@tecsinapse/react-web-kit 1.3.2 → 1.6.1

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 (337) hide show
  1. package/CHANGELOG.md +98 -0
  2. package/dist/components/atoms/Accordion/Accordion.d.ts +9 -0
  3. package/dist/components/atoms/Accordion/Accordion.js +85 -0
  4. package/dist/components/atoms/Accordion/Accordion.js.map +1 -0
  5. package/dist/components/atoms/Accordion/animations.d.ts +41 -0
  6. package/dist/components/atoms/Accordion/animations.js +65 -0
  7. package/dist/components/atoms/Accordion/animations.js.map +1 -0
  8. package/dist/components/atoms/Accordion/index.d.ts +1 -0
  9. package/dist/components/atoms/Accordion/index.js +24 -0
  10. package/dist/components/atoms/Accordion/index.js.map +1 -0
  11. package/dist/components/atoms/Accordion/styled.d.ts +8 -0
  12. package/dist/components/atoms/Accordion/styled.js +53 -0
  13. package/dist/components/atoms/Accordion/styled.js.map +1 -0
  14. package/dist/components/atoms/Badge/index.js +2 -2
  15. package/dist/components/atoms/Button/index.js +2 -2
  16. package/dist/components/atoms/Button/styled.js +14 -5
  17. package/dist/components/atoms/Button/styled.js.map +1 -1
  18. package/dist/components/atoms/Input/index.js +2 -2
  19. package/dist/components/atoms/Modal/Modal.d.ts +8 -0
  20. package/dist/components/atoms/Modal/Modal.js +43 -0
  21. package/dist/components/atoms/Modal/Modal.js.map +1 -0
  22. package/dist/components/atoms/Modal/animations.d.ts +23 -0
  23. package/dist/components/atoms/Modal/animations.js +32 -0
  24. package/dist/components/atoms/Modal/animations.js.map +1 -0
  25. package/dist/components/atoms/Modal/index.d.ts +1 -0
  26. package/dist/components/atoms/Modal/index.js +24 -0
  27. package/dist/components/atoms/Modal/index.js.map +1 -0
  28. package/dist/components/atoms/Modal/styled.d.ts +2 -0
  29. package/dist/components/atoms/Modal/styled.js +39 -0
  30. package/dist/components/atoms/Modal/styled.js.map +1 -0
  31. package/dist/components/atoms/Overlay/Overlay.d.ts +10 -0
  32. package/dist/components/atoms/Overlay/Overlay.js +40 -0
  33. package/dist/components/atoms/Overlay/Overlay.js.map +1 -0
  34. package/dist/components/atoms/Overlay/animations.d.ts +18 -0
  35. package/dist/components/atoms/Overlay/animations.js +27 -0
  36. package/dist/components/atoms/Overlay/animations.js.map +1 -0
  37. package/dist/components/atoms/Overlay/index.d.ts +1 -0
  38. package/dist/components/atoms/Overlay/index.js +16 -0
  39. package/dist/components/atoms/Overlay/index.js.map +1 -0
  40. package/dist/components/atoms/Overlay/styled.d.ts +2 -0
  41. package/dist/components/atoms/Overlay/styled.js +36 -0
  42. package/dist/components/atoms/Overlay/styled.js.map +1 -0
  43. package/dist/components/atoms/Skeleton/Skeleton.d.ts +10 -0
  44. package/dist/components/atoms/Skeleton/Skeleton.js +35 -0
  45. package/dist/components/atoms/Skeleton/Skeleton.js.map +1 -0
  46. package/dist/components/atoms/Skeleton/index.d.ts +1 -0
  47. package/dist/components/atoms/Skeleton/index.js +24 -0
  48. package/dist/components/atoms/Skeleton/index.js.map +1 -0
  49. package/dist/components/atoms/Skeleton/styled.d.ts +5 -0
  50. package/dist/components/atoms/Skeleton/styled.js +79 -0
  51. package/dist/components/atoms/Skeleton/styled.js.map +1 -0
  52. package/dist/components/atoms/Table/Body/TBody.d.ts +3 -0
  53. package/dist/components/atoms/Table/Body/TBody.js +22 -0
  54. package/dist/components/atoms/Table/Body/TBody.js.map +1 -0
  55. package/dist/components/atoms/Table/Body/index.d.ts +1 -0
  56. package/dist/components/atoms/Table/Body/index.js +16 -0
  57. package/dist/components/atoms/Table/Body/index.js.map +1 -0
  58. package/dist/components/atoms/Table/Cell/Td.d.ts +3 -0
  59. package/dist/components/atoms/Table/Cell/Td.js +23 -0
  60. package/dist/components/atoms/Table/Cell/Td.js.map +1 -0
  61. package/dist/components/atoms/Table/Cell/index.d.ts +1 -0
  62. package/dist/components/atoms/Table/Cell/index.js +16 -0
  63. package/dist/components/atoms/Table/Cell/index.js.map +1 -0
  64. package/dist/components/atoms/Table/Cell/styled.d.ts +2 -0
  65. package/dist/components/atoms/Table/Cell/styled.js +34 -0
  66. package/dist/components/atoms/Table/Cell/styled.js.map +1 -0
  67. package/dist/components/atoms/Table/Container/TableContainer.d.ts +3 -0
  68. package/dist/components/atoms/Table/Container/TableContainer.js +23 -0
  69. package/dist/components/atoms/Table/Container/TableContainer.js.map +1 -0
  70. package/dist/components/atoms/Table/Container/index.d.ts +1 -0
  71. package/dist/components/atoms/Table/Container/index.js +16 -0
  72. package/dist/components/atoms/Table/Container/index.js.map +1 -0
  73. package/dist/components/atoms/Table/Container/styled.d.ts +2 -0
  74. package/dist/components/atoms/Table/Container/styled.js +30 -0
  75. package/dist/components/atoms/Table/Container/styled.js.map +1 -0
  76. package/dist/components/atoms/Table/Footer/TFoot.d.ts +3 -0
  77. package/dist/components/atoms/Table/Footer/TFoot.js +24 -0
  78. package/dist/components/atoms/Table/Footer/TFoot.js.map +1 -0
  79. package/dist/components/atoms/Table/Footer/index.d.ts +1 -0
  80. package/dist/components/atoms/Table/Footer/index.js +16 -0
  81. package/dist/components/atoms/Table/Footer/index.js.map +1 -0
  82. package/dist/components/atoms/Table/Footer/styled.d.ts +5 -0
  83. package/dist/components/atoms/Table/Footer/styled.js +19 -0
  84. package/dist/components/atoms/Table/Footer/styled.js.map +1 -0
  85. package/dist/components/atoms/Table/Header/THead.d.ts +3 -0
  86. package/dist/components/atoms/Table/Header/THead.js +27 -0
  87. package/dist/components/atoms/Table/Header/THead.js.map +1 -0
  88. package/dist/components/atoms/Table/Header/Th.d.ts +3 -0
  89. package/dist/components/atoms/Table/Header/Th.js +24 -0
  90. package/dist/components/atoms/Table/Header/Th.js.map +1 -0
  91. package/dist/components/atoms/Table/Header/index.d.ts +2 -0
  92. package/dist/components/atoms/Table/Header/index.js +24 -0
  93. package/dist/components/atoms/Table/Header/index.js.map +1 -0
  94. package/dist/components/atoms/Table/Header/styled.d.ts +4 -0
  95. package/dist/components/atoms/Table/Header/styled.js +54 -0
  96. package/dist/components/atoms/Table/Header/styled.js.map +1 -0
  97. package/dist/components/atoms/Table/Row/Tr.d.ts +3 -0
  98. package/dist/components/atoms/Table/Row/Tr.js +24 -0
  99. package/dist/components/atoms/Table/Row/Tr.js.map +1 -0
  100. package/dist/components/atoms/Table/Row/index.d.ts +1 -0
  101. package/dist/components/atoms/Table/Row/index.js +16 -0
  102. package/dist/components/atoms/Table/Row/index.js.map +1 -0
  103. package/dist/components/atoms/Table/Row/styled.d.ts +2 -0
  104. package/dist/components/atoms/Table/Row/styled.js +24 -0
  105. package/dist/components/atoms/Table/Row/styled.js.map +1 -0
  106. package/dist/components/atoms/Table/Table.d.ts +3 -0
  107. package/dist/components/atoms/Table/Table.js +24 -0
  108. package/dist/components/atoms/Table/Table.js.map +1 -0
  109. package/dist/components/atoms/Table/Toolbar/TableToolbar.d.ts +8 -0
  110. package/dist/components/atoms/Table/Toolbar/TableToolbar.js +30 -0
  111. package/dist/components/atoms/Table/Toolbar/TableToolbar.js.map +1 -0
  112. package/dist/components/atoms/Table/Toolbar/index.d.ts +1 -0
  113. package/dist/components/atoms/Table/Toolbar/index.js +24 -0
  114. package/dist/components/atoms/Table/Toolbar/index.js.map +1 -0
  115. package/dist/components/atoms/Table/Toolbar/styled.d.ts +5 -0
  116. package/dist/components/atoms/Table/Toolbar/styled.js +19 -0
  117. package/dist/components/atoms/Table/Toolbar/styled.js.map +1 -0
  118. package/dist/components/atoms/Table/index.d.ts +8 -0
  119. package/dist/components/atoms/Table/index.js +84 -0
  120. package/dist/components/atoms/Table/index.js.map +1 -0
  121. package/dist/components/atoms/Table/styled.d.ts +2 -0
  122. package/dist/components/atoms/Table/styled.js +20 -0
  123. package/dist/components/atoms/Table/styled.js.map +1 -0
  124. package/dist/components/atoms/Tag/index.js +2 -2
  125. package/dist/components/molecules/Breadcrumbs/BreadcrumbItem/index.js +2 -2
  126. package/dist/components/molecules/Breadcrumbs/index.js +2 -2
  127. package/dist/components/molecules/Drawer/Drawer.js +33 -3
  128. package/dist/components/molecules/Drawer/Drawer.js.map +1 -1
  129. package/dist/components/molecules/Drawer/animations.d.ts +42 -0
  130. package/dist/components/molecules/Drawer/animations.js +77 -0
  131. package/dist/components/molecules/Drawer/animations.js.map +1 -0
  132. package/dist/components/molecules/Drawer/index.js +2 -2
  133. package/dist/components/molecules/Drawer/styled.d.ts +0 -1
  134. package/dist/components/molecules/Drawer/styled.js +4 -19
  135. package/dist/components/molecules/Drawer/styled.js.map +1 -1
  136. package/dist/components/molecules/InputPassword/InputPassword.js +2 -2
  137. package/dist/components/molecules/InputPassword/index.js +2 -2
  138. package/dist/components/molecules/Menubar/MenuBlock/MenuBlock.d.ts +4 -3
  139. package/dist/components/molecules/Menubar/MenuBlock/MenuBlock.js +14 -5
  140. package/dist/components/molecules/Menubar/MenuBlock/MenuBlock.js.map +1 -1
  141. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.d.ts +1 -0
  142. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js +6 -3
  143. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js.map +1 -1
  144. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/SubMenuBlock.d.ts +1 -0
  145. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/SubMenuBlock.js +4 -2
  146. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/SubMenuBlock.js.map +1 -1
  147. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/styled.js +3 -0
  148. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/styled.js.map +1 -1
  149. package/dist/components/molecules/Menubar/Menubar.d.ts +3 -2
  150. package/dist/components/molecules/Menubar/Menubar.js +33 -21
  151. package/dist/components/molecules/Menubar/Menubar.js.map +1 -1
  152. package/dist/components/molecules/Menubar/MostUsed/MostUsed.d.ts +3 -2
  153. package/dist/components/molecules/Menubar/MostUsed/MostUsed.js +6 -3
  154. package/dist/components/molecules/Menubar/MostUsed/MostUsed.js.map +1 -1
  155. package/dist/components/molecules/Menubar/animations.d.ts +4 -0
  156. package/dist/components/molecules/Menubar/animations.js +63 -0
  157. package/dist/components/molecules/Menubar/animations.js.map +1 -0
  158. package/dist/components/molecules/Menubar/index.js +2 -2
  159. package/dist/components/molecules/Menubar/styled.js +14 -1
  160. package/dist/components/molecules/Menubar/styled.js.map +1 -1
  161. package/dist/components/molecules/Menubar/types.js +4 -0
  162. package/dist/components/molecules/Select/Dropdown/Dropdown.d.ts +7 -0
  163. package/dist/components/molecules/Select/Dropdown/Dropdown.js +90 -0
  164. package/dist/components/molecules/Select/Dropdown/Dropdown.js.map +1 -0
  165. package/dist/components/molecules/Select/Dropdown/index.d.ts +1 -0
  166. package/dist/components/molecules/Select/Dropdown/index.js +16 -0
  167. package/dist/components/molecules/Select/Dropdown/index.js.map +1 -0
  168. package/dist/components/molecules/Select/Dropdown/styled.d.ts +13 -0
  169. package/dist/components/molecules/Select/Dropdown/styled.js +113 -0
  170. package/dist/components/molecules/Select/Dropdown/styled.js.map +1 -0
  171. package/dist/components/molecules/Select/Select.d.ts +15 -0
  172. package/dist/components/molecules/Select/Select.js +85 -0
  173. package/dist/components/molecules/Select/Select.js.map +1 -0
  174. package/dist/components/molecules/Select/SelectItem/SelectItem.d.ts +16 -0
  175. package/dist/components/molecules/Select/SelectItem/SelectItem.js +76 -0
  176. package/dist/components/molecules/Select/SelectItem/SelectItem.js.map +1 -0
  177. package/dist/components/molecules/Select/SelectItem/index.d.ts +1 -0
  178. package/dist/components/molecules/Select/SelectItem/index.js +16 -0
  179. package/dist/components/molecules/Select/SelectItem/index.js.map +1 -0
  180. package/dist/components/molecules/Select/SelectItem/styled.d.ts +4 -0
  181. package/dist/components/molecules/Select/SelectItem/styled.js +54 -0
  182. package/dist/components/molecules/Select/SelectItem/styled.js.map +1 -0
  183. package/dist/components/molecules/Select/animations.d.ts +27 -0
  184. package/dist/components/molecules/Select/animations.js +36 -0
  185. package/dist/components/molecules/Select/animations.js.map +1 -0
  186. package/dist/components/molecules/Select/functions.d.ts +1 -0
  187. package/dist/components/molecules/Select/functions.js +21 -0
  188. package/dist/components/molecules/Select/functions.js.map +1 -0
  189. package/dist/components/molecules/Select/index.d.ts +1 -0
  190. package/dist/components/molecules/Select/index.js +24 -0
  191. package/dist/components/molecules/Select/index.js.map +1 -0
  192. package/dist/components/molecules/Select/styled.d.ts +3 -0
  193. package/dist/components/molecules/Select/styled.js +28 -0
  194. package/dist/components/molecules/Select/styled.js.map +1 -0
  195. package/dist/components/molecules/Snackbar/index.js +2 -2
  196. package/dist/components/molecules/Snackbar/styled.js +2 -2
  197. package/dist/components/organisms/DataGrid/DataGrid.d.ts +28 -0
  198. package/dist/components/organisms/DataGrid/DataGrid.js +121 -0
  199. package/dist/components/organisms/DataGrid/DataGrid.js.map +1 -0
  200. package/dist/components/organisms/DataGrid/Footer/Footer.d.ts +15 -0
  201. package/dist/components/organisms/DataGrid/Footer/Footer.js +107 -0
  202. package/dist/components/organisms/DataGrid/Footer/Footer.js.map +1 -0
  203. package/dist/components/organisms/DataGrid/Footer/index.d.ts +1 -0
  204. package/dist/components/organisms/DataGrid/Footer/index.js +16 -0
  205. package/dist/components/organisms/DataGrid/Footer/index.js.map +1 -0
  206. package/dist/components/organisms/DataGrid/Footer/styled.d.ts +35 -0
  207. package/dist/components/organisms/DataGrid/Footer/styled.js +91 -0
  208. package/dist/components/organisms/DataGrid/Footer/styled.js.map +1 -0
  209. package/dist/components/organisms/DataGrid/Header/Header.d.ts +12 -0
  210. package/dist/components/organisms/DataGrid/Header/Header.js +88 -0
  211. package/dist/components/organisms/DataGrid/Header/Header.js.map +1 -0
  212. package/dist/components/organisms/DataGrid/Header/index.d.ts +1 -0
  213. package/dist/components/organisms/DataGrid/Header/index.js +16 -0
  214. package/dist/components/organisms/DataGrid/Header/index.js.map +1 -0
  215. package/dist/components/organisms/DataGrid/Header/styled.d.ts +1 -0
  216. package/dist/components/organisms/DataGrid/Header/styled.js +23 -0
  217. package/dist/components/organisms/DataGrid/Header/styled.js.map +1 -0
  218. package/dist/components/organisms/DataGrid/Header/utils.d.ts +10 -0
  219. package/dist/components/organisms/DataGrid/Header/utils.js +30 -0
  220. package/dist/components/organisms/DataGrid/Header/utils.js.map +1 -0
  221. package/dist/components/organisms/DataGrid/Row/Row.d.ts +10 -0
  222. package/dist/components/organisms/DataGrid/Row/Row.js +42 -0
  223. package/dist/components/organisms/DataGrid/Row/Row.js.map +1 -0
  224. package/dist/components/organisms/DataGrid/Row/index.d.ts +1 -0
  225. package/dist/components/organisms/DataGrid/Row/index.js +16 -0
  226. package/dist/components/organisms/DataGrid/Row/index.js.map +1 -0
  227. package/dist/components/organisms/DataGrid/index.d.ts +2 -0
  228. package/dist/components/organisms/DataGrid/index.js +42 -0
  229. package/dist/components/organisms/DataGrid/index.js.map +1 -0
  230. package/dist/components/organisms/DataGrid/styled.d.ts +1 -0
  231. package/dist/components/organisms/DataGrid/styled.js +23 -0
  232. package/dist/components/organisms/DataGrid/styled.js.map +1 -0
  233. package/dist/components/organisms/DataGrid/types.d.ts +7 -0
  234. package/dist/components/organisms/DataGrid/types.js +6 -0
  235. package/dist/components/organisms/DataGrid/types.js.map +1 -0
  236. package/dist/components/organisms/DataGrid/utils.d.ts +2 -0
  237. package/dist/components/organisms/DataGrid/utils.js +18 -0
  238. package/dist/components/organisms/DataGrid/utils.js.map +1 -0
  239. package/dist/hooks/index.d.ts +1 -0
  240. package/dist/hooks/index.js +14 -0
  241. package/dist/hooks/index.js.map +1 -0
  242. package/dist/hooks/useClickAwayListener.d.ts +2 -0
  243. package/dist/hooks/useClickAwayListener.js +28 -0
  244. package/dist/hooks/useClickAwayListener.js.map +1 -0
  245. package/dist/index.d.ts +6 -0
  246. package/dist/index.js +104 -3
  247. package/dist/index.js.map +1 -1
  248. package/package.json +7 -6
  249. package/src/components/atoms/Accordion/Accordion.stories.tsx +35 -0
  250. package/src/components/atoms/Accordion/Accordion.tsx +99 -0
  251. package/src/components/atoms/Accordion/animations.ts +51 -0
  252. package/src/components/atoms/Accordion/index.ts +1 -0
  253. package/src/components/atoms/Accordion/styled.ts +35 -0
  254. package/src/components/atoms/Button/styled.ts +11 -1
  255. package/src/components/atoms/Modal/Modal.stories.tsx +55 -0
  256. package/src/components/atoms/Modal/Modal.tsx +34 -0
  257. package/src/components/atoms/Modal/animations.ts +12 -0
  258. package/src/components/atoms/Modal/index.ts +1 -0
  259. package/src/components/atoms/Modal/styled.ts +17 -0
  260. package/src/components/atoms/Overlay/Overlay.tsx +40 -0
  261. package/src/components/atoms/Overlay/animations.ts +11 -0
  262. package/src/components/atoms/Overlay/index.ts +1 -0
  263. package/src/components/atoms/Overlay/styled.ts +20 -0
  264. package/src/components/atoms/Skeleton/Skeleton.stories.tsx +15 -0
  265. package/src/components/atoms/Skeleton/Skeleton.tsx +37 -0
  266. package/src/components/atoms/Skeleton/index.ts +1 -0
  267. package/src/components/atoms/Skeleton/styled.ts +68 -0
  268. package/src/components/atoms/Table/Body/TBody.tsx +10 -0
  269. package/src/components/atoms/Table/Body/index.ts +1 -0
  270. package/src/components/atoms/Table/Cell/Td.tsx +11 -0
  271. package/src/components/atoms/Table/Cell/index.ts +1 -0
  272. package/src/components/atoms/Table/Cell/styled.ts +12 -0
  273. package/src/components/atoms/Table/Container/TableContainer.tsx +11 -0
  274. package/src/components/atoms/Table/Container/index.ts +1 -0
  275. package/src/components/atoms/Table/Container/styled.ts +10 -0
  276. package/src/components/atoms/Table/Footer/TFoot.tsx +11 -0
  277. package/src/components/atoms/Table/Footer/index.ts +1 -0
  278. package/src/components/atoms/Table/Footer/styled.ts +8 -0
  279. package/src/components/atoms/Table/Header/THead.tsx +21 -0
  280. package/src/components/atoms/Table/Header/Th.tsx +10 -0
  281. package/src/components/atoms/Table/Header/index.ts +2 -0
  282. package/src/components/atoms/Table/Header/styled.ts +30 -0
  283. package/src/components/atoms/Table/Row/Tr.tsx +11 -0
  284. package/src/components/atoms/Table/Row/index.ts +1 -0
  285. package/src/components/atoms/Table/Row/styled.ts +8 -0
  286. package/src/components/atoms/Table/Table.stories.tsx +96 -0
  287. package/src/components/atoms/Table/Table.tsx +11 -0
  288. package/src/components/atoms/Table/Toolbar/TableToolbar.tsx +31 -0
  289. package/src/components/atoms/Table/Toolbar/index.ts +1 -0
  290. package/src/components/atoms/Table/Toolbar/styled.ts +8 -0
  291. package/src/components/atoms/Table/index.ts +8 -0
  292. package/src/components/atoms/Table/styled.ts +9 -0
  293. package/src/components/molecules/Drawer/Drawer.stories.tsx +19 -21
  294. package/src/components/molecules/Drawer/Drawer.tsx +34 -6
  295. package/src/components/molecules/Drawer/animations.ts +50 -0
  296. package/src/components/molecules/Drawer/styled.ts +3 -12
  297. package/src/components/molecules/InputPassword/InputPassword.stories.tsx +1 -1
  298. package/src/components/molecules/Menubar/MenuBlock/MenuBlock.tsx +38 -31
  299. package/src/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.tsx +4 -2
  300. package/src/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/SubMenuBlock.tsx +3 -2
  301. package/src/components/molecules/Menubar/MenuBlock/MenuItem/styled.ts +3 -0
  302. package/src/components/molecules/Menubar/Menubar.stories.tsx +20 -13
  303. package/src/components/molecules/Menubar/Menubar.tsx +65 -51
  304. package/src/components/molecules/Menubar/MostUsed/MostUsed.tsx +4 -2
  305. package/src/components/molecules/Menubar/animations.ts +64 -0
  306. package/src/components/molecules/Menubar/styled.ts +8 -1
  307. package/src/components/molecules/Select/Dropdown/Dropdown.tsx +106 -0
  308. package/src/components/molecules/Select/Dropdown/index.ts +1 -0
  309. package/src/components/molecules/Select/Dropdown/styled.ts +77 -0
  310. package/src/components/molecules/Select/Select.stories.tsx +108 -0
  311. package/src/components/molecules/Select/Select.tsx +92 -0
  312. package/src/components/molecules/Select/SelectItem/SelectItem.tsx +88 -0
  313. package/src/components/molecules/Select/SelectItem/index.ts +1 -0
  314. package/src/components/molecules/Select/SelectItem/styled.ts +34 -0
  315. package/src/components/molecules/Select/animations.ts +18 -0
  316. package/src/components/molecules/Select/functions.ts +32 -0
  317. package/src/components/molecules/Select/index.ts +1 -0
  318. package/src/components/molecules/Select/styled.ts +16 -0
  319. package/src/components/molecules/Snackbar/Snackbar.stories.tsx +24 -0
  320. package/src/components/organisms/DataGrid/DatGrid.stories.tsx +216 -0
  321. package/src/components/organisms/DataGrid/DataGrid.tsx +183 -0
  322. package/src/components/organisms/DataGrid/Footer/Footer.tsx +137 -0
  323. package/src/components/organisms/DataGrid/Footer/index.ts +1 -0
  324. package/src/components/organisms/DataGrid/Footer/styled.ts +59 -0
  325. package/src/components/organisms/DataGrid/Header/Header.tsx +111 -0
  326. package/src/components/organisms/DataGrid/Header/index.ts +1 -0
  327. package/src/components/organisms/DataGrid/Header/styled.ts +10 -0
  328. package/src/components/organisms/DataGrid/Header/utils.ts +28 -0
  329. package/src/components/organisms/DataGrid/Row/Row.tsx +33 -0
  330. package/src/components/organisms/DataGrid/Row/index.ts +1 -0
  331. package/src/components/organisms/DataGrid/index.ts +2 -0
  332. package/src/components/organisms/DataGrid/styled.ts +10 -0
  333. package/src/components/organisms/DataGrid/types.ts +11 -0
  334. package/src/components/organisms/DataGrid/utils.ts +15 -0
  335. package/src/hooks/index.ts +1 -0
  336. package/src/hooks/useClickAwayListener.ts +18 -0
  337. package/src/index.ts +10 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/atoms/Table/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA","sourcesContent":["export { TBody } from './Body';\nexport { Td } from './Cell';\nexport { TableContainer } from './Container';\nexport { TFoot } from './Footer';\nexport { THead, Th } from './Header';\nexport { Tr } from './Row';\nexport { TableToolbar, TableToolbarProps } from './Toolbar';\nexport { default as Table } from './Table';\n"],"file":"index.js"}
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const TableStyled: import("@emotion/styled").StyledComponent<any, import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, {}>;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.TableStyled = void 0;
7
+
8
+ var _styled = _interopRequireDefault(require("@emotion/styled"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ const TableStyled = (0, _styled.default)('table')`
13
+ width: 100%;
14
+ min-width: 200px;
15
+ border-spacing: ${({
16
+ theme
17
+ }) => `${theme.spacing.kilo} ${theme.spacing.mili}`};
18
+ `;
19
+ exports.TableStyled = TableStyled;
20
+ //# sourceMappingURL=styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/atoms/Table/styled.ts"],"names":["TableStyled","theme","spacing","kilo","mili"],"mappings":";;;;;;;AAAA;;;;AAGO,MAAMA,WAAW,GAAG,qBAAO,OAAP,CAAqC;AAChE;AACA;AACA,oBAAoB,CAAC;AAAEC,EAAAA;AAAF,CAAD,KACf,GAAEA,KAAK,CAACC,OAAN,CAAcC,IAAK,IAAGF,KAAK,CAACC,OAAN,CAAcE,IAAK,EAAE;AAClD,CALO","sourcesContent":["import styled from '@emotion/styled';\nimport { StyleProps } from '@tecsinapse/react-core';\n\nexport const TableStyled = styled('table')<Partial<StyleProps>>`\n width: 100%;\n min-width: 200px;\n border-spacing: ${({ theme }) =>\n `${theme.spacing.kilo} ${theme.spacing.mili}`};\n`;\n"],"file":"styled.js"}
@@ -18,7 +18,7 @@ Object.defineProperty(exports, "TagProps", {
18
18
 
19
19
  var _Tag = _interopRequireWildcard(require("./Tag"));
20
20
 
21
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
21
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
22
22
 
23
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
24
24
  //# sourceMappingURL=index.js.map
@@ -27,7 +27,7 @@ Object.keys(_BreadcrumbItem).forEach(function (key) {
27
27
  });
28
28
  });
29
29
 
30
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
30
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
31
31
 
32
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
32
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
33
33
  //# sourceMappingURL=index.js.map
@@ -18,7 +18,7 @@ Object.defineProperty(exports, "BreadcrumbsProps", {
18
18
 
19
19
  var _Breadcrumbs = _interopRequireWildcard(require("./Breadcrumbs"));
20
20
 
21
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
21
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
22
22
 
23
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
24
24
  //# sourceMappingURL=index.js.map
@@ -9,6 +9,12 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _styled = require("./styled");
11
11
 
12
+ var _reactTransitionGroup = require("react-transition-group");
13
+
14
+ var _Overlay = require("../../atoms/Overlay");
15
+
16
+ var _animations = require("./animations");
17
+
12
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
19
 
14
20
  const Drawer = ({
@@ -17,9 +23,33 @@ const Drawer = ({
17
23
  onClose,
18
24
  children
19
25
  }) => {
20
- return _react.default.createElement(_react.default.Fragment, null, open && _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_styled.StyledOverlay, {
21
- onClick: onClose
22
- }), _react.default.createElement(_styled.StyledContainerDrawer, {
26
+ const getStyles = (anchorPosition, state) => {
27
+ const stylesLeftRight = (0, _animations.defaultStylesLeftRight)(anchorPosition);
28
+ const transitionLeftRight = (0, _animations.transitionStylesLeftRight)(anchorPosition);
29
+ const stylesTopBottom = (0, _animations.defaultStylesTopBottom)(anchorPosition);
30
+ const transitionTopBottom = (0, _animations.transitionStylesTopBottom)(anchorPosition);
31
+
32
+ if (['left', 'right'].includes(anchorPosition)) {
33
+ return { ...stylesLeftRight,
34
+ ...transitionLeftRight[state]
35
+ };
36
+ } else {
37
+ return { ...stylesTopBottom,
38
+ ...transitionTopBottom[state]
39
+ };
40
+ }
41
+ };
42
+
43
+ return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_Overlay.Overlay, {
44
+ timeout: 300,
45
+ open: open,
46
+ onClose: onClose,
47
+ zIndex: "drawer"
48
+ }), _react.default.createElement(_reactTransitionGroup.Transition, {
49
+ in: open,
50
+ timeout: 300
51
+ }, state => _react.default.createElement(_styled.StyledContainerDrawer, {
52
+ style: getStyles(anchorPosition, state),
23
53
  anchorPosition: anchorPosition,
24
54
  onClose: onClose,
25
55
  open: open
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/molecules/Drawer/Drawer.tsx"],"names":["Drawer","open","anchorPosition","onClose","children"],"mappings":";;;;;;;AAAA;;AACA;;;;AAQA,MAAMA,MAAuB,GAAG,CAAC;AAC/BC,EAAAA,IAD+B;AAE/BC,EAAAA,cAAc,GAAG,OAFc;AAG/BC,EAAAA,OAH+B;AAI/BC,EAAAA;AAJ+B,CAAD,KAK1B;AACJ,SACE,4DACGH,IAAI,IACH,4DACE,6BAAC,qBAAD;AAAe,IAAA,OAAO,EAAEE;AAAxB,IADF,EAEE,6BAAC,6BAAD;AACE,IAAA,cAAc,EAAED,cADlB;AAEE,IAAA,OAAO,EAAEC,OAFX;AAGE,IAAA,IAAI,EAAEF;AAHR,KAKGG,QALH,CAFF,CAFJ,CADF;AAgBD,CAtBD;;eAwBeJ,M","sourcesContent":["import React, { FC } from 'react';\nimport { StyledContainerDrawer, StyledOverlay } from './styled';\n\nexport interface DrawerProps {\n open: boolean;\n onClose: () => void;\n anchorPosition: 'left' | 'right' | 'top' | 'bottom';\n}\n\nconst Drawer: FC<DrawerProps> = ({\n open,\n anchorPosition = 'right',\n onClose,\n children,\n}) => {\n return (\n <>\n {open && (\n <>\n <StyledOverlay onClick={onClose} />\n <StyledContainerDrawer\n anchorPosition={anchorPosition}\n onClose={onClose}\n open={open}\n >\n {children}\n </StyledContainerDrawer>\n </>\n )}\n </>\n );\n};\n\nexport default Drawer;\n"],"file":"Drawer.js"}
1
+ {"version":3,"sources":["../../../../src/components/molecules/Drawer/Drawer.tsx"],"names":["Drawer","open","anchorPosition","onClose","children","getStyles","state","stylesLeftRight","transitionLeftRight","stylesTopBottom","transitionTopBottom","includes"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AAaA,MAAMA,MAAuB,GAAG,CAAC;AAC/BC,EAAAA,IAD+B;AAE/BC,EAAAA,cAAc,GAAG,OAFc;AAG/BC,EAAAA,OAH+B;AAI/BC,EAAAA;AAJ+B,CAAD,KAK1B;AACJ,QAAMC,SAAS,GAAG,CAACH,cAAD,EAAyBI,KAAzB,KAAwC;AACxD,UAAMC,eAAe,GAAG,wCAAuBL,cAAvB,CAAxB;AACA,UAAMM,mBAAmB,GAAG,2CAA0BN,cAA1B,CAA5B;AACA,UAAMO,eAAe,GAAG,wCAAuBP,cAAvB,CAAxB;AACA,UAAMQ,mBAAmB,GAAG,2CAA0BR,cAA1B,CAA5B;;AAEA,QAAI,CAAC,MAAD,EAAS,OAAT,EAAkBS,QAAlB,CAA2BT,cAA3B,CAAJ,EAAgD;AAC9C,aAAO,EACL,GAAGK,eADE;AAEL,WAAGC,mBAAmB,CAACF,KAAD;AAFjB,OAAP;AAID,KALD,MAKO;AACL,aAAO,EACL,GAAGG,eADE;AAEL,WAAGC,mBAAmB,CAACJ,KAAD;AAFjB,OAAP;AAID;AACF,GAjBD;;AAmBA,SACE,4DACE,6BAAC,gBAAD;AAAS,IAAA,OAAO,EAAE,GAAlB;AAAuB,IAAA,IAAI,EAAEL,IAA7B;AAAmC,IAAA,OAAO,EAAEE,OAA5C;AAAqD,IAAA,MAAM,EAAC;AAA5D,IADF,EAEE,6BAAC,gCAAD;AAAY,IAAA,EAAE,EAAEF,IAAhB;AAAsB,IAAA,OAAO,EAAE;AAA/B,KACGK,KAAK,IACJ,6BAAC,6BAAD;AACE,IAAA,KAAK,EAAED,SAAS,CAACH,cAAD,EAAiBI,KAAjB,CADlB;AAEE,IAAA,cAAc,EAAEJ,cAFlB;AAGE,IAAA,OAAO,EAAEC,OAHX;AAIE,IAAA,IAAI,EAAEF;AAJR,KAMGG,QANH,CAFJ,CAFF,CADF;AAiBD,CA1CD;;eA4CeJ,M","sourcesContent":["import React, { FC } from 'react';\nimport { StyledContainerDrawer } from './styled';\nimport { Transition } from 'react-transition-group';\nimport { Overlay } from '../../atoms/Overlay';\nimport {\n transitionStylesTopBottom,\n defaultStylesTopBottom,\n defaultStylesLeftRight,\n transitionStylesLeftRight,\n} from './animations';\n\nexport interface DrawerProps {\n open: boolean;\n onClose: () => void;\n anchorPosition: 'left' | 'right' | 'top' | 'bottom';\n}\n\nconst Drawer: FC<DrawerProps> = ({\n open,\n anchorPosition = 'right',\n onClose,\n children,\n}) => {\n const getStyles = (anchorPosition: string, state: any) => {\n const stylesLeftRight = defaultStylesLeftRight(anchorPosition);\n const transitionLeftRight = transitionStylesLeftRight(anchorPosition);\n const stylesTopBottom = defaultStylesTopBottom(anchorPosition);\n const transitionTopBottom = transitionStylesTopBottom(anchorPosition);\n\n if (['left', 'right'].includes(anchorPosition)) {\n return {\n ...stylesLeftRight,\n ...transitionLeftRight[state],\n };\n } else {\n return {\n ...stylesTopBottom,\n ...transitionTopBottom[state],\n };\n }\n };\n\n return (\n <>\n <Overlay timeout={300} open={open} onClose={onClose} zIndex=\"drawer\" />\n <Transition in={open} timeout={300}>\n {state => (\n <StyledContainerDrawer\n style={getStyles(anchorPosition, state)}\n anchorPosition={anchorPosition}\n onClose={onClose}\n open={open}\n >\n {children}\n </StyledContainerDrawer>\n )}\n </Transition>\n </>\n );\n};\n\nexport default Drawer;\n"],"file":"Drawer.js"}
@@ -0,0 +1,42 @@
1
+ export declare const transformLeftRigthClose: (anchorPosition: string) => "translateX(100%)" | "translateX(-100%)";
2
+ export declare const transformLeftRigthOpen = "translateX(0)";
3
+ export declare const transformTopBottomClose: (anchorPosition: string) => "translateY(-100%)" | "translateY(100%)";
4
+ export declare const transformTopBottomOpen = "translateY(0%)";
5
+ export declare const defaultStylesLeftRight: (anchorPosition: string) => {
6
+ transition: string;
7
+ transform: () => "translateX(100%)" | "translateX(-100%)";
8
+ overflow: string;
9
+ };
10
+ export declare const transitionStylesLeftRight: (anchorPosition: string) => {
11
+ entering: {
12
+ transform: string;
13
+ };
14
+ entered: {
15
+ transform: string;
16
+ };
17
+ exiting: {
18
+ transform: string;
19
+ };
20
+ exited: {
21
+ transform: string;
22
+ };
23
+ };
24
+ export declare const defaultStylesTopBottom: (anchorPosition: string) => {
25
+ transition: string;
26
+ transform: string;
27
+ overflow: string;
28
+ };
29
+ export declare const transitionStylesTopBottom: (anchorPosition: string) => {
30
+ entering: {
31
+ transform: string;
32
+ };
33
+ entered: {
34
+ transform: string;
35
+ };
36
+ exiting: {
37
+ transform: string;
38
+ };
39
+ exited: {
40
+ transform: string;
41
+ };
42
+ };
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.transitionStylesTopBottom = exports.defaultStylesTopBottom = exports.transitionStylesLeftRight = exports.defaultStylesLeftRight = exports.transformTopBottomOpen = exports.transformTopBottomClose = exports.transformLeftRigthOpen = exports.transformLeftRigthClose = void 0;
7
+
8
+ const transformLeftRigthClose = anchorPosition => anchorPosition === 'right' ? 'translateX(100%)' : 'translateX(-100%)';
9
+
10
+ exports.transformLeftRigthClose = transformLeftRigthClose;
11
+ const transformLeftRigthOpen = 'translateX(0)';
12
+ exports.transformLeftRigthOpen = transformLeftRigthOpen;
13
+
14
+ const transformTopBottomClose = anchorPosition => anchorPosition === 'top' ? 'translateY(-100%)' : 'translateY(100%)';
15
+
16
+ exports.transformTopBottomClose = transformTopBottomClose;
17
+ const transformTopBottomOpen = 'translateY(0%)';
18
+ exports.transformTopBottomOpen = transformTopBottomOpen;
19
+
20
+ const defaultStylesLeftRight = anchorPosition => {
21
+ return {
22
+ transition: 'transform 300ms ease-in-out',
23
+ transform: () => transformLeftRigthClose(anchorPosition),
24
+ overflow: 'hidden'
25
+ };
26
+ };
27
+
28
+ exports.defaultStylesLeftRight = defaultStylesLeftRight;
29
+
30
+ const transitionStylesLeftRight = anchorPosition => {
31
+ return {
32
+ entering: {
33
+ transform: transformLeftRigthClose(anchorPosition)
34
+ },
35
+ entered: {
36
+ transform: transformLeftRigthOpen
37
+ },
38
+ exiting: {
39
+ transform: transformLeftRigthOpen
40
+ },
41
+ exited: {
42
+ transform: transformLeftRigthClose(anchorPosition)
43
+ }
44
+ };
45
+ };
46
+
47
+ exports.transitionStylesLeftRight = transitionStylesLeftRight;
48
+
49
+ const defaultStylesTopBottom = anchorPosition => {
50
+ return {
51
+ transition: 'transform 300ms ease-in-out',
52
+ transform: transformTopBottomClose(anchorPosition),
53
+ overflow: 'hidden'
54
+ };
55
+ };
56
+
57
+ exports.defaultStylesTopBottom = defaultStylesTopBottom;
58
+
59
+ const transitionStylesTopBottom = anchorPosition => {
60
+ return {
61
+ entering: {
62
+ transform: transformTopBottomClose(anchorPosition)
63
+ },
64
+ entered: {
65
+ transform: transformTopBottomOpen
66
+ },
67
+ exiting: {
68
+ transform: transformTopBottomOpen
69
+ },
70
+ exited: {
71
+ transform: transformTopBottomClose(anchorPosition)
72
+ }
73
+ };
74
+ };
75
+
76
+ exports.transitionStylesTopBottom = transitionStylesTopBottom;
77
+ //# sourceMappingURL=animations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/molecules/Drawer/animations.ts"],"names":["transformLeftRigthClose","anchorPosition","transformLeftRigthOpen","transformTopBottomClose","transformTopBottomOpen","defaultStylesLeftRight","transition","transform","overflow","transitionStylesLeftRight","entering","entered","exiting","exited","defaultStylesTopBottom","transitionStylesTopBottom"],"mappings":";;;;;;;AAAO,MAAMA,uBAAuB,GAAIC,cAAD,IACrCA,cAAc,KAAK,OAAnB,GAA6B,kBAA7B,GAAkD,mBAD7C;;;AAGA,MAAMC,sBAAsB,GAAG,eAA/B;;;AAEA,MAAMC,uBAAuB,GAAIF,cAAD,IACrCA,cAAc,KAAK,KAAnB,GAA2B,mBAA3B,GAAiD,kBAD5C;;;AAGA,MAAMG,sBAAsB,GAAG,gBAA/B;;;AAEA,MAAMC,sBAAsB,GAAIJ,cAAD,IAA4B;AAChE,SAAO;AACLK,IAAAA,UAAU,EAAE,6BADP;AAELC,IAAAA,SAAS,EAAE,MAAMP,uBAAuB,CAACC,cAAD,CAFnC;AAGLO,IAAAA,QAAQ,EAAE;AAHL,GAAP;AAKD,CANM;;;;AAQA,MAAMC,yBAAyB,GAAIR,cAAD,IAA4B;AACnE,SAAO;AACLS,IAAAA,QAAQ,EAAE;AAAEH,MAAAA,SAAS,EAAEP,uBAAuB,CAACC,cAAD;AAApC,KADL;AAELU,IAAAA,OAAO,EAAE;AACPJ,MAAAA,SAAS,EAAEL;AADJ,KAFJ;AAKLU,IAAAA,OAAO,EAAE;AACPL,MAAAA,SAAS,EAAEL;AADJ,KALJ;AAQLW,IAAAA,MAAM,EAAE;AAAEN,MAAAA,SAAS,EAAEP,uBAAuB,CAACC,cAAD;AAApC;AARH,GAAP;AAUD,CAXM;;;;AAaA,MAAMa,sBAAsB,GAAIb,cAAD,IAA4B;AAChE,SAAO;AACLK,IAAAA,UAAU,EAAE,6BADP;AAELC,IAAAA,SAAS,EAAEJ,uBAAuB,CAACF,cAAD,CAF7B;AAGLO,IAAAA,QAAQ,EAAE;AAHL,GAAP;AAKD,CANM;;;;AAOA,MAAMO,yBAAyB,GAAId,cAAD,IAA4B;AACnE,SAAO;AACLS,IAAAA,QAAQ,EAAE;AAAEH,MAAAA,SAAS,EAAEJ,uBAAuB,CAACF,cAAD;AAApC,KADL;AAELU,IAAAA,OAAO,EAAE;AACPJ,MAAAA,SAAS,EAAEH;AADJ,KAFJ;AAKLQ,IAAAA,OAAO,EAAE;AACPL,MAAAA,SAAS,EAAEH;AADJ,KALJ;AAQLS,IAAAA,MAAM,EAAE;AAAEN,MAAAA,SAAS,EAAEJ,uBAAuB,CAACF,cAAD;AAApC;AARH,GAAP;AAUD,CAXM","sourcesContent":["export const transformLeftRigthClose = (anchorPosition: string) =>\n anchorPosition === 'right' ? 'translateX(100%)' : 'translateX(-100%)';\n\nexport const transformLeftRigthOpen = 'translateX(0)';\n\nexport const transformTopBottomClose = (anchorPosition: string) =>\n anchorPosition === 'top' ? 'translateY(-100%)' : 'translateY(100%)';\n\nexport const transformTopBottomOpen = 'translateY(0%)';\n\nexport const defaultStylesLeftRight = (anchorPosition: string) => {\n return {\n transition: 'transform 300ms ease-in-out',\n transform: () => transformLeftRigthClose(anchorPosition),\n overflow: 'hidden',\n };\n};\n\nexport const transitionStylesLeftRight = (anchorPosition: string) => {\n return {\n entering: { transform: transformLeftRigthClose(anchorPosition) },\n entered: {\n transform: transformLeftRigthOpen,\n },\n exiting: {\n transform: transformLeftRigthOpen,\n },\n exited: { transform: transformLeftRigthClose(anchorPosition) },\n };\n};\n\nexport const defaultStylesTopBottom = (anchorPosition: string) => {\n return {\n transition: 'transform 300ms ease-in-out',\n transform: transformTopBottomClose(anchorPosition),\n overflow: 'hidden',\n };\n};\nexport const transitionStylesTopBottom = (anchorPosition: string) => {\n return {\n entering: { transform: transformTopBottomClose(anchorPosition) },\n entered: {\n transform: transformTopBottomOpen,\n },\n exiting: {\n transform: transformTopBottomOpen,\n },\n exited: { transform: transformTopBottomClose(anchorPosition) },\n };\n};\n"],"file":"animations.js"}
@@ -18,7 +18,7 @@ Object.defineProperty(exports, "DrawerProps", {
18
18
 
19
19
  var _Drawer = _interopRequireWildcard(require("./Drawer"));
20
20
 
21
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
21
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
22
22
 
23
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
24
24
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,2 @@
1
1
  /// <reference types="react" />
2
- export declare const StyledOverlay: import("@emotion/styled").StyledComponent<any, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
3
2
  export declare const StyledContainerDrawer: import("@emotion/styled").StyledComponent<any, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -3,30 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.StyledContainerDrawer = exports.StyledOverlay = void 0;
6
+ exports.StyledContainerDrawer = void 0;
7
7
 
8
8
  var _styled = _interopRequireDefault(require("@emotion/styled"));
9
9
 
10
- var _reactCore = require("@tecsinapse/react-core");
11
-
12
10
  var _react = require("@emotion/react");
13
11
 
14
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
13
 
16
- const StyledOverlay = (0, _styled.default)('div')`
17
- background: ${({
18
- theme
19
- }) => (0, _reactCore.hex2rgba)(theme.miscellaneous.overlay, 0.5)};
20
- width: 100vw;
21
- height: 100vh;
22
- z-index: ${({
23
- theme
24
- }) => theme.zIndex.drawer};
25
- cursor: pointer;
26
- position: absolute;
27
- `;
28
- exports.StyledOverlay = StyledOverlay;
29
-
30
14
  const anchorLeft = ({
31
15
  theme,
32
16
  anchorPosition
@@ -84,9 +68,10 @@ const baseStyles = ({
84
68
  return (0, _react.css)`
85
69
  height: ${['left', 'right'].includes(anchorPosition) && '100vh'};
86
70
  width: ${['top', 'bottom'].includes(anchorPosition) && '100wh'};
87
- position: absolute;
71
+ position: fixed;
72
+ overflow: hidden;
88
73
  background-color: ${theme.miscellaneous.bodyColor};
89
- z-index: ${theme.zIndex.drawer + 1};
74
+ z-index: ${theme.zIndex.drawer};
90
75
  `;
91
76
  };
92
77
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/molecules/Drawer/styled.ts"],"names":["StyledOverlay","theme","miscellaneous","overlay","zIndex","drawer","anchorLeft","anchorPosition","borderRadius","centi","anchorRight","anchorTop","anchorBottom","baseStyles","includes","bodyColor","StyledContainerDrawer","props"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;AAEO,MAAMA,aAAa,GAAG,qBAAO,KAAP,CAAmC;AAChE,gBAAgB,CAAC;AAAEC,EAAAA;AAAF,CAAD,KACZ,yBAASA,KAAK,CAACC,aAAN,CAAoBC,OAA7B,EAAsC,GAAtC,CAA2C;AAC/C;AACA;AACA,aAAa,CAAC;AAAEF,EAAAA;AAAF,CAAD,KAA2BA,KAAK,CAACG,MAAN,CAAaC,MAAO;AAC5D;AACA;AACA,CARO;;;AAUP,MAAMC,UAAU,GAAG,CAAC;AAAEL,EAAAA,KAAF;AAASM,EAAAA;AAAT,CAAD,KAAyD;AAC1E,SACEA,cAAc,KAAK,MAAnB,IACA,eAAI;AACR;AACA;AACA,iCAAiCN,KAAK,CAACO,YAAN,CAAmBC,KAAM;AAC1D,oCAAoCR,KAAK,CAACO,YAAN,CAAmBC,KAAM;AAC7D,KAPE;AASD,CAVD;;AAWA,MAAMC,WAAW,GAAG,CAAC;AAAET,EAAAA,KAAF;AAASM,EAAAA;AAAT,CAAD,KAAyD;AAC3E,SACEA,cAAc,KAAK,OAAnB,IACA,eAAI;AACR;AACA;AACA,gCAAgCN,KAAK,CAACO,YAAN,CAAmBC,KAAM;AACzD,mCAAmCR,KAAK,CAACO,YAAN,CAAmBC,KAAM;AAC5D,KAPE;AASD,CAVD;;AAYA,MAAME,SAAS,GAAG,CAAC;AAAEV,EAAAA,KAAF;AAASM,EAAAA;AAAT,CAAD,KAAyD;AACzE,SACEA,cAAc,KAAK,KAAnB,IACA,eAAI;AACR;AACA;AACA;AACA,oCAAoCN,KAAK,CAACO,YAAN,CAAmBC,KAAM;AAC7D,mCAAmCR,KAAK,CAACO,YAAN,CAAmBC,KAAM;AAC5D,KARE;AAUD,CAXD;;AAaA,MAAMG,YAAY,GAAG,CAAC;AAAEX,EAAAA,KAAF;AAASM,EAAAA;AAAT,CAAD,KAAyD;AAC5E,SACEA,cAAc,KAAK,QAAnB,IACA,eAAI;AACR;AACA;AACA;AACA,iCAAiCN,KAAK,CAACO,YAAN,CAAmBC,KAAM;AAC1D,gCAAgCR,KAAK,CAACO,YAAN,CAAmBC,KAAM;AACzD,KARE;AAUD,CAXD;;AAaA,MAAMI,UAAU,GAAG,CAAC;AAAEZ,EAAAA,KAAF;AAASM,EAAAA;AAAT,CAAD,KAAyD;AAC1E,SAAO,eAAI;AACb,cAAc,CAAC,MAAD,EAAS,OAAT,EAAkBO,QAAlB,CAA2BP,cAA3B,KAA8C,OAAQ;AACpE,aAAa,CAAC,KAAD,EAAQ,QAAR,EAAkBO,QAAlB,CAA2BP,cAA3B,KAA8C,OAAQ;AACnE;AACA,wBAAwBN,KAAK,CAACC,aAAN,CAAoBa,SAAU;AACtD,eAAed,KAAK,CAACG,MAAN,CAAaC,MAAb,GAAsB,CAAE;AACvC,GANE;AAOD,CARD;;AAUO,MAAMW,qBAAqB,GAAG,qBAAO,KAAP,EAGnCC,KAAK,IAAI,eAAI;AACf,MAAMJ,UAAU,CAACI,KAAD,CAAQ;AACxB,MAAML,YAAY,CAACK,KAAD,CAAQ;AAC1B,MAAMN,SAAS,CAACM,KAAD,CAAQ;AACvB,MAAMX,UAAU,CAACW,KAAD,CAAQ;AACxB,MAAMP,WAAW,CAACO,KAAD,CAAQ;AACzB,GATqC,CAA9B","sourcesContent":["import styled from '@emotion/styled';\nimport { hex2rgba, StyleProps } from '@tecsinapse/react-core';\nimport { DrawerProps } from './Drawer';\nimport { css } from '@emotion/react';\n\nexport const StyledOverlay = styled('div')<Partial<StyleProps>>`\n background: ${({ theme }: StyleProps) =>\n hex2rgba(theme.miscellaneous.overlay, 0.5)};\n width: 100vw;\n height: 100vh;\n z-index: ${({ theme }: StyleProps) => theme.zIndex.drawer};\n cursor: pointer;\n position: absolute;\n`;\n\nconst anchorLeft = ({ theme, anchorPosition }: StyleProps & DrawerProps) => {\n return (\n anchorPosition === 'left' &&\n css`\n left: 0;\n top: 0;\n border-top-right-radius: ${theme.borderRadius.centi};\n border-bottom-right-radius: ${theme.borderRadius.centi};\n `\n );\n};\nconst anchorRight = ({ theme, anchorPosition }: StyleProps & DrawerProps) => {\n return (\n anchorPosition === 'right' &&\n css`\n right: 0;\n top: 0;\n border-top-left-radius: ${theme.borderRadius.centi};\n border-bottom-left-radius: ${theme.borderRadius.centi};\n `\n );\n};\n\nconst anchorTop = ({ theme, anchorPosition }: StyleProps & DrawerProps) => {\n return (\n anchorPosition === 'top' &&\n css`\n left: 0;\n right: 0;\n top: 0;\n border-bottom-right-radius: ${theme.borderRadius.centi};\n border-bottom-left-radius: ${theme.borderRadius.centi};\n `\n );\n};\n\nconst anchorBottom = ({ theme, anchorPosition }: StyleProps & DrawerProps) => {\n return (\n anchorPosition === 'bottom' &&\n css`\n left: 0;\n right: 0;\n bottom: 0;\n border-top-right-radius: ${theme.borderRadius.centi};\n border-top-left-radius: ${theme.borderRadius.centi};\n `\n );\n};\n\nconst baseStyles = ({ theme, anchorPosition }: StyleProps & DrawerProps) => {\n return css`\n height: ${['left', 'right'].includes(anchorPosition) && '100vh'};\n width: ${['top', 'bottom'].includes(anchorPosition) && '100wh'};\n position: absolute;\n background-color: ${theme.miscellaneous.bodyColor};\n z-index: ${theme.zIndex.drawer + 1};\n `;\n};\n\nexport const StyledContainerDrawer = styled('div')<\n DrawerProps & Partial<StyleProps>\n>(\n props => css`\n ${baseStyles(props)}\n ${anchorBottom(props)}\n ${anchorTop(props)}\n ${anchorLeft(props)}\n ${anchorRight(props)}\n `\n);\n"],"file":"styled.js"}
1
+ {"version":3,"sources":["../../../../src/components/molecules/Drawer/styled.ts"],"names":["anchorLeft","theme","anchorPosition","borderRadius","centi","anchorRight","anchorTop","anchorBottom","baseStyles","includes","miscellaneous","bodyColor","zIndex","drawer","StyledContainerDrawer","props"],"mappings":";;;;;;;AAAA;;AAGA;;;;AAEA,MAAMA,UAAU,GAAG,CAAC;AAAEC,EAAAA,KAAF;AAASC,EAAAA;AAAT,CAAD,KAAyD;AAC1E,SACEA,cAAc,KAAK,MAAnB,IACA,eAAI;AACR;AACA;AACA,iCAAiCD,KAAK,CAACE,YAAN,CAAmBC,KAAM;AAC1D,oCAAoCH,KAAK,CAACE,YAAN,CAAmBC,KAAM;AAC7D,KAPE;AASD,CAVD;;AAWA,MAAMC,WAAW,GAAG,CAAC;AAAEJ,EAAAA,KAAF;AAASC,EAAAA;AAAT,CAAD,KAAyD;AAC3E,SACEA,cAAc,KAAK,OAAnB,IACA,eAAI;AACR;AACA;AACA,gCAAgCD,KAAK,CAACE,YAAN,CAAmBC,KAAM;AACzD,mCAAmCH,KAAK,CAACE,YAAN,CAAmBC,KAAM;AAC5D,KAPE;AASD,CAVD;;AAYA,MAAME,SAAS,GAAG,CAAC;AAAEL,EAAAA,KAAF;AAASC,EAAAA;AAAT,CAAD,KAAyD;AACzE,SACEA,cAAc,KAAK,KAAnB,IACA,eAAI;AACR;AACA;AACA;AACA,oCAAoCD,KAAK,CAACE,YAAN,CAAmBC,KAAM;AAC7D,mCAAmCH,KAAK,CAACE,YAAN,CAAmBC,KAAM;AAC5D,KARE;AAUD,CAXD;;AAaA,MAAMG,YAAY,GAAG,CAAC;AAAEN,EAAAA,KAAF;AAASC,EAAAA;AAAT,CAAD,KAAyD;AAC5E,SACEA,cAAc,KAAK,QAAnB,IACA,eAAI;AACR;AACA;AACA;AACA,iCAAiCD,KAAK,CAACE,YAAN,CAAmBC,KAAM;AAC1D,gCAAgCH,KAAK,CAACE,YAAN,CAAmBC,KAAM;AACzD,KARE;AAUD,CAXD;;AAaA,MAAMI,UAAU,GAAG,CAAC;AAAEP,EAAAA,KAAF;AAASC,EAAAA;AAAT,CAAD,KAAyD;AAC1E,SAAO,eAAI;AACb,cAAc,CAAC,MAAD,EAAS,OAAT,EAAkBO,QAAlB,CAA2BP,cAA3B,KAA8C,OAAQ;AACpE,aAAa,CAAC,KAAD,EAAQ,QAAR,EAAkBO,QAAlB,CAA2BP,cAA3B,KAA8C,OAAQ;AACnE;AACA;AACA,wBAAwBD,KAAK,CAACS,aAAN,CAAoBC,SAAU;AACtD,eAAeV,KAAK,CAACW,MAAN,CAAaC,MAAO;AACnC,GAPE;AAQD,CATD;;AAWO,MAAMC,qBAAqB,GAAG,qBAAO,KAAP,EAGnCC,KAAK,IAAI,eAAI;AACf,MAAMP,UAAU,CAACO,KAAD,CAAQ;AACxB,MAAMR,YAAY,CAACQ,KAAD,CAAQ;AAC1B,MAAMT,SAAS,CAACS,KAAD,CAAQ;AACvB,MAAMf,UAAU,CAACe,KAAD,CAAQ;AACxB,MAAMV,WAAW,CAACU,KAAD,CAAQ;AACzB,GATqC,CAA9B","sourcesContent":["import styled from '@emotion/styled';\nimport { hex2rgba, StyleProps } from '@tecsinapse/react-core';\nimport { DrawerProps } from './Drawer';\nimport { css } from '@emotion/react';\n\nconst anchorLeft = ({ theme, anchorPosition }: StyleProps & DrawerProps) => {\n return (\n anchorPosition === 'left' &&\n css`\n left: 0;\n top: 0;\n border-top-right-radius: ${theme.borderRadius.centi};\n border-bottom-right-radius: ${theme.borderRadius.centi};\n `\n );\n};\nconst anchorRight = ({ theme, anchorPosition }: StyleProps & DrawerProps) => {\n return (\n anchorPosition === 'right' &&\n css`\n right: 0;\n top: 0;\n border-top-left-radius: ${theme.borderRadius.centi};\n border-bottom-left-radius: ${theme.borderRadius.centi};\n `\n );\n};\n\nconst anchorTop = ({ theme, anchorPosition }: StyleProps & DrawerProps) => {\n return (\n anchorPosition === 'top' &&\n css`\n left: 0;\n right: 0;\n top: 0;\n border-bottom-right-radius: ${theme.borderRadius.centi};\n border-bottom-left-radius: ${theme.borderRadius.centi};\n `\n );\n};\n\nconst anchorBottom = ({ theme, anchorPosition }: StyleProps & DrawerProps) => {\n return (\n anchorPosition === 'bottom' &&\n css`\n left: 0;\n right: 0;\n bottom: 0;\n border-top-right-radius: ${theme.borderRadius.centi};\n border-top-left-radius: ${theme.borderRadius.centi};\n `\n );\n};\n\nconst baseStyles = ({ theme, anchorPosition }: StyleProps & DrawerProps) => {\n return css`\n height: ${['left', 'right'].includes(anchorPosition) && '100vh'};\n width: ${['top', 'bottom'].includes(anchorPosition) && '100wh'};\n position: fixed;\n overflow: hidden;\n background-color: ${theme.miscellaneous.bodyColor};\n z-index: ${theme.zIndex.drawer};\n `;\n};\n\nexport const StyledContainerDrawer = styled('div')<\n DrawerProps & Partial<StyleProps>\n>(\n props => css`\n ${baseStyles(props)}\n ${anchorBottom(props)}\n ${anchorTop(props)}\n ${anchorLeft(props)}\n ${anchorRight(props)}\n `\n);\n"],"file":"styled.js"}
@@ -11,9 +11,9 @@ var _react = _interopRequireWildcard(require("react"));
11
11
 
12
12
  var _Input = require("../../atoms/Input");
13
13
 
14
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
14
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
15
 
16
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
17
 
18
18
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
19
 
@@ -18,7 +18,7 @@ Object.defineProperty(exports, "InputPasswordWebProps", {
18
18
 
19
19
  var _InputPassword = _interopRequireWildcard(require("./InputPassword"));
20
20
 
21
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
21
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
22
22
 
23
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
24
24
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  import { OptionsType } from '../types';
3
3
  interface MenuBlockProps {
4
- data: OptionsType;
4
+ toggle: () => void;
5
+ options: OptionsType[];
5
6
  }
6
- declare const MenuBlock: React.FC<MenuBlockProps>;
7
- export default MenuBlock;
7
+ declare const _default: React.NamedExoticComponent<MenuBlockProps>;
8
+ export default _default;
@@ -13,12 +13,19 @@ var _MenuItem = require("./MenuItem");
13
13
 
14
14
  var _styled = require("./styled");
15
15
 
16
+ var _Masonry = require("../../Masonry");
17
+
16
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
19
 
18
20
  const MenuBlock = ({
19
- data
21
+ options,
22
+ toggle
20
23
  }) => {
21
- return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_styled.StyledContainerMenu, null, data.leftComponents && _react.default.createElement(_styled.StyledLeftComponent, null, data.leftComponents), _react.default.createElement(_reactCore.Text, {
24
+ return _react.default.createElement(_Masonry.Masonry, {
25
+ columns: 4,
26
+ spacingTop: "kilo",
27
+ spacingLeft: "mega"
28
+ }, options.map(data => _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_styled.StyledContainerMenu, null, data.leftComponents && _react.default.createElement(_styled.StyledLeftComponent, null, data.leftComponents), _react.default.createElement(_reactCore.Text, {
22
29
  fontWeight: "bold"
23
30
  }, data.title)), _react.default.createElement(_styled.StyledContainerItems, null, data.items.map(({
24
31
  title,
@@ -32,10 +39,12 @@ const MenuBlock = ({
32
39
  title: title,
33
40
  Component: Component,
34
41
  rightComponents: rightComponents,
35
- props: props
36
- }))));
42
+ props: props,
43
+ toggle: toggle
44
+ }))))));
37
45
  };
38
46
 
39
- var _default = MenuBlock;
47
+ var _default = _react.default.memo(MenuBlock);
48
+
40
49
  exports.default = _default;
41
50
  //# sourceMappingURL=MenuBlock.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/molecules/Menubar/MenuBlock/MenuBlock.tsx"],"names":["MenuBlock","data","leftComponents","title","items","map","Component","props","rightComponents"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;AAWA,MAAMA,SAAmC,GAAG,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAc;AACxD,SACE,4DACE,6BAAC,2BAAD,QACGA,IAAI,CAACC,cAAL,IACC,6BAAC,2BAAD,QAAsBD,IAAI,CAACC,cAA3B,CAFJ,EAIE,6BAAC,eAAD;AAAM,IAAA,UAAU,EAAC;AAAjB,KAAyBD,IAAI,CAACE,KAA9B,CAJF,CADF,EAOE,6BAAC,4BAAD,QACGF,IAAI,CAACG,KAAL,CAAWC,GAAX,CACC,CAAC;AACCF,IAAAA,KADD;AAECG,IAAAA,SAFD;AAGCC,IAAAA,KAHD;AAICC,IAAAA,eAJD;AAKCJ,IAAAA;AALD,GAAD,KAOE,6BAAC,kBAAD;AACE,IAAA,KAAK,EAAEA,KADT;AAEE,IAAA,GAAG,EAAED,KAFP;AAGE,IAAA,KAAK,EAAEA,KAHT;AAIE,IAAA,SAAS,EAAEG,SAJb;AAKE,IAAA,eAAe,EAAEE,eALnB;AAME,IAAA,KAAK,EAAED;AANT,IARH,CADH,CAPF,CADF;AA8BD,CA/BD;;eAiCeP,S","sourcesContent":["import React from 'react';\nimport { Text } from '@tecsinapse/react-core';\nimport { MenuItem } from './MenuItem';\nimport {\n StyledContainerItems,\n StyledContainerMenu,\n StyledLeftComponent,\n} from './styled';\nimport { ItemsOptions, OptionsType } from '../types';\n\ninterface MenuBlockProps {\n data: OptionsType;\n}\n\nconst MenuBlock: React.FC<MenuBlockProps> = ({ data }) => {\n return (\n <>\n <StyledContainerMenu>\n {data.leftComponents && (\n <StyledLeftComponent>{data.leftComponents}</StyledLeftComponent>\n )}\n <Text fontWeight=\"bold\">{data.title}</Text>\n </StyledContainerMenu>\n <StyledContainerItems>\n {data.items.map(\n ({\n title,\n Component,\n props,\n rightComponents,\n items,\n }: ItemsOptions) => (\n <MenuItem\n items={items}\n key={title}\n title={title}\n Component={Component}\n rightComponents={rightComponents}\n props={props}\n />\n )\n )}\n </StyledContainerItems>\n </>\n );\n};\n\nexport default MenuBlock;\n"],"file":"MenuBlock.js"}
1
+ {"version":3,"sources":["../../../../../src/components/molecules/Menubar/MenuBlock/MenuBlock.tsx"],"names":["MenuBlock","options","toggle","map","data","leftComponents","title","items","Component","props","rightComponents","React","memo"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AAMA;;;;AAOA,MAAMA,SAAmC,GAAG,CAAC;AAAEC,EAAAA,OAAF;AAAWC,EAAAA;AAAX,CAAD,KAAyB;AACnE,SACE,6BAAC,gBAAD;AAAS,IAAA,OAAO,EAAE,CAAlB;AAAqB,IAAA,UAAU,EAAC,MAAhC;AAAuC,IAAA,WAAW,EAAC;AAAnD,KACGD,OAAO,CAACE,GAAR,CAAYC,IAAI,IACf,4DACE,6BAAC,2BAAD,QACGA,IAAI,CAACC,cAAL,IACC,6BAAC,2BAAD,QAAsBD,IAAI,CAACC,cAA3B,CAFJ,EAIE,6BAAC,eAAD;AAAM,IAAA,UAAU,EAAC;AAAjB,KAAyBD,IAAI,CAACE,KAA9B,CAJF,CADF,EAOE,6BAAC,4BAAD,QACGF,IAAI,CAACG,KAAL,CAAWJ,GAAX,CACC,CAAC;AACCG,IAAAA,KADD;AAECE,IAAAA,SAFD;AAGCC,IAAAA,KAHD;AAICC,IAAAA,eAJD;AAKCH,IAAAA;AALD,GAAD,KAOE,6BAAC,kBAAD;AACE,IAAA,KAAK,EAAEA,KADT;AAEE,IAAA,GAAG,EAAED,KAFP;AAGE,IAAA,KAAK,EAAEA,KAHT;AAIE,IAAA,SAAS,EAAEE,SAJb;AAKE,IAAA,eAAe,EAAEE,eALnB;AAME,IAAA,KAAK,EAAED,KANT;AAOE,IAAA,MAAM,EAAEP;AAPV,IARH,CADH,CAPF,CADD,CADH,CADF;AAmCD,CApCD;;eAsCeS,eAAMC,IAAN,CAAWZ,SAAX,C","sourcesContent":["import React from 'react';\nimport { Text } from '@tecsinapse/react-core';\nimport { MenuItem } from './MenuItem';\nimport {\n StyledContainerItems,\n StyledContainerMenu,\n StyledLeftComponent,\n} from './styled';\nimport { ItemsOptions, OptionsType } from '../types';\nimport { Masonry } from '../../Masonry';\n\ninterface MenuBlockProps {\n toggle: () => void;\n options: OptionsType[];\n}\n\nconst MenuBlock: React.FC<MenuBlockProps> = ({ options, toggle }) => {\n return (\n <Masonry columns={4} spacingTop=\"kilo\" spacingLeft=\"mega\">\n {options.map(data => (\n <>\n <StyledContainerMenu>\n {data.leftComponents && (\n <StyledLeftComponent>{data.leftComponents}</StyledLeftComponent>\n )}\n <Text fontWeight=\"bold\">{data.title}</Text>\n </StyledContainerMenu>\n <StyledContainerItems>\n {data.items.map(\n ({\n title,\n Component,\n props,\n rightComponents,\n items,\n }: ItemsOptions) => (\n <MenuItem\n items={items}\n key={title}\n title={title}\n Component={Component}\n rightComponents={rightComponents}\n props={props}\n toggle={toggle}\n />\n )\n )}\n </StyledContainerItems>\n </>\n ))}\n </Masonry>\n );\n};\n\nexport default React.memo(MenuBlock);\n"],"file":"MenuBlock.js"}
@@ -4,6 +4,7 @@ interface MenuItemProps {
4
4
  title: string;
5
5
  Component: ElementType;
6
6
  props: any;
7
+ toggle: () => void;
7
8
  rightComponents?: React.ReactNode;
8
9
  items?: ItemsOptions[];
9
10
  }
@@ -24,7 +24,8 @@ const MenuItem = ({
24
24
  Component = 'a',
25
25
  props = {},
26
26
  rightComponents,
27
- items
27
+ items,
28
+ toggle
28
29
  }) => {
29
30
  const [open, setOpen] = _react.default.useState(false);
30
31
 
@@ -39,7 +40,8 @@ const MenuItem = ({
39
40
  return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_styled2.StyledContainerItemText, {
40
41
  key: title
41
42
  }, _react.default.createElement(Component, _extends({}, props, {
42
- style: noTextDecoration
43
+ style: noTextDecoration,
44
+ onClick: toggle
43
45
  }), _react.default.createElement(_reactCore.Text, {
44
46
  colorVariant: open ? 'primary' : 'secondary',
45
47
  colorTone: open ? 'medium' : 'dark'
@@ -51,7 +53,8 @@ const MenuItem = ({
51
53
  fontColor: "orange"
52
54
  }))), open && (items === null || items === void 0 ? void 0 : items.map(subItem => _react.default.createElement(_SubMenuBlock.SubMenuBlock, {
53
55
  key: subItem.title,
54
- data: subItem
56
+ data: subItem,
57
+ toggle: toggle
55
58
  }))));
56
59
  };
57
60
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.tsx"],"names":["MenuItem","title","Component","props","rightComponents","items","open","setOpen","React","useState","noTextDecoration","textDecoration","getIconName","handleMenuAction","map","subItem"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAaA,MAAMA,QAAiC,GAAG,CAAC;AACzCC,EAAAA,KADyC;AAEzCC,EAAAA,SAAS,GAAG,GAF6B;AAGzCC,EAAAA,KAAK,GAAG,EAHiC;AAIzCC,EAAAA,eAJyC;AAKzCC,EAAAA;AALyC,CAAD,KAMpC;AACJ,QAAM,CAACC,IAAD,EAAOC,OAAP,IAAkBC,eAAMC,QAAN,CAAwB,KAAxB,CAAxB;;AAEA,QAAMC,gBAAgB,GAAG;AAAEC,IAAAA,cAAc,EAAE;AAAlB,GAAzB;;AAEA,QAAMC,WAAW,GAAG,MAClBN,IAAI,GAAG,8BAAH,GAAoC,gCAD1C;;AAGA,QAAMO,gBAAgB,GAAG,MAAMN,OAAO,CAAC,CAACD,IAAF,CAAtC;;AAEA,SACE,4DACE,6BAAC,gCAAD;AAAyB,IAAA,GAAG,EAAEL;AAA9B,KACE,6BAAC,SAAD,eAAeE,KAAf;AAAsB,IAAA,KAAK,EAAEO;AAA7B,MACE,6BAAC,eAAD;AACE,IAAA,YAAY,EAAEJ,IAAI,GAAG,SAAH,GAAe,WADnC;AAEE,IAAA,SAAS,EAAEA,IAAI,GAAG,QAAH,GAAc;AAF/B,KAIE,6BAAC,kBAAD,QAAaL,KAAb,CAJF,CADF,CADF,EASGG,eAAe,IAAI,CAACC,KAApB,IACC,6BAAC,4BAAD,QAAuBD,eAAvB,CAVJ,EAYGC,KAAK,IACJ,6BAAC,wBAAD;AAAiB,IAAA,OAAO,EAAEQ;AAA1B,KACE,6BAAC,eAAD;AACE,IAAA,IAAI,EAAED,WAAW,EADnB;AAEE,IAAA,IAAI,EAAC,oBAFP;AAGE,IAAA,SAAS,EAAC;AAHZ,IADF,CAbJ,CADF,EAuBGN,IAAI,KACHD,KADG,aACHA,KADG,uBACHA,KAAK,CAAES,GAAP,CAAWC,OAAO,IAChB,6BAAC,0BAAD;AAAc,IAAA,GAAG,EAAEA,OAAO,CAACd,KAA3B;AAAkC,IAAA,IAAI,EAAEc;AAAxC,IADF,CADG,CAvBP,CADF;AA8BD,CA9CD;;eAgDef,Q","sourcesContent":["import React, { ElementType } from 'react';\nimport { Icon, Text } from '@tecsinapse/react-core';\nimport { SubMenuBlock } from './SubMenuBlock';\nimport { StyledRightComponent, StyledText } from '../styled';\nimport { StyledContainerItemText, StyledSubButton } from './styled';\nimport { ItemsOptions } from '../../types';\n\ninterface MenuItemProps {\n title: string;\n /** Wrapping component for element. This is used for navigation */\n Component: ElementType;\n /** Properties spread to wrapping Component */\n props: any;\n rightComponents?: React.ReactNode;\n items?: ItemsOptions[];\n}\n\nconst MenuItem: React.FC<MenuItemProps> = ({\n title,\n Component = 'a',\n props = {},\n rightComponents,\n items,\n}) => {\n const [open, setOpen] = React.useState<boolean>(false);\n\n const noTextDecoration = { textDecoration: 'none' };\n\n const getIconName = () =>\n open ? 'arrow-up-drop-circle-outline' : 'arrow-down-drop-circle-outline';\n\n const handleMenuAction = () => setOpen(!open);\n\n return (\n <>\n <StyledContainerItemText key={title}>\n <Component {...props} style={noTextDecoration}>\n <Text\n colorVariant={open ? 'primary' : 'secondary'}\n colorTone={open ? 'medium' : 'dark'}\n >\n <StyledText>{title}</StyledText>\n </Text>\n </Component>\n {rightComponents && !items && (\n <StyledRightComponent>{rightComponents}</StyledRightComponent>\n )}\n {items && (\n <StyledSubButton onClick={handleMenuAction}>\n <Icon\n name={getIconName()}\n type=\"material-community\"\n fontColor=\"orange\"\n />\n </StyledSubButton>\n )}\n </StyledContainerItemText>\n {open &&\n items?.map(subItem => (\n <SubMenuBlock key={subItem.title} data={subItem} />\n ))}\n </>\n );\n};\n\nexport default MenuItem;\n"],"file":"MenuItem.js"}
1
+ {"version":3,"sources":["../../../../../../src/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.tsx"],"names":["MenuItem","title","Component","props","rightComponents","items","toggle","open","setOpen","React","useState","noTextDecoration","textDecoration","getIconName","handleMenuAction","map","subItem"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAcA,MAAMA,QAAiC,GAAG,CAAC;AACzCC,EAAAA,KADyC;AAEzCC,EAAAA,SAAS,GAAG,GAF6B;AAGzCC,EAAAA,KAAK,GAAG,EAHiC;AAIzCC,EAAAA,eAJyC;AAKzCC,EAAAA,KALyC;AAMzCC,EAAAA;AANyC,CAAD,KAOpC;AACJ,QAAM,CAACC,IAAD,EAAOC,OAAP,IAAkBC,eAAMC,QAAN,CAAwB,KAAxB,CAAxB;;AAEA,QAAMC,gBAAgB,GAAG;AAAEC,IAAAA,cAAc,EAAE;AAAlB,GAAzB;;AAEA,QAAMC,WAAW,GAAG,MAClBN,IAAI,GAAG,8BAAH,GAAoC,gCAD1C;;AAGA,QAAMO,gBAAgB,GAAG,MAAMN,OAAO,CAAC,CAACD,IAAF,CAAtC;;AAEA,SACE,4DACE,6BAAC,gCAAD;AAAyB,IAAA,GAAG,EAAEN;AAA9B,KACE,6BAAC,SAAD,eAAeE,KAAf;AAAsB,IAAA,KAAK,EAAEQ,gBAA7B;AAA+C,IAAA,OAAO,EAAEL;AAAxD,MACE,6BAAC,eAAD;AACE,IAAA,YAAY,EAAEC,IAAI,GAAG,SAAH,GAAe,WADnC;AAEE,IAAA,SAAS,EAAEA,IAAI,GAAG,QAAH,GAAc;AAF/B,KAIE,6BAAC,kBAAD,QAAaN,KAAb,CAJF,CADF,CADF,EASGG,eAAe,IAAI,CAACC,KAApB,IACC,6BAAC,4BAAD,QAAuBD,eAAvB,CAVJ,EAYGC,KAAK,IACJ,6BAAC,wBAAD;AAAiB,IAAA,OAAO,EAAES;AAA1B,KACE,6BAAC,eAAD;AACE,IAAA,IAAI,EAAED,WAAW,EADnB;AAEE,IAAA,IAAI,EAAC,oBAFP;AAGE,IAAA,SAAS,EAAC;AAHZ,IADF,CAbJ,CADF,EAuBGN,IAAI,KACHF,KADG,aACHA,KADG,uBACHA,KAAK,CAAEU,GAAP,CAAWC,OAAO,IAChB,6BAAC,0BAAD;AAAc,IAAA,GAAG,EAAEA,OAAO,CAACf,KAA3B;AAAkC,IAAA,IAAI,EAAEe,OAAxC;AAAiD,IAAA,MAAM,EAAEV;AAAzD,IADF,CADG,CAvBP,CADF;AA8BD,CA/CD;;eAiDeN,Q","sourcesContent":["import React, { ElementType } from 'react';\nimport { Icon, Text } from '@tecsinapse/react-core';\nimport { SubMenuBlock } from './SubMenuBlock';\nimport { StyledRightComponent, StyledText } from '../styled';\nimport { StyledContainerItemText, StyledSubButton } from './styled';\nimport { ItemsOptions } from '../../types';\n\ninterface MenuItemProps {\n title: string;\n /** Wrapping component for element. This is used for navigation */\n Component: ElementType;\n /** Properties spread to wrapping Component */\n props: any;\n toggle: () => void;\n rightComponents?: React.ReactNode;\n items?: ItemsOptions[];\n}\n\nconst MenuItem: React.FC<MenuItemProps> = ({\n title,\n Component = 'a',\n props = {},\n rightComponents,\n items,\n toggle,\n}) => {\n const [open, setOpen] = React.useState<boolean>(false);\n\n const noTextDecoration = { textDecoration: 'none' };\n\n const getIconName = () =>\n open ? 'arrow-up-drop-circle-outline' : 'arrow-down-drop-circle-outline';\n\n const handleMenuAction = () => setOpen(!open);\n\n return (\n <>\n <StyledContainerItemText key={title}>\n <Component {...props} style={noTextDecoration} onClick={toggle}>\n <Text\n colorVariant={open ? 'primary' : 'secondary'}\n colorTone={open ? 'medium' : 'dark'}\n >\n <StyledText>{title}</StyledText>\n </Text>\n </Component>\n {rightComponents && !items && (\n <StyledRightComponent>{rightComponents}</StyledRightComponent>\n )}\n {items && (\n <StyledSubButton onClick={handleMenuAction}>\n <Icon\n name={getIconName()}\n type=\"material-community\"\n fontColor=\"orange\"\n />\n </StyledSubButton>\n )}\n </StyledContainerItemText>\n {open &&\n items?.map(subItem => (\n <SubMenuBlock key={subItem.title} data={subItem} toggle={toggle} />\n ))}\n </>\n );\n};\n\nexport default MenuItem;\n"],"file":"MenuItem.js"}
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { ItemsOptions } from '../../../types';
3
3
  interface SubMenuBlockProps {
4
4
  data: ItemsOptions;
5
+ toggle: () => void;
5
6
  }
6
7
  declare const SubMenuBlock: React.FC<SubMenuBlockProps>;
7
8
  export default SubMenuBlock;
@@ -18,7 +18,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
18
18
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
19
 
20
20
  const SubMenuBlock = ({
21
- data
21
+ data,
22
+ toggle
22
23
  }) => {
23
24
  const {
24
25
  Component,
@@ -30,7 +31,8 @@ const SubMenuBlock = ({
30
31
  textDecoration: 'none'
31
32
  };
32
33
  return _react.default.createElement(_styled2.StyledContainerItem, null, _react.default.createElement(_styled2.DummyBorder, null), _react.default.createElement(Component, _extends({}, props, {
33
- style: noTextDecoration
34
+ style: noTextDecoration,
35
+ onClick: toggle
34
36
  }), _react.default.createElement(_reactCore.Text, {
35
37
  colorVariant: "secondary",
36
38
  colorTone: "medium",