@tecsinapse/react-web-kit 1.20.1 → 1.21.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 (553) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/babel.config.esm.js +0 -1
  3. package/babel.config.js +1 -6
  4. package/dist/components/atoms/Accordion/Accordion.js +10 -8
  5. package/dist/components/atoms/Accordion/Accordion.js.map +1 -1
  6. package/dist/components/atoms/Accordion/animations.js +2 -2
  7. package/dist/components/atoms/Accordion/animations.js.map +1 -1
  8. package/dist/components/atoms/Accordion/index.d.ts +2 -1
  9. package/dist/components/atoms/Accordion/index.js +2 -10
  10. package/dist/components/atoms/Accordion/index.js.map +1 -1
  11. package/dist/components/atoms/Accordion/styled.js +33 -37
  12. package/dist/components/atoms/Accordion/styled.js.map +1 -1
  13. package/dist/components/atoms/Badge/Badge.js +7 -6
  14. package/dist/components/atoms/Badge/Badge.js.map +1 -1
  15. package/dist/components/atoms/Badge/index.d.ts +2 -1
  16. package/dist/components/atoms/Badge/index.js +2 -10
  17. package/dist/components/atoms/Badge/index.js.map +1 -1
  18. package/dist/components/atoms/Button/Button.js +14 -12
  19. package/dist/components/atoms/Button/Button.js.map +1 -1
  20. package/dist/components/atoms/Button/index.d.ts +2 -1
  21. package/dist/components/atoms/Button/index.js +3 -12
  22. package/dist/components/atoms/Button/index.js.map +1 -1
  23. package/dist/components/atoms/Button/styled.js +14 -16
  24. package/dist/components/atoms/Button/styled.js.map +1 -1
  25. package/dist/components/atoms/Dropdown/index.js +6 -5
  26. package/dist/components/atoms/Dropdown/index.js.map +1 -1
  27. package/dist/components/atoms/Dropdown/styled.js +30 -21
  28. package/dist/components/atoms/Dropdown/styled.js.map +1 -1
  29. package/dist/components/atoms/Input/Input.js +26 -24
  30. package/dist/components/atoms/Input/Input.js.map +1 -1
  31. package/dist/components/atoms/Input/index.d.ts +2 -1
  32. package/dist/components/atoms/Input/index.js +2 -10
  33. package/dist/components/atoms/Input/index.js.map +1 -1
  34. package/dist/components/atoms/Input/styled.js +5 -5
  35. package/dist/components/atoms/Input/styled.js.map +1 -1
  36. package/dist/components/atoms/InputMask/InputMask.js +26 -24
  37. package/dist/components/atoms/InputMask/InputMask.js.map +1 -1
  38. package/dist/components/atoms/InputMask/index.d.ts +2 -1
  39. package/dist/components/atoms/InputMask/index.js +2 -10
  40. package/dist/components/atoms/InputMask/index.js.map +1 -1
  41. package/dist/components/atoms/InputMask/styled.js +5 -5
  42. package/dist/components/atoms/InputMask/styled.js.map +1 -1
  43. package/dist/components/atoms/Modal/Modal.js +8 -7
  44. package/dist/components/atoms/Modal/Modal.js.map +1 -1
  45. package/dist/components/atoms/Modal/animations.js +1 -1
  46. package/dist/components/atoms/Modal/animations.js.map +1 -1
  47. package/dist/components/atoms/Modal/index.d.ts +2 -1
  48. package/dist/components/atoms/Modal/index.js +2 -10
  49. package/dist/components/atoms/Modal/index.js.map +1 -1
  50. package/dist/components/atoms/Modal/styled.js +30 -24
  51. package/dist/components/atoms/Modal/styled.js.map +1 -1
  52. package/dist/components/atoms/Overlay/Overlay.js +8 -7
  53. package/dist/components/atoms/Overlay/Overlay.js.map +1 -1
  54. package/dist/components/atoms/Overlay/animations.js +1 -1
  55. package/dist/components/atoms/Overlay/animations.js.map +1 -1
  56. package/dist/components/atoms/Overlay/styled.js +21 -20
  57. package/dist/components/atoms/Overlay/styled.js.map +1 -1
  58. package/dist/components/atoms/Skeleton/Skeleton.js +11 -9
  59. package/dist/components/atoms/Skeleton/Skeleton.js.map +1 -1
  60. package/dist/components/atoms/Skeleton/index.d.ts +2 -1
  61. package/dist/components/atoms/Skeleton/index.js +2 -10
  62. package/dist/components/atoms/Skeleton/index.js.map +1 -1
  63. package/dist/components/atoms/Skeleton/styled.js +42 -66
  64. package/dist/components/atoms/Skeleton/styled.js.map +1 -1
  65. package/dist/components/atoms/Table/Body/TBody.js +5 -4
  66. package/dist/components/atoms/Table/Body/TBody.js.map +1 -1
  67. package/dist/components/atoms/Table/Cell/Td.js +5 -4
  68. package/dist/components/atoms/Table/Cell/Td.js.map +1 -1
  69. package/dist/components/atoms/Table/Cell/styled.js +34 -20
  70. package/dist/components/atoms/Table/Cell/styled.js.map +1 -1
  71. package/dist/components/atoms/Table/Container/TableContainer.js +5 -4
  72. package/dist/components/atoms/Table/Container/TableContainer.js.map +1 -1
  73. package/dist/components/atoms/Table/Container/styled.js +25 -15
  74. package/dist/components/atoms/Table/Container/styled.js.map +1 -1
  75. package/dist/components/atoms/Table/Footer/TFoot.js +5 -4
  76. package/dist/components/atoms/Table/Footer/TFoot.js.map +1 -1
  77. package/dist/components/atoms/Table/Footer/styled.js +5 -6
  78. package/dist/components/atoms/Table/Footer/styled.js.map +1 -1
  79. package/dist/components/atoms/Table/Header/THead.js +5 -4
  80. package/dist/components/atoms/Table/Header/THead.js.map +1 -1
  81. package/dist/components/atoms/Table/Header/Th.js +5 -4
  82. package/dist/components/atoms/Table/Header/Th.js.map +1 -1
  83. package/dist/components/atoms/Table/Header/styled.js +41 -38
  84. package/dist/components/atoms/Table/Header/styled.js.map +1 -1
  85. package/dist/components/atoms/Table/Row/Tr.js +5 -4
  86. package/dist/components/atoms/Table/Row/Tr.js.map +1 -1
  87. package/dist/components/atoms/Table/Row/styled.js +15 -9
  88. package/dist/components/atoms/Table/Row/styled.js.map +1 -1
  89. package/dist/components/atoms/Table/Table.js +5 -4
  90. package/dist/components/atoms/Table/Table.js.map +1 -1
  91. package/dist/components/atoms/Table/Toolbar/TableToolbar.js +7 -6
  92. package/dist/components/atoms/Table/Toolbar/TableToolbar.js.map +1 -1
  93. package/dist/components/atoms/Table/Toolbar/index.d.ts +2 -1
  94. package/dist/components/atoms/Table/Toolbar/index.js +2 -10
  95. package/dist/components/atoms/Table/Toolbar/index.js.map +1 -1
  96. package/dist/components/atoms/Table/Toolbar/styled.js +5 -6
  97. package/dist/components/atoms/Table/Toolbar/styled.js.map +1 -1
  98. package/dist/components/atoms/Table/index.d.ts +2 -1
  99. package/dist/components/atoms/Table/index.js +0 -6
  100. package/dist/components/atoms/Table/index.js.map +1 -1
  101. package/dist/components/atoms/Table/styled.js +10 -7
  102. package/dist/components/atoms/Table/styled.js.map +1 -1
  103. package/dist/components/atoms/Tag/Tag.js +6 -5
  104. package/dist/components/atoms/Tag/Tag.js.map +1 -1
  105. package/dist/components/atoms/Tag/index.d.ts +2 -1
  106. package/dist/components/atoms/Tag/index.js +2 -10
  107. package/dist/components/atoms/Tag/index.js.map +1 -1
  108. package/dist/components/atoms/Tooltip/Tooltip.js +7 -5
  109. package/dist/components/atoms/Tooltip/Tooltip.js.map +1 -1
  110. package/dist/components/atoms/Tooltip/index.d.ts +2 -1
  111. package/dist/components/atoms/Tooltip/index.js +2 -10
  112. package/dist/components/atoms/Tooltip/index.js.map +1 -1
  113. package/dist/components/atoms/Tooltip/styled.js +41 -122
  114. package/dist/components/atoms/Tooltip/styled.js.map +1 -1
  115. package/dist/components/molecules/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.js +7 -6
  116. package/dist/components/molecules/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.js.map +1 -1
  117. package/dist/components/molecules/Breadcrumbs/BreadcrumbItem/styled.js +16 -18
  118. package/dist/components/molecules/Breadcrumbs/BreadcrumbItem/styled.js.map +1 -1
  119. package/dist/components/molecules/Breadcrumbs/Breadcrumbs.js +5 -4
  120. package/dist/components/molecules/Breadcrumbs/Breadcrumbs.js.map +1 -1
  121. package/dist/components/molecules/Breadcrumbs/index.d.ts +2 -1
  122. package/dist/components/molecules/Breadcrumbs/index.js +2 -16
  123. package/dist/components/molecules/Breadcrumbs/index.js.map +1 -1
  124. package/dist/components/molecules/Breadcrumbs/styled.js +25 -18
  125. package/dist/components/molecules/Breadcrumbs/styled.js.map +1 -1
  126. package/dist/components/molecules/DatePicker/DatePicker.js +6 -5
  127. package/dist/components/molecules/DatePicker/DatePicker.js.map +1 -1
  128. package/dist/components/molecules/DatePicker/Modal.js +6 -5
  129. package/dist/components/molecules/DatePicker/Modal.js.map +1 -1
  130. package/dist/components/molecules/DatePicker/index.d.ts +2 -1
  131. package/dist/components/molecules/DatePicker/index.js +0 -6
  132. package/dist/components/molecules/DatePicker/index.js.map +1 -1
  133. package/dist/components/molecules/DatePicker/styled.js +20 -30
  134. package/dist/components/molecules/DatePicker/styled.js.map +1 -1
  135. package/dist/components/molecules/DateTimePicker/DateTimePicker.js +3 -2
  136. package/dist/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
  137. package/dist/components/molecules/DateTimePicker/Modal.js +6 -5
  138. package/dist/components/molecules/DateTimePicker/Modal.js.map +1 -1
  139. package/dist/components/molecules/DateTimePicker/index.d.ts +2 -1
  140. package/dist/components/molecules/DateTimePicker/index.js +0 -6
  141. package/dist/components/molecules/DateTimePicker/index.js.map +1 -1
  142. package/dist/components/molecules/DateTimePicker/styled.js +15 -29
  143. package/dist/components/molecules/DateTimePicker/styled.js.map +1 -1
  144. package/dist/components/molecules/Drawer/Drawer.js +10 -10
  145. package/dist/components/molecules/Drawer/Drawer.js.map +1 -1
  146. package/dist/components/molecules/Drawer/index.d.ts +2 -1
  147. package/dist/components/molecules/Drawer/index.js +2 -10
  148. package/dist/components/molecules/Drawer/index.js.map +1 -1
  149. package/dist/components/molecules/Drawer/styled.js +35 -63
  150. package/dist/components/molecules/Drawer/styled.js.map +1 -1
  151. package/dist/components/molecules/Grid/Grid.js +15 -11
  152. package/dist/components/molecules/Grid/Grid.js.map +1 -1
  153. package/dist/components/molecules/Grid/Item/Item.js +22 -21
  154. package/dist/components/molecules/Grid/Item/Item.js.map +1 -1
  155. package/dist/components/molecules/Grid/Item/functions.js +5 -2
  156. package/dist/components/molecules/Grid/Item/functions.js.map +1 -1
  157. package/dist/components/molecules/IconTextButton/IconTextButton.js +10 -9
  158. package/dist/components/molecules/IconTextButton/IconTextButton.js.map +1 -1
  159. package/dist/components/molecules/IconTextButton/TextComponent.js +12 -9
  160. package/dist/components/molecules/IconTextButton/TextComponent.js.map +1 -1
  161. package/dist/components/molecules/IconTextButton/index.d.ts +2 -1
  162. package/dist/components/molecules/IconTextButton/index.js +2 -10
  163. package/dist/components/molecules/IconTextButton/index.js.map +1 -1
  164. package/dist/components/molecules/IconTextButton/styled.js +25 -18
  165. package/dist/components/molecules/IconTextButton/styled.js.map +1 -1
  166. package/dist/components/molecules/InputPassword/InputPassword.js +5 -4
  167. package/dist/components/molecules/InputPassword/InputPassword.js.map +1 -1
  168. package/dist/components/molecules/InputPassword/index.d.ts +2 -1
  169. package/dist/components/molecules/InputPassword/index.js +2 -10
  170. package/dist/components/molecules/InputPassword/index.js.map +1 -1
  171. package/dist/components/molecules/LabeledSwitch/LabelComponent.js +13 -10
  172. package/dist/components/molecules/LabeledSwitch/LabelComponent.js.map +1 -1
  173. package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js +11 -10
  174. package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -1
  175. package/dist/components/molecules/LabeledSwitch/index.d.ts +2 -1
  176. package/dist/components/molecules/LabeledSwitch/index.js +2 -10
  177. package/dist/components/molecules/LabeledSwitch/index.js.map +1 -1
  178. package/dist/components/molecules/LabeledSwitch/styled.js +12 -17
  179. package/dist/components/molecules/LabeledSwitch/styled.js.map +1 -1
  180. package/dist/components/molecules/Masonry/Masonry.js +8 -6
  181. package/dist/components/molecules/Masonry/Masonry.js.map +1 -1
  182. package/dist/components/molecules/Masonry/styled.js +21 -28
  183. package/dist/components/molecules/Masonry/styled.js.map +1 -1
  184. package/dist/components/molecules/Menubar/MenuBlock/MenuBlock.js +24 -20
  185. package/dist/components/molecules/Menubar/MenuBlock/MenuBlock.js.map +1 -1
  186. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js +10 -8
  187. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js.map +1 -1
  188. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/SubMenuBlock.js +5 -4
  189. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/SubMenuBlock.js.map +1 -1
  190. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/styled.js +21 -15
  191. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/styled.js.map +1 -1
  192. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/styled.js +21 -19
  193. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/styled.js.map +1 -1
  194. package/dist/components/molecules/Menubar/MenuBlock/styled.js +34 -33
  195. package/dist/components/molecules/Menubar/MenuBlock/styled.js.map +1 -1
  196. package/dist/components/molecules/Menubar/Menubar.js +14 -12
  197. package/dist/components/molecules/Menubar/Menubar.js.map +1 -1
  198. package/dist/components/molecules/Menubar/MostUsed/MostUsed.js +29 -25
  199. package/dist/components/molecules/Menubar/MostUsed/MostUsed.js.map +1 -1
  200. package/dist/components/molecules/Menubar/MostUsed/styled.js +41 -27
  201. package/dist/components/molecules/Menubar/MostUsed/styled.js.map +1 -1
  202. package/dist/components/molecules/Menubar/SearchResultItem/SearchResultItem.js +6 -5
  203. package/dist/components/molecules/Menubar/SearchResultItem/SearchResultItem.js.map +1 -1
  204. package/dist/components/molecules/Menubar/SearchResultItem/styled.js +21 -16
  205. package/dist/components/molecules/Menubar/SearchResultItem/styled.js.map +1 -1
  206. package/dist/components/molecules/Menubar/SearchResultItem/utils.js +2 -2
  207. package/dist/components/molecules/Menubar/SearchResultItem/utils.js.map +1 -1
  208. package/dist/components/molecules/Menubar/index.d.ts +1 -1
  209. package/dist/components/molecules/Menubar/index.js +1 -24
  210. package/dist/components/molecules/Menubar/index.js.map +1 -1
  211. package/dist/components/molecules/Menubar/styled.js +117 -96
  212. package/dist/components/molecules/Menubar/styled.js.map +1 -1
  213. package/dist/components/molecules/Select/Dropdown/Dropdown.js +16 -15
  214. package/dist/components/molecules/Select/Dropdown/Dropdown.js.map +1 -1
  215. package/dist/components/molecules/Select/Dropdown/components/SearchInput.js +7 -6
  216. package/dist/components/molecules/Select/Dropdown/components/SearchInput.js.map +1 -1
  217. package/dist/components/molecules/Select/Dropdown/styled.js +111 -107
  218. package/dist/components/molecules/Select/Dropdown/styled.js.map +1 -1
  219. package/dist/components/molecules/Select/Select.js +20 -18
  220. package/dist/components/molecules/Select/Select.js.map +1 -1
  221. package/dist/components/molecules/Select/SelectItem/SelectItem.js +13 -12
  222. package/dist/components/molecules/Select/SelectItem/SelectItem.js.map +1 -1
  223. package/dist/components/molecules/Select/SelectItem/styled.js +38 -39
  224. package/dist/components/molecules/Select/SelectItem/styled.js.map +1 -1
  225. package/dist/components/molecules/Select/index.d.ts +2 -1
  226. package/dist/components/molecules/Select/index.js +2 -10
  227. package/dist/components/molecules/Select/index.js.map +1 -1
  228. package/dist/components/molecules/Select/styled.js +6 -11
  229. package/dist/components/molecules/Select/styled.js.map +1 -1
  230. package/dist/components/molecules/Snackbar/Snackbar.js +9 -8
  231. package/dist/components/molecules/Snackbar/Snackbar.js.map +1 -1
  232. package/dist/components/molecules/Snackbar/index.d.ts +2 -1
  233. package/dist/components/molecules/Snackbar/index.js +2 -10
  234. package/dist/components/molecules/Snackbar/index.js.map +1 -1
  235. package/dist/components/molecules/Snackbar/styled.js +6 -7
  236. package/dist/components/molecules/Snackbar/styled.js.map +1 -1
  237. package/dist/components/molecules/TextArea/TextArea.js +27 -26
  238. package/dist/components/molecules/TextArea/TextArea.js.map +1 -1
  239. package/dist/components/molecules/TextArea/index.d.ts +2 -1
  240. package/dist/components/molecules/TextArea/index.js +2 -10
  241. package/dist/components/molecules/TextArea/index.js.map +1 -1
  242. package/dist/components/molecules/TextArea/styled.js +17 -11
  243. package/dist/components/molecules/TextArea/styled.js.map +1 -1
  244. package/dist/components/organisms/DataGrid/DataGrid.js +34 -32
  245. package/dist/components/organisms/DataGrid/DataGrid.js.map +1 -1
  246. package/dist/components/organisms/DataGrid/Footer/Footer.js +17 -15
  247. package/dist/components/organisms/DataGrid/Footer/Footer.js.map +1 -1
  248. package/dist/components/organisms/DataGrid/Footer/styled.js +75 -74
  249. package/dist/components/organisms/DataGrid/Footer/styled.js.map +1 -1
  250. package/dist/components/organisms/DataGrid/Header/Header.js +37 -32
  251. package/dist/components/organisms/DataGrid/Header/Header.js.map +1 -1
  252. package/dist/components/organisms/DataGrid/Header/styled.js +10 -8
  253. package/dist/components/organisms/DataGrid/Header/styled.js.map +1 -1
  254. package/dist/components/organisms/DataGrid/Row/Row.js +18 -14
  255. package/dist/components/organisms/DataGrid/Row/Row.js.map +1 -1
  256. package/dist/components/organisms/DataGrid/index.d.ts +2 -1
  257. package/dist/components/organisms/DataGrid/index.js +3 -12
  258. package/dist/components/organisms/DataGrid/index.js.map +1 -1
  259. package/dist/components/organisms/DataGrid/styled.js +10 -8
  260. package/dist/components/organisms/DataGrid/styled.js.map +1 -1
  261. package/dist/hooks/useClickAwayListener.js +3 -1
  262. package/dist/hooks/useClickAwayListener.js.map +1 -1
  263. package/dist/index.d.ts +42 -21
  264. package/dist/index.js +3 -194
  265. package/dist/index.js.map +1 -1
  266. package/esm/components/atoms/Accordion/Accordion.js +30 -10
  267. package/esm/components/atoms/Accordion/Accordion.js.map +1 -1
  268. package/esm/components/atoms/Accordion/animations.js +2 -2
  269. package/esm/components/atoms/Accordion/animations.js.map +1 -1
  270. package/esm/components/atoms/Accordion/index.d.ts +2 -1
  271. package/esm/components/atoms/Accordion/index.js +1 -1
  272. package/esm/components/atoms/Accordion/index.js.map +1 -1
  273. package/esm/components/atoms/Accordion/styled.js +7 -7
  274. package/esm/components/atoms/Accordion/styled.js.map +1 -1
  275. package/esm/components/atoms/Badge/Badge.js +3 -1
  276. package/esm/components/atoms/Badge/Badge.js.map +1 -1
  277. package/esm/components/atoms/Badge/index.d.ts +2 -1
  278. package/esm/components/atoms/Badge/index.js +1 -1
  279. package/esm/components/atoms/Badge/index.js.map +1 -1
  280. package/esm/components/atoms/Button/Button.js +3 -1
  281. package/esm/components/atoms/Button/Button.js.map +1 -1
  282. package/esm/components/atoms/Button/hooks/useMouseHover.js +17 -4
  283. package/esm/components/atoms/Button/hooks/useMouseHover.js.map +1 -1
  284. package/esm/components/atoms/Button/hooks/useMousePressed.js +17 -4
  285. package/esm/components/atoms/Button/hooks/useMousePressed.js.map +1 -1
  286. package/esm/components/atoms/Button/index.d.ts +2 -1
  287. package/esm/components/atoms/Button/index.js +1 -1
  288. package/esm/components/atoms/Button/index.js.map +1 -1
  289. package/esm/components/atoms/Button/styled.js +3 -3
  290. package/esm/components/atoms/Button/styled.js.map +1 -1
  291. package/esm/components/atoms/Dropdown/index.js +6 -2
  292. package/esm/components/atoms/Dropdown/index.js.map +1 -1
  293. package/esm/components/atoms/Dropdown/styled.js +2 -2
  294. package/esm/components/atoms/Dropdown/styled.js.map +1 -1
  295. package/esm/components/atoms/Input/Input.js +3 -1
  296. package/esm/components/atoms/Input/Input.js.map +1 -1
  297. package/esm/components/atoms/Input/index.d.ts +2 -1
  298. package/esm/components/atoms/Input/index.js +1 -1
  299. package/esm/components/atoms/Input/index.js.map +1 -1
  300. package/esm/components/atoms/Input/styled.js +2 -2
  301. package/esm/components/atoms/Input/styled.js.map +1 -1
  302. package/esm/components/atoms/InputMask/InputMask.js +3 -1
  303. package/esm/components/atoms/InputMask/InputMask.js.map +1 -1
  304. package/esm/components/atoms/InputMask/index.d.ts +2 -1
  305. package/esm/components/atoms/InputMask/index.js +1 -1
  306. package/esm/components/atoms/InputMask/index.js.map +1 -1
  307. package/esm/components/atoms/InputMask/styled.js +2 -2
  308. package/esm/components/atoms/InputMask/styled.js.map +1 -1
  309. package/esm/components/atoms/Modal/Modal.js +10 -2
  310. package/esm/components/atoms/Modal/Modal.js.map +1 -1
  311. package/esm/components/atoms/Modal/index.d.ts +2 -1
  312. package/esm/components/atoms/Modal/index.js +1 -1
  313. package/esm/components/atoms/Modal/index.js.map +1 -1
  314. package/esm/components/atoms/Modal/styled.js +2 -2
  315. package/esm/components/atoms/Modal/styled.js.map +1 -1
  316. package/esm/components/atoms/Overlay/Overlay.js +6 -2
  317. package/esm/components/atoms/Overlay/Overlay.js.map +1 -1
  318. package/esm/components/atoms/Overlay/styled.js +2 -2
  319. package/esm/components/atoms/Overlay/styled.js.map +1 -1
  320. package/esm/components/atoms/Skeleton/Skeleton.js +3 -1
  321. package/esm/components/atoms/Skeleton/Skeleton.js.map +1 -1
  322. package/esm/components/atoms/Skeleton/index.d.ts +2 -1
  323. package/esm/components/atoms/Skeleton/index.js +1 -1
  324. package/esm/components/atoms/Skeleton/index.js.map +1 -1
  325. package/esm/components/atoms/Skeleton/styled.js +8 -8
  326. package/esm/components/atoms/Skeleton/styled.js.map +1 -1
  327. package/esm/components/atoms/Table/Body/TBody.js +3 -1
  328. package/esm/components/atoms/Table/Body/TBody.js.map +1 -1
  329. package/esm/components/atoms/Table/Cell/Td.js +3 -1
  330. package/esm/components/atoms/Table/Cell/Td.js.map +1 -1
  331. package/esm/components/atoms/Table/Cell/styled.js +2 -2
  332. package/esm/components/atoms/Table/Cell/styled.js.map +1 -1
  333. package/esm/components/atoms/Table/Container/TableContainer.js +3 -1
  334. package/esm/components/atoms/Table/Container/TableContainer.js.map +1 -1
  335. package/esm/components/atoms/Table/Container/styled.js +3 -3
  336. package/esm/components/atoms/Table/Container/styled.js.map +1 -1
  337. package/esm/components/atoms/Table/Footer/TFoot.js +3 -1
  338. package/esm/components/atoms/Table/Footer/TFoot.js.map +1 -1
  339. package/esm/components/atoms/Table/Footer/styled.js +2 -2
  340. package/esm/components/atoms/Table/Footer/styled.js.map +1 -1
  341. package/esm/components/atoms/Table/Header/THead.js +3 -1
  342. package/esm/components/atoms/Table/Header/THead.js.map +1 -1
  343. package/esm/components/atoms/Table/Header/Th.js +3 -1
  344. package/esm/components/atoms/Table/Header/Th.js.map +1 -1
  345. package/esm/components/atoms/Table/Header/styled.js +5 -5
  346. package/esm/components/atoms/Table/Header/styled.js.map +1 -1
  347. package/esm/components/atoms/Table/Row/Tr.js +3 -1
  348. package/esm/components/atoms/Table/Row/Tr.js.map +1 -1
  349. package/esm/components/atoms/Table/Row/styled.js +2 -2
  350. package/esm/components/atoms/Table/Row/styled.js.map +1 -1
  351. package/esm/components/atoms/Table/Table.js +3 -1
  352. package/esm/components/atoms/Table/Table.js.map +1 -1
  353. package/esm/components/atoms/Table/Toolbar/TableToolbar.js +3 -1
  354. package/esm/components/atoms/Table/Toolbar/TableToolbar.js.map +1 -1
  355. package/esm/components/atoms/Table/Toolbar/index.d.ts +2 -1
  356. package/esm/components/atoms/Table/Toolbar/index.js +1 -1
  357. package/esm/components/atoms/Table/Toolbar/index.js.map +1 -1
  358. package/esm/components/atoms/Table/Toolbar/styled.js +2 -2
  359. package/esm/components/atoms/Table/Toolbar/styled.js.map +1 -1
  360. package/esm/components/atoms/Table/index.d.ts +2 -1
  361. package/esm/components/atoms/Table/index.js +1 -1
  362. package/esm/components/atoms/Table/index.js.map +1 -1
  363. package/esm/components/atoms/Table/styled.js +3 -3
  364. package/esm/components/atoms/Table/styled.js.map +1 -1
  365. package/esm/components/atoms/Tag/Tag.js +3 -1
  366. package/esm/components/atoms/Tag/Tag.js.map +1 -1
  367. package/esm/components/atoms/Tag/index.d.ts +2 -1
  368. package/esm/components/atoms/Tag/index.js +1 -1
  369. package/esm/components/atoms/Tag/index.js.map +1 -1
  370. package/esm/components/atoms/Tooltip/Tooltip.js +17 -4
  371. package/esm/components/atoms/Tooltip/Tooltip.js.map +1 -1
  372. package/esm/components/atoms/Tooltip/index.d.ts +2 -1
  373. package/esm/components/atoms/Tooltip/index.js +1 -1
  374. package/esm/components/atoms/Tooltip/index.js.map +1 -1
  375. package/esm/components/atoms/Tooltip/styled.js +15 -15
  376. package/esm/components/atoms/Tooltip/styled.js.map +1 -1
  377. package/esm/components/molecules/Breadcrumbs/BreadcrumbItem/styled.js +3 -3
  378. package/esm/components/molecules/Breadcrumbs/BreadcrumbItem/styled.js.map +1 -1
  379. package/esm/components/molecules/Breadcrumbs/Breadcrumbs.js +3 -1
  380. package/esm/components/molecules/Breadcrumbs/Breadcrumbs.js.map +1 -1
  381. package/esm/components/molecules/Breadcrumbs/index.d.ts +2 -1
  382. package/esm/components/molecules/Breadcrumbs/index.js +1 -1
  383. package/esm/components/molecules/Breadcrumbs/index.js.map +1 -1
  384. package/esm/components/molecules/Breadcrumbs/styled.js +3 -3
  385. package/esm/components/molecules/Breadcrumbs/styled.js.map +1 -1
  386. package/esm/components/molecules/DatePicker/DatePicker.js +18 -3
  387. package/esm/components/molecules/DatePicker/DatePicker.js.map +1 -1
  388. package/esm/components/molecules/DatePicker/Modal.js +3 -1
  389. package/esm/components/molecules/DatePicker/Modal.js.map +1 -1
  390. package/esm/components/molecules/DatePicker/index.d.ts +2 -1
  391. package/esm/components/molecules/DatePicker/index.js +1 -1
  392. package/esm/components/molecules/DatePicker/index.js.map +1 -1
  393. package/esm/components/molecules/DatePicker/styled.js +5 -5
  394. package/esm/components/molecules/DatePicker/styled.js.map +1 -1
  395. package/esm/components/molecules/DateTimePicker/DateTimePicker.js +15 -2
  396. package/esm/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
  397. package/esm/components/molecules/DateTimePicker/Modal.js +3 -1
  398. package/esm/components/molecules/DateTimePicker/Modal.js.map +1 -1
  399. package/esm/components/molecules/DateTimePicker/index.d.ts +2 -1
  400. package/esm/components/molecules/DateTimePicker/index.js +1 -1
  401. package/esm/components/molecules/DateTimePicker/index.js.map +1 -1
  402. package/esm/components/molecules/DateTimePicker/styled.js +4 -4
  403. package/esm/components/molecules/DateTimePicker/styled.js.map +1 -1
  404. package/esm/components/molecules/Drawer/Drawer.js +12 -4
  405. package/esm/components/molecules/Drawer/Drawer.js.map +1 -1
  406. package/esm/components/molecules/Drawer/index.d.ts +2 -1
  407. package/esm/components/molecules/Drawer/index.js +1 -1
  408. package/esm/components/molecules/Drawer/index.js.map +1 -1
  409. package/esm/components/molecules/Drawer/styled.js +7 -7
  410. package/esm/components/molecules/Drawer/styled.js.map +1 -1
  411. package/esm/components/molecules/Grid/Grid.js +15 -7
  412. package/esm/components/molecules/Grid/Grid.js.map +1 -1
  413. package/esm/components/molecules/Grid/Item/Item.js +13 -5
  414. package/esm/components/molecules/Grid/Item/Item.js.map +1 -1
  415. package/esm/components/molecules/Grid/Item/functions.js +3 -2
  416. package/esm/components/molecules/Grid/Item/functions.js.map +1 -1
  417. package/esm/components/molecules/IconTextButton/IconTextButton.js +3 -1
  418. package/esm/components/molecules/IconTextButton/IconTextButton.js.map +1 -1
  419. package/esm/components/molecules/IconTextButton/TextComponent.js +3 -3
  420. package/esm/components/molecules/IconTextButton/TextComponent.js.map +1 -1
  421. package/esm/components/molecules/IconTextButton/hooks/useIconTextButton.js +19 -5
  422. package/esm/components/molecules/IconTextButton/hooks/useIconTextButton.js.map +1 -1
  423. package/esm/components/molecules/IconTextButton/index.d.ts +2 -1
  424. package/esm/components/molecules/IconTextButton/index.js +1 -1
  425. package/esm/components/molecules/IconTextButton/index.js.map +1 -1
  426. package/esm/components/molecules/IconTextButton/styled.js +4 -4
  427. package/esm/components/molecules/IconTextButton/styled.js.map +1 -1
  428. package/esm/components/molecules/InputPassword/InputPassword.js +18 -3
  429. package/esm/components/molecules/InputPassword/InputPassword.js.map +1 -1
  430. package/esm/components/molecules/InputPassword/index.d.ts +2 -1
  431. package/esm/components/molecules/InputPassword/index.js +1 -1
  432. package/esm/components/molecules/InputPassword/index.js.map +1 -1
  433. package/esm/components/molecules/LabeledSwitch/LabelComponent.js +5 -3
  434. package/esm/components/molecules/LabeledSwitch/LabelComponent.js.map +1 -1
  435. package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js +3 -1
  436. package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -1
  437. package/esm/components/molecules/LabeledSwitch/index.d.ts +2 -1
  438. package/esm/components/molecules/LabeledSwitch/index.js +1 -1
  439. package/esm/components/molecules/LabeledSwitch/index.js.map +1 -1
  440. package/esm/components/molecules/LabeledSwitch/styled.js +4 -4
  441. package/esm/components/molecules/LabeledSwitch/styled.js.map +1 -1
  442. package/esm/components/molecules/Masonry/styled.js +4 -4
  443. package/esm/components/molecules/Masonry/styled.js.map +1 -1
  444. package/esm/components/molecules/Menubar/MenuBlock/MenuBlock.js +1 -1
  445. package/esm/components/molecules/Menubar/MenuBlock/MenuBlock.js.map +1 -1
  446. package/esm/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js +16 -3
  447. package/esm/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js.map +1 -1
  448. package/esm/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/styled.js +4 -4
  449. package/esm/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/styled.js.map +1 -1
  450. package/esm/components/molecules/Menubar/MenuBlock/MenuItem/styled.js +3 -3
  451. package/esm/components/molecules/Menubar/MenuBlock/MenuItem/styled.js.map +1 -1
  452. package/esm/components/molecules/Menubar/MenuBlock/styled.js +7 -7
  453. package/esm/components/molecules/Menubar/MenuBlock/styled.js.map +1 -1
  454. package/esm/components/molecules/Menubar/Menubar.js +30 -12
  455. package/esm/components/molecules/Menubar/Menubar.js.map +1 -1
  456. package/esm/components/molecules/Menubar/MostUsed/MostUsed.js +2 -2
  457. package/esm/components/molecules/Menubar/MostUsed/MostUsed.js.map +1 -1
  458. package/esm/components/molecules/Menubar/MostUsed/styled.js +3 -3
  459. package/esm/components/molecules/Menubar/MostUsed/styled.js.map +1 -1
  460. package/esm/components/molecules/Menubar/SearchResultItem/styled.js +5 -5
  461. package/esm/components/molecules/Menubar/SearchResultItem/styled.js.map +1 -1
  462. package/esm/components/molecules/Menubar/SearchResultItem/utils.js +2 -2
  463. package/esm/components/molecules/Menubar/SearchResultItem/utils.js.map +1 -1
  464. package/esm/components/molecules/Menubar/animations.js +7 -3
  465. package/esm/components/molecules/Menubar/animations.js.map +1 -1
  466. package/esm/components/molecules/Menubar/index.d.ts +1 -1
  467. package/esm/components/molecules/Menubar/index.js +0 -1
  468. package/esm/components/molecules/Menubar/index.js.map +1 -1
  469. package/esm/components/molecules/Menubar/styled.js +11 -11
  470. package/esm/components/molecules/Menubar/styled.js.map +1 -1
  471. package/esm/components/molecules/Menubar/utils.js +1 -1
  472. package/esm/components/molecules/Menubar/utils.js.map +1 -1
  473. package/esm/components/molecules/Select/Dropdown/Dropdown.js +20 -6
  474. package/esm/components/molecules/Select/Dropdown/Dropdown.js.map +1 -1
  475. package/esm/components/molecules/Select/Dropdown/styled.js +13 -13
  476. package/esm/components/molecules/Select/Dropdown/styled.js.map +1 -1
  477. package/esm/components/molecules/Select/Select.js +25 -4
  478. package/esm/components/molecules/Select/Select.js.map +1 -1
  479. package/esm/components/molecules/Select/SelectItem/SelectItem.js +28 -6
  480. package/esm/components/molecules/Select/SelectItem/SelectItem.js.map +1 -1
  481. package/esm/components/molecules/Select/SelectItem/styled.js +6 -6
  482. package/esm/components/molecules/Select/SelectItem/styled.js.map +1 -1
  483. package/esm/components/molecules/Select/index.d.ts +2 -1
  484. package/esm/components/molecules/Select/index.js +1 -1
  485. package/esm/components/molecules/Select/index.js.map +1 -1
  486. package/esm/components/molecules/Select/styled.js +3 -3
  487. package/esm/components/molecules/Select/styled.js.map +1 -1
  488. package/esm/components/molecules/Snackbar/Snackbar.js +3 -1
  489. package/esm/components/molecules/Snackbar/Snackbar.js.map +1 -1
  490. package/esm/components/molecules/Snackbar/index.d.ts +2 -1
  491. package/esm/components/molecules/Snackbar/index.js +1 -1
  492. package/esm/components/molecules/Snackbar/index.js.map +1 -1
  493. package/esm/components/molecules/Snackbar/styled.js +3 -3
  494. package/esm/components/molecules/Snackbar/styled.js.map +1 -1
  495. package/esm/components/molecules/TextArea/TextArea.js +3 -1
  496. package/esm/components/molecules/TextArea/TextArea.js.map +1 -1
  497. package/esm/components/molecules/TextArea/index.d.ts +2 -1
  498. package/esm/components/molecules/TextArea/index.js +1 -1
  499. package/esm/components/molecules/TextArea/index.js.map +1 -1
  500. package/esm/components/molecules/TextArea/styled.js +3 -3
  501. package/esm/components/molecules/TextArea/styled.js.map +1 -1
  502. package/esm/components/organisms/DataGrid/DataGrid.js +27 -13
  503. package/esm/components/organisms/DataGrid/DataGrid.js.map +1 -1
  504. package/esm/components/organisms/DataGrid/Footer/Footer.js +20 -8
  505. package/esm/components/organisms/DataGrid/Footer/Footer.js.map +1 -1
  506. package/esm/components/organisms/DataGrid/Footer/styled.js +12 -12
  507. package/esm/components/organisms/DataGrid/Footer/styled.js.map +1 -1
  508. package/esm/components/organisms/DataGrid/Header/Header.js +21 -8
  509. package/esm/components/organisms/DataGrid/Header/Header.js.map +1 -1
  510. package/esm/components/organisms/DataGrid/Header/styled.js +2 -2
  511. package/esm/components/organisms/DataGrid/Header/styled.js.map +1 -1
  512. package/esm/components/organisms/DataGrid/Row/Row.js +1 -1
  513. package/esm/components/organisms/DataGrid/Row/Row.js.map +1 -1
  514. package/esm/components/organisms/DataGrid/index.d.ts +2 -1
  515. package/esm/components/organisms/DataGrid/index.js +1 -1
  516. package/esm/components/organisms/DataGrid/index.js.map +1 -1
  517. package/esm/components/organisms/DataGrid/styled.js +2 -2
  518. package/esm/components/organisms/DataGrid/styled.js.map +1 -1
  519. package/esm/components/organisms/DataGrid/utils.js +14 -1
  520. package/esm/components/organisms/DataGrid/utils.js.map +1 -1
  521. package/esm/hooks/useClickAwayListener.js +2 -5
  522. package/esm/hooks/useClickAwayListener.js.map +1 -1
  523. package/esm/hooks/useWindowSize.js +15 -2
  524. package/esm/hooks/useWindowSize.js.map +1 -1
  525. package/esm/index.d.ts +42 -21
  526. package/esm/index.js +21 -21
  527. package/esm/index.js.map +1 -1
  528. package/package.json +3 -3
  529. package/src/components/atoms/Accordion/index.ts +2 -1
  530. package/src/components/atoms/Badge/index.ts +2 -1
  531. package/src/components/atoms/Button/index.ts +2 -1
  532. package/src/components/atoms/Input/index.ts +2 -1
  533. package/src/components/atoms/InputMask/index.ts +2 -1
  534. package/src/components/atoms/Modal/index.ts +2 -1
  535. package/src/components/atoms/Skeleton/index.ts +2 -1
  536. package/src/components/atoms/Table/Toolbar/index.ts +2 -1
  537. package/src/components/atoms/Table/index.ts +2 -1
  538. package/src/components/atoms/Tag/index.ts +2 -1
  539. package/src/components/atoms/Tooltip/index.ts +2 -1
  540. package/src/components/molecules/Breadcrumbs/index.ts +2 -5
  541. package/src/components/molecules/DatePicker/index.ts +2 -1
  542. package/src/components/molecules/DateTimePicker/index.ts +2 -1
  543. package/src/components/molecules/Drawer/index.ts +2 -1
  544. package/src/components/molecules/Grid/Item/functions.ts +1 -0
  545. package/src/components/molecules/IconTextButton/index.ts +2 -4
  546. package/src/components/molecules/InputPassword/index.ts +2 -4
  547. package/src/components/molecules/LabeledSwitch/index.ts +2 -4
  548. package/src/components/molecules/Menubar/index.ts +1 -1
  549. package/src/components/molecules/Select/index.ts +2 -1
  550. package/src/components/molecules/Snackbar/index.ts +2 -1
  551. package/src/components/molecules/TextArea/index.ts +2 -1
  552. package/src/components/organisms/DataGrid/index.ts +2 -1
  553. package/src/index.ts +42 -48
@@ -1,5 +1,17 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
2
2
 
3
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
+
5
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6
+
7
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
8
+
9
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
10
+
11
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
12
+
13
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
+
3
15
  import React from 'react';
4
16
  import { Icon, Text } from '@tecsinapse/react-core';
5
17
  import { SubMenuBlock } from "./SubMenuBlock";
@@ -17,8 +29,9 @@ var MenuItem = function MenuItem(_ref) {
17
29
  toggle = _ref.toggle;
18
30
 
19
31
  var _React$useState = React.useState(false),
20
- open = _React$useState[0],
21
- setOpen = _React$useState[1];
32
+ _React$useState2 = _slicedToArray(_React$useState, 2),
33
+ open = _React$useState2[0],
34
+ setOpen = _React$useState2[1];
22
35
 
23
36
  var noTextDecoration = {
24
37
  textDecoration: 'none'
@@ -46,7 +59,7 @@ var MenuItem = function MenuItem(_ref) {
46
59
  name: getIconName(),
47
60
  type: "material-community",
48
61
  fontColor: "orange"
49
- }))), open && (items == null ? void 0 : items.map(function (subItem) {
62
+ }))), open && (items === null || items === void 0 ? void 0 : items.map(function (subItem) {
50
63
  return React.createElement(SubMenuBlock, {
51
64
  key: subItem.title,
52
65
  data: subItem,
@@ -1 +1 @@
1
- {"version":3,"file":"MenuItem.js","names":["React","Icon","Text","SubMenuBlock","StyledRightComponent","StyledText","StyledContainerItemText","StyledSubButton","MenuItem","title","Component","props","rightComponents","items","toggle","useState","open","setOpen","noTextDecoration","textDecoration","getIconName","handleMenuAction","map","subItem"],"sources":["../../../../../../src/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.tsx"],"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"],"mappings":";;AAAA,OAAOA,KAAP,MAAmC,OAAnC;AACA,SAASC,IAAT,EAAeC,IAAf,QAA2B,wBAA3B;AACA,SAASC,YAAT;AACA,SAASC,oBAAT,EAA+BC,UAA/B;AACA,SAASC,uBAAT,EAAkCC,eAAlC;;AAcA,IA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,GAAP,CAAW,UAAAC,OAAO;IAAA,OAChB,oBAAC,YAAD;MAAc,GAAG,EAAEA,OAAO,CAACd,KAA3B;MAAkC,IAAI,EAAEc,OAAxC;MAAiD,MAAM,EAAET;IAAzD,EADgB;EAAA,CAAlB,CADG,CAvBP,CADF;AA8BD,CA/CD;;AAiDA,eAAeN,QAAf"}
1
+ {"version":3,"file":"MenuItem.js","names":["React","Icon","Text","SubMenuBlock","StyledRightComponent","StyledText","StyledContainerItemText","StyledSubButton","MenuItem","title","Component","props","rightComponents","items","toggle","useState","open","setOpen","noTextDecoration","textDecoration","getIconName","handleMenuAction","map","subItem"],"sources":["../../../../../../src/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.tsx"],"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"],"mappings":";;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAmC,OAAnC;AACA,SAASC,IAAT,EAAeC,IAAf,QAA2B,wBAA3B;AACA,SAASC,YAAT;AACA,SAASC,oBAAT,EAA+BC,UAA/B;AACA,SAASC,uBAAT,EAAkCC,eAAlC;;AAcA,IAAMC,QAAiC,GAAG,SAApCA,QAAoC,OAOpC;EAAA,IANJC,KAMI,QANJA,KAMI;EAAA,0BALJC,SAKI;EAAA,IALJA,SAKI,+BALQ,GAKR;EAAA,sBAJJC,KAII;EAAA,IAJJA,KAII,2BAJI,EAIJ;EAAA,IAHJC,eAGI,QAHJA,eAGI;EAAA,IAFJC,KAEI,QAFJA,KAEI;EAAA,IADJC,MACI,QADJA,MACI;;EACJ,sBAAwBd,KAAK,CAACe,QAAN,CAAwB,KAAxB,CAAxB;EAAA;EAAA,IAAOC,IAAP;EAAA,IAAaC,OAAb;;EAEA,IAAMC,gBAAgB,GAAG;IAAEC,cAAc,EAAE;EAAlB,CAAzB;;EAEA,IAAMC,WAAW,GAAG,SAAdA,WAAc;IAAA,OAClBJ,IAAI,GAAG,8BAAH,GAAoC,gCADtB;EAAA,CAApB;;EAGA,IAAMK,gBAAgB,GAAG,SAAnBA,gBAAmB;IAAA,OAAMJ,OAAO,CAAC,CAACD,IAAF,CAAb;EAAA,CAAzB;;EAEA,OACE,0CACE,oBAAC,uBAAD;IAAyB,GAAG,EAAEP;EAA9B,GACE,oBAAC,SAAD,eAAeE,KAAf;IAAsB,KAAK,EAAEO,gBAA7B;IAA+C,OAAO,EAAEJ;EAAxD,IACE,oBAAC,IAAD;IACE,YAAY,EAAEE,IAAI,GAAG,SAAH,GAAe,WADnC;IAEE,SAAS,EAAEA,IAAI,GAAG,QAAH,GAAc;EAF/B,GAIE,oBAAC,UAAD,QAAaP,KAAb,CAJF,CADF,CADF,EASGG,eAAe,IAAI,CAACC,KAApB,IACC,oBAAC,oBAAD,QAAuBD,eAAvB,CAVJ,EAYGC,KAAK,IACJ,oBAAC,eAAD;IAAiB,OAAO,EAAEQ;EAA1B,GACE,oBAAC,IAAD;IACE,IAAI,EAAED,WAAW,EADnB;IAEE,IAAI,EAAC,oBAFP;IAGE,SAAS,EAAC;EAHZ,EADF,CAbJ,CADF,EAuBGJ,IAAI,KACHH,KADG,aACHA,KADG,uBACHA,KAAK,CAAES,GAAP,CAAW,UAAAC,OAAO;IAAA,OAChB,oBAAC,YAAD;MAAc,GAAG,EAAEA,OAAO,CAACd,KAA3B;MAAkC,IAAI,EAAEc,OAAxC;MAAiD,MAAM,EAAET;IAAzD,EADgB;EAAA,CAAlB,CADG,CAvBP,CADF;AA8BD,CA/CD;;AAiDA,eAAeN,QAAf"}
@@ -1,15 +1,15 @@
1
1
  var _templateObject, _templateObject2;
2
2
 
3
- function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
3
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
4
4
 
5
5
  import styled from '@emotion/styled';
6
- export var StyledContainerItem = styled('div')(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n"])));
7
- export var DummyBorder = styled('div')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n height: ", ";\n border-left: ", ";\n margin-right: ", ";\n"])), function (_ref) {
6
+ export var StyledContainerItem = styled('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
7
+ export var DummyBorder = styled('div')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: ", ";\n border-left: ", ";\n margin-right: ", ";\n"])), function (_ref) {
8
8
  var theme = _ref.theme;
9
9
  return theme.typography.sub.fontSize;
10
10
  }, function (_ref2) {
11
11
  var theme = _ref2.theme;
12
- return theme.borderWidth.pico + " solid " + theme.color.primary.medium;
12
+ return "".concat(theme.borderWidth.pico, " solid ").concat(theme.color.primary.medium);
13
13
  }, function (_ref3) {
14
14
  var theme = _ref3.theme;
15
15
  return theme.spacing.mili;
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","names":["styled","StyledContainerItem","DummyBorder","theme","typography","sub","fontSize","borderWidth","pico","color","primary","medium","spacing","mili"],"sources":["../../../../../../../src/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { StyleProps } from '@tecsinapse/react-core';\n\nexport const StyledContainerItem = styled('div')<Partial<StyleProps>>`\n display: flex;\n align-items: center;\n`;\n\nexport const DummyBorder = styled('div')<Partial<StyleProps>>`\n height: ${({ theme }) => theme.typography.sub.fontSize};\n border-left: ${({ theme }) =>\n `${theme.borderWidth.pico} solid ${theme.color.primary.medium}`};\n margin-right: ${({ theme }) => theme.spacing.mili};\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AAGA,OAAO,IAAMC,mBAAmB,GAAGD,MAAM,CAAC,KAAD,CAAT,sHAAzB;AAKP,OAAO,IAAME,WAAW,GAAGF,MAAM,CAAC,KAAD,CAAT,6IACZ;EAAA,IAAGG,KAAH,QAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,UAAN,CAAiBC,GAAjB,CAAqBC,QAApC;AAAA,CADY,EAEP;EAAA,IAAGH,KAAH,SAAGA,KAAH;EAAA,OACVA,KAAK,CAACI,WAAN,CAAkBC,IADR,eACsBL,KAAK,CAACM,KAAN,CAAYC,OAAZ,CAAoBC,MAD1C;AAAA,CAFO,EAIN;EAAA,IAAGR,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACS,OAAN,CAAcC,IAA7B;AAAA,CAJM,CAAjB"}
1
+ {"version":3,"file":"styled.js","names":["styled","StyledContainerItem","DummyBorder","theme","typography","sub","fontSize","borderWidth","pico","color","primary","medium","spacing","mili"],"sources":["../../../../../../../src/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { StyleProps } from '@tecsinapse/react-core';\n\nexport const StyledContainerItem = styled('div')<Partial<StyleProps>>`\n display: flex;\n align-items: center;\n`;\n\nexport const DummyBorder = styled('div')<Partial<StyleProps>>`\n height: ${({ theme }) => theme.typography.sub.fontSize};\n border-left: ${({ theme }) =>\n `${theme.borderWidth.pico} solid ${theme.color.primary.medium}`};\n margin-right: ${({ theme }) => theme.spacing.mili};\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AAGA,OAAO,IAAMC,mBAAmB,GAAGD,MAAM,CAAC,KAAD,CAAT,iHAAzB;AAKP,OAAO,IAAME,WAAW,GAAGF,MAAM,CAAC,KAAD,CAAT,wIACZ;EAAA,IAAGG,KAAH,QAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,UAAN,CAAiBC,GAAjB,CAAqBC,QAApC;AAAA,CADY,EAEP;EAAA,IAAGH,KAAH,SAAGA,KAAH;EAAA,iBACVA,KAAK,CAACI,WAAN,CAAkBC,IADR,oBACsBL,KAAK,CAACM,KAAN,CAAYC,OAAZ,CAAoBC,MAD1C;AAAA,CAFO,EAIN;EAAA,IAAGR,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACS,OAAN,CAAcC,IAA7B;AAAA,CAJM,CAAjB"}
@@ -1,13 +1,13 @@
1
1
  var _templateObject, _templateObject2;
2
2
 
3
- function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
3
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
4
4
 
5
5
  import styled from '@emotion/styled';
6
- export var StyledContainerItemText = styled('div')(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n margin-top: ", ";\n display: flex;\n align-items: center;\n"])), function (_ref) {
6
+ export var StyledContainerItemText = styled('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-top: ", ";\n display: flex;\n align-items: center;\n"])), function (_ref) {
7
7
  var theme = _ref.theme;
8
8
  return theme.spacing.mili;
9
9
  });
10
- export var StyledSubButton = styled('span')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n padding-top: ", " 0 0 0;\n margin-left: ", ";\n cursor: pointer;\n & * {\n user-select: none;\n }\n"])), function (_ref2) {
10
+ export var StyledSubButton = styled('span')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding-top: ", " 0 0 0;\n margin-left: ", ";\n cursor: pointer;\n & * {\n user-select: none;\n }\n"])), function (_ref2) {
11
11
  var theme = _ref2.theme;
12
12
  return theme.spacing.nano;
13
13
  }, function (_ref3) {
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","names":["styled","StyledContainerItemText","theme","spacing","mili","StyledSubButton","nano"],"sources":["../../../../../../src/components/molecules/Menubar/MenuBlock/MenuItem/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { StyleProps } from '@tecsinapse/react-core';\n\nexport const StyledContainerItemText = styled('div')<Partial<StyleProps>>`\n margin-top: ${({ theme }) => theme.spacing.mili};\n display: flex;\n align-items: center;\n`;\n\nexport const StyledSubButton = styled('span')<Partial<StyleProps>>`\n padding-top: ${({ theme }) => theme.spacing.nano} 0 0 0;\n margin-left: ${({ theme }) => theme.spacing.mili};\n cursor: pointer;\n & * {\n user-select: none;\n }\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AAGA,OAAO,IAAMC,uBAAuB,GAAGD,MAAM,CAAC,KAAD,CAAT,4IACpB;EAAA,IAAGE,KAAH,QAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcC,IAA7B;AAAA,CADoB,CAA7B;AAMP,OAAO,IAAMC,eAAe,GAAGL,MAAM,CAAC,MAAD,CAAT,2LACX;EAAA,IAAGE,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcG,IAA7B;AAAA,CADW,EAEX;EAAA,IAAGJ,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcC,IAA7B;AAAA,CAFW,CAArB"}
1
+ {"version":3,"file":"styled.js","names":["styled","StyledContainerItemText","theme","spacing","mili","StyledSubButton","nano"],"sources":["../../../../../../src/components/molecules/Menubar/MenuBlock/MenuItem/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { StyleProps } from '@tecsinapse/react-core';\n\nexport const StyledContainerItemText = styled('div')<Partial<StyleProps>>`\n margin-top: ${({ theme }) => theme.spacing.mili};\n display: flex;\n align-items: center;\n`;\n\nexport const StyledSubButton = styled('span')<Partial<StyleProps>>`\n padding-top: ${({ theme }) => theme.spacing.nano} 0 0 0;\n margin-left: ${({ theme }) => theme.spacing.mili};\n cursor: pointer;\n & * {\n user-select: none;\n }\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AAGA,OAAO,IAAMC,uBAAuB,GAAGD,MAAM,CAAC,KAAD,CAAT,uIACpB;EAAA,IAAGE,KAAH,QAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcC,IAA7B;AAAA,CADoB,CAA7B;AAMP,OAAO,IAAMC,eAAe,GAAGL,MAAM,CAAC,MAAD,CAAT,sLACX;EAAA,IAAGE,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcG,IAA7B;AAAA,CADW,EAEX;EAAA,IAAGJ,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcC,IAA7B;AAAA,CAFW,CAArB"}
@@ -1,26 +1,26 @@
1
1
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
2
2
 
3
- function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
3
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
4
4
 
5
5
  import styled from '@emotion/styled';
6
6
  import { hex2rgba } from '@tecsinapse/react-core';
7
- export var StyledLeftComponent = styled('div')(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n margin-right: ", ";\n"])), function (_ref) {
7
+ export var StyledLeftComponent = styled('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-right: ", ";\n"])), function (_ref) {
8
8
  var theme = _ref.theme;
9
9
  return theme.spacing.mili;
10
10
  });
11
- export var StyledRightComponent = styled('div')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n margin-left: ", ";\n"])), function (_ref2) {
11
+ export var StyledRightComponent = styled('div')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-left: ", ";\n"])), function (_ref2) {
12
12
  var theme = _ref2.theme;
13
13
  return theme.spacing.mili;
14
14
  });
15
- export var StyledContainerMenu = styled('div')(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n flex-direction: row;\n display: flex;\n align-items: center;\n border-bottom: ", ";\n width: 100%;\n padding-bottom: ", ";\n"])), function (_ref3) {
15
+ export var StyledContainerMenu = styled('div')(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n flex-direction: row;\n display: flex;\n align-items: center;\n border-bottom: ", ";\n width: 100%;\n padding-bottom: ", ";\n"])), function (_ref3) {
16
16
  var theme = _ref3.theme;
17
- return theme.borderWidth.pico + " solid " + hex2rgba(theme.miscellaneous.shadow, 0.05);
17
+ return "".concat(theme.borderWidth.pico, " solid ").concat(hex2rgba(theme.miscellaneous.shadow, 0.05));
18
18
  }, function (_ref4) {
19
19
  var theme = _ref4.theme;
20
20
  return theme.spacing.mili;
21
21
  });
22
- export var StyledContainerItems = styled('div')(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n"])));
23
- export var StyledText = styled('span')(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n &:hover {\n color: ", ";\n }\n"])), function (_ref5) {
22
+ export var StyledContainerItems = styled('div')(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n"])));
23
+ export var StyledText = styled('span')(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n &:hover {\n color: ", ";\n }\n"])), function (_ref5) {
24
24
  var theme = _ref5.theme;
25
25
  return theme.font.color.orange;
26
26
  });
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","names":["styled","hex2rgba","StyledLeftComponent","theme","spacing","mili","StyledRightComponent","StyledContainerMenu","borderWidth","pico","miscellaneous","shadow","StyledContainerItems","StyledText","font","color","orange"],"sources":["../../../../../src/components/molecules/Menubar/MenuBlock/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { hex2rgba, StyleProps } from '@tecsinapse/react-core';\n\nexport const StyledLeftComponent = styled('div')<Partial<StyleProps>>`\n margin-right: ${({ theme }) => theme.spacing.mili};\n`;\n\nexport const StyledRightComponent = styled('div')<Partial<StyleProps>>`\n margin-left: ${({ theme }) => theme.spacing.mili};\n`;\n\nexport const StyledContainerMenu = styled('div')<Partial<StyleProps>>`\n flex-direction: row;\n display: flex;\n align-items: center;\n border-bottom: ${({ theme }) =>\n `${theme.borderWidth.pico} solid ${hex2rgba(\n theme.miscellaneous.shadow,\n 0.05\n )}`};\n width: 100%;\n padding-bottom: ${({ theme }) => theme.spacing.mili};\n`;\n\nexport const StyledContainerItems = styled('div')<Partial<StyleProps>>`\n display: flex;\n flex-direction: column;\n`;\n\nexport const StyledText = styled('span')<Partial<StyleProps>>`\n &:hover {\n color: ${({ theme }) => theme.font.color.orange};\n }\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AACA,SAASC,QAAT,QAAqC,wBAArC;AAEA,OAAO,IAAMC,mBAAmB,GAAGF,MAAM,CAAC,KAAD,CAAT,oGACd;EAAA,IAAGG,KAAH,QAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcC,IAA7B;AAAA,CADc,CAAzB;AAIP,OAAO,IAAMC,oBAAoB,GAAGN,MAAM,CAAC,KAAD,CAAT,qGAChB;EAAA,IAAGG,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcC,IAA7B;AAAA,CADgB,CAA1B;AAIP,OAAO,IAAME,mBAAmB,GAAGP,MAAM,CAAC,KAAD,CAAT,kNAIb;EAAA,IAAGG,KAAH,SAAGA,KAAH;EAAA,OACZA,KAAK,CAACK,WAAN,CAAkBC,IADN,eACoBR,QAAQ,CACzCE,KAAK,CAACO,aAAN,CAAoBC,MADqB,EAEzC,IAFyC,CAD5B;AAAA,CAJa,EAUZ;EAAA,IAAGR,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcC,IAA7B;AAAA,CAVY,CAAzB;AAaP,OAAO,IAAMO,oBAAoB,GAAGZ,MAAM,CAAC,KAAD,CAAT,2HAA1B;AAKP,OAAO,IAAMa,UAAU,GAAGb,MAAM,CAAC,MAAD,CAAT,mHAEV;EAAA,IAAGG,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACW,IAAN,CAAWC,KAAX,CAAiBC,MAAhC;AAAA,CAFU,CAAhB"}
1
+ {"version":3,"file":"styled.js","names":["styled","hex2rgba","StyledLeftComponent","theme","spacing","mili","StyledRightComponent","StyledContainerMenu","borderWidth","pico","miscellaneous","shadow","StyledContainerItems","StyledText","font","color","orange"],"sources":["../../../../../src/components/molecules/Menubar/MenuBlock/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { hex2rgba, StyleProps } from '@tecsinapse/react-core';\n\nexport const StyledLeftComponent = styled('div')<Partial<StyleProps>>`\n margin-right: ${({ theme }) => theme.spacing.mili};\n`;\n\nexport const StyledRightComponent = styled('div')<Partial<StyleProps>>`\n margin-left: ${({ theme }) => theme.spacing.mili};\n`;\n\nexport const StyledContainerMenu = styled('div')<Partial<StyleProps>>`\n flex-direction: row;\n display: flex;\n align-items: center;\n border-bottom: ${({ theme }) =>\n `${theme.borderWidth.pico} solid ${hex2rgba(\n theme.miscellaneous.shadow,\n 0.05\n )}`};\n width: 100%;\n padding-bottom: ${({ theme }) => theme.spacing.mili};\n`;\n\nexport const StyledContainerItems = styled('div')<Partial<StyleProps>>`\n display: flex;\n flex-direction: column;\n`;\n\nexport const StyledText = styled('span')<Partial<StyleProps>>`\n &:hover {\n color: ${({ theme }) => theme.font.color.orange};\n }\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AACA,SAASC,QAAT,QAAqC,wBAArC;AAEA,OAAO,IAAMC,mBAAmB,GAAGF,MAAM,CAAC,KAAD,CAAT,+FACd;EAAA,IAAGG,KAAH,QAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcC,IAA7B;AAAA,CADc,CAAzB;AAIP,OAAO,IAAMC,oBAAoB,GAAGN,MAAM,CAAC,KAAD,CAAT,gGAChB;EAAA,IAAGG,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcC,IAA7B;AAAA,CADgB,CAA1B;AAIP,OAAO,IAAME,mBAAmB,GAAGP,MAAM,CAAC,KAAD,CAAT,6MAIb;EAAA,IAAGG,KAAH,SAAGA,KAAH;EAAA,iBACZA,KAAK,CAACK,WAAN,CAAkBC,IADN,oBACoBR,QAAQ,CACzCE,KAAK,CAACO,aAAN,CAAoBC,MADqB,EAEzC,IAFyC,CAD5B;AAAA,CAJa,EAUZ;EAAA,IAAGR,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcC,IAA7B;AAAA,CAVY,CAAzB;AAaP,OAAO,IAAMO,oBAAoB,GAAGZ,MAAM,CAAC,KAAD,CAAT,sHAA1B;AAKP,OAAO,IAAMa,UAAU,GAAGb,MAAM,CAAC,MAAD,CAAT,8GAEV;EAAA,IAAGG,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACW,IAAN,CAAWC,KAAX,CAAiBC,MAAhC;AAAA,CAFU,CAAhB"}
@@ -2,6 +2,20 @@ var _excluded = ["leftComponents", "rightComponents", "searchPlaceholder", "opti
2
2
 
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
4
4
 
5
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
+
7
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
8
+
9
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
+
11
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
12
+
13
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
14
+
15
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
+
17
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
18
+
5
19
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
6
20
 
7
21
  import React, { useRef } from 'react';
@@ -28,23 +42,27 @@ var Menubar = function Menubar(_ref) {
28
42
  searchResultsLabel = _ref$searchResultsLab === void 0 ? 'Resultados da busca' : _ref$searchResultsLab,
29
43
  _ref$searchable = _ref.searchable,
30
44
  searchable = _ref$searchable === void 0 ? true : _ref$searchable,
31
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
45
+ rest = _objectWithoutProperties(_ref, _excluded);
32
46
 
33
47
  var _React$useState = React.useState(''),
34
- search = _React$useState[0],
35
- setSearch = _React$useState[1];
48
+ _React$useState2 = _slicedToArray(_React$useState, 2),
49
+ search = _React$useState2[0],
50
+ setSearch = _React$useState2[1];
36
51
 
37
- var _React$useState2 = React.useState([]),
38
- results = _React$useState2[0],
39
- setResults = _React$useState2[1];
52
+ var _React$useState3 = React.useState([]),
53
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
54
+ results = _React$useState4[0],
55
+ setResults = _React$useState4[1];
40
56
 
41
57
  var _useDebouncedState = useDebouncedState('', setSearch),
42
- input = _useDebouncedState[0],
43
- setInput = _useDebouncedState[1];
58
+ _useDebouncedState2 = _slicedToArray(_useDebouncedState, 2),
59
+ input = _useDebouncedState2[0],
60
+ setInput = _useDebouncedState2[1];
44
61
 
45
- var _React$useState3 = React.useState(false),
46
- open = _React$useState3[0],
47
- setOpen = _React$useState3[1];
62
+ var _React$useState5 = React.useState(false),
63
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
64
+ open = _React$useState6[0],
65
+ setOpen = _React$useState6[1];
48
66
 
49
67
  var menuRef = useRef(null);
50
68
  useClickAwayListener(menuRef, setOpen, 'mouseup');
@@ -107,7 +125,7 @@ var Menubar = function Menubar(_ref) {
107
125
  fontWeight: "bold"
108
126
  }, searchResultsLabel)), results.map(function (result) {
109
127
  return React.createElement(SearchResultItem, {
110
- key: result.title + "-" + result.category,
128
+ key: "".concat(result.title, "-").concat(result.category),
111
129
  data: result,
112
130
  searchTerm: search,
113
131
  toggle: toggleOpen
@@ -1 +1 @@
1
- {"version":3,"file":"Menubar.js","names":["React","useRef","Icon","Text","useDebouncedState","Transition","StyledIconInput","StyledMenuBar","StyledMenuButton","StyledContainerOpenMenu","StyledInput","StyledInputContainer","StyledSearchResultsContainer","StyledSearchTextContainer","MostUsed","MenuBlock","SearchResultItem","filterAndTransform","getContainerOpenMenuStyles","getInputContainerStyles","useClickAwayListener","Menubar","leftComponents","rightComponents","searchPlaceholder","options","mostUsed","mostUsedLabel","searchResultsLabel","searchable","rest","useState","search","setSearch","results","setResults","input","setInput","open","setOpen","menuRef","toggleOpen","useCallback","state","useEffect","ref","current","map","result","title","category"],"sources":["../../../../src/components/molecules/Menubar/Menubar.tsx"],"sourcesContent":["import React, { useRef } from 'react';\nimport { Icon, Text, useDebouncedState } from '@tecsinapse/react-core';\nimport { Transition } from 'react-transition-group';\nimport {\n StyledIconInput,\n StyledMenuBar,\n StyledMenuButton,\n StyledContainerOpenMenu,\n StyledInput,\n StyledInputContainer,\n StyledSearchResultsContainer,\n StyledSearchTextContainer,\n} from './styled';\nimport { MostUsedType, OptionsType } from './types';\nimport { MostUsed } from './MostUsed';\nimport { MenuBlock } from './MenuBlock';\nimport { SearchResultItem } from './SearchResultItem';\nimport { filterAndTransform } from './utils';\nimport {\n getContainerOpenMenuStyles,\n getInputContainerStyles,\n} from './animations';\nimport { useClickAwayListener } from '../../../hooks';\n\nexport interface MenubarProps extends React.HTMLAttributes<HTMLDivElement> {\n options: OptionsType[];\n leftComponents?: React.ReactNode;\n rightComponents?: React.ReactNode;\n /** Limited to first 4 elements */\n mostUsed?: MostUsedType[];\n mostUsedLabel?: string;\n searchable?: boolean;\n searchPlaceholder?: string;\n searchResultsLabel?: string;\n}\n\nconst Menubar: React.FC<MenubarProps> = ({\n leftComponents,\n rightComponents,\n searchPlaceholder = 'O quê você deseja buscar?',\n options,\n mostUsed,\n mostUsedLabel = 'Mais acessados',\n searchResultsLabel = 'Resultados da busca',\n searchable = true,\n ...rest\n}) => {\n const [search, setSearch] = React.useState<string>('');\n const [results, setResults] = React.useState<MostUsedType[]>([]);\n const [input, setInput] = useDebouncedState<string>('', setSearch);\n const [open, setOpen] = React.useState<boolean>(false);\n const menuRef = useRef<HTMLDivElement | null>(null);\n useClickAwayListener(menuRef, setOpen, 'mouseup');\n\n const toggleOpen = React.useCallback(\n () => setOpen(state => !state),\n [setOpen]\n );\n\n React.useEffect(() => {\n if (search === '') return;\n setResults(filterAndTransform(options, search));\n }, [search]);\n\n return (\n <div ref={ref => (menuRef.current = ref)} {...rest}>\n <StyledMenuBar>\n <StyledMenuButton variant=\"filled\" color=\"primary\" onPress={toggleOpen}>\n {!open ? (\n <Icon\n size=\"deca\"\n name=\"menu\"\n type=\"material-community\"\n fontColor=\"light\"\n />\n ) : (\n <Icon\n size=\"deca\"\n name=\"close\"\n type=\"material-community\"\n fontColor=\"light\"\n />\n )}\n </StyledMenuButton>\n {leftComponents}\n <Transition in={open} timeout={250}>\n {state => (\n <StyledInputContainer style={getInputContainerStyles(state)}>\n {searchable && (\n <StyledInput\n placeholder={searchPlaceholder}\n leftComponent={\n <StyledIconInput>\n <Icon name=\"magnify\" type=\"material-community\" />\n </StyledIconInput>\n }\n value={input}\n onChange={setInput}\n />\n )}\n </StyledInputContainer>\n )}\n </Transition>\n {rightComponents}\n </StyledMenuBar>\n <Transition in={open} timeout={250}>\n {state => (\n <StyledContainerOpenMenu style={getContainerOpenMenuStyles(state)}>\n {!search ? (\n <>\n {mostUsed && (\n <MostUsed\n label={mostUsedLabel}\n data={mostUsed}\n toggle={toggleOpen}\n />\n )}\n <MenuBlock options={options} toggle={toggleOpen} />\n </>\n ) : (\n <StyledSearchResultsContainer>\n <StyledSearchTextContainer>\n <Text fontWeight=\"bold\">{searchResultsLabel}</Text>\n </StyledSearchTextContainer>\n {results.map(result => (\n <SearchResultItem\n key={`${result.title}-${result.category}`}\n data={result}\n searchTerm={search}\n toggle={toggleOpen}\n />\n ))}\n </StyledSearchResultsContainer>\n )}\n </StyledContainerOpenMenu>\n )}\n </Transition>\n </div>\n );\n};\n\nexport default Menubar;\n"],"mappings":";;;;;;AAAA,OAAOA,KAAP,IAAgBC,MAAhB,QAA8B,OAA9B;AACA,SAASC,IAAT,EAAeC,IAAf,EAAqBC,iBAArB,QAA8C,wBAA9C;AACA,SAASC,UAAT,QAA2B,wBAA3B;AACA,SACEC,eADF,EAEEC,aAFF,EAGEC,gBAHF,EAIEC,uBAJF,EAKEC,WALF,EAMEC,oBANF,EAOEC,4BAPF,EAQEC,yBARF;AAWA,SAASC,QAAT;AACA,SAASC,SAAT;AACA,SAASC,gBAAT;AACA,SAASC,kBAAT;AACA,SACEC,0BADF,EAEEC,uBAFF;AAIA,SAASC,oBAAT;;AAcA,IAAMC,OAA+B,GAAG,SAAlCA,OAAkC,OAUlC;EAAA,IATJC,cASI,QATJA,cASI;EAAA,I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AAO,EAAEhB,OAApB;MAA6B,MAAM,EAAEgB;IAArC,EARF,CADD,GAYC,oBAAC,4BAAD,QACE,oBAAC,yBAAD,QACE,oBAAC,IAAD;MAAM,UAAU,EAAC;IAAjB,GAAyBb,kBAAzB,CADF,CADF,EAIGM,OAAO,CAACa,GAAR,CAAY,UAAAC,MAAM;MAAA,OACjB,oBAAC,gBAAD;QACE,GAAG,EAAKA,MAAM,CAACC,KAAZ,SAAqBD,MAAM,CAACE,QADjC;QAEE,IAAI,EAAEF,MAFR;QAGE,UAAU,EAAEhB,MAHd;QAIE,MAAM,EAAES;MAJV,EADiB;IAAA,CAAlB,CAJH,CAbJ,CADI;EAAA,CADR,CAxCF,CADF;AA2ED,CAvGD;;AAyGA,eAAepB,OAAf"}
1
+ {"version":3,"file":"Menubar.js","names":["React","useRef","Icon","Text","useDebouncedState","Transition","StyledIconInput","StyledMenuBar","StyledMenuButton","StyledContainerOpenMenu","StyledInput","StyledInputContainer","StyledSearchResultsContainer","StyledSearchTextContainer","MostUsed","MenuBlock","SearchResultItem","filterAndTransform","getContainerOpenMenuStyles","getInputContainerStyles","useClickAwayListener","Menubar","leftComponents","rightComponents","searchPlaceholder","options","mostUsed","mostUsedLabel","searchResultsLabel","searchable","rest","useState","search","setSearch","results","setResults","input","setInput","open","setOpen","menuRef","toggleOpen","useCallback","state","useEffect","ref","current","map","result","title","category"],"sources":["../../../../src/components/molecules/Menubar/Menubar.tsx"],"sourcesContent":["import React, { useRef } from 'react';\nimport { Icon, Text, useDebouncedState } from '@tecsinapse/react-core';\nimport { Transition } from 'react-transition-group';\nimport {\n StyledIconInput,\n StyledMenuBar,\n StyledMenuButton,\n StyledContainerOpenMenu,\n StyledInput,\n StyledInputContainer,\n StyledSearchResultsContainer,\n StyledSearchTextContainer,\n} from './styled';\nimport { MostUsedType, OptionsType } from './types';\nimport { MostUsed } from './MostUsed';\nimport { MenuBlock } from './MenuBlock';\nimport { SearchResultItem } from './SearchResultItem';\nimport { filterAndTransform } from './utils';\nimport {\n getContainerOpenMenuStyles,\n getInputContainerStyles,\n} from './animations';\nimport { useClickAwayListener } from '../../../hooks';\n\nexport interface MenubarProps extends React.HTMLAttributes<HTMLDivElement> {\n options: OptionsType[];\n leftComponents?: React.ReactNode;\n rightComponents?: React.ReactNode;\n /** Limited to first 4 elements */\n mostUsed?: MostUsedType[];\n mostUsedLabel?: string;\n searchable?: boolean;\n searchPlaceholder?: string;\n searchResultsLabel?: string;\n}\n\nconst Menubar: React.FC<MenubarProps> = ({\n leftComponents,\n rightComponents,\n searchPlaceholder = 'O quê você deseja buscar?',\n options,\n mostUsed,\n mostUsedLabel = 'Mais acessados',\n searchResultsLabel = 'Resultados da busca',\n searchable = true,\n ...rest\n}) => {\n const [search, setSearch] = React.useState<string>('');\n const [results, setResults] = React.useState<MostUsedType[]>([]);\n const [input, setInput] = useDebouncedState<string>('', setSearch);\n const [open, setOpen] = React.useState<boolean>(false);\n const menuRef = useRef<HTMLDivElement | null>(null);\n useClickAwayListener(menuRef, setOpen, 'mouseup');\n\n const toggleOpen = React.useCallback(\n () => setOpen(state => !state),\n [setOpen]\n );\n\n React.useEffect(() => {\n if (search === '') return;\n setResults(filterAndTransform(options, search));\n }, [search]);\n\n return (\n <div ref={ref => (menuRef.current = ref)} {...rest}>\n <StyledMenuBar>\n <StyledMenuButton variant=\"filled\" color=\"primary\" onPress={toggleOpen}>\n {!open ? (\n <Icon\n size=\"deca\"\n name=\"menu\"\n type=\"material-community\"\n fontColor=\"light\"\n />\n ) : (\n <Icon\n size=\"deca\"\n name=\"close\"\n type=\"material-community\"\n fontColor=\"light\"\n />\n )}\n </StyledMenuButton>\n {leftComponents}\n <Transition in={open} timeout={250}>\n {state => (\n <StyledInputContainer style={getInputContainerStyles(state)}>\n {searchable && (\n <StyledInput\n placeholder={searchPlaceholder}\n leftComponent={\n <StyledIconInput>\n <Icon name=\"magnify\" type=\"material-community\" />\n </StyledIconInput>\n }\n value={input}\n onChange={setInput}\n />\n )}\n </StyledInputContainer>\n )}\n </Transition>\n {rightComponents}\n </StyledMenuBar>\n <Transition in={open} timeout={250}>\n {state => (\n <StyledContainerOpenMenu style={getContainerOpenMenuStyles(state)}>\n {!search ? (\n <>\n {mostUsed && (\n <MostUsed\n label={mostUsedLabel}\n data={mostUsed}\n toggle={toggleOpen}\n />\n )}\n <MenuBlock options={options} toggle={toggleOpen} />\n </>\n ) : (\n <StyledSearchResultsContainer>\n <StyledSearchTextContainer>\n <Text fontWeight=\"bold\">{searchResultsLabel}</Text>\n </StyledSearchTextContainer>\n {results.map(result => (\n <SearchResultItem\n key={`${result.title}-${result.category}`}\n data={result}\n searchTerm={search}\n toggle={toggleOpen}\n />\n ))}\n </StyledSearchResultsContainer>\n )}\n </StyledContainerOpenMenu>\n )}\n </Transition>\n </div>\n );\n};\n\nexport default Menubar;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,IAAgBC,MAAhB,QAA8B,OAA9B;AACA,SAASC,IAAT,EAAeC,IAAf,EAAqBC,iBAArB,QAA8C,wBAA9C;AACA,SAASC,UAAT,QAA2B,wBAA3B;AACA,SACEC,eADF,EAEEC,aAFF,EAGEC,gBAHF,EAIEC,uBAJF,EAKEC,WALF,EAMEC,oBANF,EAOEC,4BAPF,EAQEC,yBARF;AAWA,SAASC,QAAT;AACA,SAASC,SAAT;AACA,SAASC,gBAAT;AACA,SAASC,kBAAT;AACA,SACEC,0BADF,EAEEC,uBAFF;AAIA,SAASC,oBAAT;;AAcA,IAAMC,OAA+B,GAAG,SAAlCA,OAAkC,OAUlC;EAAA,IATJC,cASI,QATJA,cASI;EAAA,IARJC,eAQI,QARJA,eAQI;EAAA,iCAPJC,iBAOI;EAAA,IAPJA,iBAOI,sCAPgB,2BAOhB;EAAA,IANJC,OAMI,QANJA,OAMI;EAAA,IALJC,QAKI,QALJA,QAKI;EAAA,8BAJJC,aAII;EAAA,IAJJA,aAII,mCAJY,gBAIZ;EAAA,iCAHJC,kBAGI;EAAA,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AAAC,MAAM;MAAA,OACjB,oBAAC,gBAAD;QACE,GAAG,YAAKA,MAAM,CAACC,KAAZ,cAAqBD,MAAM,CAACE,QAA5B,CADL;QAEE,IAAI,EAAEF,MAFR;QAGE,UAAU,EAAEhB,MAHd;QAIE,MAAM,EAAES;MAJV,EADiB;IAAA,CAAlB,CAJH,CAbJ,CADI;EAAA,CADR,CAxCF,CADF;AA2ED,CAvGD;;AAyGA,eAAepB,OAAf"}
@@ -22,11 +22,11 @@ var MostUsed = function MostUsed(_ref) {
22
22
  props = _ref2$props === void 0 ? {} : _ref2$props;
23
23
  return React.createElement(Component, _extends({}, props, {
24
24
  style: noTextDecoration,
25
- key: title + "-" + category,
25
+ key: "".concat(title, "-").concat(category),
26
26
  onClick: toggle
27
27
  }), React.createElement(StyledCard, {
28
28
  elevated: true,
29
- key: title + "-" + category
29
+ key: "".concat(title, "-").concat(category)
30
30
  }, React.createElement(Text, {
31
31
  fontWeight: "bold",
32
32
  colorVariant: "primary"
@@ -1 +1 @@
1
- {"version":3,"file":"MostUsed.js","names":["React","Text","StyledCard","StyledCardContainer","MostUsed","data","label","toggle","noTextDecoration","textDecoration","slice","map","title","category","Component","props","memo"],"sources":["../../../../../src/components/molecules/Menubar/MostUsed/MostUsed.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from '@tecsinapse/react-core';\nimport { StyledCard, StyledCardContainer } from './styled';\nimport { MostUsedType } from '../types';\n\ninterface MostUsedProps {\n data: MostUsedType[];\n label: string;\n toggle: () => void;\n}\n\nconst MostUsed: React.FC<MostUsedProps> = ({ data, label, toggle }) => {\n const noTextDecoration = { textDecoration: 'none' };\n\n return (\n <>\n <Text fontWeight=\"bold\">{label}</Text>\n <StyledCardContainer>\n {data\n .slice(0, 4)\n .map(\n ({\n title,\n category,\n Component = 'a',\n props = {},\n }: MostUsedType) => (\n <Component\n {...props}\n style={noTextDecoration}\n key={`${title}-${category}`}\n onClick={toggle}\n >\n <StyledCard elevated key={`${title}-${category}`}>\n <Text fontWeight=\"bold\" colorVariant=\"primary\">\n {title}\n </Text>\n <Text\n fontWeight=\"bold\"\n colorVariant=\"secondary\"\n typography=\"label\"\n >\n {category}\n </Text>\n </StyledCard>\n </Component>\n )\n )}\n </StyledCardContainer>\n </>\n );\n};\n\nexport default React.memo(MostUsed);\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,wBAArB;AACA,SAASC,UAAT,EAAqBC,mBAArB;;AASA,IAAMC,QAAiC,GAAG,SAApCA,QAAoC,OAA6B;EAAA,IAA1BC,IAA0B,QAA1BA,IAA0B;EAAA,IAApBC,KAAoB,QAApBA,KAAoB;EAAA,IAAbC,MAAa,QAAbA,MAAa;EACrE,IAAMC,gBAAgB,GAAG;IAAEC,cAAc,EAAE;EAAlB,CAAzB;EAEA,OACE,0CACE,oBAAC,IAAD;IAAM,UAAU,EAAC;EAAjB,GAAyBH,KAAzB,CADF,EAEE,oBAAC,mBAAD,QACGD,IAAI,CACFK,KADF,CACQ,CADR,EACW,CADX,EAEEC,GAFF,CAGG;IAAA,IACEC,KADF,SACEA,KADF;IAAA,IAEEC,QAFF,SAEEA,QAFF;IAAA,4BAGEC,SAHF;IAAA,IAGEA,SAHF,gCAGc,GAHd;IAAA,wBAIEC,KAJF;IAAA,IAIEA,KAJF,4BAIU,EAJV;IAAA,OAME,oBAAC,SAAD,eACMA,KADN;MAEE,KAAK,EAAEP,gBAFT;MAGE,GAAG,EAAKI,KAAL,SAAcC,QAHnB;MAIE,OAAO,EAAEN;IAJX,IAME,oBAAC,UAAD;MAAY,QAAQ,MAApB;MAAqB,GAAG,EAAKK,KAAL,SAAcC;IAAtC,GACE,oBAAC,IAAD;MAAM,UAAU,EAAC,MAAjB;MAAwB,YAAY,EAAC;IAArC,GACGD,KADH,CADF,EAIE,oBAAC,IAAD;MACE,UAAU,EAAC,MADb;MAEE,YAAY,EAAC,WAFf;MAGE,UAAU,EAAC;IAHb,GAKGC,QALH,CAJF,CANF,CANF;EAAA,CAHH,CADH,CAFF,CADF;AAqCD,CAxCD;;AA0CA,eAAeb,KAAK,CAACgB,IAAN,CAAWZ,QAAX,CAAf"}
1
+ {"version":3,"file":"MostUsed.js","names":["React","Text","StyledCard","StyledCardContainer","MostUsed","data","label","toggle","noTextDecoration","textDecoration","slice","map","title","category","Component","props","memo"],"sources":["../../../../../src/components/molecules/Menubar/MostUsed/MostUsed.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from '@tecsinapse/react-core';\nimport { StyledCard, StyledCardContainer } from './styled';\nimport { MostUsedType } from '../types';\n\ninterface MostUsedProps {\n data: MostUsedType[];\n label: string;\n toggle: () => void;\n}\n\nconst MostUsed: React.FC<MostUsedProps> = ({ data, label, toggle }) => {\n const noTextDecoration = { textDecoration: 'none' };\n\n return (\n <>\n <Text fontWeight=\"bold\">{label}</Text>\n <StyledCardContainer>\n {data\n .slice(0, 4)\n .map(\n ({\n title,\n category,\n Component = 'a',\n props = {},\n }: MostUsedType) => (\n <Component\n {...props}\n style={noTextDecoration}\n key={`${title}-${category}`}\n onClick={toggle}\n >\n <StyledCard elevated key={`${title}-${category}`}>\n <Text fontWeight=\"bold\" colorVariant=\"primary\">\n {title}\n </Text>\n <Text\n fontWeight=\"bold\"\n colorVariant=\"secondary\"\n typography=\"label\"\n >\n {category}\n </Text>\n </StyledCard>\n </Component>\n )\n )}\n </StyledCardContainer>\n </>\n );\n};\n\nexport default React.memo(MostUsed);\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,wBAArB;AACA,SAASC,UAAT,EAAqBC,mBAArB;;AASA,IAAMC,QAAiC,GAAG,SAApCA,QAAoC,OAA6B;EAAA,IAA1BC,IAA0B,QAA1BA,IAA0B;EAAA,IAApBC,KAAoB,QAApBA,KAAoB;EAAA,IAAbC,MAAa,QAAbA,MAAa;EACrE,IAAMC,gBAAgB,GAAG;IAAEC,cAAc,EAAE;EAAlB,CAAzB;EAEA,OACE,0CACE,oBAAC,IAAD;IAAM,UAAU,EAAC;EAAjB,GAAyBH,KAAzB,CADF,EAEE,oBAAC,mBAAD,QACGD,IAAI,CACFK,KADF,CACQ,CADR,EACW,CADX,EAEEC,GAFF,CAGG;IAAA,IACEC,KADF,SACEA,KADF;IAAA,IAEEC,QAFF,SAEEA,QAFF;IAAA,4BAGEC,SAHF;IAAA,IAGEA,SAHF,gCAGc,GAHd;IAAA,wBAIEC,KAJF;IAAA,IAIEA,KAJF,4BAIU,EAJV;IAAA,OAME,oBAAC,SAAD,eACMA,KADN;MAEE,KAAK,EAAEP,gBAFT;MAGE,GAAG,YAAKI,KAAL,cAAcC,QAAd,CAHL;MAIE,OAAO,EAAEN;IAJX,IAME,oBAAC,UAAD;MAAY,QAAQ,MAApB;MAAqB,GAAG,YAAKK,KAAL,cAAcC,QAAd;IAAxB,GACE,oBAAC,IAAD;MAAM,UAAU,EAAC,MAAjB;MAAwB,YAAY,EAAC;IAArC,GACGD,KADH,CADF,EAIE,oBAAC,IAAD;MACE,UAAU,EAAC,MADb;MAEE,YAAY,EAAC,WAFf;MAGE,UAAU,EAAC;IAHb,GAKGC,QALH,CAJF,CANF,CANF;EAAA,CAHH,CADH,CAFF,CADF;AAqCD,CAxCD;;AA0CA,eAAeb,KAAK,CAACgB,IAAN,CAAWZ,QAAX,CAAf"}
@@ -1,11 +1,11 @@
1
1
  var _templateObject, _templateObject2;
2
2
 
3
- function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
3
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
4
4
 
5
5
  import { default as webStyled } from '@emotion/styled';
6
6
  import { Card } from '@tecsinapse/react-core';
7
7
  import { default as nativeStyled } from '@emotion/native';
8
- export var StyledCardContainer = webStyled('div')(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n grid-column-gap: ", ";\n margin-bottom: ", ";\n margin-top: ", ";\n"])), function (_ref) {
8
+ export var StyledCardContainer = webStyled('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n grid-column-gap: ", ";\n margin-bottom: ", ";\n margin-top: ", ";\n"])), function (_ref) {
9
9
  var theme = _ref.theme;
10
10
  return theme.spacing.mega;
11
11
  }, function (_ref2) {
@@ -15,7 +15,7 @@ export var StyledCardContainer = webStyled('div')(_templateObject || (_templateO
15
15
  var theme = _ref3.theme;
16
16
  return theme.spacing.centi;
17
17
  });
18
- export var StyledCard = nativeStyled(Card)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n"])), function (_ref4) {
18
+ export var StyledCard = nativeStyled(Card)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n"])), function (_ref4) {
19
19
  var theme = _ref4.theme;
20
20
  return theme.spacing.mili;
21
21
  }, function (_ref5) {
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","names":["default","webStyled","Card","nativeStyled","StyledCardContainer","theme","spacing","mega","kilo","centi","StyledCard","mili","deca"],"sources":["../../../../../src/components/molecules/Menubar/MostUsed/styled.ts"],"sourcesContent":["import { default as webStyled } from '@emotion/styled';\nimport { Card, StyleProps } from '@tecsinapse/react-core';\nimport { default as nativeStyled } from '@emotion/native';\n\nexport const StyledCardContainer = webStyled('div')<Partial<StyleProps>>`\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n grid-column-gap: ${({ theme }) => theme.spacing.mega};\n margin-bottom: ${({ theme }) => theme.spacing.kilo};\n margin-top: ${({ theme }) => theme.spacing.centi};\n`;\n\nexport const StyledCard = nativeStyled(Card)<Partial<StyleProps>>`\n padding-top: ${({ theme }) => theme.spacing.mili};\n padding-bottom: ${({ theme }) => theme.spacing.mili};\n padding-left: ${({ theme }) => theme.spacing.deca};\n padding-right: ${({ theme }) => theme.spacing.deca};\n`;\n"],"mappings":";;;;AAAA,SAASA,OAAO,IAAIC,SAApB,QAAqC,iBAArC;AACA,SAASC,IAAT,QAAiC,wBAAjC;AACA,SAASF,OAAO,IAAIG,YAApB,QAAwC,iBAAxC;AAEA,OAAO,IAAMC,mBAAmB,GAAGH,SAAS,CAAC,KAAD,CAAZ,0NAGT;EAAA,IAAGI,KAAH,QAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcC,IAA7B;AAAA,CAHS,EAIX;EAAA,IAAGF,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcE,IAA7B;AAAA,CAJW,EAKd;EAAA,IAAGH,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcG,KAA7B;AAAA,CALc,CAAzB;AAQP,OAAO,IAAMC,UAAU,GAAGP,YAAY,CAACD,IAAD,CAAf,qLACJ;EAAA,IAAGG,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcK,IAA7B;AAAA,CADI,EAED;EAAA,IAAGN,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcK,IAA7B;AAAA,CAFC,EAGH;EAAA,IAAGN,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcM,IAA7B;AAAA,CAHG,EAIF;EAAA,IAAGP,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcM,IAA7B;AAAA,CAJE,CAAhB"}
1
+ {"version":3,"file":"styled.js","names":["default","webStyled","Card","nativeStyled","StyledCardContainer","theme","spacing","mega","kilo","centi","StyledCard","mili","deca"],"sources":["../../../../../src/components/molecules/Menubar/MostUsed/styled.ts"],"sourcesContent":["import { default as webStyled } from '@emotion/styled';\nimport { Card, StyleProps } from '@tecsinapse/react-core';\nimport { default as nativeStyled } from '@emotion/native';\n\nexport const StyledCardContainer = webStyled('div')<Partial<StyleProps>>`\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n grid-column-gap: ${({ theme }) => theme.spacing.mega};\n margin-bottom: ${({ theme }) => theme.spacing.kilo};\n margin-top: ${({ theme }) => theme.spacing.centi};\n`;\n\nexport const StyledCard = nativeStyled(Card)<Partial<StyleProps>>`\n padding-top: ${({ theme }) => theme.spacing.mili};\n padding-bottom: ${({ theme }) => theme.spacing.mili};\n padding-left: ${({ theme }) => theme.spacing.deca};\n padding-right: ${({ theme }) => theme.spacing.deca};\n`;\n"],"mappings":";;;;AAAA,SAASA,OAAO,IAAIC,SAApB,QAAqC,iBAArC;AACA,SAASC,IAAT,QAAiC,wBAAjC;AACA,SAASF,OAAO,IAAIG,YAApB,QAAwC,iBAAxC;AAEA,OAAO,IAAMC,mBAAmB,GAAGH,SAAS,CAAC,KAAD,CAAZ,qNAGT;EAAA,IAAGI,KAAH,QAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcC,IAA7B;AAAA,CAHS,EAIX;EAAA,IAAGF,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcE,IAA7B;AAAA,CAJW,EAKd;EAAA,IAAGH,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcG,KAA7B;AAAA,CALc,CAAzB;AAQP,OAAO,IAAMC,UAAU,GAAGP,YAAY,CAACD,IAAD,CAAf,gLACJ;EAAA,IAAGG,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcK,IAA7B;AAAA,CADI,EAED;EAAA,IAAGN,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcK,IAA7B;AAAA,CAFC,EAGH;EAAA,IAAGN,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcM,IAA7B;AAAA,CAHG,EAIF;EAAA,IAAGP,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcM,IAA7B;AAAA,CAJE,CAAhB"}
@@ -1,18 +1,18 @@
1
1
  var _templateObject, _templateObject2;
2
2
 
3
- function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
3
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
4
4
 
5
5
  import styled from '@emotion/styled';
6
6
  import { default as nativeStyled } from '@emotion/native';
7
7
  import { hex2rgba, Text } from '@tecsinapse/react-core';
8
- export var StyledSearchItemContainer = styled('div')(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n padding: ", ";\n border-top: ", ";\n"])), function (_ref) {
8
+ export var StyledSearchItemContainer = styled('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: ", ";\n border-top: ", ";\n"])), function (_ref) {
9
9
  var theme = _ref.theme;
10
- return theme.spacing.mili + " 0 " + theme.spacing.centi + " 0";
10
+ return "".concat(theme.spacing.mili, " 0 ").concat(theme.spacing.centi, " 0");
11
11
  }, function (_ref2) {
12
12
  var theme = _ref2.theme;
13
- return theme.borderWidth.pico + " solid " + hex2rgba(theme.miscellaneous.shadow, 0.05);
13
+ return "".concat(theme.borderWidth.pico, " solid ").concat(hex2rgba(theme.miscellaneous.shadow, 0.05));
14
14
  });
15
- export var HighlightText = nativeStyled(Text)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n text-decoration: underline;\n text-decoration-color: ", ";\n"])), function (_ref3) {
15
+ export var HighlightText = nativeStyled(Text)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n text-decoration: underline;\n text-decoration-color: ", ";\n"])), function (_ref3) {
16
16
  var theme = _ref3.theme;
17
17
  return theme.font.color.orange;
18
18
  });
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","names":["styled","default","nativeStyled","hex2rgba","Text","StyledSearchItemContainer","theme","spacing","mili","centi","borderWidth","pico","miscellaneous","shadow","HighlightText","font","color","orange"],"sources":["../../../../../src/components/molecules/Menubar/SearchResultItem/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { default as nativeStyled } from '@emotion/native';\nimport { hex2rgba, StyleProps, Text } from '@tecsinapse/react-core';\n\nexport const StyledSearchItemContainer = styled('div')<Partial<StyleProps>>`\n display: flex;\n flex-direction: column;\n padding: ${({ theme }) => `${theme.spacing.mili} 0 ${theme.spacing.centi} 0`};\n border-top: ${({ theme }) =>\n `${theme.borderWidth.pico} solid ${hex2rgba(\n theme.miscellaneous.shadow,\n 0.05\n )}`};\n`;\n\nexport const HighlightText = nativeStyled(Text)<Partial<StyleProps>>`\n text-decoration: underline;\n text-decoration-color: ${({ theme }) => theme.font.color.orange};\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AACA,SAASC,OAAO,IAAIC,YAApB,QAAwC,iBAAxC;AACA,SAASC,QAAT,EAA+BC,IAA/B,QAA2C,wBAA3C;AAEA,OAAO,IAAMC,yBAAyB,GAAGL,MAAM,CAAC,KAAD,CAAT,iKAGzB;EAAA,IAAGM,KAAH,QAAGA,KAAH;EAAA,OAAkBA,KAAK,CAACC,OAAN,CAAcC,IAAhC,WAA0CF,KAAK,CAACC,OAAN,CAAcE,KAAxD;AAAA,CAHyB,EAItB;EAAA,IAAGH,KAAH,SAAGA,KAAH;EAAA,OACTA,KAAK,CAACI,WAAN,CAAkBC,IADT,eACuBR,QAAQ,CACzCG,KAAK,CAACM,aAAN,CAAoBC,MADqB,EAEzC,IAFyC,CAD/B;AAAA,CAJsB,CAA/B;AAWP,OAAO,IAAMC,aAAa,GAAGZ,YAAY,CAACE,IAAD,CAAf,8IAEC;EAAA,IAAGE,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACS,IAAN,CAAWC,KAAX,CAAiBC,MAAhC;AAAA,CAFD,CAAnB"}
1
+ {"version":3,"file":"styled.js","names":["styled","default","nativeStyled","hex2rgba","Text","StyledSearchItemContainer","theme","spacing","mili","centi","borderWidth","pico","miscellaneous","shadow","HighlightText","font","color","orange"],"sources":["../../../../../src/components/molecules/Menubar/SearchResultItem/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { default as nativeStyled } from '@emotion/native';\nimport { hex2rgba, StyleProps, Text } from '@tecsinapse/react-core';\n\nexport const StyledSearchItemContainer = styled('div')<Partial<StyleProps>>`\n display: flex;\n flex-direction: column;\n padding: ${({ theme }) => `${theme.spacing.mili} 0 ${theme.spacing.centi} 0`};\n border-top: ${({ theme }) =>\n `${theme.borderWidth.pico} solid ${hex2rgba(\n theme.miscellaneous.shadow,\n 0.05\n )}`};\n`;\n\nexport const HighlightText = nativeStyled(Text)<Partial<StyleProps>>`\n text-decoration: underline;\n text-decoration-color: ${({ theme }) => theme.font.color.orange};\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AACA,SAASC,OAAO,IAAIC,YAApB,QAAwC,iBAAxC;AACA,SAASC,QAAT,EAA+BC,IAA/B,QAA2C,wBAA3C;AAEA,OAAO,IAAMC,yBAAyB,GAAGL,MAAM,CAAC,KAAD,CAAT,4JAGzB;EAAA,IAAGM,KAAH,QAAGA,KAAH;EAAA,iBAAkBA,KAAK,CAACC,OAAN,CAAcC,IAAhC,gBAA0CF,KAAK,CAACC,OAAN,CAAcE,KAAxD;AAAA,CAHyB,EAItB;EAAA,IAAGH,KAAH,SAAGA,KAAH;EAAA,iBACTA,KAAK,CAACI,WAAN,CAAkBC,IADT,oBACuBR,QAAQ,CACzCG,KAAK,CAACM,aAAN,CAAoBC,MADqB,EAEzC,IAFyC,CAD/B;AAAA,CAJsB,CAA/B;AAWP,OAAO,IAAMC,aAAa,GAAGZ,YAAY,CAACE,IAAD,CAAf,yIAEC;EAAA,IAAGE,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACS,IAAN,CAAWC,KAAX,CAAiBC,MAAhC;AAAA,CAFD,CAAnB"}
@@ -23,7 +23,7 @@ var matchSpliter = function matchSpliter(str, indexes, size) {
23
23
  export var stringMatcher = function stringMatcher(searchTerm, textToReplace) {
24
24
  var s = normalize(searchTerm);
25
25
  var tx = normalize(textToReplace);
26
- var r = new RegExp("(" + s + ")", 'g');
26
+ var r = new RegExp("(".concat(s, ")"), 'g');
27
27
  return Array.from(tx.matchAll(r));
28
28
  };
29
29
 
@@ -41,7 +41,7 @@ var highlightReplacer = function highlightReplacer(searchTerm, textToReplace, Co
41
41
  var splited = matchSpliter(textToReplace, indexes, searchTerm.length);
42
42
  return splited.map(function (value, idx) {
43
43
  return normalize(value) === search ? React.createElement(Component, _extends({
44
- key: "highlight-" + value + idx
44
+ key: "highlight-".concat(value).concat(idx)
45
45
  }, props), value) : React.createElement(React.Fragment, null, value);
46
46
  });
47
47
  };
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["React","normalize","str","replace","toLowerCase","matchSpliter","indexes","size","result","currentIndex","forEach","index","push","substring","length","filter","e","stringMatcher","searchTerm","textToReplace","s","tx","r","RegExp","Array","from","matchAll","highlightReplacer","Component","props","search","matches","map","match","splited","value","idx","highlight"],"sources":["../../../../../src/components/molecules/Menubar/SearchResultItem/utils.tsx"],"sourcesContent":["import React from 'react';\n\nconst normalize = (str: string): string => {\n return str\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '')\n .replace(/[-[\\]{}()*+?.,\\\\^$|#]/g, ' ')\n .toLowerCase();\n};\n\nconst matchSpliter = (\n str: string,\n indexes: number[],\n size: number\n): string[] => {\n const result: string[] = [];\n let currentIndex = 0;\n\n indexes.forEach((index: number) => {\n result.push(str.substring(currentIndex, index));\n result.push(str.substring(index, index + size));\n currentIndex = index + size;\n });\n\n result.push(str.substring(currentIndex, str.length));\n\n return result.filter(e => e);\n};\n\nexport const stringMatcher = (\n searchTerm: string,\n textToReplace: string\n): RegExpMatchArray[] => {\n const s = normalize(searchTerm);\n const tx = normalize(textToReplace);\n\n const r = new RegExp(`(${s})`, 'g');\n\n return Array.from(tx.matchAll(r));\n};\n\nconst highlightReplacer = <T,>(\n searchTerm: string,\n textToReplace: string,\n Component: React.ElementType,\n props: T\n): React.ReactNode => {\n const search = normalize(searchTerm);\n const matches = stringMatcher(searchTerm, textToReplace);\n\n if (matches.length <= 0) {\n return textToReplace;\n }\n\n const indexes: number[] = matches.map(match => match.index) as number[];\n const splited = matchSpliter(textToReplace, indexes, searchTerm.length);\n\n return splited.map((value, idx) => {\n return normalize(value) === search ? (\n <Component key={`highlight-${value}${idx}`} {...props}>\n {value}\n </Component>\n ) : (\n <>{value}</>\n );\n });\n};\n\nexport const highlight = <T,>(\n searchTerm: string,\n textToReplace: string,\n Component: React.ElementType,\n props: T\n): React.ReactNode => {\n if (textToReplace && searchTerm) {\n return highlightReplacer(searchTerm, textToReplace, Component, props);\n }\n\n return textToReplace;\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;;AAEA,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAACC,GAAD,EAAyB;EACzC,OAAOA,GAAG,CACPD,SADI,CACM,KADN,EAEJE,OAFI,CAEI,kBAFJ,EAEwB,EAFxB,EAGJA,OAHI,CAGI,wBAHJ,EAG8B,GAH9B,EAIJC,WAJI,EAAP;AAKD,CAND;;AAQA,IAAMC,YAAY,GAAG,SAAfA,YAAe,CACnBH,GADmB,EAEnBI,OAFmB,EAGnBC,IAHmB,EAIN;EACb,IAAMC,MAAgB,GAAG,EAAzB;EACA,IAAIC,YAAY,GAAG,CAAnB;EAEAH,OAAO,CAACI,OAAR,CAAgB,UAACC,KAAD,EAAmB;IACjCH,MAAM,CAACI,IAAP,CAAYV,GAAG,CAACW,SAAJ,CAAcJ,YAAd,EAA4BE,KAA5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J,MAApC,CAA5B;EAEA,OAAOoB,OAAO,CAACF,GAAR,CAAY,UAACG,KAAD,EAAQC,GAAR,EAAgB;IACjC,OAAOnC,SAAS,CAACkC,KAAD,CAAT,KAAqBL,MAArB,GACL,oBAAC,SAAD;MAAW,GAAG,iBAAeK,KAAf,GAAuBC;IAArC,GAAgDP,KAAhD,GACGM,KADH,CADK,GAKL,0CAAGA,KAAH,CALF;EAOD,CARM,CAAP;AASD,CAzBD;;AA2BA,OAAO,IAAME,SAAS,GAAG,SAAZA,SAAY,CACvBnB,UADuB,EAEvBC,aAFuB,EAGvBS,SAHuB,EAIvBC,KAJuB,EAKH;EACpB,IAAIV,aAAa,IAAID,UAArB,EAAiC;IAC/B,OAAOS,iBAAiB,CAACT,UAAD,EAAaC,aAAb,EAA4BS,SAA5B,EAAuCC,KAAvC,CAAxB;EACD;;EAED,OAAOV,aAAP;AACD,CAXM"}
1
+ {"version":3,"file":"utils.js","names":["React","normalize","str","replace","toLowerCase","matchSpliter","indexes","size","result","currentIndex","forEach","index","push","substring","length","filter","e","stringMatcher","searchTerm","textToReplace","s","tx","r","RegExp","Array","from","matchAll","highlightReplacer","Component","props","search","matches","map","match","splited","value","idx","highlight"],"sources":["../../../../../src/components/molecules/Menubar/SearchResultItem/utils.tsx"],"sourcesContent":["import React from 'react';\n\nconst normalize = (str: string): string => {\n return str\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '')\n .replace(/[-[\\]{}()*+?.,\\\\^$|#]/g, ' ')\n .toLowerCase();\n};\n\nconst matchSpliter = (\n str: string,\n indexes: number[],\n size: number\n): string[] => {\n const result: string[] = [];\n let currentIndex = 0;\n\n indexes.forEach((index: number) => {\n result.push(str.substring(currentIndex, index));\n result.push(str.substring(index, index + size));\n currentIndex = index + size;\n });\n\n result.push(str.substring(currentIndex, str.length));\n\n return result.filter(e => e);\n};\n\nexport const stringMatcher = (\n searchTerm: string,\n textToReplace: string\n): RegExpMatchArray[] => {\n const s = normalize(searchTerm);\n const tx = normalize(textToReplace);\n\n const r = new RegExp(`(${s})`, 'g');\n\n return Array.from(tx.matchAll(r));\n};\n\nconst highlightReplacer = <T,>(\n searchTerm: string,\n textToReplace: string,\n Component: React.ElementType,\n props: T\n): React.ReactNode => {\n const search = normalize(searchTerm);\n const matches = stringMatcher(searchTerm, textToReplace);\n\n if (matches.length <= 0) {\n return textToReplace;\n }\n\n const indexes: number[] = matches.map(match => match.index) as number[];\n const splited = matchSpliter(textToReplace, indexes, searchTerm.length);\n\n return splited.map((value, idx) => {\n return normalize(value) === search ? (\n <Component key={`highlight-${value}${idx}`} {...props}>\n {value}\n </Component>\n ) : (\n <>{value}</>\n );\n });\n};\n\nexport const highlight = <T,>(\n searchTerm: string,\n textToReplace: string,\n Component: React.ElementType,\n props: T\n): React.ReactNode => {\n if (textToReplace && searchTerm) {\n return highlightReplacer(searchTerm, textToReplace, Component, props);\n }\n\n return textToReplace;\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;;AAEA,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAACC,GAAD,EAAyB;EACzC,OAAOA,GAAG,CACPD,SADI,CACM,KADN,EAEJE,OAFI,CAEI,kBAFJ,EAEwB,EAFxB,EAGJA,OAHI,CAGI,wBAHJ,EAG8B,GAH9B,EAIJC,WAJI,EAAP;AAKD,CAND;;AAQA,IAAMC,YAAY,GAAG,SAAfA,YAAe,CACnBH,GADmB,EAEnBI,OAFmB,EAGnBC,IAHmB,EAIN;EACb,IAAMC,MAAgB,GAAG,EAAzB;EACA,IAAIC,YAAY,GAAG,CAAnB;EAEAH,OAAO,CAACI,OAAR,CAAgB,UAACC,KAAD,EAAmB;IACjCH,MAAM,CAACI,IAAP,CAAYV,GAAG,CAACW,SAAJ,CAAcJ,YAAd,EAA4BE,KAA5B,CAAZ;IACAH,MAAM,CAACI,IAAP,CAAYV,GAAG,CAACW,SAAJ,CAAcF,KAAd,EAAqBA,KAAK,GAAGJ,IAA7B,CAAZ;IAC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C,KAAD,CAAT,KAAqBL,MAArB,GACL,oBAAC,SAAD;MAAW,GAAG,sBAAeK,KAAf,SAAuBC,GAAvB;IAAd,GAAgDP,KAAhD,GACGM,KADH,CADK,GAKL,0CAAGA,KAAH,CALF;EAOD,CARM,CAAP;AASD,CAzBD;;AA2BA,OAAO,IAAME,SAAS,GAAG,SAAZA,SAAY,CACvBnB,UADuB,EAEvBC,aAFuB,EAGvBS,SAHuB,EAIvBC,KAJuB,EAKH;EACpB,IAAIV,aAAa,IAAID,UAArB,EAAiC;IAC/B,OAAOS,iBAAiB,CAACT,UAAD,EAAaC,aAAb,EAA4BS,SAA5B,EAAuCC,KAAvC,CAAxB;EACD;;EAED,OAAOV,aAAP;AACD,CAXM"}
@@ -1,4 +1,8 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
1
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
+
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+
5
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
6
 
3
7
  var getDefaultInputContainerStyles = {
4
8
  transitionDuration: '250ms',
@@ -45,9 +49,9 @@ var getContainerOpenMenuTransform = {
45
49
  }
46
50
  };
47
51
  export var getInputContainerStyles = function getInputContainerStyles(state) {
48
- return _extends({}, getDefaultInputContainerStyles, getInputContainerTransform[state]);
52
+ return _objectSpread(_objectSpread({}, getDefaultInputContainerStyles), getInputContainerTransform[state]);
49
53
  };
50
54
  export var getContainerOpenMenuStyles = function getContainerOpenMenuStyles(state) {
51
- return _extends({}, getDefaultContainerOpenMenuStyles, getContainerOpenMenuTransform[state]);
55
+ return _objectSpread(_objectSpread({}, getDefaultContainerOpenMenuStyles), getContainerOpenMenuTransform[state]);
52
56
  };
53
57
  //# sourceMappingURL=animations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"animations.js","names":["getDefaultInputContainerStyles","transitionDuration","transitionProperty","transitionTimingFunction","getDefaultContainerOpenMenuStyles","getInputContainerTransform","entered","transform","entering","opacity","exited","exiting","getContainerOpenMenuTransform","getInputContainerStyles","state","getContainerOpenMenuStyles"],"sources":["../../../../src/components/molecules/Menubar/animations.ts"],"sourcesContent":["import { CSSProperties } from 'react';\nimport { TransitionStatus } from 'react-transition-group';\n\nconst getDefaultInputContainerStyles = {\n transitionDuration: '250ms',\n transitionProperty: 'opacity scale transform',\n transitionTimingFunction: 'ease-in-out',\n};\n\nconst getDefaultContainerOpenMenuStyles = {\n transitionDuration: '250ms',\n transitionProperty: 'opacity scale transform',\n transitionTimingFunction: 'ease-in-out',\n};\n\nconst getInputContainerTransform = {\n entered: {\n transform: 'scale(1, 1) translateY(0px)',\n },\n entering: {\n opacity: 0.5,\n transform: 'scale(0.99, 0.99) translateY(-5px)',\n },\n exited: {\n opacity: 0,\n transform: 'scale(0.99, 0.99) translateY(-50px)',\n },\n exiting: {\n opacity: 0.5,\n transform: 'scale(0.99, 0.99) translateY(-5px)',\n },\n};\n\nconst getContainerOpenMenuTransform = {\n entered: {\n transform: 'scale(1, 1) translateY(0px) ',\n },\n entering: {\n opacity: 0.95,\n transform: 'scale(0.99, 0.99) translateY(0px)',\n },\n exited: {\n opacity: 0,\n transform: 'scale(0.99, 0.99) translateY(-600px)',\n },\n exiting: {\n opacity: 0.95,\n transform: 'scale(0.99, 0.99) translateY(0px)',\n },\n};\n\nexport const getInputContainerStyles = (\n state: TransitionStatus\n): CSSProperties => ({\n ...getDefaultInputContainerStyles,\n ...getInputContainerTransform[state],\n});\n\nexport const getContainerOpenMenuStyles = (\n state: TransitionStatus\n): CSSProperties => ({\n ...getDefaultContainerOpenMenuStyles,\n ...getContainerOpenMenuTransform[state],\n});\n"],"mappings":";;AAGA,IAAMA,8BAA8B,GAAG;EACrCC,kBAAkB,EAAE,OADiB;EAErCC,kBAAkB,EAAE,yBAFiB;EAGrCC,wBAAwB,EAAE;AAHW,CAAvC;AAMA,IAAMC,iCAAiC,GAAG;EACxCH,kBAAkB,EAAE,OADoB;EAExCC,kBAAkB,EAAE,yBAFoB;EAGxCC,wBAAwB,EAAE;AAHc,CAA1C;AAMA,IAAME,0BAA0B,GAAG;EACjCC,OAAO,EAAE;IACPC,SAAS,EAAE;EADJ,CADwB;EAIjCC,QAAQ,EAAE;IACRC,OAAO,EAAE,GADD;IAERF,SAAS,EAAE;EAFH,CAJuB;EAQjCG,MAAM,EAAE;IACND,OAAO,EAAE,CADH;IAENF,SAAS,EAAE;EAFL,CARyB;EAYjCI,OAAO,EAAE;IACPF,OAAO,EAAE,GADF;IAEPF,SAAS,EAAE;EAFJ;AAZwB,CAAnC;AAkBA,IAAMK,6BAA6B,GAAG;EACpCN,OAAO,EAAE;IACPC,SAAS,EAAE;EADJ,CAD2B;EAIpCC,QAAQ,EAAE;IACRC,OAAO,EAAE,IADD;IAERF,SAAS,EAAE;EAFH,CAJ0B;EAQpCG,MAAM,EAAE;IACND,OAAO,EAAE,CADH;IAENF,SAAS,EAAE;EAFL,CAR4B;EAYpCI,OAAO,EAAE;IACPF,OAAO,EAAE,IADF;IAEPF,SAAS,EAAE;EAFJ;AAZ2B,CAAtC;AAkBA,OAAO,IAAMM,uBAAuB,GAAG,SAA1BA,uBAA0B,CACrCC,KADqC;EAAA,oBAGlCd,8BAHkC,EAIlCK,0BAA0B,CAACS,KAAD,CAJQ;AAAA,CAAhC;AAOP,OAAO,IAAMC,0BAA0B,GAAG,SAA7BA,0BAA6B,CACxCD,KADwC;EAAA,oBAGrCV,iCAHqC,EAIrCQ,6BAA6B,CAACE,KAAD,CAJQ;AAAA,CAAnC"}
1
+ {"version":3,"file":"animations.js","names":["getDefaultInputContainerStyles","transitionDuration","transitionProperty","transitionTimingFunction","getDefaultContainerOpenMenuStyles","getInputContainerTransform","entered","transform","entering","opacity","exited","exiting","getContainerOpenMenuTransform","getInputContainerStyles","state","getContainerOpenMenuStyles"],"sources":["../../../../src/components/molecules/Menubar/animations.ts"],"sourcesContent":["import { CSSProperties } from 'react';\nimport { TransitionStatus } from 'react-transition-group';\n\nconst getDefaultInputContainerStyles = {\n transitionDuration: '250ms',\n transitionProperty: 'opacity scale transform',\n transitionTimingFunction: 'ease-in-out',\n};\n\nconst getDefaultContainerOpenMenuStyles = {\n transitionDuration: '250ms',\n transitionProperty: 'opacity scale transform',\n transitionTimingFunction: 'ease-in-out',\n};\n\nconst getInputContainerTransform = {\n entered: {\n transform: 'scale(1, 1) translateY(0px)',\n },\n entering: {\n opacity: 0.5,\n transform: 'scale(0.99, 0.99) translateY(-5px)',\n },\n exited: {\n opacity: 0,\n transform: 'scale(0.99, 0.99) translateY(-50px)',\n },\n exiting: {\n opacity: 0.5,\n transform: 'scale(0.99, 0.99) translateY(-5px)',\n },\n};\n\nconst getContainerOpenMenuTransform = {\n entered: {\n transform: 'scale(1, 1) translateY(0px) ',\n },\n entering: {\n opacity: 0.95,\n transform: 'scale(0.99, 0.99) translateY(0px)',\n },\n exited: {\n opacity: 0,\n transform: 'scale(0.99, 0.99) translateY(-600px)',\n },\n exiting: {\n opacity: 0.95,\n transform: 'scale(0.99, 0.99) translateY(0px)',\n },\n};\n\nexport const getInputContainerStyles = (\n state: TransitionStatus\n): CSSProperties => ({\n ...getDefaultInputContainerStyles,\n ...getInputContainerTransform[state],\n});\n\nexport const getContainerOpenMenuStyles = (\n state: TransitionStatus\n): CSSProperties => ({\n ...getDefaultContainerOpenMenuStyles,\n ...getContainerOpenMenuTransform[state],\n});\n"],"mappings":";;;;;;AAGA,IAAMA,8BAA8B,GAAG;EACrCC,kBAAkB,EAAE,OADiB;EAErCC,kBAAkB,EAAE,yBAFiB;EAGrCC,wBAAwB,EAAE;AAHW,CAAvC;AAMA,IAAMC,iCAAiC,GAAG;EACxCH,kBAAkB,EAAE,OADoB;EAExCC,kBAAkB,EAAE,yBAFoB;EAGxCC,wBAAwB,EAAE;AAHc,CAA1C;AAMA,IAAME,0BAA0B,GAAG;EACjCC,OAAO,EAAE;IACPC,SAAS,EAAE;EADJ,CADwB;EAIjCC,QAAQ,EAAE;IACRC,OAAO,EAAE,GADD;IAERF,SAAS,EAAE;EAFH,CAJuB;EAQjCG,MAAM,EAAE;IACND,OAAO,EAAE,CADH;IAENF,SAAS,EAAE;EAFL,CARyB;EAYjCI,OAAO,EAAE;IACPF,OAAO,EAAE,GADF;IAEPF,SAAS,EAAE;EAFJ;AAZwB,CAAnC;AAkBA,IAAMK,6BAA6B,GAAG;EACpCN,OAAO,EAAE;IACPC,SAAS,EAAE;EADJ,CAD2B;EAIpCC,QAAQ,EAAE;IACRC,OAAO,EAAE,IADD;IAERF,SAAS,EAAE;EAFH,CAJ0B;EAQpCG,MAAM,EAAE;IACND,OAAO,EAAE,CADH;IAENF,SAAS,EAAE;EAFL,CAR4B;EAYpCI,OAAO,EAAE;IACPF,OAAO,EAAE,IADF;IAEPF,SAAS,EAAE;EAFJ;AAZ2B,CAAtC;AAkBA,OAAO,IAAMM,uBAAuB,GAAG,SAA1BA,uBAA0B,CACrCC,KADqC;EAAA,uCAGlCd,8BAHkC,GAIlCK,0BAA0B,CAACS,KAAD,CAJQ;AAAA,CAAhC;AAOP,OAAO,IAAMC,0BAA0B,GAAG,SAA7BA,0BAA6B,CACxCD,KADwC;EAAA,uCAGrCV,iCAHqC,GAIrCQ,6BAA6B,CAACE,KAAD,CAJQ;AAAA,CAAnC"}
@@ -1,3 +1,3 @@
1
1
  export { default as Menubar } from './Menubar';
2
- export { OptionsType as MenubarOptionsType, MostUsedType as MenubarMostUsedType, ItemsOptions as MenubarItemsOptions, } from './types';
2
+ export type { OptionsType as MenubarOptionsType, MostUsedType as MenubarMostUsedType, ItemsOptions as MenubarItemsOptions, } from './types';
3
3
  export * from './Menubar';
@@ -1,4 +1,3 @@
1
1
  export { default as Menubar } from "./Menubar";
2
- export { OptionsType as MenubarOptionsType, MostUsedType as MenubarMostUsedType, ItemsOptions as MenubarItemsOptions } from "./types";
3
2
  export * from "./Menubar";
4
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","Menubar","OptionsType","MenubarOptionsType","MostUsedType","MenubarMostUsedType","ItemsOptions","MenubarItemsOptions"],"sources":["../../../../src/components/molecules/Menubar/index.ts"],"sourcesContent":["export { default as Menubar } from './Menubar';\nexport {\n OptionsType as MenubarOptionsType,\n MostUsedType as MenubarMostUsedType,\n ItemsOptions as MenubarItemsOptions,\n} from './types';\nexport * from './Menubar';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,OAApB;AACA,SACEC,WAAW,IAAIC,kBADjB,EAEEC,YAAY,IAAIC,mBAFlB,EAGEC,YAAY,IAAIC,mBAHlB;AAKA"}
1
+ {"version":3,"file":"index.js","names":["default","Menubar"],"sources":["../../../../src/components/molecules/Menubar/index.ts"],"sourcesContent":["export { default as Menubar } from './Menubar';\nexport type {\n OptionsType as MenubarOptionsType,\n MostUsedType as MenubarMostUsedType,\n ItemsOptions as MenubarItemsOptions,\n} from './types';\nexport * from './Menubar';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,OAApB;AAMA"}
@@ -1,13 +1,13 @@
1
1
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
2
2
 
3
- function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
3
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
4
4
 
5
5
  import { default as webStyled } from '@emotion/styled';
6
6
  import { default as nativeStyled } from '@emotion/native';
7
7
  import { hex2rgba } from '@tecsinapse/react-core';
8
8
  import { Button } from "../../atoms/Button";
9
9
  import { Input } from "../../atoms/Input";
10
- export var StyledIconInput = webStyled('div')(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n padding-top: calc(", " + 2px);\n padding-left: ", ";\n padding-bottom: calc(", " - 2px);\n padding-right: ", ";\n"])), function (_ref) {
10
+ export var StyledIconInput = webStyled('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding-top: calc(", " + 2px);\n padding-left: ", ";\n padding-bottom: calc(", " - 2px);\n padding-right: ", ";\n"])), function (_ref) {
11
11
  var theme = _ref.theme;
12
12
  return theme.spacing.centi;
13
13
  }, function (_ref2) {
@@ -20,17 +20,17 @@ export var StyledIconInput = webStyled('div')(_templateObject || (_templateObjec
20
20
  var theme = _ref4.theme;
21
21
  return theme.spacing.centi;
22
22
  });
23
- export var StyledMenuBar = webStyled('div')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n position: relative;\n background-color: ", ";\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: ", ";\n box-shadow: 0px 2px 8px ", ";\n"])), function (_ref5) {
23
+ export var StyledMenuBar = webStyled('div')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n background-color: ", ";\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: ", ";\n box-shadow: 0px 2px 8px ", ";\n"])), function (_ref5) {
24
24
  var theme = _ref5.theme;
25
25
  return theme.miscellaneous.surfaceColor;
26
26
  }, function (_ref6) {
27
27
  var theme = _ref6.theme;
28
- return theme.spacing.deca + " " + theme.spacing.kilo;
28
+ return "".concat(theme.spacing.deca, " ").concat(theme.spacing.kilo);
29
29
  }, function (_ref7) {
30
30
  var theme = _ref7.theme;
31
31
  return hex2rgba(theme.miscellaneous.shadow, 0.05);
32
32
  });
33
- export var StyledMenuButton = nativeStyled(Button)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n padding-top: calc(", " + 2px);\n padding-right: calc(", " + 2px);\n padding-bottom: calc(", " + 2px);\n padding-left: calc(", " + 2px);\n margin-right: ", ";\n & * {\n user-select: none;\n }\n"])), function (_ref8) {
33
+ export var StyledMenuButton = nativeStyled(Button)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding-top: calc(", " + 2px);\n padding-right: calc(", " + 2px);\n padding-bottom: calc(", " + 2px);\n padding-left: calc(", " + 2px);\n margin-right: ", ";\n & * {\n user-select: none;\n }\n"])), function (_ref8) {
34
34
  var theme = _ref8.theme;
35
35
  return theme.spacing.centi;
36
36
  }, function (_ref9) {
@@ -46,9 +46,9 @@ export var StyledMenuButton = nativeStyled(Button)(_templateObject3 || (_templat
46
46
  var theme = _ref12.theme;
47
47
  return theme.spacing.kilo;
48
48
  });
49
- export var StyledContainerOpenMenu = webStyled('div')(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n border-top: ", ";\n background-color: ", "; \n border-bottom-left-radius: ", "; \n border-bottom-right-radius: ", ";\n box-shadow: 0px 2px 8px ", ";\n padding-right: 8vw;\n padding-left: 8vw;\n padding-top: ", ";\n padding-bottom: ", ";\n position: absolute;\n z-index: ", ";\n width: -webkit-fill-available;\n width: -moz-available;\n"])), function (_ref13) {
49
+ export var StyledContainerOpenMenu = webStyled('div')(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border-top: ", ";\n background-color: ", "; \n border-bottom-left-radius: ", "; \n border-bottom-right-radius: ", ";\n box-shadow: 0px 2px 8px ", ";\n padding-right: 8vw;\n padding-left: 8vw;\n padding-top: ", ";\n padding-bottom: ", ";\n position: absolute;\n z-index: ", ";\n width: -webkit-fill-available;\n width: -moz-available;\n"])), function (_ref13) {
50
50
  var theme = _ref13.theme;
51
- return theme.borderWidth.pico + " solid " + hex2rgba(theme.miscellaneous.shadow, 0.05);
51
+ return "".concat(theme.borderWidth.pico, " solid ").concat(hex2rgba(theme.miscellaneous.shadow, 0.05));
52
52
  }, function (_ref14) {
53
53
  var theme = _ref14.theme;
54
54
  return theme.miscellaneous.surfaceColor;
@@ -71,10 +71,10 @@ export var StyledContainerOpenMenu = webStyled('div')(_templateObject4 || (_temp
71
71
  var theme = _ref20.theme;
72
72
  return theme.zIndex.header + 1;
73
73
  });
74
- export var StyledInput = nativeStyled(Input)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n width: 100%;\n"])));
75
- export var StyledInputContainer = webStyled('div')(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex: 1;\n"])));
76
- export var StyledSearchResultsContainer = webStyled('div')(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n"])));
77
- export var StyledSearchTextContainer = webStyled('div')(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n margin-bottom: ", ";\n"])), function (_ref21) {
74
+ export var StyledInput = nativeStyled(Input)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: 100%;\n"])));
75
+ export var StyledInputContainer = webStyled('div')(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n flex: 1;\n"])));
76
+ export var StyledSearchResultsContainer = webStyled('div')(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n"])));
77
+ export var StyledSearchTextContainer = webStyled('div')(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n"])), function (_ref21) {
78
78
  var theme = _ref21.theme;
79
79
  return theme.spacing.mili;
80
80
  });