@tecsinapse/react-web-kit 1.20.2 → 1.21.0

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 (384) hide show
  1. package/CHANGELOG.md +11 -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/styled.js +33 -37
  9. package/dist/components/atoms/Accordion/styled.js.map +1 -1
  10. package/dist/components/atoms/Badge/Badge.js +7 -6
  11. package/dist/components/atoms/Badge/Badge.js.map +1 -1
  12. package/dist/components/atoms/Button/Button.js +14 -12
  13. package/dist/components/atoms/Button/Button.js.map +1 -1
  14. package/dist/components/atoms/Button/styled.js +14 -16
  15. package/dist/components/atoms/Button/styled.js.map +1 -1
  16. package/dist/components/atoms/Dropdown/index.js +6 -5
  17. package/dist/components/atoms/Dropdown/index.js.map +1 -1
  18. package/dist/components/atoms/Dropdown/styled.js +30 -21
  19. package/dist/components/atoms/Dropdown/styled.js.map +1 -1
  20. package/dist/components/atoms/Input/Input.js +26 -24
  21. package/dist/components/atoms/Input/Input.js.map +1 -1
  22. package/dist/components/atoms/Input/styled.js +5 -5
  23. package/dist/components/atoms/Input/styled.js.map +1 -1
  24. package/dist/components/atoms/InputMask/InputMask.js +26 -24
  25. package/dist/components/atoms/InputMask/InputMask.js.map +1 -1
  26. package/dist/components/atoms/InputMask/styled.js +5 -5
  27. package/dist/components/atoms/InputMask/styled.js.map +1 -1
  28. package/dist/components/atoms/Modal/Modal.js +8 -7
  29. package/dist/components/atoms/Modal/Modal.js.map +1 -1
  30. package/dist/components/atoms/Modal/animations.js +1 -1
  31. package/dist/components/atoms/Modal/animations.js.map +1 -1
  32. package/dist/components/atoms/Modal/styled.js +30 -24
  33. package/dist/components/atoms/Modal/styled.js.map +1 -1
  34. package/dist/components/atoms/Overlay/Overlay.js +8 -7
  35. package/dist/components/atoms/Overlay/Overlay.js.map +1 -1
  36. package/dist/components/atoms/Overlay/animations.js +1 -1
  37. package/dist/components/atoms/Overlay/animations.js.map +1 -1
  38. package/dist/components/atoms/Overlay/styled.js +21 -20
  39. package/dist/components/atoms/Overlay/styled.js.map +1 -1
  40. package/dist/components/atoms/Skeleton/Skeleton.js +11 -9
  41. package/dist/components/atoms/Skeleton/Skeleton.js.map +1 -1
  42. package/dist/components/atoms/Skeleton/styled.js +42 -66
  43. package/dist/components/atoms/Skeleton/styled.js.map +1 -1
  44. package/dist/components/atoms/Table/Body/TBody.js +5 -4
  45. package/dist/components/atoms/Table/Body/TBody.js.map +1 -1
  46. package/dist/components/atoms/Table/Cell/Td.js +5 -4
  47. package/dist/components/atoms/Table/Cell/Td.js.map +1 -1
  48. package/dist/components/atoms/Table/Cell/styled.js +34 -20
  49. package/dist/components/atoms/Table/Cell/styled.js.map +1 -1
  50. package/dist/components/atoms/Table/Container/TableContainer.js +5 -4
  51. package/dist/components/atoms/Table/Container/TableContainer.js.map +1 -1
  52. package/dist/components/atoms/Table/Container/styled.js +25 -15
  53. package/dist/components/atoms/Table/Container/styled.js.map +1 -1
  54. package/dist/components/atoms/Table/Footer/TFoot.js +5 -4
  55. package/dist/components/atoms/Table/Footer/TFoot.js.map +1 -1
  56. package/dist/components/atoms/Table/Footer/styled.js +5 -6
  57. package/dist/components/atoms/Table/Footer/styled.js.map +1 -1
  58. package/dist/components/atoms/Table/Header/THead.js +5 -4
  59. package/dist/components/atoms/Table/Header/THead.js.map +1 -1
  60. package/dist/components/atoms/Table/Header/Th.js +5 -4
  61. package/dist/components/atoms/Table/Header/Th.js.map +1 -1
  62. package/dist/components/atoms/Table/Header/styled.js +41 -38
  63. package/dist/components/atoms/Table/Header/styled.js.map +1 -1
  64. package/dist/components/atoms/Table/Row/Tr.js +5 -4
  65. package/dist/components/atoms/Table/Row/Tr.js.map +1 -1
  66. package/dist/components/atoms/Table/Row/styled.js +15 -9
  67. package/dist/components/atoms/Table/Row/styled.js.map +1 -1
  68. package/dist/components/atoms/Table/Table.js +5 -4
  69. package/dist/components/atoms/Table/Table.js.map +1 -1
  70. package/dist/components/atoms/Table/Toolbar/TableToolbar.js +7 -6
  71. package/dist/components/atoms/Table/Toolbar/TableToolbar.js.map +1 -1
  72. package/dist/components/atoms/Table/Toolbar/styled.js +5 -6
  73. package/dist/components/atoms/Table/Toolbar/styled.js.map +1 -1
  74. package/dist/components/atoms/Table/styled.js +10 -7
  75. package/dist/components/atoms/Table/styled.js.map +1 -1
  76. package/dist/components/atoms/Tag/Tag.js +6 -5
  77. package/dist/components/atoms/Tag/Tag.js.map +1 -1
  78. package/dist/components/atoms/Tooltip/Tooltip.js +7 -5
  79. package/dist/components/atoms/Tooltip/Tooltip.js.map +1 -1
  80. package/dist/components/atoms/Tooltip/styled.js +41 -122
  81. package/dist/components/atoms/Tooltip/styled.js.map +1 -1
  82. package/dist/components/molecules/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.js +7 -6
  83. package/dist/components/molecules/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.js.map +1 -1
  84. package/dist/components/molecules/Breadcrumbs/BreadcrumbItem/styled.js +16 -18
  85. package/dist/components/molecules/Breadcrumbs/BreadcrumbItem/styled.js.map +1 -1
  86. package/dist/components/molecules/Breadcrumbs/Breadcrumbs.js +5 -4
  87. package/dist/components/molecules/Breadcrumbs/Breadcrumbs.js.map +1 -1
  88. package/dist/components/molecules/Breadcrumbs/styled.js +25 -18
  89. package/dist/components/molecules/Breadcrumbs/styled.js.map +1 -1
  90. package/dist/components/molecules/DatePicker/DatePicker.js +6 -5
  91. package/dist/components/molecules/DatePicker/DatePicker.js.map +1 -1
  92. package/dist/components/molecules/DatePicker/Modal.js +6 -5
  93. package/dist/components/molecules/DatePicker/Modal.js.map +1 -1
  94. package/dist/components/molecules/DatePicker/styled.js +20 -30
  95. package/dist/components/molecules/DatePicker/styled.js.map +1 -1
  96. package/dist/components/molecules/DateTimePicker/DateTimePicker.js +3 -2
  97. package/dist/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
  98. package/dist/components/molecules/DateTimePicker/Modal.js +6 -5
  99. package/dist/components/molecules/DateTimePicker/Modal.js.map +1 -1
  100. package/dist/components/molecules/DateTimePicker/styled.js +15 -29
  101. package/dist/components/molecules/DateTimePicker/styled.js.map +1 -1
  102. package/dist/components/molecules/Drawer/Drawer.js +10 -10
  103. package/dist/components/molecules/Drawer/Drawer.js.map +1 -1
  104. package/dist/components/molecules/Drawer/styled.js +35 -63
  105. package/dist/components/molecules/Drawer/styled.js.map +1 -1
  106. package/dist/components/molecules/Grid/Grid.js +15 -11
  107. package/dist/components/molecules/Grid/Grid.js.map +1 -1
  108. package/dist/components/molecules/Grid/Item/Item.js +22 -21
  109. package/dist/components/molecules/Grid/Item/Item.js.map +1 -1
  110. package/dist/components/molecules/Grid/Item/functions.js +4 -2
  111. package/dist/components/molecules/Grid/Item/functions.js.map +1 -1
  112. package/dist/components/molecules/IconTextButton/IconTextButton.js +10 -9
  113. package/dist/components/molecules/IconTextButton/IconTextButton.js.map +1 -1
  114. package/dist/components/molecules/IconTextButton/TextComponent.js +12 -9
  115. package/dist/components/molecules/IconTextButton/TextComponent.js.map +1 -1
  116. package/dist/components/molecules/IconTextButton/styled.js +25 -18
  117. package/dist/components/molecules/IconTextButton/styled.js.map +1 -1
  118. package/dist/components/molecules/InputPassword/InputPassword.js +5 -4
  119. package/dist/components/molecules/InputPassword/InputPassword.js.map +1 -1
  120. package/dist/components/molecules/LabeledSwitch/LabelComponent.js +13 -10
  121. package/dist/components/molecules/LabeledSwitch/LabelComponent.js.map +1 -1
  122. package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js +11 -10
  123. package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -1
  124. package/dist/components/molecules/LabeledSwitch/styled.js +12 -17
  125. package/dist/components/molecules/LabeledSwitch/styled.js.map +1 -1
  126. package/dist/components/molecules/Masonry/Masonry.js +8 -6
  127. package/dist/components/molecules/Masonry/Masonry.js.map +1 -1
  128. package/dist/components/molecules/Masonry/styled.js +21 -28
  129. package/dist/components/molecules/Masonry/styled.js.map +1 -1
  130. package/dist/components/molecules/Menubar/MenuBlock/MenuBlock.js +24 -20
  131. package/dist/components/molecules/Menubar/MenuBlock/MenuBlock.js.map +1 -1
  132. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js +10 -8
  133. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js.map +1 -1
  134. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/SubMenuBlock.js +5 -4
  135. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/SubMenuBlock.js.map +1 -1
  136. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/styled.js +21 -15
  137. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/styled.js.map +1 -1
  138. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/styled.js +21 -19
  139. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/styled.js.map +1 -1
  140. package/dist/components/molecules/Menubar/MenuBlock/styled.js +34 -33
  141. package/dist/components/molecules/Menubar/MenuBlock/styled.js.map +1 -1
  142. package/dist/components/molecules/Menubar/Menubar.js +14 -12
  143. package/dist/components/molecules/Menubar/Menubar.js.map +1 -1
  144. package/dist/components/molecules/Menubar/MostUsed/MostUsed.js +29 -25
  145. package/dist/components/molecules/Menubar/MostUsed/MostUsed.js.map +1 -1
  146. package/dist/components/molecules/Menubar/MostUsed/styled.js +41 -27
  147. package/dist/components/molecules/Menubar/MostUsed/styled.js.map +1 -1
  148. package/dist/components/molecules/Menubar/SearchResultItem/SearchResultItem.js +6 -5
  149. package/dist/components/molecules/Menubar/SearchResultItem/SearchResultItem.js.map +1 -1
  150. package/dist/components/molecules/Menubar/SearchResultItem/styled.js +21 -16
  151. package/dist/components/molecules/Menubar/SearchResultItem/styled.js.map +1 -1
  152. package/dist/components/molecules/Menubar/SearchResultItem/utils.js +2 -2
  153. package/dist/components/molecules/Menubar/SearchResultItem/utils.js.map +1 -1
  154. package/dist/components/molecules/Menubar/styled.js +117 -96
  155. package/dist/components/molecules/Menubar/styled.js.map +1 -1
  156. package/dist/components/molecules/Select/Dropdown/Dropdown.js +16 -15
  157. package/dist/components/molecules/Select/Dropdown/Dropdown.js.map +1 -1
  158. package/dist/components/molecules/Select/Dropdown/components/SearchInput.js +7 -6
  159. package/dist/components/molecules/Select/Dropdown/components/SearchInput.js.map +1 -1
  160. package/dist/components/molecules/Select/Dropdown/styled.js +111 -107
  161. package/dist/components/molecules/Select/Dropdown/styled.js.map +1 -1
  162. package/dist/components/molecules/Select/Select.js +20 -18
  163. package/dist/components/molecules/Select/Select.js.map +1 -1
  164. package/dist/components/molecules/Select/SelectItem/SelectItem.js +13 -12
  165. package/dist/components/molecules/Select/SelectItem/SelectItem.js.map +1 -1
  166. package/dist/components/molecules/Select/SelectItem/styled.js +38 -39
  167. package/dist/components/molecules/Select/SelectItem/styled.js.map +1 -1
  168. package/dist/components/molecules/Select/styled.js +6 -11
  169. package/dist/components/molecules/Select/styled.js.map +1 -1
  170. package/dist/components/molecules/Snackbar/Snackbar.js +9 -8
  171. package/dist/components/molecules/Snackbar/Snackbar.js.map +1 -1
  172. package/dist/components/molecules/Snackbar/styled.js +6 -7
  173. package/dist/components/molecules/Snackbar/styled.js.map +1 -1
  174. package/dist/components/molecules/TextArea/TextArea.js +27 -26
  175. package/dist/components/molecules/TextArea/TextArea.js.map +1 -1
  176. package/dist/components/molecules/TextArea/styled.js +17 -11
  177. package/dist/components/molecules/TextArea/styled.js.map +1 -1
  178. package/dist/components/organisms/DataGrid/DataGrid.js +34 -32
  179. package/dist/components/organisms/DataGrid/DataGrid.js.map +1 -1
  180. package/dist/components/organisms/DataGrid/Footer/Footer.js +17 -15
  181. package/dist/components/organisms/DataGrid/Footer/Footer.js.map +1 -1
  182. package/dist/components/organisms/DataGrid/Footer/styled.js +75 -74
  183. package/dist/components/organisms/DataGrid/Footer/styled.js.map +1 -1
  184. package/dist/components/organisms/DataGrid/Header/Header.js +37 -32
  185. package/dist/components/organisms/DataGrid/Header/Header.js.map +1 -1
  186. package/dist/components/organisms/DataGrid/Header/styled.js +10 -8
  187. package/dist/components/organisms/DataGrid/Header/styled.js.map +1 -1
  188. package/dist/components/organisms/DataGrid/Row/Row.js +18 -14
  189. package/dist/components/organisms/DataGrid/Row/Row.js.map +1 -1
  190. package/dist/components/organisms/DataGrid/styled.js +10 -8
  191. package/dist/components/organisms/DataGrid/styled.js.map +1 -1
  192. package/dist/hooks/useClickAwayListener.js +3 -1
  193. package/dist/hooks/useClickAwayListener.js.map +1 -1
  194. package/esm/components/atoms/Accordion/Accordion.js +30 -10
  195. package/esm/components/atoms/Accordion/Accordion.js.map +1 -1
  196. package/esm/components/atoms/Accordion/animations.js +2 -2
  197. package/esm/components/atoms/Accordion/animations.js.map +1 -1
  198. package/esm/components/atoms/Accordion/styled.js +7 -7
  199. package/esm/components/atoms/Accordion/styled.js.map +1 -1
  200. package/esm/components/atoms/Badge/Badge.js +3 -1
  201. package/esm/components/atoms/Badge/Badge.js.map +1 -1
  202. package/esm/components/atoms/Button/Button.js +3 -1
  203. package/esm/components/atoms/Button/Button.js.map +1 -1
  204. package/esm/components/atoms/Button/hooks/useMouseHover.js +17 -4
  205. package/esm/components/atoms/Button/hooks/useMouseHover.js.map +1 -1
  206. package/esm/components/atoms/Button/hooks/useMousePressed.js +17 -4
  207. package/esm/components/atoms/Button/hooks/useMousePressed.js.map +1 -1
  208. package/esm/components/atoms/Button/styled.js +3 -3
  209. package/esm/components/atoms/Button/styled.js.map +1 -1
  210. package/esm/components/atoms/Dropdown/index.js +6 -2
  211. package/esm/components/atoms/Dropdown/index.js.map +1 -1
  212. package/esm/components/atoms/Dropdown/styled.js +2 -2
  213. package/esm/components/atoms/Dropdown/styled.js.map +1 -1
  214. package/esm/components/atoms/Input/Input.js +3 -1
  215. package/esm/components/atoms/Input/Input.js.map +1 -1
  216. package/esm/components/atoms/Input/styled.js +2 -2
  217. package/esm/components/atoms/Input/styled.js.map +1 -1
  218. package/esm/components/atoms/InputMask/InputMask.js +3 -1
  219. package/esm/components/atoms/InputMask/InputMask.js.map +1 -1
  220. package/esm/components/atoms/InputMask/styled.js +2 -2
  221. package/esm/components/atoms/InputMask/styled.js.map +1 -1
  222. package/esm/components/atoms/Modal/Modal.js +10 -2
  223. package/esm/components/atoms/Modal/Modal.js.map +1 -1
  224. package/esm/components/atoms/Modal/styled.js +2 -2
  225. package/esm/components/atoms/Modal/styled.js.map +1 -1
  226. package/esm/components/atoms/Overlay/Overlay.js +6 -2
  227. package/esm/components/atoms/Overlay/Overlay.js.map +1 -1
  228. package/esm/components/atoms/Overlay/styled.js +2 -2
  229. package/esm/components/atoms/Overlay/styled.js.map +1 -1
  230. package/esm/components/atoms/Skeleton/Skeleton.js +3 -1
  231. package/esm/components/atoms/Skeleton/Skeleton.js.map +1 -1
  232. package/esm/components/atoms/Skeleton/styled.js +8 -8
  233. package/esm/components/atoms/Skeleton/styled.js.map +1 -1
  234. package/esm/components/atoms/Table/Body/TBody.js +3 -1
  235. package/esm/components/atoms/Table/Body/TBody.js.map +1 -1
  236. package/esm/components/atoms/Table/Cell/Td.js +3 -1
  237. package/esm/components/atoms/Table/Cell/Td.js.map +1 -1
  238. package/esm/components/atoms/Table/Cell/styled.js +2 -2
  239. package/esm/components/atoms/Table/Cell/styled.js.map +1 -1
  240. package/esm/components/atoms/Table/Container/TableContainer.js +3 -1
  241. package/esm/components/atoms/Table/Container/TableContainer.js.map +1 -1
  242. package/esm/components/atoms/Table/Container/styled.js +3 -3
  243. package/esm/components/atoms/Table/Container/styled.js.map +1 -1
  244. package/esm/components/atoms/Table/Footer/TFoot.js +3 -1
  245. package/esm/components/atoms/Table/Footer/TFoot.js.map +1 -1
  246. package/esm/components/atoms/Table/Footer/styled.js +2 -2
  247. package/esm/components/atoms/Table/Footer/styled.js.map +1 -1
  248. package/esm/components/atoms/Table/Header/THead.js +3 -1
  249. package/esm/components/atoms/Table/Header/THead.js.map +1 -1
  250. package/esm/components/atoms/Table/Header/Th.js +3 -1
  251. package/esm/components/atoms/Table/Header/Th.js.map +1 -1
  252. package/esm/components/atoms/Table/Header/styled.js +5 -5
  253. package/esm/components/atoms/Table/Header/styled.js.map +1 -1
  254. package/esm/components/atoms/Table/Row/Tr.js +3 -1
  255. package/esm/components/atoms/Table/Row/Tr.js.map +1 -1
  256. package/esm/components/atoms/Table/Row/styled.js +2 -2
  257. package/esm/components/atoms/Table/Row/styled.js.map +1 -1
  258. package/esm/components/atoms/Table/Table.js +3 -1
  259. package/esm/components/atoms/Table/Table.js.map +1 -1
  260. package/esm/components/atoms/Table/Toolbar/TableToolbar.js +3 -1
  261. package/esm/components/atoms/Table/Toolbar/TableToolbar.js.map +1 -1
  262. package/esm/components/atoms/Table/Toolbar/styled.js +2 -2
  263. package/esm/components/atoms/Table/Toolbar/styled.js.map +1 -1
  264. package/esm/components/atoms/Table/styled.js +3 -3
  265. package/esm/components/atoms/Table/styled.js.map +1 -1
  266. package/esm/components/atoms/Tag/Tag.js +3 -1
  267. package/esm/components/atoms/Tag/Tag.js.map +1 -1
  268. package/esm/components/atoms/Tooltip/Tooltip.js +17 -4
  269. package/esm/components/atoms/Tooltip/Tooltip.js.map +1 -1
  270. package/esm/components/atoms/Tooltip/styled.js +15 -15
  271. package/esm/components/atoms/Tooltip/styled.js.map +1 -1
  272. package/esm/components/molecules/Breadcrumbs/BreadcrumbItem/styled.js +3 -3
  273. package/esm/components/molecules/Breadcrumbs/BreadcrumbItem/styled.js.map +1 -1
  274. package/esm/components/molecules/Breadcrumbs/Breadcrumbs.js +3 -1
  275. package/esm/components/molecules/Breadcrumbs/Breadcrumbs.js.map +1 -1
  276. package/esm/components/molecules/Breadcrumbs/styled.js +3 -3
  277. package/esm/components/molecules/Breadcrumbs/styled.js.map +1 -1
  278. package/esm/components/molecules/DatePicker/DatePicker.js +18 -3
  279. package/esm/components/molecules/DatePicker/DatePicker.js.map +1 -1
  280. package/esm/components/molecules/DatePicker/Modal.js +3 -1
  281. package/esm/components/molecules/DatePicker/Modal.js.map +1 -1
  282. package/esm/components/molecules/DatePicker/styled.js +5 -5
  283. package/esm/components/molecules/DatePicker/styled.js.map +1 -1
  284. package/esm/components/molecules/DateTimePicker/DateTimePicker.js +15 -2
  285. package/esm/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
  286. package/esm/components/molecules/DateTimePicker/Modal.js +3 -1
  287. package/esm/components/molecules/DateTimePicker/Modal.js.map +1 -1
  288. package/esm/components/molecules/DateTimePicker/styled.js +4 -4
  289. package/esm/components/molecules/DateTimePicker/styled.js.map +1 -1
  290. package/esm/components/molecules/Drawer/Drawer.js +12 -4
  291. package/esm/components/molecules/Drawer/Drawer.js.map +1 -1
  292. package/esm/components/molecules/Drawer/styled.js +7 -7
  293. package/esm/components/molecules/Drawer/styled.js.map +1 -1
  294. package/esm/components/molecules/Grid/Grid.js +15 -7
  295. package/esm/components/molecules/Grid/Grid.js.map +1 -1
  296. package/esm/components/molecules/Grid/Item/Item.js +13 -5
  297. package/esm/components/molecules/Grid/Item/Item.js.map +1 -1
  298. package/esm/components/molecules/Grid/Item/functions.js +2 -2
  299. package/esm/components/molecules/Grid/Item/functions.js.map +1 -1
  300. package/esm/components/molecules/IconTextButton/IconTextButton.js +3 -1
  301. package/esm/components/molecules/IconTextButton/IconTextButton.js.map +1 -1
  302. package/esm/components/molecules/IconTextButton/TextComponent.js +3 -3
  303. package/esm/components/molecules/IconTextButton/TextComponent.js.map +1 -1
  304. package/esm/components/molecules/IconTextButton/hooks/useIconTextButton.js +19 -5
  305. package/esm/components/molecules/IconTextButton/hooks/useIconTextButton.js.map +1 -1
  306. package/esm/components/molecules/IconTextButton/styled.js +4 -4
  307. package/esm/components/molecules/IconTextButton/styled.js.map +1 -1
  308. package/esm/components/molecules/InputPassword/InputPassword.js +18 -3
  309. package/esm/components/molecules/InputPassword/InputPassword.js.map +1 -1
  310. package/esm/components/molecules/LabeledSwitch/LabelComponent.js +5 -3
  311. package/esm/components/molecules/LabeledSwitch/LabelComponent.js.map +1 -1
  312. package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js +3 -1
  313. package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -1
  314. package/esm/components/molecules/LabeledSwitch/styled.js +4 -4
  315. package/esm/components/molecules/LabeledSwitch/styled.js.map +1 -1
  316. package/esm/components/molecules/Masonry/styled.js +4 -4
  317. package/esm/components/molecules/Masonry/styled.js.map +1 -1
  318. package/esm/components/molecules/Menubar/MenuBlock/MenuBlock.js +1 -1
  319. package/esm/components/molecules/Menubar/MenuBlock/MenuBlock.js.map +1 -1
  320. package/esm/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js +16 -3
  321. package/esm/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js.map +1 -1
  322. package/esm/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/styled.js +4 -4
  323. package/esm/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/styled.js.map +1 -1
  324. package/esm/components/molecules/Menubar/MenuBlock/MenuItem/styled.js +3 -3
  325. package/esm/components/molecules/Menubar/MenuBlock/MenuItem/styled.js.map +1 -1
  326. package/esm/components/molecules/Menubar/MenuBlock/styled.js +7 -7
  327. package/esm/components/molecules/Menubar/MenuBlock/styled.js.map +1 -1
  328. package/esm/components/molecules/Menubar/Menubar.js +30 -12
  329. package/esm/components/molecules/Menubar/Menubar.js.map +1 -1
  330. package/esm/components/molecules/Menubar/MostUsed/MostUsed.js +2 -2
  331. package/esm/components/molecules/Menubar/MostUsed/MostUsed.js.map +1 -1
  332. package/esm/components/molecules/Menubar/MostUsed/styled.js +3 -3
  333. package/esm/components/molecules/Menubar/MostUsed/styled.js.map +1 -1
  334. package/esm/components/molecules/Menubar/SearchResultItem/styled.js +5 -5
  335. package/esm/components/molecules/Menubar/SearchResultItem/styled.js.map +1 -1
  336. package/esm/components/molecules/Menubar/SearchResultItem/utils.js +2 -2
  337. package/esm/components/molecules/Menubar/SearchResultItem/utils.js.map +1 -1
  338. package/esm/components/molecules/Menubar/animations.js +7 -3
  339. package/esm/components/molecules/Menubar/animations.js.map +1 -1
  340. package/esm/components/molecules/Menubar/styled.js +11 -11
  341. package/esm/components/molecules/Menubar/styled.js.map +1 -1
  342. package/esm/components/molecules/Menubar/utils.js +1 -1
  343. package/esm/components/molecules/Menubar/utils.js.map +1 -1
  344. package/esm/components/molecules/Select/Dropdown/Dropdown.js +20 -6
  345. package/esm/components/molecules/Select/Dropdown/Dropdown.js.map +1 -1
  346. package/esm/components/molecules/Select/Dropdown/styled.js +13 -13
  347. package/esm/components/molecules/Select/Dropdown/styled.js.map +1 -1
  348. package/esm/components/molecules/Select/Select.js +25 -4
  349. package/esm/components/molecules/Select/Select.js.map +1 -1
  350. package/esm/components/molecules/Select/SelectItem/SelectItem.js +28 -6
  351. package/esm/components/molecules/Select/SelectItem/SelectItem.js.map +1 -1
  352. package/esm/components/molecules/Select/SelectItem/styled.js +6 -6
  353. package/esm/components/molecules/Select/SelectItem/styled.js.map +1 -1
  354. package/esm/components/molecules/Select/styled.js +3 -3
  355. package/esm/components/molecules/Select/styled.js.map +1 -1
  356. package/esm/components/molecules/Snackbar/Snackbar.js +3 -1
  357. package/esm/components/molecules/Snackbar/Snackbar.js.map +1 -1
  358. package/esm/components/molecules/Snackbar/styled.js +3 -3
  359. package/esm/components/molecules/Snackbar/styled.js.map +1 -1
  360. package/esm/components/molecules/TextArea/TextArea.js +3 -1
  361. package/esm/components/molecules/TextArea/TextArea.js.map +1 -1
  362. package/esm/components/molecules/TextArea/styled.js +3 -3
  363. package/esm/components/molecules/TextArea/styled.js.map +1 -1
  364. package/esm/components/organisms/DataGrid/DataGrid.js +27 -13
  365. package/esm/components/organisms/DataGrid/DataGrid.js.map +1 -1
  366. package/esm/components/organisms/DataGrid/Footer/Footer.js +20 -8
  367. package/esm/components/organisms/DataGrid/Footer/Footer.js.map +1 -1
  368. package/esm/components/organisms/DataGrid/Footer/styled.js +12 -12
  369. package/esm/components/organisms/DataGrid/Footer/styled.js.map +1 -1
  370. package/esm/components/organisms/DataGrid/Header/Header.js +21 -8
  371. package/esm/components/organisms/DataGrid/Header/Header.js.map +1 -1
  372. package/esm/components/organisms/DataGrid/Header/styled.js +2 -2
  373. package/esm/components/organisms/DataGrid/Header/styled.js.map +1 -1
  374. package/esm/components/organisms/DataGrid/Row/Row.js +1 -1
  375. package/esm/components/organisms/DataGrid/Row/Row.js.map +1 -1
  376. package/esm/components/organisms/DataGrid/styled.js +2 -2
  377. package/esm/components/organisms/DataGrid/styled.js.map +1 -1
  378. package/esm/components/organisms/DataGrid/utils.js +14 -1
  379. package/esm/components/organisms/DataGrid/utils.js.map +1 -1
  380. package/esm/hooks/useClickAwayListener.js +2 -5
  381. package/esm/hooks/useClickAwayListener.js.map +1 -1
  382. package/esm/hooks/useWindowSize.js +15 -2
  383. package/esm/hooks/useWindowSize.js.map +1 -1
  384. package/package.json +3 -3
@@ -15,25 +15,29 @@ var _Table = require("../../../atoms/Table");
15
15
 
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
17
 
18
- const Row = ({
19
- rowKeyExtractor,
20
- data,
21
- checked: _checked,
22
- handleSelect,
23
- selectable,
24
- headers
25
- }) => {
18
+ const Row = _ref => {
19
+ let {
20
+ rowKeyExtractor,
21
+ data,
22
+ checked: _checked,
23
+ handleSelect,
24
+ selectable,
25
+ headers
26
+ } = _ref;
26
27
  return _react.default.createElement(_Table.Tr, {
27
28
  key: rowKeyExtractor(data)
28
29
  }, selectable && _react.default.createElement(_styled.CheckboxCell, null, _react.default.createElement(_reactCore.Checkbox, {
29
30
  checked: _checked,
30
31
  onChange: checked => handleSelect(data, checked)
31
- })), headers.map(({
32
- label,
33
- render
34
- }) => _react.default.createElement(_Table.Td, {
35
- key: `row-${rowKeyExtractor(data)}-column-${label}`
36
- }, render(data))));
32
+ })), headers.map(_ref2 => {
33
+ let {
34
+ label,
35
+ render
36
+ } = _ref2;
37
+ return _react.default.createElement(_Table.Td, {
38
+ key: "row-".concat(rowKeyExtractor(data), "-column-").concat(label)
39
+ }, render(data));
40
+ }));
37
41
  };
38
42
 
39
43
  var _default = _react.default.memo(Row);
@@ -1 +1 @@
1
- {"version":3,"file":"Row.js","names":["Row","rowKeyExtractor","data","checked","_checked","handleSelect","selectable","headers","map","label","render","React","memo"],"sources":["../../../../../src/components/organisms/DataGrid/Row/Row.tsx"],"sourcesContent":["import React from 'react';\nimport { Checkbox } from '@tecsinapse/react-core';\nimport { CheckboxCell } from '../styled';\nimport { Td, Tr } from '../../../atoms/Table';\n\nconst Row = ({\n rowKeyExtractor,\n data,\n checked: _checked,\n handleSelect,\n selectable,\n headers,\n}) => {\n return (\n <Tr key={rowKeyExtractor(data)}>\n {selectable && (\n <CheckboxCell>\n <Checkbox\n checked={_checked}\n onChange={checked => handleSelect(data, checked)}\n />\n </CheckboxCell>\n )}\n {headers.map(({ label, render }) => (\n <Td key={`row-${rowKeyExtractor(data)}-column-${label}`}>\n {render(data)}\n </Td>\n ))}\n </Tr>\n );\n};\n\nexport default React.memo(Row);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,GAAG,GAAG,CAAC;EACXC,eADW;EAEXC,IAFW;EAGXC,OAAO,EAAEC,QAHE;EAIXC,YAJW;EAKXC,UALW;EAMXC;AANW,CAAD,KAON;EACJ,OACE,6BAAC,SAAD;IAAI,GAAG,EAAEN,eAAe,CAACC,IAAD;EAAxB,GACGI,UAAU,IACT,6BAAC,oBAAD,QACE,6BAAC,mBAAD;IACE,OAAO,EAAEF,QADX;IAEE,QAAQ,EAAED,OAAO,IAAIE,YAAY,CAACH,IAAD,EAAOC,OAAP;EAFnC,EADF,CAFJ,EASGI,OAAO,CAACC,GAAR,CAAY,CAAC;IAAEC,KAAF;IAASC;EAAT,CAAD,KACX,6BAAC,SAAD;IAAI,GAAG,EAAG,OAAMT,eAAe,CAACC,IAAD,CAAO,WAAUO,KAAM;EAAtD,GACGC,MAAM,CAACR,IAAD,CADT,CADD,CATH,CADF;AAiBD,CAzBD;;eA2BeS,cAAA,CAAMC,IAAN,CAAWZ,GAAX,C"}
1
+ {"version":3,"file":"Row.js","names":["Row","rowKeyExtractor","data","checked","_checked","handleSelect","selectable","headers","map","label","render","React","memo"],"sources":["../../../../../src/components/organisms/DataGrid/Row/Row.tsx"],"sourcesContent":["import React from 'react';\nimport { Checkbox } from '@tecsinapse/react-core';\nimport { CheckboxCell } from '../styled';\nimport { Td, Tr } from '../../../atoms/Table';\n\nconst Row = ({\n rowKeyExtractor,\n data,\n checked: _checked,\n handleSelect,\n selectable,\n headers,\n}) => {\n return (\n <Tr key={rowKeyExtractor(data)}>\n {selectable && (\n <CheckboxCell>\n <Checkbox\n checked={_checked}\n onChange={checked => handleSelect(data, checked)}\n />\n </CheckboxCell>\n )}\n {headers.map(({ label, render }) => (\n <Td key={`row-${rowKeyExtractor(data)}-column-${label}`}>\n {render(data)}\n </Td>\n ))}\n </Tr>\n );\n};\n\nexport default React.memo(Row);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,GAAG,GAAG,QAON;EAAA,IAPO;IACXC,eADW;IAEXC,IAFW;IAGXC,OAAO,EAAEC,QAHE;IAIXC,YAJW;IAKXC,UALW;IAMXC;EANW,CAOP;EACJ,OACE,6BAAC,SAAD;IAAI,GAAG,EAAEN,eAAe,CAACC,IAAD;EAAxB,GACGI,UAAU,IACT,6BAAC,oBAAD,QACE,6BAAC,mBAAD;IACE,OAAO,EAAEF,QADX;IAEE,QAAQ,EAAED,OAAO,IAAIE,YAAY,CAACH,IAAD,EAAOC,OAAP;EAFnC,EADF,CAFJ,EASGI,OAAO,CAACC,GAAR,CAAY;IAAA,IAAC;MAAEC,KAAF;MAASC;IAAT,CAAD;IAAA,OACX,6BAAC,SAAD;MAAI,GAAG,gBAAST,eAAe,CAACC,IAAD,CAAxB,qBAAyCO,KAAzC;IAAP,GACGC,MAAM,CAACR,IAAD,CADT,CADW;EAAA,CAAZ,CATH,CADF;AAiBD,CAzBD;;eA2BeS,cAAA,CAAMC,IAAN,CAAWZ,GAAX,C"}
@@ -9,15 +9,17 @@ var _styled = _interopRequireDefault(require("@emotion/styled"));
9
9
 
10
10
  var _Table = require("../../atoms/Table");
11
11
 
12
+ var _templateObject;
13
+
12
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
15
 
14
- const CheckboxCell = (0, _styled.default)(_Table.Td)`
15
- padding: ${({
16
- theme
17
- }) => theme.spacing.mili};
18
- & * {
19
- user-select: none;
20
- }
21
- `;
16
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
17
+
18
+ const CheckboxCell = (0, _styled.default)(_Table.Td)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: ", ";\n & * {\n user-select: none;\n }\n"])), _ref => {
19
+ let {
20
+ theme
21
+ } = _ref;
22
+ return theme.spacing.mili;
23
+ });
22
24
  exports.CheckboxCell = CheckboxCell;
23
25
  //# sourceMappingURL=styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","names":["CheckboxCell","styled","Td","theme","spacing","mili"],"sources":["../../../../src/components/organisms/DataGrid/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { StyleProps } from '@tecsinapse/react-core';\nimport { Td } from '../../atoms/Table';\n\nexport const CheckboxCell = styled(Td)<Partial<StyleProps>>`\n padding: ${({ theme }) => theme.spacing.mili};\n & * {\n user-select: none;\n }\n`;\n"],"mappings":";;;;;;;AAAA;;AAEA;;;;AAEO,MAAMA,YAAY,GAAG,IAAAC,eAAA,EAAOC,SAAP,CAAgC;AAC5D,aAAa,CAAC;EAAEC;AAAF,CAAD,KAAeA,KAAK,CAACC,OAAN,CAAcC,IAAK;AAC/C;AACA;AACA;AACA,CALO"}
1
+ {"version":3,"file":"styled.js","names":["CheckboxCell","styled","Td","theme","spacing","mili"],"sources":["../../../../src/components/organisms/DataGrid/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { StyleProps } from '@tecsinapse/react-core';\nimport { Td } from '../../atoms/Table';\n\nexport const CheckboxCell = styled(Td)<Partial<StyleProps>>`\n padding: ${({ theme }) => theme.spacing.mili};\n & * {\n user-select: none;\n }\n`;\n"],"mappings":";;;;;;;AAAA;;AAEA;;;;;;;;AAEO,MAAMA,YAAY,GAAG,IAAAC,eAAA,EAAOC,SAAP,CAAH,gIACZ;EAAA,IAAC;IAAEC;EAAF,CAAD;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcC,IAA7B;AAAA,CADY,CAAlB"}
@@ -9,7 +9,9 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
12
- const useClickAwayListener = (ref, setVisible, event = 'mousedown') => {
12
+ const useClickAwayListener = function (ref, setVisible) {
13
+ let event = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'mousedown';
14
+
13
15
  _react.default.useEffect(() => {
14
16
  const handleClickOutside = event => {
15
17
  if (ref.current && !ref.current.contains(event.target)) {
@@ -1 +1 @@
1
- {"version":3,"file":"useClickAwayListener.js","names":["useClickAwayListener","ref","setVisible","event","React","useEffect","handleClickOutside","current","contains","target","document","addEventListener","removeEventListener"],"sources":["../../src/hooks/useClickAwayListener.ts"],"sourcesContent":["import React from 'react';\n\nexport const useClickAwayListener = (\n ref: React.MutableRefObject<any>,\n setVisible: React.Dispatch<React.SetStateAction<boolean>>,\n event: 'mouseup' | 'mousedown' | undefined = 'mousedown'\n): void => {\n React.useEffect(() => {\n const handleClickOutside = event => {\n if (ref.current && !ref.current.contains(event.target)) {\n setVisible(false);\n }\n };\n document.addEventListener(event, handleClickOutside);\n return () => {\n document.removeEventListener(event, handleClickOutside);\n };\n }, [ref]);\n};\n"],"mappings":";;;;;;;AAAA;;;;AAEO,MAAMA,oBAAoB,GAAG,CAClCC,GADkC,EAElCC,UAFkC,EAGlCC,KAA0C,GAAG,WAHX,KAIzB;EACTC,cAAA,CAAMC,SAAN,CAAgB,MAAM;IACpB,MAAMC,kBAAkB,GAAGH,KAAK,IAAI;MAClC,IAAIF,GAAG,CAACM,OAAJ,IAAe,CAACN,GAAG,CAACM,OAAJ,CAAYC,QAAZ,CAAqBL,KAAK,CAACM,MAA3B,CAApB,EAAwD;QACtDP,UAAU,CAAC,KAAD,CAAV;MACD;IACF,CAJD;;IAKAQ,QAAQ,CAACC,gBAAT,CAA0BR,KAA1B,EAAiCG,kBAAjC;IACA,OAAO,MAAM;MACXI,QAAQ,CAACE,mBAAT,CAA6BT,KAA7B,EAAoCG,kBAApC;IACD,CAFD;EAGD,CAVD,EAUG,CAACL,GAAD,CAVH;AAWD,CAhBM"}
1
+ {"version":3,"file":"useClickAwayListener.js","names":["useClickAwayListener","ref","setVisible","event","React","useEffect","handleClickOutside","current","contains","target","document","addEventListener","removeEventListener"],"sources":["../../src/hooks/useClickAwayListener.ts"],"sourcesContent":["import React from 'react';\n\nexport const useClickAwayListener = (\n ref: React.MutableRefObject<any>,\n setVisible: React.Dispatch<React.SetStateAction<boolean>>,\n event: 'mouseup' | 'mousedown' | undefined = 'mousedown'\n): void => {\n React.useEffect(() => {\n const handleClickOutside = event => {\n if (ref.current && !ref.current.contains(event.target)) {\n setVisible(false);\n }\n };\n document.addEventListener(event, handleClickOutside);\n return () => {\n document.removeEventListener(event, handleClickOutside);\n };\n }, [ref]);\n};\n"],"mappings":";;;;;;;AAAA;;;;AAEO,MAAMA,oBAAoB,GAAG,UAClCC,GADkC,EAElCC,UAFkC,EAIzB;EAAA,IADTC,KACS,uEADoC,WACpC;;EACTC,cAAA,CAAMC,SAAN,CAAgB,MAAM;IACpB,MAAMC,kBAAkB,GAAGH,KAAK,IAAI;MAClC,IAAIF,GAAG,CAACM,OAAJ,IAAe,CAACN,GAAG,CAACM,OAAJ,CAAYC,QAAZ,CAAqBL,KAAK,CAACM,MAA3B,CAApB,EAAwD;QACtDP,UAAU,CAAC,KAAD,CAAV;MACD;IACF,CAJD;;IAKAQ,QAAQ,CAACC,gBAAT,CAA0BR,KAA1B,EAAiCG,kBAAjC;IACA,OAAO,MAAM;MACXI,QAAQ,CAACE,mBAAT,CAA6BT,KAA7B,EAAoCG,kBAApC;IACD,CAFD;EAGD,CAVD,EAUG,CAACL,GAAD,CAVH;AAWD,CAhBM"}
@@ -1,6 +1,24 @@
1
1
  var _excluded = ["title", "open", "onChange", "transition", "children"];
2
2
 
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); }
3
+ 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; }
4
+
5
+ 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; }
6
+
7
+ 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; }
8
+
9
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
10
+
11
+ 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."); }
12
+
13
+ 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); }
14
+
15
+ 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; }
16
+
17
+ 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; }
18
+
19
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
+
21
+ 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; }
4
22
 
5
23
  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
24
 
@@ -19,15 +37,17 @@ var Accordion = function Accordion(_ref) {
19
37
  _ref$transition = _ref.transition,
20
38
  transition = _ref$transition === void 0 ? 200 : _ref$transition,
21
39
  children = _ref.children,
22
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
40
+ rest = _objectWithoutProperties(_ref, _excluded);
23
41
 
24
42
  var _React$useState = React.useState(_open),
25
- open = _React$useState[0],
26
- setOpen = _React$useState[1];
43
+ _React$useState2 = _slicedToArray(_React$useState, 2),
44
+ open = _React$useState2[0],
45
+ setOpen = _React$useState2[1];
27
46
 
28
- var _React$useState2 = React.useState(0),
29
- contentHeight = _React$useState2[0],
30
- setContentHeight = _React$useState2[1];
47
+ var _React$useState3 = React.useState(0),
48
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
49
+ contentHeight = _React$useState4[0],
50
+ setContentHeight = _React$useState4[1];
31
51
 
32
52
  var theme = useTheme();
33
53
 
@@ -39,7 +59,7 @@ var Accordion = function Accordion(_ref) {
39
59
  React.useLayoutEffect(function () {
40
60
  var _ref$current;
41
61
 
42
- var size = Array.from(((_ref$current = _ref2.current) == null ? void 0 : _ref$current.children) || []).reduce(function (prev, curr) {
62
+ var size = Array.from(((_ref$current = _ref2.current) === null || _ref$current === void 0 ? void 0 : _ref$current.children) || []).reduce(function (prev, curr) {
43
63
  return prev + curr.clientHeight;
44
64
  }, 0);
45
65
  setContentHeight(size);
@@ -63,7 +83,7 @@ var Accordion = function Accordion(_ref) {
63
83
  return React.createElement(Text, {
64
84
  typography: "h4",
65
85
  fontWeight: "bold",
66
- style: _extends({}, titleStyle(transition, theme), titleTransition(theme)[state])
86
+ style: _objectSpread(_objectSpread({}, titleStyle(transition, theme)), titleTransition(theme)[state])
67
87
  }, title);
68
88
  }), React.createElement(IconContainer, null, React.createElement(Icon, {
69
89
  type: "material-community",
@@ -78,7 +98,7 @@ var Accordion = function Accordion(_ref) {
78
98
  ref: function ref(htmlEl) {
79
99
  return _ref2.current = htmlEl;
80
100
  },
81
- style: _extends({}, contentStyle(open, transition, contentHeight, theme), contentTransition(contentHeight, theme)[state])
101
+ style: _objectSpread(_objectSpread({}, contentStyle(open, transition, contentHeight, theme)), contentTransition(contentHeight, theme)[state])
82
102
  }, children);
83
103
  }));
84
104
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.js","names":["React","useRef","Icon","Text","AccordionContainer","IconContainer","TitleContainer","ContentContainer","Transition","contentStyle","contentTransition","titleStyle","titleTransition","useTheme","Accordion","title","open","_open","onChange","transition","children","rest","useState","setOpen","contentHeight","setContentHeight","theme","ref","useEffect","useLayoutEffect","size","Array","from","current","reduce","prev","curr","clientHeight","handleClick","useCallback","state","htmlEl"],"sources":["../../../../src/components/atoms/Accordion/Accordion.tsx"],"sourcesContent":["import React, { useRef } from 'react';\nimport { Icon, Text, ThemeProp } from '@tecsinapse/react-core';\nimport {\n AccordionContainer,\n IconContainer,\n TitleContainer,\n ContentContainer,\n} from './styled';\nimport { Transition } from 'react-transition-group';\nimport {\n contentStyle,\n contentTransition,\n titleStyle,\n titleTransition,\n} from './animations';\nimport { useTheme } from '@emotion/react';\n\nexport interface AccordionProps extends React.HTMLAttributes<HTMLDivElement> {\n open?: boolean;\n onChange?: () => void;\n title: string;\n /** Transition time for collapse effect in ms */\n transition?: number;\n}\n\nconst Accordion: React.FC<AccordionProps> = ({\n title,\n open: _open = false,\n onChange,\n transition = 200,\n children,\n ...rest\n}) => {\n const [open, setOpen] = React.useState(_open);\n const [contentHeight, setContentHeight] = React.useState(0);\n const theme = useTheme() as ThemeProp;\n\n const ref = useRef<HTMLDivElement | null>(null);\n\n React.useEffect(() => setOpen(_open), [_open]);\n\n React.useLayoutEffect(() => {\n const size = Array.from(\n (ref.current?.children || []) as HTMLCollection\n ).reduce((prev, curr) => prev + curr.clientHeight, 0);\n setContentHeight(size);\n }, []);\n\n const handleClick = React.useCallback(() => {\n if (onChange) {\n onChange();\n return;\n }\n setOpen(state => !state);\n }, [onChange]);\n\n return (\n <AccordionContainer {...rest}>\n <TitleContainer onClick={handleClick}>\n <Transition in={open} timeout={transition}>\n {state => (\n <Text\n typography=\"h4\"\n fontWeight=\"bold\"\n style={{\n ...titleStyle(transition, theme),\n ...titleTransition(theme)[state],\n }}\n >\n {title}\n </Text>\n )}\n </Transition>\n <IconContainer>\n <Icon\n type=\"material-community\"\n name={open ? 'chevron-up' : 'chevron-down'}\n size=\"kilo\"\n fontColor=\"medium\"\n />\n </IconContainer>\n </TitleContainer>\n <Transition in={open} timeout={transition}>\n {state => (\n <ContentContainer\n ref={htmlEl => (ref.current = htmlEl)}\n style={{\n ...contentStyle(open, transition, contentHeight, theme),\n ...contentTransition(contentHeight, theme)[state],\n }}\n >\n {children}\n </ContentContainer>\n )}\n </Transition>\n </AccordionContainer>\n );\n};\n\nexport default Accordion;\n"],"mappings":"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"}
1
+ {"version":3,"file":"Accordion.js","names":["React","useRef","Icon","Text","AccordionContainer","IconContainer","TitleContainer","ContentContainer","Transition","contentStyle","contentTransition","titleStyle","titleTransition","useTheme","Accordion","title","open","_open","onChange","transition","children","rest","useState","setOpen","contentHeight","setContentHeight","theme","ref","useEffect","useLayoutEffect","size","Array","from","current","reduce","prev","curr","clientHeight","handleClick","useCallback","state","htmlEl"],"sources":["../../../../src/components/atoms/Accordion/Accordion.tsx"],"sourcesContent":["import React, { useRef } from 'react';\nimport { Icon, Text, ThemeProp } from '@tecsinapse/react-core';\nimport {\n AccordionContainer,\n IconContainer,\n TitleContainer,\n ContentContainer,\n} from './styled';\nimport { Transition } from 'react-transition-group';\nimport {\n contentStyle,\n contentTransition,\n titleStyle,\n titleTransition,\n} from './animations';\nimport { useTheme } from '@emotion/react';\n\nexport interface AccordionProps extends React.HTMLAttributes<HTMLDivElement> {\n open?: boolean;\n onChange?: () => void;\n title: string;\n /** Transition time for collapse effect in ms */\n transition?: number;\n}\n\nconst Accordion: React.FC<AccordionProps> = ({\n title,\n open: _open = false,\n onChange,\n transition = 200,\n children,\n ...rest\n}) => {\n const [open, setOpen] = React.useState(_open);\n const [contentHeight, setContentHeight] = React.useState(0);\n const theme = useTheme() as ThemeProp;\n\n const ref = useRef<HTMLDivElement | null>(null);\n\n React.useEffect(() => setOpen(_open), [_open]);\n\n React.useLayoutEffect(() => {\n const size = Array.from(\n (ref.current?.children || []) as HTMLCollection\n ).reduce((prev, curr) => prev + curr.clientHeight, 0);\n setContentHeight(size);\n }, []);\n\n const handleClick = React.useCallback(() => {\n if (onChange) {\n onChange();\n return;\n }\n setOpen(state => !state);\n }, [onChange]);\n\n return (\n <AccordionContainer {...rest}>\n <TitleContainer onClick={handleClick}>\n <Transition in={open} timeout={transition}>\n {state => (\n <Text\n typography=\"h4\"\n fontWeight=\"bold\"\n style={{\n ...titleStyle(transition, theme),\n ...titleTransition(theme)[state],\n }}\n >\n {title}\n </Text>\n )}\n </Transition>\n <IconContainer>\n <Icon\n type=\"material-community\"\n name={open ? 'chevron-up' : 'chevron-down'}\n size=\"kilo\"\n fontColor=\"medium\"\n />\n </IconContainer>\n </TitleContainer>\n <Transition in={open} timeout={transition}>\n {state => (\n <ContentContainer\n ref={htmlEl => (ref.current = htmlEl)}\n style={{\n ...contentStyle(open, transition, contentHeight, theme),\n ...contentTransition(contentHeight, theme)[state],\n }}\n >\n {children}\n </ContentContainer>\n )}\n </Transition>\n </AccordionContainer>\n );\n};\n\nexport default Accordion;\n"],"mappings":"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"}
@@ -1,7 +1,7 @@
1
1
  import { extractNumbersFromString } from '@tecsinapse/react-core';
2
2
  export var contentStyle = function contentStyle(open, transition, value, theme) {
3
3
  return {
4
- transition: "padding-bottom " + transition * 2 + "ms ease-in-out, height " + transition * 2 + "ms ease-in-out",
4
+ transition: "padding-bottom ".concat(transition * 2, "ms ease-in-out, height ").concat(transition * 2, "ms ease-in-out"),
5
5
  paddingBottom: open ? extractNumbersFromString(theme.spacing.kilo) : 0,
6
6
  height: open ? value : 0
7
7
  };
@@ -29,7 +29,7 @@ export var contentTransition = function contentTransition(value, theme) {
29
29
  };
30
30
  export var titleStyle = function titleStyle(transition, theme) {
31
31
  return {
32
- transition: "color " + transition * 2 + "ms ease-in-out",
32
+ transition: "color ".concat(transition * 2, "ms ease-in-out"),
33
33
  color: theme.font.color.dark
34
34
  };
35
35
  };
@@ -1 +1 @@
1
- {"version":3,"file":"animations.js","names":["extractNumbersFromString","contentStyle","open","transition","value","theme","paddingBottom","spacing","kilo","height","contentTransition","entering","entered","exiting","exited","titleStyle","color","font","dark","titleTransition","orange"],"sources":["../../../../src/components/atoms/Accordion/animations.ts"],"sourcesContent":["import { ThemeProp, extractNumbersFromString } from '@tecsinapse/react-core';\n\nexport const contentStyle = (\n open: boolean,\n transition: number,\n value: number,\n theme: ThemeProp\n) => ({\n transition: `padding-bottom ${transition * 2}ms ease-in-out, height ${\n transition * 2\n }ms ease-in-out`,\n paddingBottom: open ? extractNumbersFromString(theme.spacing.kilo) : 0,\n height: open ? value : 0,\n});\n\nexport const contentTransition = (value: number, theme: ThemeProp) => {\n const paddingBottom = extractNumbersFromString(theme.spacing.kilo);\n return {\n entering: {\n paddingBottom,\n height: value,\n },\n entered: {\n paddingBottom,\n height: value,\n },\n exiting: {\n paddingBottom,\n height: value,\n },\n exited: { paddingBottom: 0, height: 0 },\n };\n};\n\nexport const titleStyle = (transition: number, theme: ThemeProp) => ({\n transition: `color ${transition * 2}ms ease-in-out`,\n color: theme.font.color.dark,\n});\n\nexport const titleTransition = (theme: ThemeProp) => ({\n entering: {\n color: theme.font.color.orange,\n },\n entered: {\n color: theme.font.color.orange,\n },\n exiting: {\n color: theme.font.color.orange,\n },\n exited: { color: theme.font.color.dark },\n});\n"],"mappings":"AAAA,SAAoBA,wBAApB,QAAoD,wBAApD;AAEA,OAAO,IAAMC,YAAY,GAAG,SAAfA,YAAe,CAC1BC,IAD0B,EAE1BC,UAF0B,EAG1BC,KAH0B,EAI1BC,KAJ0B;EAAA,OAKtB;IACJF,UAAU,sBAAoBA,UAAU,GAAG,CAAjC,+BACRA,UAAU,GAAG,CADL,mBADN;IAIJG,aAAa,EAAEJ,IAAI,GAAGF,wBAAwB,CAACK,KAAK,CAACE,OAAN,CAAcC,IAAf,CAA3B,GAAkD,CAJjE;IAKJC,MAAM,EAAEP,IAAI,GAAGE,KAAH,GAAW;EALnB,CALsB;AAAA,CAArB;AAaP,OAAO,IAAMM,iBAAiB,GAAG,SAApBA,iBAAoB,CAACN,KAAD,EAAgBC,KAAhB,EAAqC;EACpE,IAAMC,aAAa,GAAGN,wBAAwB,CAACK,KAAK,CAACE,OAAN,CAAcC,IAAf,CAA9C;EACA,OAAO;IACLG,QAAQ,EAAE;MACRL,aAAa,EAAbA,aADQ;MAERG,MAAM,EAAEL;IAFA,CADL;IAKLQ,OAAO,EAAE;MACPN,aAAa,EAAbA,aADO;MAEPG,MAAM,EAAEL;IAFD,CALJ;IASLS,OAAO,EAAE;MACPP,aAAa,EAAbA,aADO;MAEPG,MAAM,EAAEL;IAFD,CATJ;IAaLU,MAAM,EAAE;MAAER,aAAa,EAAE,CAAjB;MAAoBG,MAAM,EAAE;IAA5B;EAbH,CAAP;AAeD,CAjBM;AAmBP,OAAO,IAAMM,UAAU,GAAG,SAAbA,UAAa,CAACZ,UAAD,EAAqBE,KAArB;EAAA,OAA2C;IACnEF,UAAU,aAAWA,UAAU,GAAG,CAAxB,mBADyD;IAEnEa,KAAK,EAAEX,KAAK,CAACY,IAAN,CAAWD,KAAX,CAAiBE;EAF2C,CAA3C;AAAA,CAAnB;AAKP,OAAO,IAAMC,eAAe,GAAG,SAAlBA,eAAkB,CAACd,KAAD;EAAA,OAAuB;IACpDM,QAAQ,EAAE;MACRK,KAAK,EAAEX,KAAK,CAACY,IAAN,CAAWD,KAAX,CAAiBI;IADhB,CAD0C;IAIpDR,OAAO,EAAE;MACPI,KAAK,EAAEX,KAAK,CAACY,IAAN,CAAWD,KAAX,CAAiBI;IADjB,CAJ2C;IAOpDP,OAAO,EAAE;MACPG,KAAK,EAAEX,KAAK,CAACY,IAAN,CAAWD,KAAX,CAAiBI;IADjB,CAP2C;IAUpDN,MAAM,EAAE;MAAEE,KAAK,EAAEX,KAAK,CAACY,IAAN,CAAWD,KAAX,CAAiBE;IAA1B;EAV4C,CAAvB;AAAA,CAAxB"}
1
+ {"version":3,"file":"animations.js","names":["extractNumbersFromString","contentStyle","open","transition","value","theme","paddingBottom","spacing","kilo","height","contentTransition","entering","entered","exiting","exited","titleStyle","color","font","dark","titleTransition","orange"],"sources":["../../../../src/components/atoms/Accordion/animations.ts"],"sourcesContent":["import { ThemeProp, extractNumbersFromString } from '@tecsinapse/react-core';\n\nexport const contentStyle = (\n open: boolean,\n transition: number,\n value: number,\n theme: ThemeProp\n) => ({\n transition: `padding-bottom ${transition * 2}ms ease-in-out, height ${\n transition * 2\n }ms ease-in-out`,\n paddingBottom: open ? extractNumbersFromString(theme.spacing.kilo) : 0,\n height: open ? value : 0,\n});\n\nexport const contentTransition = (value: number, theme: ThemeProp) => {\n const paddingBottom = extractNumbersFromString(theme.spacing.kilo);\n return {\n entering: {\n paddingBottom,\n height: value,\n },\n entered: {\n paddingBottom,\n height: value,\n },\n exiting: {\n paddingBottom,\n height: value,\n },\n exited: { paddingBottom: 0, height: 0 },\n };\n};\n\nexport const titleStyle = (transition: number, theme: ThemeProp) => ({\n transition: `color ${transition * 2}ms ease-in-out`,\n color: theme.font.color.dark,\n});\n\nexport const titleTransition = (theme: ThemeProp) => ({\n entering: {\n color: theme.font.color.orange,\n },\n entered: {\n color: theme.font.color.orange,\n },\n exiting: {\n color: theme.font.color.orange,\n },\n exited: { color: theme.font.color.dark },\n});\n"],"mappings":"AAAA,SAAoBA,wBAApB,QAAoD,wBAApD;AAEA,OAAO,IAAMC,YAAY,GAAG,SAAfA,YAAe,CAC1BC,IAD0B,EAE1BC,UAF0B,EAG1BC,KAH0B,EAI1BC,KAJ0B;EAAA,OAKtB;IACJF,UAAU,2BAAoBA,UAAU,GAAG,CAAjC,oCACRA,UAAU,GAAG,CADL,mBADN;IAIJG,aAAa,EAAEJ,IAAI,GAAGF,wBAAwB,CAACK,KAAK,CAACE,OAAN,CAAcC,IAAf,CAA3B,GAAkD,CAJjE;IAKJC,MAAM,EAAEP,IAAI,GAAGE,KAAH,GAAW;EALnB,CALsB;AAAA,CAArB;AAaP,OAAO,IAAMM,iBAAiB,GAAG,SAApBA,iBAAoB,CAACN,KAAD,EAAgBC,KAAhB,EAAqC;EACpE,IAAMC,aAAa,GAAGN,wBAAwB,CAACK,KAAK,CAACE,OAAN,CAAcC,IAAf,CAA9C;EACA,OAAO;IACLG,QAAQ,EAAE;MACRL,aAAa,EAAbA,aADQ;MAERG,MAAM,EAAEL;IAFA,CADL;IAKLQ,OAAO,EAAE;MACPN,aAAa,EAAbA,aADO;MAEPG,MAAM,EAAEL;IAFD,CALJ;IASLS,OAAO,EAAE;MACPP,aAAa,EAAbA,aADO;MAEPG,MAAM,EAAEL;IAFD,CATJ;IAaLU,MAAM,EAAE;MAAER,aAAa,EAAE,CAAjB;MAAoBG,MAAM,EAAE;IAA5B;EAbH,CAAP;AAeD,CAjBM;AAmBP,OAAO,IAAMM,UAAU,GAAG,SAAbA,UAAa,CAACZ,UAAD,EAAqBE,KAArB;EAAA,OAA2C;IACnEF,UAAU,kBAAWA,UAAU,GAAG,CAAxB,mBADyD;IAEnEa,KAAK,EAAEX,KAAK,CAACY,IAAN,CAAWD,KAAX,CAAiBE;EAF2C,CAA3C;AAAA,CAAnB;AAKP,OAAO,IAAMC,eAAe,GAAG,SAAlBA,eAAkB,CAACd,KAAD;EAAA,OAAuB;IACpDM,QAAQ,EAAE;MACRK,KAAK,EAAEX,KAAK,CAACY,IAAN,CAAWD,KAAX,CAAiBI;IADhB,CAD0C;IAIpDR,OAAO,EAAE;MACPI,KAAK,EAAEX,KAAK,CAACY,IAAN,CAAWD,KAAX,CAAiBI;IADjB,CAJ2C;IAOpDP,OAAO,EAAE;MACPG,KAAK,EAAEX,KAAK,CAACY,IAAN,CAAWD,KAAX,CAAiBI;IADjB,CAP2C;IAUpDN,MAAM,EAAE;MAAEE,KAAK,EAAEX,KAAK,CAACY,IAAN,CAAWD,KAAX,CAAiBE;IAA1B;EAV4C,CAAvB;AAAA,CAAxB"}
@@ -1,25 +1,25 @@
1
1
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
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 IconContainer = styled('div')(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n border-radius: ", ";\n border: ", ";\n display: flex;\n text-align: center;\n justify-content: center;\n align-items: center;\n"])), function (_ref) {
6
+ export var IconContainer = styled('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: ", ";\n border: ", ";\n display: flex;\n text-align: center;\n justify-content: center;\n align-items: center;\n"])), function (_ref) {
7
7
  var theme = _ref.theme;
8
8
  return theme.borderRadius.mili;
9
9
  }, function (_ref2) {
10
10
  var theme = _ref2.theme;
11
- return theme.borderWidth.pico + " solid " + theme.color.secondary.light;
11
+ return "".concat(theme.borderWidth.pico, " solid ").concat(theme.color.secondary.light);
12
12
  });
13
- export var TitleContainer = styled('div')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex: 1;\n flex-direction: row;\n justify-content: space-between;\n cursor: pointer;\n padding: ", " 0;\n"])), function (_ref3) {
13
+ export var TitleContainer = styled('div')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex: 1;\n flex-direction: row;\n justify-content: space-between;\n cursor: pointer;\n padding: ", " 0;\n"])), function (_ref3) {
14
14
  var theme = _ref3.theme;
15
15
  return theme.spacing.kilo;
16
16
  });
17
- export var AccordionContainer = styled('div')(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n border-bottom: ", ";\n background-color: ", ";\n"])), function (_ref4) {
17
+ export var AccordionContainer = styled('div')(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n border-bottom: ", ";\n background-color: ", ";\n"])), function (_ref4) {
18
18
  var theme = _ref4.theme;
19
- return theme.borderWidth.pico + " solid " + theme.color.secondary.light;
19
+ return "".concat(theme.borderWidth.pico, " solid ").concat(theme.color.secondary.light);
20
20
  }, function (_ref5) {
21
21
  var theme = _ref5.theme;
22
22
  return theme.miscellaneous.surfaceColor;
23
23
  });
24
- export var ContentContainer = styled('div')(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n overflow: hidden;\n"])));
24
+ export var ContentContainer = styled('div')(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n overflow: hidden;\n"])));
25
25
  //# sourceMappingURL=styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","names":["styled","IconContainer","theme","borderRadius","mili","borderWidth","pico","color","secondary","light","TitleContainer","spacing","kilo","AccordionContainer","miscellaneous","surfaceColor","ContentContainer"],"sources":["../../../../src/components/atoms/Accordion/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { StyleProps } from '@tecsinapse/react-core';\n\nexport const IconContainer = styled('div')<Partial<StyleProps>>`\n border-radius: ${({ theme }) => theme.borderRadius.mili};\n border: ${({ theme }) =>\n `${theme.borderWidth.pico} solid ${theme.color.secondary.light}`};\n display: flex;\n text-align: center;\n justify-content: center;\n align-items: center;\n`;\n\nexport const TitleContainer = styled('div')<Partial<StyleProps>>`\n display: flex;\n flex: 1;\n flex-direction: row;\n justify-content: space-between;\n cursor: pointer;\n padding: ${({ theme }) => theme.spacing.kilo} 0;\n`;\n\nexport const AccordionContainer = styled('div')<Partial<StyleProps>>`\n display: flex;\n flex-direction: column;\n border-bottom: ${({ theme }) =>\n `${theme.borderWidth.pico} solid ${theme.color.secondary.light}`};\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n`;\n\nexport const ContentContainer = styled('div')`\n display: flex;\n flex-direction: column;\n overflow: hidden;\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AAGA,OAAO,IAAMC,aAAa,GAAGD,MAAM,CAAC,KAAD,CAAT,mNACP;EAAA,IAAGE,KAAH,QAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,YAAN,CAAmBC,IAAlC;AAAA,CADO,EAEd;EAAA,IAAGF,KAAH,SAAGA,KAAH;EAAA,OACLA,KAAK,CAACG,WAAN,CAAkBC,IADb,eAC2BJ,KAAK,CAACK,KAAN,CAAYC,SAAZ,CAAsBC,KADjD;AAAA,CAFc,CAAnB;AAUP,OAAO,IAAMC,cAAc,GAAGV,MAAM,CAAC,KAAD,CAAT,gNAMd;EAAA,IAAGE,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACS,OAAN,CAAcC,IAA7B;AAAA,CANc,CAApB;AASP,OAAO,IAAMC,kBAAkB,GAAGb,MAAM,CAAC,KAAD,CAAT,+KAGZ;EAAA,IAAGE,KAAH,SAAGA,KAAH;EAAA,OACZA,KAAK,CAACG,WAAN,CAAkBC,IADN,eACoBJ,KAAK,CAACK,KAAN,CAAYC,SAAZ,CAAsBC,KAD1C;AAAA,CAHY,EAKT;EAAA,IAAGP,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACY,aAAN,CAAoBC,YAAnC;AAAA,CALS,CAAxB;AAQP,OAAO,IAAMC,gBAAgB,GAAGhB,MAAM,CAAC,KAAD,CAAT,gJAAtB"}
1
+ {"version":3,"file":"styled.js","names":["styled","IconContainer","theme","borderRadius","mili","borderWidth","pico","color","secondary","light","TitleContainer","spacing","kilo","AccordionContainer","miscellaneous","surfaceColor","ContentContainer"],"sources":["../../../../src/components/atoms/Accordion/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { StyleProps } from '@tecsinapse/react-core';\n\nexport const IconContainer = styled('div')<Partial<StyleProps>>`\n border-radius: ${({ theme }) => theme.borderRadius.mili};\n border: ${({ theme }) =>\n `${theme.borderWidth.pico} solid ${theme.color.secondary.light}`};\n display: flex;\n text-align: center;\n justify-content: center;\n align-items: center;\n`;\n\nexport const TitleContainer = styled('div')<Partial<StyleProps>>`\n display: flex;\n flex: 1;\n flex-direction: row;\n justify-content: space-between;\n cursor: pointer;\n padding: ${({ theme }) => theme.spacing.kilo} 0;\n`;\n\nexport const AccordionContainer = styled('div')<Partial<StyleProps>>`\n display: flex;\n flex-direction: column;\n border-bottom: ${({ theme }) =>\n `${theme.borderWidth.pico} solid ${theme.color.secondary.light}`};\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n`;\n\nexport const ContentContainer = styled('div')`\n display: flex;\n flex-direction: column;\n overflow: hidden;\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AAGA,OAAO,IAAMC,aAAa,GAAGD,MAAM,CAAC,KAAD,CAAT,8MACP;EAAA,IAAGE,KAAH,QAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,YAAN,CAAmBC,IAAlC;AAAA,CADO,EAEd;EAAA,IAAGF,KAAH,SAAGA,KAAH;EAAA,iBACLA,KAAK,CAACG,WAAN,CAAkBC,IADb,oBAC2BJ,KAAK,CAACK,KAAN,CAAYC,SAAZ,CAAsBC,KADjD;AAAA,CAFc,CAAnB;AAUP,OAAO,IAAMC,cAAc,GAAGV,MAAM,CAAC,KAAD,CAAT,2MAMd;EAAA,IAAGE,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACS,OAAN,CAAcC,IAA7B;AAAA,CANc,CAApB;AASP,OAAO,IAAMC,kBAAkB,GAAGb,MAAM,CAAC,KAAD,CAAT,0KAGZ;EAAA,IAAGE,KAAH,SAAGA,KAAH;EAAA,iBACZA,KAAK,CAACG,WAAN,CAAkBC,IADN,oBACoBJ,KAAK,CAACK,KAAN,CAAYC,SAAZ,CAAsBC,KAD1C;AAAA,CAHY,EAKT;EAAA,IAAGP,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACY,aAAN,CAAoBC,YAAnC;AAAA,CALS,CAAxB;AAQP,OAAO,IAAMC,gBAAgB,GAAGhB,MAAM,CAAC,KAAD,CAAT,2IAAtB"}
@@ -2,6 +2,8 @@ var _excluded = ["children", "fontColor", "value"];
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 _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; }
6
+
5
7
  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
8
 
7
9
  import { Badge as BadgeCore, Text } from '@tecsinapse/react-core';
@@ -12,7 +14,7 @@ var Badge = function Badge(_ref) {
12
14
  _ref$fontColor = _ref.fontColor,
13
15
  fontColor = _ref$fontColor === void 0 ? 'light' : _ref$fontColor,
14
16
  value = _ref.value,
15
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
17
+ props = _objectWithoutProperties(_ref, _excluded);
16
18
 
17
19
  return React.createElement(BadgeCore, _extends({}, props, {
18
20
  value: React.createElement(Text, {
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","names":["Badge","BadgeCore","Text","React","children","fontColor","value","props"],"sources":["../../../../src/components/atoms/Badge/Badge.tsx"],"sourcesContent":["import {\n BadgeProps,\n Badge as BadgeCore,\n Text,\n FontColorType,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\n\nexport interface BadgeWebProps extends Omit<BadgeProps, 'value'> {\n fontColor?: FontColorType;\n value: string | number;\n}\n\nconst Badge: FC<BadgeWebProps> = ({\n children,\n fontColor = 'light',\n value,\n ...props\n}) => {\n return (\n <BadgeCore\n {...props}\n value={\n <Text fontColor={fontColor} fontWeight={'bold'} typography={'label'}>\n {value}\n </Text>\n }\n >\n {children}\n </BadgeCore>\n );\n};\n\nexport default Badge;\n"],"mappings":";;;;;;AAAA,SAEEA,KAAK,IAAIC,SAFX,EAGEC,IAHF,QAKO,wBALP;AAMA,OAAOC,KAAP,MAA0B,OAA1B;;AAOA,IAAMH,KAAwB,GAAG,SAA3BA,KAA2B,OAK3B;EAAA,IAJJI,QAII,QAJJA,QAII;EAAA,0BAHJC,SAGI;EAAA,IAHJA,SAGI,+BAHQ,OAGR;EAAA,IAFJC,KAEI,QAFJA,KAEI;EAAA,IADDC,KACC;;EACJ,OACE,oBAAC,SAAD,eACMA,KADN;IAEE,KAAK,EACH,oBAAC,IAAD;MAAM,SAAS,EAAEF,SAAjB;MAA4B,UAAU,EAAE,MAAxC;MAAgD,UAAU,EAAE;IAA5D,GACGC,KADH;EAHJ,IAQGF,QARH,CADF;AAYD,CAlBD;;AAoBA,eAAeJ,KAAf"}
1
+ {"version":3,"file":"Badge.js","names":["Badge","BadgeCore","Text","React","children","fontColor","value","props"],"sources":["../../../../src/components/atoms/Badge/Badge.tsx"],"sourcesContent":["import {\n BadgeProps,\n Badge as BadgeCore,\n Text,\n FontColorType,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\n\nexport interface BadgeWebProps extends Omit<BadgeProps, 'value'> {\n fontColor?: FontColorType;\n value: string | number;\n}\n\nconst Badge: FC<BadgeWebProps> = ({\n children,\n fontColor = 'light',\n value,\n ...props\n}) => {\n return (\n <BadgeCore\n {...props}\n value={\n <Text fontColor={fontColor} fontWeight={'bold'} typography={'label'}>\n {value}\n </Text>\n }\n >\n {children}\n </BadgeCore>\n );\n};\n\nexport default Badge;\n"],"mappings":";;;;;;;;AAAA,SAEEA,KAAK,IAAIC,SAFX,EAGEC,IAHF,QAKO,wBALP;AAMA,OAAOC,KAAP,MAA0B,OAA1B;;AAOA,IAAMH,KAAwB,GAAG,SAA3BA,KAA2B,OAK3B;EAAA,IAJJI,QAII,QAJJA,QAII;EAAA,0BAHJC,SAGI;EAAA,IAHJA,SAGI,+BAHQ,OAGR;EAAA,IAFJC,KAEI,QAFJA,KAEI;EAAA,IADDC,KACC;;EACJ,OACE,oBAAC,SAAD,eACMA,KADN;IAEE,KAAK,EACH,oBAAC,IAAD;MAAM,SAAS,EAAEF,SAAjB;MAA4B,UAAU,EAAE,MAAxC;MAAgD,UAAU,EAAE;IAA5D,GACGC,KADH;EAHJ,IAQGF,QARH,CADF;AAYD,CAlBD;;AAoBA,eAAeJ,KAAf"}
@@ -2,6 +2,8 @@ var _excluded = ["children", "disabled", "frozen", "state", "variant", "onMouseO
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 _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; }
6
+
5
7
  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
8
 
7
9
  import React from 'react';
@@ -19,7 +21,7 @@ var Button = function Button(_ref) {
19
21
  onMouseOver = _ref.onMouseOver,
20
22
  onPressIn = _ref.onPressIn,
21
23
  onPressOut = _ref.onPressOut,
22
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
24
+ rest = _objectWithoutProperties(_ref, _excluded);
23
25
 
24
26
  var _frozen = frozen || state === 'loading';
25
27
 
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","names":["React","useMouseHover","useMousePressed","StyledWebButton","Button","children","disabled","frozen","state","variant","onMouseOut","onMouseOver","onPressIn","onPressOut","rest","_frozen","mouseOver","handleMouseOut","handleMouseOver","pressed","handlePressIn","handlePressOut"],"sources":["../../../../src/components/atoms/Button/Button.tsx"],"sourcesContent":["import { ButtonProps } from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { useMouseHover } from './hooks/useMouseHover';\nimport { useMousePressed } from './hooks/useMousePressed';\nimport { StyledWebButton } from './styled';\n\n/**\n * TODO: Add a property 'defaultElement' to render a default\n * component and provide some button's state to it.\n */\nexport type WebButtonProps = ButtonProps & {\n onMouseOver?: () => void;\n onMouseOut?: () => void;\n onPressIn?: () => void;\n onPressOut?: () => void;\n};\n\nconst Button: FC<WebButtonProps> = ({\n children,\n disabled,\n frozen,\n state,\n variant,\n onMouseOut,\n onMouseOver,\n onPressIn,\n onPressOut,\n ...rest\n}): JSX.Element => {\n const _frozen = frozen || state === 'loading';\n const { mouseOver, handleMouseOut, handleMouseOver } = useMouseHover(\n !disabled && !_frozen,\n onMouseOut,\n onMouseOver\n );\n const { pressed, handlePressIn, handlePressOut } = useMousePressed(\n !disabled && !_frozen,\n onPressIn,\n onPressOut\n );\n\n return (\n <StyledWebButton\n {...rest}\n disabled={disabled}\n frozen={_frozen}\n state={state}\n onMouseOver={handleMouseOver}\n onMouseOut={handleMouseOut}\n mouseOver={mouseOver}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n pressed={pressed}\n variant={variant}\n >\n {children}\n </StyledWebButton>\n );\n};\n\nexport default Button;\n"],"mappings":";;;;;;AACA,OAAOA,KAAP,MAA0B,OAA1B;AACA,SAASC,aAAT;AACA,SAASC,eAAT;AACA,SAASC,eAAT;;AAaA,IAAMC,MAA0B,GAAG,SAA7BA,MAA6B,OAWhB;EAAA,IAVjBC,QAUiB,QAVjBA,QAUiB;EAAA,IATjBC,QASiB,QATjBA,QASiB;EAAA,IARjBC,MAQiB,QARjBA,MAQiB;EAAA,IAPjBC,KAOiB,QAPjBA,KAOiB;EAAA,IANjBC,OAMiB,QANjBA,OAMiB;EAAA,IALjBC,UAKiB,QALjBA,UAKiB;EAAA,IAJjBC,WAIiB,QAJjBA,WAIiB;EAAA,IAHjBC,SAGiB,QAHjBA,SAGiB;EAAA,IAFjBC,UAEiB,QAFjBA,UAEiB;EAAA,IADdC,IACc;;EACjB,IAAMC,OAAO,GAAGR,MAAM,IAAIC,KAAK,KAAK,SAApC;;EACA,qBAAuDP,aAAa,CAClE,CAACK,QAAD,IAAa,CAACS,OADoD,EAElEL,UAFkE,EAGlEC,WAHkE,CAApE;EAAA,IAAQK,SAAR,kBAAQA,SAAR;EAAA,IAAmBC,cAAnB,kBAAmBA,cAAnB;EAAA,IAAmCC,eAAnC,kBAAmCA,eAAnC;;EAKA,uBAAmDhB,eAAe,CAChE,CAACI,QAAD,IAAa,CAACS,OADkD,EAEhEH,SAFgE,EAGhEC,UAHgE,CAAlE;EAAA,IAAQM,OAAR,oBAAQA,OAAR;EAAA,IAAiBC,aAAjB,oBAAiBA,aAAjB;EAAA,IAAgCC,cAAhC,oBAAgCA,cAAhC;;EAMA,OACE,oBAAC,eAAD,eACMP,IADN;IAEE,QAAQ,EAAER,QAFZ;IAGE,MAAM,EAAES,OAHV;IAIE,KAAK,EAAEP,KAJT;IAKE,WAAW,EAAEU,eALf;IAME,UAAU,EAAED,cANd;IAOE,SAAS,EAAED,SAPb;IAQE,SAAS,EAAEI,aARb;IASE,UAAU,EAAEC,cATd;IAUE,OAAO,EAAEF,OAVX;IAWE,OAAO,EAAEV;EAXX,IAaGJ,QAbH,CADF;AAiBD,CAzCD;;AA2CA,eAAeD,MAAf"}
1
+ {"version":3,"file":"Button.js","names":["React","useMouseHover","useMousePressed","StyledWebButton","Button","children","disabled","frozen","state","variant","onMouseOut","onMouseOver","onPressIn","onPressOut","rest","_frozen","mouseOver","handleMouseOut","handleMouseOver","pressed","handlePressIn","handlePressOut"],"sources":["../../../../src/components/atoms/Button/Button.tsx"],"sourcesContent":["import { ButtonProps } from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { useMouseHover } from './hooks/useMouseHover';\nimport { useMousePressed } from './hooks/useMousePressed';\nimport { StyledWebButton } from './styled';\n\n/**\n * TODO: Add a property 'defaultElement' to render a default\n * component and provide some button's state to it.\n */\nexport type WebButtonProps = ButtonProps & {\n onMouseOver?: () => void;\n onMouseOut?: () => void;\n onPressIn?: () => void;\n onPressOut?: () => void;\n};\n\nconst Button: FC<WebButtonProps> = ({\n children,\n disabled,\n frozen,\n state,\n variant,\n onMouseOut,\n onMouseOver,\n onPressIn,\n onPressOut,\n ...rest\n}): JSX.Element => {\n const _frozen = frozen || state === 'loading';\n const { mouseOver, handleMouseOut, handleMouseOver } = useMouseHover(\n !disabled && !_frozen,\n onMouseOut,\n onMouseOver\n );\n const { pressed, handlePressIn, handlePressOut } = useMousePressed(\n !disabled && !_frozen,\n onPressIn,\n onPressOut\n );\n\n return (\n <StyledWebButton\n {...rest}\n disabled={disabled}\n frozen={_frozen}\n state={state}\n onMouseOver={handleMouseOver}\n onMouseOut={handleMouseOut}\n mouseOver={mouseOver}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n pressed={pressed}\n variant={variant}\n >\n {children}\n </StyledWebButton>\n );\n};\n\nexport default Button;\n"],"mappings":";;;;;;;;AACA,OAAOA,KAAP,MAA0B,OAA1B;AACA,SAASC,aAAT;AACA,SAASC,eAAT;AACA,SAASC,eAAT;;AAaA,IAAMC,MAA0B,GAAG,SAA7BA,MAA6B,OAWhB;EAAA,IAVjBC,QAUiB,QAVjBA,QAUiB;EAAA,IATjBC,QASiB,QATjBA,QASiB;EAAA,IARjBC,MAQiB,QARjBA,MAQiB;EAAA,IAPjBC,KAOiB,QAPjBA,KAOiB;EAAA,IANjBC,OAMiB,QANjBA,OAMiB;EAAA,IALjBC,UAKiB,QALjBA,UAKiB;EAAA,IAJjBC,WAIiB,QAJjBA,WAIiB;EAAA,IAHjBC,SAGiB,QAHjBA,SAGiB;EAAA,IAFjBC,UAEiB,QAFjBA,UAEiB;EAAA,IADdC,IACc;;EACjB,IAAMC,OAAO,GAAGR,MAAM,IAAIC,KAAK,KAAK,SAApC;;EACA,qBAAuDP,aAAa,CAClE,CAACK,QAAD,IAAa,CAACS,OADoD,EAElEL,UAFkE,EAGlEC,WAHkE,CAApE;EAAA,IAAQK,SAAR,kBAAQA,SAAR;EAAA,IAAmBC,cAAnB,kBAAmBA,cAAnB;EAAA,IAAmCC,eAAnC,kBAAmCA,eAAnC;;EAKA,uBAAmDhB,eAAe,CAChE,CAACI,QAAD,IAAa,CAACS,OADkD,EAEhEH,SAFgE,EAGhEC,UAHgE,CAAlE;EAAA,IAAQM,OAAR,oBAAQA,OAAR;EAAA,IAAiBC,aAAjB,oBAAiBA,aAAjB;EAAA,IAAgCC,cAAhC,oBAAgCA,cAAhC;;EAMA,OACE,oBAAC,eAAD,eACMP,IADN;IAEE,QAAQ,EAAER,QAFZ;IAGE,MAAM,EAAES,OAHV;IAIE,KAAK,EAAEP,KAJT;IAKE,WAAW,EAAEU,eALf;IAME,UAAU,EAAED,cANd;IAOE,SAAS,EAAED,SAPb;IAQE,SAAS,EAAEI,aARb;IASE,UAAU,EAAEC,cATd;IAUE,OAAO,EAAEF,OAVX;IAWE,OAAO,EAAEV;EAXX,IAaGJ,QAbH,CADF;AAiBD,CAzCD;;AA2CA,eAAeD,MAAf"}
@@ -1,19 +1,32 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+
3
+ 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."); }
4
+
5
+ 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); }
6
+
7
+ 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; }
8
+
9
+ 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; }
10
+
11
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
+
1
13
  import { useCallback, useState } from 'react';
2
14
  export var useMouseHover = function useMouseHover(active, onMouseOver, onMouseOut) {
3
15
  var _useState = useState(false),
4
- mouseOver = _useState[0],
5
- setMouseOver = _useState[1];
16
+ _useState2 = _slicedToArray(_useState, 2),
17
+ mouseOver = _useState2[0],
18
+ setMouseOver = _useState2[1];
6
19
 
7
20
  var handleMouseOver = useCallback(function () {
8
21
  if (active) {
9
22
  setMouseOver(true);
10
- onMouseOver == null ? void 0 : onMouseOver();
23
+ onMouseOver === null || onMouseOver === void 0 ? void 0 : onMouseOver();
11
24
  }
12
25
  }, [active, setMouseOver]);
13
26
  var handleMouseOut = useCallback(function () {
14
27
  if (active) {
15
28
  setMouseOver(false);
16
- onMouseOut == null ? void 0 : onMouseOut();
29
+ onMouseOut === null || onMouseOut === void 0 ? void 0 : onMouseOut();
17
30
  }
18
31
  }, [active, setMouseOver]);
19
32
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"useMouseHover.js","names":["useCallback","useState","useMouseHover","active","onMouseOver","onMouseOut","mouseOver","setMouseOver","handleMouseOver","handleMouseOut"],"sources":["../../../../../src/components/atoms/Button/hooks/useMouseHover.ts"],"sourcesContent":["import { useCallback, useState } from 'react';\n\nexport const useMouseHover = (\n active: boolean,\n onMouseOver?: () => void,\n onMouseOut?: () => void\n) => {\n const [mouseOver, setMouseOver] = useState<boolean>(false);\n\n const handleMouseOver = useCallback(() => {\n if (active) {\n setMouseOver(true);\n onMouseOver?.();\n }\n }, [active, setMouseOver]);\n\n const handleMouseOut = useCallback(() => {\n if (active) {\n setMouseOver(false);\n onMouseOut?.();\n }\n }, [active, setMouseOver]);\n\n return {\n mouseOver,\n handleMouseOver,\n handleMouseOut,\n };\n};\n"],"mappings":"AAAA,SAASA,WAAT,EAAsBC,QAAtB,QAAsC,OAAtC;AAEA,OAAO,IAAMC,aAAa,GAAG,SAAhBA,aAAgB,CAC3BC,MAD2B,EAE3BC,WAF2B,EAG3BC,UAH2B,EAIxB;EACH,gBAAkCJ,QAAQ,CAAU,KAAV,CAA1C;EAAA,IAAOK,SAAP;EAAA,IAAkBC,YAAlB;;EAEA,IAAMC,eAAe,GAAGR,WAAW,CAAC,YAAM;IACxC,IAAIG,MAAJ,EAAY;MACVI,YAAY,CAAC,IAAD,CAAZ;MACAH,WAAW,QAAX,YAAAA,WAAW;IACZ;EACF,CALkC,EAKhC,CAACD,MAAD,EAASI,YAAT,CALgC,CAAnC;EAOA,IAAME,cAAc,GAAGT,WAAW,CAAC,YAAM;IACvC,IAAIG,MAAJ,EAAY;MACVI,YAAY,CAAC,KAAD,CAAZ;MACAF,UAAU,QAAV,YAAAA,UAAU;IACX;EACF,CALiC,EAK/B,CAACF,MAAD,EAASI,YAAT,CAL+B,CAAlC;EAOA,OAAO;IACLD,SAAS,EAATA,SADK;IAELE,eAAe,EAAfA,eAFK;IAGLC,cAAc,EAAdA;EAHK,CAAP;AAKD,CA1BM"}
1
+ {"version":3,"file":"useMouseHover.js","names":["useCallback","useState","useMouseHover","active","onMouseOver","onMouseOut","mouseOver","setMouseOver","handleMouseOver","handleMouseOut"],"sources":["../../../../../src/components/atoms/Button/hooks/useMouseHover.ts"],"sourcesContent":["import { useCallback, useState } from 'react';\n\nexport const useMouseHover = (\n active: boolean,\n onMouseOver?: () => void,\n onMouseOut?: () => void\n) => {\n const [mouseOver, setMouseOver] = useState<boolean>(false);\n\n const handleMouseOver = useCallback(() => {\n if (active) {\n setMouseOver(true);\n onMouseOver?.();\n }\n }, [active, setMouseOver]);\n\n const handleMouseOut = useCallback(() => {\n if (active) {\n setMouseOver(false);\n onMouseOut?.();\n }\n }, [active, setMouseOver]);\n\n return {\n mouseOver,\n handleMouseOver,\n handleMouseOut,\n };\n};\n"],"mappings":";;;;;;;;;;;;AAAA,SAASA,WAAT,EAAsBC,QAAtB,QAAsC,OAAtC;AAEA,OAAO,IAAMC,aAAa,GAAG,SAAhBA,aAAgB,CAC3BC,MAD2B,EAE3BC,WAF2B,EAG3BC,UAH2B,EAIxB;EACH,gBAAkCJ,QAAQ,CAAU,KAAV,CAA1C;EAAA;EAAA,IAAOK,SAAP;EAAA,IAAkBC,YAAlB;;EAEA,IAAMC,eAAe,GAAGR,WAAW,CAAC,YAAM;IACxC,IAAIG,MAAJ,EAAY;MACVI,YAAY,CAAC,IAAD,CAAZ;MACAH,WAAW,SAAX,IAAAA,WAAW,WAAX,YAAAA,WAAW;IACZ;EACF,CALkC,EAKhC,CAACD,MAAD,EAASI,YAAT,CALgC,CAAnC;EAOA,IAAME,cAAc,GAAGT,WAAW,CAAC,YAAM;IACvC,IAAIG,MAAJ,EAAY;MACVI,YAAY,CAAC,KAAD,CAAZ;MACAF,UAAU,SAAV,IAAAA,UAAU,WAAV,YAAAA,UAAU;IACX;EACF,CALiC,EAK/B,CAACF,MAAD,EAASI,YAAT,CAL+B,CAAlC;EAOA,OAAO;IACLD,SAAS,EAATA,SADK;IAELE,eAAe,EAAfA,eAFK;IAGLC,cAAc,EAAdA;EAHK,CAAP;AAKD,CA1BM"}
@@ -1,19 +1,32 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+
3
+ 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."); }
4
+
5
+ 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); }
6
+
7
+ 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; }
8
+
9
+ 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; }
10
+
11
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
+
1
13
  import { useCallback, useState } from 'react';
2
14
  export var useMousePressed = function useMousePressed(active, onPressIn, onPressOut) {
3
15
  var _useState = useState(false),
4
- pressed = _useState[0],
5
- setPressed = _useState[1];
16
+ _useState2 = _slicedToArray(_useState, 2),
17
+ pressed = _useState2[0],
18
+ setPressed = _useState2[1];
6
19
 
7
20
  var handlePressIn = useCallback(function () {
8
21
  if (active) {
9
22
  setPressed(true);
10
- onPressIn == null ? void 0 : onPressIn();
23
+ onPressIn === null || onPressIn === void 0 ? void 0 : onPressIn();
11
24
  }
12
25
  }, [active, setPressed]);
13
26
  var handlePressOut = useCallback(function () {
14
27
  if (active) {
15
28
  setPressed(false);
16
- onPressOut == null ? void 0 : onPressOut();
29
+ onPressOut === null || onPressOut === void 0 ? void 0 : onPressOut();
17
30
  }
18
31
  }, [active, setPressed]);
19
32
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"useMousePressed.js","names":["useCallback","useState","useMousePressed","active","onPressIn","onPressOut","pressed","setPressed","handlePressIn","handlePressOut"],"sources":["../../../../../src/components/atoms/Button/hooks/useMousePressed.ts"],"sourcesContent":["import { useCallback, useState } from 'react';\n\nexport const useMousePressed = (\n active: boolean,\n onPressIn?: () => void,\n onPressOut?: () => void\n) => {\n const [pressed, setPressed] = useState<boolean>(false);\n\n const handlePressIn = useCallback(() => {\n if (active) {\n setPressed(true);\n onPressIn?.();\n }\n }, [active, setPressed]);\n\n const handlePressOut = useCallback(() => {\n if (active) {\n setPressed(false);\n onPressOut?.();\n }\n }, [active, setPressed]);\n\n return {\n pressed,\n handlePressIn,\n handlePressOut,\n };\n};\n"],"mappings":"AAAA,SAASA,WAAT,EAAsBC,QAAtB,QAAsC,OAAtC;AAEA,OAAO,IAAMC,eAAe,GAAG,SAAlBA,eAAkB,CAC7BC,MAD6B,EAE7BC,SAF6B,EAG7BC,UAH6B,EAI1B;EACH,gBAA8BJ,QAAQ,CAAU,KAAV,CAAtC;EAAA,IAAOK,OAAP;EAAA,IAAgBC,UAAhB;;EAEA,IAAMC,aAAa,GAAGR,WAAW,CAAC,YAAM;IACtC,IAAIG,MAAJ,EAAY;MACVI,UAAU,CAAC,IAAD,CAAV;MACAH,SAAS,QAAT,YAAAA,SAAS;IACV;EACF,CALgC,EAK9B,CAACD,MAAD,EAASI,UAAT,CAL8B,CAAjC;EAOA,IAAME,cAAc,GAAGT,WAAW,CAAC,YAAM;IACvC,IAAIG,MAAJ,EAAY;MACVI,UAAU,CAAC,KAAD,CAAV;MACAF,UAAU,QAAV,YAAAA,UAAU;IACX;EACF,CALiC,EAK/B,CAACF,MAAD,EAASI,UAAT,CAL+B,CAAlC;EAOA,OAAO;IACLD,OAAO,EAAPA,OADK;IAELE,aAAa,EAAbA,aAFK;IAGLC,cAAc,EAAdA;EAHK,CAAP;AAKD,CA1BM"}
1
+ {"version":3,"file":"useMousePressed.js","names":["useCallback","useState","useMousePressed","active","onPressIn","onPressOut","pressed","setPressed","handlePressIn","handlePressOut"],"sources":["../../../../../src/components/atoms/Button/hooks/useMousePressed.ts"],"sourcesContent":["import { useCallback, useState } from 'react';\n\nexport const useMousePressed = (\n active: boolean,\n onPressIn?: () => void,\n onPressOut?: () => void\n) => {\n const [pressed, setPressed] = useState<boolean>(false);\n\n const handlePressIn = useCallback(() => {\n if (active) {\n setPressed(true);\n onPressIn?.();\n }\n }, [active, setPressed]);\n\n const handlePressOut = useCallback(() => {\n if (active) {\n setPressed(false);\n onPressOut?.();\n }\n }, [active, setPressed]);\n\n return {\n pressed,\n handlePressIn,\n handlePressOut,\n };\n};\n"],"mappings":";;;;;;;;;;;;AAAA,SAASA,WAAT,EAAsBC,QAAtB,QAAsC,OAAtC;AAEA,OAAO,IAAMC,eAAe,GAAG,SAAlBA,eAAkB,CAC7BC,MAD6B,EAE7BC,SAF6B,EAG7BC,UAH6B,EAI1B;EACH,gBAA8BJ,QAAQ,CAAU,KAAV,CAAtC;EAAA;EAAA,IAAOK,OAAP;EAAA,IAAgBC,UAAhB;;EAEA,IAAMC,aAAa,GAAGR,WAAW,CAAC,YAAM;IACtC,IAAIG,MAAJ,EAAY;MACVI,UAAU,CAAC,IAAD,CAAV;MACAH,SAAS,SAAT,IAAAA,SAAS,WAAT,YAAAA,SAAS;IACV;EACF,CALgC,EAK9B,CAACD,MAAD,EAASI,UAAT,CAL8B,CAAjC;EAOA,IAAME,cAAc,GAAGT,WAAW,CAAC,YAAM;IACvC,IAAIG,MAAJ,EAAY;MACVI,UAAU,CAAC,KAAD,CAAV;MACAF,UAAU,SAAV,IAAAA,UAAU,WAAV,YAAAA,UAAU;IACX;EACF,CALiC,EAK/B,CAACF,MAAD,EAASI,UAAT,CAL+B,CAAlC;EAOA,OAAO;IACLD,OAAO,EAAPA,OADK;IAELE,aAAa,EAAbA,aAFK;IAGLC,cAAc,EAAdA;EAHK,CAAP;AAKD,CA1BM"}
@@ -1,12 +1,12 @@
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, { css } from '@emotion/native';
6
6
  import { borderColorGradationVC, borderColorVC, Button, colorGradationVC, colorVC } from '@tecsinapse/react-core';
7
7
 
8
8
  var webStyles = function webStyles() {
9
- return css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n & * {\n user-select: none;\n }\n "])));
9
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & * {\n user-select: none;\n }\n "])));
10
10
  };
11
11
 
12
12
  var hoverStyles = function hoverStyles(_ref) {
@@ -20,7 +20,7 @@ var hoverStyles = function hoverStyles(_ref) {
20
20
  var variantColorGradation = colorGradationVC[variant];
21
21
  var variantBorderColor = borderColorVC[variant];
22
22
  var variantBorderColorGradation = borderColorGradationVC[variant];
23
- return mouseOver && !disabled && !pressed && css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n border-color: ", ";\n "])), theme == null ? void 0 : theme.color[variantColor][variantColorGradation], theme == null ? void 0 : theme.color[variantBorderColor][variantBorderColorGradation]);
23
+ return mouseOver && !disabled && !pressed && css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-color: ", ";\n border-color: ", ";\n "])), theme === null || theme === void 0 ? void 0 : theme.color[variantColor][variantColorGradation], theme === null || theme === void 0 ? void 0 : theme.color[variantBorderColor][variantBorderColorGradation]);
24
24
  };
25
25
 
26
26
  export var StyledWebButton = styled(Button)(webStyles, hoverStyles);
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","names":["styled","css","borderColorGradationVC","borderColorVC","Button","colorGradationVC","colorVC","webStyles","hoverStyles","mouseOver","pressed","theme","variant","disabled","variantColor","variantColorGradation","variantBorderColor","variantBorderColorGradation","color","StyledWebButton"],"sources":["../../../../src/components/atoms/Button/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport {\n borderColorGradationVC,\n borderColorVC,\n Button,\n colorGradationVC,\n colorVC,\n StyleProps,\n} from '@tecsinapse/react-core';\nimport { WebButtonProps } from './Button';\n\nconst webStyles = () => {\n return css`\n & * {\n user-select: none;\n }\n `;\n};\n\nconst hoverStyles = ({\n mouseOver,\n pressed,\n theme,\n variant = 'filled',\n disabled,\n}: { mouseOver: boolean; pressed: boolean } & WebButtonProps &\n Partial<StyleProps>) => {\n const variantColor = colorVC[variant];\n const variantColorGradation = colorGradationVC[variant];\n const variantBorderColor = borderColorVC[variant];\n const variantBorderColorGradation = borderColorGradationVC[variant];\n return (\n mouseOver &&\n !disabled &&\n !pressed &&\n css`\n background-color: ${theme?.color[variantColor][variantColorGradation]};\n border-color: ${theme?.color[variantBorderColor][\n variantBorderColorGradation\n ]};\n `\n );\n};\n\nexport const StyledWebButton = styled(Button)<\n { mouseOver: boolean; pressed: boolean } & WebButtonProps &\n Partial<StyleProps>\n>(webStyles, hoverStyles);\n"],"mappings":";;;;AAAA,OAAOA,MAAP,IAAiBC,GAAjB,QAA4B,iBAA5B;AACA,SACEC,sBADF,EAEEC,aAFF,EAGEC,MAHF,EAIEC,gBAJF,EAKEC,OALF,QAOO,wBAPP;;AAUA,IAAMC,SAAS,GAAG,SAAZA,SAAY,GAAM;EACtB,OAAON,GAAP;AAKD,CAND;;AAQA,IAAMO,WAAW,GAAG,SAAdA,WAAc,OAOM;EAAA,IANxBC,SAMwB,QANxBA,SAMwB;EAAA,IALxBC,OAKwB,QALxBA,OAKwB;EAAA,IAJxBC,KAIwB,QAJxBA,KAIwB;EAAA,wBAHxBC,OAGwB;EAAA,IAHxBA,OAGwB,6BAHd,QAGc;EAAA,IAFxBC,QAEwB,QAFxBA,QAEwB;EACxB,IAAMC,YAAY,GAAGR,OAAO,CAACM,OAAD,CAA5B;EACA,IAAMG,qBAAqB,GAAGV,gBAAgB,CAACO,OAAD,CAA9C;EACA,IAAMI,kBAAkB,GAAGb,aAAa,CAACS,OAAD,CAAxC;EACA,IAAMK,2BAA2B,GAAGf,sBAAsB,CAACU,OAAD,CAA1D;EACA,OACEH,SAAS,IACT,CAACI,QADD,IAEA,CAACH,OAFD,IAGAT,GAHA,6IAIsBU,KAJtB,oBAIsBA,KAAK,CAAEO,KAAP,CAAaJ,YAAb,EAA2BC,qBAA3B,CAJtB,EAKkBJ,KALlB,oBAKkBA,KAAK,CAAEO,KAAP,CAAaF,kBAAb,EACdC,2BADc,CALlB,CADF;AAWD,CAvBD;;AAyBA,OAAO,IAAME,eAAe,GAAGnB,MAAM,CAACI,MAAD,CAAN,CAG7BG,SAH6B,EAGlBC,WAHkB,CAAxB"}
1
+ {"version":3,"file":"styled.js","names":["styled","css","borderColorGradationVC","borderColorVC","Button","colorGradationVC","colorVC","webStyles","hoverStyles","mouseOver","pressed","theme","variant","disabled","variantColor","variantColorGradation","variantBorderColor","variantBorderColorGradation","color","StyledWebButton"],"sources":["../../../../src/components/atoms/Button/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport {\n borderColorGradationVC,\n borderColorVC,\n Button,\n colorGradationVC,\n colorVC,\n StyleProps,\n} from '@tecsinapse/react-core';\nimport { WebButtonProps } from './Button';\n\nconst webStyles = () => {\n return css`\n & * {\n user-select: none;\n }\n `;\n};\n\nconst hoverStyles = ({\n mouseOver,\n pressed,\n theme,\n variant = 'filled',\n disabled,\n}: { mouseOver: boolean; pressed: boolean } & WebButtonProps &\n Partial<StyleProps>) => {\n const variantColor = colorVC[variant];\n const variantColorGradation = colorGradationVC[variant];\n const variantBorderColor = borderColorVC[variant];\n const variantBorderColorGradation = borderColorGradationVC[variant];\n return (\n mouseOver &&\n !disabled &&\n !pressed &&\n css`\n background-color: ${theme?.color[variantColor][variantColorGradation]};\n border-color: ${theme?.color[variantBorderColor][\n variantBorderColorGradation\n ]};\n `\n );\n};\n\nexport const StyledWebButton = styled(Button)<\n { mouseOver: boolean; pressed: boolean } & WebButtonProps &\n Partial<StyleProps>\n>(webStyles, hoverStyles);\n"],"mappings":";;;;AAAA,OAAOA,MAAP,IAAiBC,GAAjB,QAA4B,iBAA5B;AACA,SACEC,sBADF,EAEEC,aAFF,EAGEC,MAHF,EAIEC,gBAJF,EAKEC,OALF,QAOO,wBAPP;;AAUA,IAAMC,SAAS,GAAG,SAAZA,SAAY,GAAM;EACtB,OAAON,GAAP;AAKD,CAND;;AAQA,IAAMO,WAAW,GAAG,SAAdA,WAAc,OAOM;EAAA,IANxBC,SAMwB,QANxBA,SAMwB;EAAA,IALxBC,OAKwB,QALxBA,OAKwB;EAAA,IAJxBC,KAIwB,QAJxBA,KAIwB;EAAA,wBAHxBC,OAGwB;EAAA,IAHxBA,OAGwB,6BAHd,QAGc;EAAA,IAFxBC,QAEwB,QAFxBA,QAEwB;EACxB,IAAMC,YAAY,GAAGR,OAAO,CAACM,OAAD,CAA5B;EACA,IAAMG,qBAAqB,GAAGV,gBAAgB,CAACO,OAAD,CAA9C;EACA,IAAMI,kBAAkB,GAAGb,aAAa,CAACS,OAAD,CAAxC;EACA,IAAMK,2BAA2B,GAAGf,sBAAsB,CAACU,OAAD,CAA1D;EACA,OACEH,SAAS,IACT,CAACI,QADD,IAEA,CAACH,OAFD,IAGAT,GAHA,wIAIsBU,KAJtB,aAIsBA,KAJtB,uBAIsBA,KAAK,CAAEO,KAAP,CAAaJ,YAAb,EAA2BC,qBAA3B,CAJtB,EAKkBJ,KALlB,aAKkBA,KALlB,uBAKkBA,KAAK,CAAEO,KAAP,CAAaF,kBAAb,EACdC,2BADc,CALlB,CADF;AAWD,CAvBD;;AAyBA,OAAO,IAAME,eAAe,GAAGnB,MAAM,CAACI,MAAD,CAAN,CAG7BG,SAH6B,EAGlBC,WAHkB,CAAxB"}
@@ -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
  import * as React from 'react';
4
8
  import { StyledContainerDropdown } from "./styled";
@@ -17,7 +21,7 @@ var Component = function Component(_ref) {
17
21
  timeout: 300
18
22
  }, function (state) {
19
23
  return React.createElement(StyledContainerDropdown, {
20
- style: _extends({}, defaultStyles, transition['bottom'][state]),
24
+ style: _objectSpread(_objectSpread({}, defaultStyles), transition['bottom'][state]),
21
25
  ref: refDropDown
22
26
  }, children);
23
27
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","StyledContainerDropdown","Transition","defaultStyles","transition","useClickAwayListener","Component","visible","setVisible","children","refDropDown","useRef","state","Dropdown"],"sources":["../../../../src/components/atoms/Dropdown/index.tsx"],"sourcesContent":["import * as React from 'react';\nimport { StyledContainerDropdown } from './styled';\nimport { Transition } from 'react-transition-group';\nimport { defaultStyles, transition } from '../../molecules/Select/animations';\nimport { Dispatch, SetStateAction } from 'react';\nimport { useClickAwayListener } from '@tecsinapse/react-web-kit';\n\nexport interface DropdownProps {\n visible: boolean;\n setVisible: Dispatch<SetStateAction<boolean>>;\n}\n\nconst Component: React.FC<DropdownProps & { children: JSX.Element }> = ({\n visible,\n setVisible,\n children,\n}): JSX.Element => {\n const refDropDown = React.useRef(null);\n useClickAwayListener(refDropDown, setVisible);\n\n return (\n <Transition in={visible} timeout={300}>\n {state => (\n <StyledContainerDropdown\n style={{ ...defaultStyles, ...transition['bottom'][state] }}\n ref={refDropDown}\n >\n {children}\n </StyledContainerDropdown>\n )}\n </Transition>\n );\n};\n\nexport const Dropdown = Component;\n"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,uBAAT;AACA,SAASC,UAAT,QAA2B,wBAA3B;AACA,SAASC,aAAT,EAAwBC,UAAxB;AAEA,SAASC,oBAAT,QAAqC,2BAArC;;AAOA,IAAMC,SAA8D,GAAG,SAAjEA,SAAiE,OAIpD;EAAA,IAHjBC,OAGiB,QAHjBA,OAGiB;EAAA,IAFjBC,UAEiB,QAFjBA,UAEiB;EAAA,IADjBC,QACiB,QADjBA,QACiB;EACjB,IAAMC,WAAW,GAAGV,KAAK,CAACW,MAAN,CAAa,IAAb,CAApB;EACAN,oBAAoB,CAACK,WAAD,EAAcF,UAAd,CAApB;EAEA,OACE,oBAAC,UAAD;IAAY,MAAID,OAAhB;IAAyB,OAAO,EAAE;EAAlC,GACG,UAAAK,KAAK;IAAA,OACJ,oBAAC,uBAAD;MACE,KAAK,eAAOT,aAAP,EAAyBC,UAAU,CAAC,QAAD,CAAV,CAAqBQ,KAArB,CAAzB,CADP;MAEE,GAAG,EAAEF;IAFP,GAIGD,QAJH,CADI;EAAA,CADR,CADF;AAYD,CApBD;;AAsBA,OAAO,IAAMI,QAAQ,GAAGP,SAAjB"}
1
+ {"version":3,"file":"index.js","names":["React","StyledContainerDropdown","Transition","defaultStyles","transition","useClickAwayListener","Component","visible","setVisible","children","refDropDown","useRef","state","Dropdown"],"sources":["../../../../src/components/atoms/Dropdown/index.tsx"],"sourcesContent":["import * as React from 'react';\nimport { StyledContainerDropdown } from './styled';\nimport { Transition } from 'react-transition-group';\nimport { defaultStyles, transition } from '../../molecules/Select/animations';\nimport { Dispatch, SetStateAction } from 'react';\nimport { useClickAwayListener } from '@tecsinapse/react-web-kit';\n\nexport interface DropdownProps {\n visible: boolean;\n setVisible: Dispatch<SetStateAction<boolean>>;\n}\n\nconst Component: React.FC<DropdownProps & { children: JSX.Element }> = ({\n visible,\n setVisible,\n children,\n}): JSX.Element => {\n const refDropDown = React.useRef(null);\n useClickAwayListener(refDropDown, setVisible);\n\n return (\n <Transition in={visible} timeout={300}>\n {state => (\n <StyledContainerDropdown\n style={{ ...defaultStyles, ...transition['bottom'][state] }}\n ref={refDropDown}\n >\n {children}\n </StyledContainerDropdown>\n )}\n </Transition>\n );\n};\n\nexport const Dropdown = Component;\n"],"mappings":";;;;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,uBAAT;AACA,SAASC,UAAT,QAA2B,wBAA3B;AACA,SAASC,aAAT,EAAwBC,UAAxB;AAEA,SAASC,oBAAT,QAAqC,2BAArC;;AAOA,IAAMC,SAA8D,GAAG,SAAjEA,SAAiE,OAIpD;EAAA,IAHjBC,OAGiB,QAHjBA,OAGiB;EAAA,IAFjBC,UAEiB,QAFjBA,UAEiB;EAAA,IADjBC,QACiB,QADjBA,QACiB;EACjB,IAAMC,WAAW,GAAGV,KAAK,CAACW,MAAN,CAAa,IAAb,CAApB;EACAN,oBAAoB,CAACK,WAAD,EAAcF,UAAd,CAApB;EAEA,OACE,oBAAC,UAAD;IAAY,MAAID,OAAhB;IAAyB,OAAO,EAAE;EAAlC,GACG,UAAAK,KAAK;IAAA,OACJ,oBAAC,uBAAD;MACE,KAAK,kCAAOT,aAAP,GAAyBC,UAAU,CAAC,QAAD,CAAV,CAAqBQ,KAArB,CAAzB,CADP;MAEE,GAAG,EAAEF;IAFP,GAIGD,QAJH,CADI;EAAA,CADR,CADF;AAYD,CApBD;;AAsBA,OAAO,IAAMI,QAAQ,GAAGP,SAAjB"}
@@ -1,10 +1,10 @@
1
1
  var _templateObject;
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 StyledContainerDropdown = styled('div')(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n width: auto;\n background-color: ", ";\n border-radius: ", ";\n box-shadow: 0 2px 8px\n ", ";\n position: absolute;\n padding-bottom: ", ";\n margin-top: 8px;\n z-index: ", ";\n"])), function (_ref) {
7
+ export var StyledContainerDropdown = styled('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: auto;\n background-color: ", ";\n border-radius: ", ";\n box-shadow: 0 2px 8px\n ", ";\n position: absolute;\n padding-bottom: ", ";\n margin-top: 8px;\n z-index: ", ";\n"])), function (_ref) {
8
8
  var theme = _ref.theme;
9
9
  return theme.miscellaneous.surfaceColor;
10
10
  }, function (_ref2) {
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","names":["styled","hex2rgba","StyledContainerDropdown","theme","miscellaneous","surfaceColor","borderRadius","mili","shadow","spacing","zIndex","select"],"sources":["../../../../src/components/atoms/Dropdown/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { hex2rgba, StyleProps } from '@tecsinapse/react-core';\n\nexport const StyledContainerDropdown = styled('div')<Partial<StyleProps>>`\n width: auto;\n background-color: ${({ theme }: StyleProps) =>\n theme.miscellaneous.surfaceColor};\n border-radius: ${({ theme }: StyleProps) => theme.borderRadius.mili};\n box-shadow: 0 2px 8px\n ${({ theme }: StyleProps) => hex2rgba(theme.miscellaneous.shadow, 0.05)};\n position: absolute;\n padding-bottom: ${({ theme }: StyleProps) => theme.spacing.mili};\n margin-top: 8px;\n z-index: ${({ theme }: StyleProps) => theme.zIndex.select};\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AACA,SAASC,QAAT,QAAqC,wBAArC;AAEA,OAAO,IAAMC,uBAAuB,GAAGF,MAAM,CAAC,KAAD,CAAT,0QAEd;EAAA,IAAGG,KAAH,QAAGA,KAAH;EAAA,OAClBA,KAAK,CAACC,aAAN,CAAoBC,YADF;AAAA,CAFc,EAIjB;EAAA,IAAGF,KAAH,SAAGA,KAAH;EAAA,OAA2BA,KAAK,CAACG,YAAN,CAAmBC,IAA9C;AAAA,CAJiB,EAM9B;EAAA,IAAGJ,KAAH,SAAGA,KAAH;EAAA,OAA2BF,QAAQ,CAACE,KAAK,CAACC,aAAN,CAAoBI,MAArB,EAA6B,IAA7B,CAAnC;AAAA,CAN8B,EAQhB;EAAA,IAAGL,KAAH,SAAGA,KAAH;EAAA,OAA2BA,KAAK,CAACM,OAAN,CAAcF,IAAzC;AAAA,CARgB,EAUvB;EAAA,IAAGJ,KAAH,SAAGA,KAAH;EAAA,OAA2BA,KAAK,CAACO,MAAN,CAAaC,MAAxC;AAAA,CAVuB,CAA7B"}
1
+ {"version":3,"file":"styled.js","names":["styled","hex2rgba","StyledContainerDropdown","theme","miscellaneous","surfaceColor","borderRadius","mili","shadow","spacing","zIndex","select"],"sources":["../../../../src/components/atoms/Dropdown/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { hex2rgba, StyleProps } from '@tecsinapse/react-core';\n\nexport const StyledContainerDropdown = styled('div')<Partial<StyleProps>>`\n width: auto;\n background-color: ${({ theme }: StyleProps) =>\n theme.miscellaneous.surfaceColor};\n border-radius: ${({ theme }: StyleProps) => theme.borderRadius.mili};\n box-shadow: 0 2px 8px\n ${({ theme }: StyleProps) => hex2rgba(theme.miscellaneous.shadow, 0.05)};\n position: absolute;\n padding-bottom: ${({ theme }: StyleProps) => theme.spacing.mili};\n margin-top: 8px;\n z-index: ${({ theme }: StyleProps) => theme.zIndex.select};\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AACA,SAASC,QAAT,QAAqC,wBAArC;AAEA,OAAO,IAAMC,uBAAuB,GAAGF,MAAM,CAAC,KAAD,CAAT,qQAEd;EAAA,IAAGG,KAAH,QAAGA,KAAH;EAAA,OAClBA,KAAK,CAACC,aAAN,CAAoBC,YADF;AAAA,CAFc,EAIjB;EAAA,IAAGF,KAAH,SAAGA,KAAH;EAAA,OAA2BA,KAAK,CAACG,YAAN,CAAmBC,IAA9C;AAAA,CAJiB,EAM9B;EAAA,IAAGJ,KAAH,SAAGA,KAAH;EAAA,OAA2BF,QAAQ,CAACE,KAAK,CAACC,aAAN,CAAoBI,MAArB,EAA6B,IAA7B,CAAnC;AAAA,CAN8B,EAQhB;EAAA,IAAGL,KAAH,SAAGA,KAAH;EAAA,OAA2BA,KAAK,CAACM,OAAN,CAAcF,IAAzC;AAAA,CARgB,EAUvB;EAAA,IAAGJ,KAAH,SAAGA,KAAH;EAAA,OAA2BA,KAAK,CAACO,MAAN,CAAaC,MAAxC;AAAA,CAVuB,CAA7B"}