@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
@@ -1,6 +1,6 @@
1
1
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
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';
@@ -9,16 +9,16 @@ import { css } from '@emotion/react';
9
9
  var anchorBottom = function anchorBottom(_ref) {
10
10
  var theme = _ref.theme,
11
11
  anchor = _ref.anchor;
12
- return anchor === 'bottom' && css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n margin-top: ", ";\n top: 100%;\n "])), theme.spacing.centi);
12
+ return anchor === 'bottom' && css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-top: ", ";\n top: 100%;\n "])), theme.spacing.centi);
13
13
  };
14
14
 
15
15
  var anchorTop = function anchorTop(_ref2) {
16
16
  var theme = _ref2.theme,
17
17
  anchor = _ref2.anchor;
18
- return anchor === 'top' && css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n margin-bottom: ", ";\n bottom: 100%;\n "])), theme.spacing.centi);
18
+ return anchor === 'top' && css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n bottom: 100%;\n "])), theme.spacing.centi);
19
19
  };
20
20
 
21
- export var StyledContainerDropdown = styled('div')(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n width: 100%;\n background-color: ", ";\n border-radius: ", ";\n box-shadow: 0 2px 8px\n ", ";\n position: absolute;\n padding-top: ", ";\n padding-bottom: ", ";\n z-index: ", ";\n ", "\n ", "\n"])), function (_ref3) {
21
+ export var StyledContainerDropdown = styled('div')(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 100%;\n background-color: ", ";\n border-radius: ", ";\n box-shadow: 0 2px 8px\n ", ";\n position: absolute;\n padding-top: ", ";\n padding-bottom: ", ";\n z-index: ", ";\n ", "\n ", "\n"])), function (_ref3) {
22
22
  var theme = _ref3.theme;
23
23
  return theme.miscellaneous.surfaceColor;
24
24
  }, function (_ref4) {
@@ -30,7 +30,7 @@ export var StyledContainerDropdown = styled('div')(_templateObject3 || (_templat
30
30
  }, function (_ref6) {
31
31
  var theme = _ref6.theme,
32
32
  hideSearchBar = _ref6.hideSearchBar;
33
- return !hideSearchBar ? "" + theme.spacing.deca : '0px';
33
+ return !hideSearchBar ? "".concat(theme.spacing.deca) : '0px';
34
34
  }, function (_ref7) {
35
35
  var theme = _ref7.theme;
36
36
  return theme.spacing.mili;
@@ -38,7 +38,7 @@ export var StyledContainerDropdown = styled('div')(_templateObject3 || (_templat
38
38
  var theme = _ref8.theme;
39
39
  return theme.zIndex.select;
40
40
  }, anchorTop, anchorBottom);
41
- export var OptionsContainer = styled('div')(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n max-height: 250px;\n top: 100%;\n overflow-y: ", ";\n ::-webkit-scrollbar {\n width: 8px;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: ", ";\n background-color: ", ";\n }\n ::-webkit-scrollbar-thumb:hover {\n background-color: ", ";\n },\n"])), function (_ref9) {
41
+ export var OptionsContainer = styled('div')(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n max-height: 250px;\n top: 100%;\n overflow-y: ", ";\n ::-webkit-scrollbar {\n width: 8px;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: ", ";\n background-color: ", ";\n }\n ::-webkit-scrollbar-thumb:hover {\n background-color: ", ";\n },\n"])), function (_ref9) {
42
42
  var _ref9$lengthOptions = _ref9.lengthOptions,
43
43
  lengthOptions = _ref9$lengthOptions === void 0 ? 0 : _ref9$lengthOptions;
44
44
  return lengthOptions > 5 ? 'scroll' : 'hidden';
@@ -52,29 +52,29 @@ export var OptionsContainer = styled('div')(_templateObject4 || (_templateObject
52
52
  var theme = _ref12.theme;
53
53
  return theme.color.primary.light;
54
54
  });
55
- export var SearchBarContainer = styled('div')(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n padding-left: ", ";\n width: 100%;\n"])), function (_ref13) {
55
+ export var SearchBarContainer = styled('div')(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding-left: ", ";\n width: 100%;\n"])), function (_ref13) {
56
56
  var theme = _ref13.theme;
57
57
  return theme.spacing.mili;
58
58
  });
59
- export var PaddedContainer = styled('div')(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n padding: ", ";\n"])), function (_ref14) {
59
+ export var PaddedContainer = styled('div')(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n padding: ", ";\n"])), function (_ref14) {
60
60
  var theme = _ref14.theme;
61
- return theme.spacing.mili + " " + theme.spacing.deca;
61
+ return "".concat(theme.spacing.mili, " ").concat(theme.spacing.deca);
62
62
  });
63
- export var StyledContainerCheckAll = styled(PaddedContainer)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n flex-direction: row;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n cursor: pointer;\n &:hover {\n background-color: ", ";\n }\n &:hover span {\n color: ", ";\n }\n"])), function (_ref15) {
63
+ export var StyledContainerCheckAll = styled(PaddedContainer)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n flex-direction: row;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n cursor: pointer;\n &:hover {\n background-color: ", ";\n }\n &:hover span {\n color: ", ";\n }\n"])), function (_ref15) {
64
64
  var theme = _ref15.theme;
65
65
  return theme.color.primary.xlight;
66
66
  }, function (_ref16) {
67
67
  var theme = _ref16.theme;
68
68
  return theme.color.primary.medium;
69
69
  });
70
- export var StyledSpan = styled('span')(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n color: ", ";\n padding: ", ";\n"])), function (_ref17) {
70
+ export var StyledSpan = styled('span')(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n color: ", ";\n padding: ", ";\n"])), function (_ref17) {
71
71
  var theme = _ref17.theme;
72
72
  return theme.font.color.dark;
73
73
  }, function (_ref18) {
74
74
  var theme = _ref18.theme;
75
- return theme.spacing.mili + " 0px";
75
+ return "".concat(theme.spacing.mili, " 0px");
76
76
  });
77
- export var StyledContainerTextLabel = styled('div')(_templateObject9 || (_templateObject9 = _taggedTemplateLiteralLoose(["\n padding-left: ", ";\n width: 100%;\n display: flex;\n overflow: hidden;\n"])), function (_ref19) {
77
+ export var StyledContainerTextLabel = styled('div')(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n padding-left: ", ";\n width: 100%;\n display: flex;\n overflow: hidden;\n"])), function (_ref19) {
78
78
  var theme = _ref19.theme;
79
79
  return theme.spacing.mili;
80
80
  });
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","names":["styled","hex2rgba","css","anchorBottom","theme","anchor","spacing","centi","anchorTop","StyledContainerDropdown","miscellaneous","surfaceColor","borderRadius","mili","shadow","hideSearchBar","deca","zIndex","select","OptionsContainer","lengthOptions","color","secondary","light","primary","SearchBarContainer","PaddedContainer","StyledContainerCheckAll","xlight","medium","StyledSpan","font","dark","StyledContainerTextLabel"],"sources":["../../../../../src/components/molecules/Select/Dropdown/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { hex2rgba, StyleProps } from '@tecsinapse/react-core';\nimport { SelectProps } from '../Select';\nimport { css } from '@emotion/react';\n\ntype InjectedProps = Partial<\n StyleProps &\n SelectProps<unknown, 'single' | 'multi'> & { lengthOptions: number }\n>;\n\nconst anchorBottom = ({\n theme,\n anchor,\n}: StyleProps & Omit<InjectedProps, 'theme'>) =>\n anchor === 'bottom' &&\n css`\n margin-top: ${theme.spacing.centi};\n top: 100%;\n `;\n\nconst anchorTop = ({\n theme,\n anchor,\n}: StyleProps & Omit<InjectedProps, 'theme'>) =>\n anchor === 'top' &&\n css`\n margin-bottom: ${theme.spacing.centi};\n bottom: 100%;\n `;\n\nexport const StyledContainerDropdown = styled('div')<InjectedProps>`\n width: 100%;\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-top: ${({\n theme,\n hideSearchBar,\n }: StyleProps & Partial<SelectProps<unknown, 'single' | 'multi'>>) =>\n !hideSearchBar ? `${theme.spacing.deca}` : '0px'};\n padding-bottom: ${({ theme }: StyleProps) => theme.spacing.mili};\n z-index: ${({ theme }: StyleProps) => theme.zIndex.select};\n ${anchorTop}\n ${anchorBottom}\n`;\n\nexport const OptionsContainer = styled('div')<InjectedProps>`\n max-height: 250px;\n top: 100%;\n overflow-y: ${({ lengthOptions = 0 }: InjectedProps) =>\n lengthOptions > 5 ? 'scroll' : 'hidden'};\n ::-webkit-scrollbar {\n width: 8px;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: ${({ theme }: StyleProps) => theme.borderRadius.centi};\n background-color: ${({ theme }: StyleProps) => theme.color.secondary.light};\n }\n ::-webkit-scrollbar-thumb:hover {\n background-color: ${({ theme }: StyleProps) => theme.color.primary.light};\n },\n`;\n\nexport const SearchBarContainer = styled('div')<Partial<StyleProps>>`\n padding-left: ${({ theme }) => theme.spacing.mili};\n width: 100%;\n`;\n\nexport const PaddedContainer = styled('div')<Partial<StyleProps>>`\n padding: ${({ theme }) => `${theme.spacing.mili} ${theme.spacing.deca}`};\n`;\n\nexport const StyledContainerCheckAll = styled(PaddedContainer)<\n Partial<StyleProps>\n>`\n flex-direction: row;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n cursor: pointer;\n &:hover {\n background-color: ${({ theme }) => theme.color.primary.xlight};\n }\n &:hover span {\n color: ${({ theme }) => theme.color.primary.medium};\n }\n`;\n\nexport const StyledSpan = styled('span')<Partial<StyleProps>>`\n color: ${({ theme }) => theme.font.color.dark};\n padding: ${({ theme }) => `${theme.spacing.mili} 0px`};\n`;\n\nexport const StyledContainerTextLabel = styled('div')<Partial<StyleProps>>`\n padding-left: ${({ theme }) => theme.spacing.mili};\n width: 100%;\n display: flex;\n overflow: hidden;\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AACA,SAASC,QAAT,QAAqC,wBAArC;AAEA,SAASC,GAAT,QAAoB,gBAApB;;AAOA,IAAMC,YAAY,GAAG,SAAfA,YAAe;EAAA,IACnBC,KADmB,QACnBA,KADmB;EAAA,IAEnBC,MAFmB,QAEnBA,MAFmB;EAAA,OAInBA,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Y,EAEV;EAAA,IAAG5B,KAAH,UAAGA,KAAH;EAAA,OAAkBA,KAAK,CAACE,OAAN,CAAcO,IAAhC;AAAA,CAFU,CAAhB;AAKP,OAAO,IAAMoB,wBAAwB,GAAGjC,MAAM,CAAC,KAAD,CAAT,6JACnB;EAAA,IAAGI,KAAH,UAAGA,KAAH;EAAA,OAAeA,KAAK,CAACE,OAAN,CAAcO,IAA7B;AAAA,CADmB,CAA9B"}
1
+ {"version":3,"file":"styled.js","names":["styled","hex2rgba","css","anchorBottom","theme","anchor","spacing","centi","anchorTop","StyledContainerDropdown","miscellaneous","surfaceColor","borderRadius","mili","shadow","hideSearchBar","deca","zIndex","select","OptionsContainer","lengthOptions","color","secondary","light","primary","SearchBarContainer","PaddedContainer","StyledContainerCheckAll","xlight","medium","StyledSpan","font","dark","StyledContainerTextLabel"],"sources":["../../../../../src/components/molecules/Select/Dropdown/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { hex2rgba, StyleProps } from '@tecsinapse/react-core';\nimport { SelectProps } from '../Select';\nimport { css } from '@emotion/react';\n\ntype InjectedProps = Partial<\n StyleProps &\n SelectProps<unknown, 'single' | 'multi'> & { lengthOptions: number }\n>;\n\nconst anchorBottom = ({\n theme,\n anchor,\n}: StyleProps & Omit<InjectedProps, 'theme'>) =>\n anchor === 'bottom' &&\n css`\n margin-top: ${theme.spacing.centi};\n top: 100%;\n `;\n\nconst anchorTop = ({\n theme,\n anchor,\n}: StyleProps & Omit<InjectedProps, 'theme'>) =>\n anchor === 'top' &&\n css`\n margin-bottom: ${theme.spacing.centi};\n bottom: 100%;\n `;\n\nexport const StyledContainerDropdown = styled('div')<InjectedProps>`\n width: 100%;\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-top: ${({\n theme,\n hideSearchBar,\n }: StyleProps & Partial<SelectProps<unknown, 'single' | 'multi'>>) =>\n !hideSearchBar ? `${theme.spacing.deca}` : '0px'};\n padding-bottom: ${({ theme }: StyleProps) => theme.spacing.mili};\n z-index: ${({ theme }: StyleProps) => theme.zIndex.select};\n ${anchorTop}\n ${anchorBottom}\n`;\n\nexport const OptionsContainer = styled('div')<InjectedProps>`\n max-height: 250px;\n top: 100%;\n overflow-y: ${({ lengthOptions = 0 }: InjectedProps) =>\n lengthOptions > 5 ? 'scroll' : 'hidden'};\n ::-webkit-scrollbar {\n width: 8px;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: ${({ theme }: StyleProps) => theme.borderRadius.centi};\n background-color: ${({ theme }: StyleProps) => theme.color.secondary.light};\n }\n ::-webkit-scrollbar-thumb:hover {\n background-color: ${({ theme }: StyleProps) => theme.color.primary.light};\n },\n`;\n\nexport const SearchBarContainer = styled('div')<Partial<StyleProps>>`\n padding-left: ${({ theme }) => theme.spacing.mili};\n width: 100%;\n`;\n\nexport const PaddedContainer = styled('div')<Partial<StyleProps>>`\n padding: ${({ theme }) => `${theme.spacing.mili} ${theme.spacing.deca}`};\n`;\n\nexport const StyledContainerCheckAll = styled(PaddedContainer)<\n Partial<StyleProps>\n>`\n flex-direction: row;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n cursor: pointer;\n &:hover {\n background-color: ${({ theme }) => theme.color.primary.xlight};\n }\n &:hover span {\n color: ${({ theme }) => theme.color.primary.medium};\n }\n`;\n\nexport const StyledSpan = styled('span')<Partial<StyleProps>>`\n color: ${({ theme }) => theme.font.color.dark};\n padding: ${({ theme }) => `${theme.spacing.mili} 0px`};\n`;\n\nexport const StyledContainerTextLabel = styled('div')<Partial<StyleProps>>`\n padding-left: ${({ theme }) => theme.spacing.mili};\n width: 100%;\n display: flex;\n overflow: hidden;\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AACA,SAASC,QAAT,QAAqC,wBAArC;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IAAMC,UAAU,GAAG9B,MAAM,CAAC,MAAD,CAAT,4GACZ;EAAA,IAAGI,KAAH,UAAGA,KAAH;EAAA,OAAeA,KAAK,CAAC2B,IAAN,CAAWV,KAAX,CAAiBW,IAAhC;AAAA,CADY,EAEV;EAAA,IAAG5B,KAAH,UAAGA,KAAH;EAAA,iBAAkBA,KAAK,CAACE,OAAN,CAAcO,IAAhC;AAAA,CAFU,CAAhB;AAKP,OAAO,IAAMoB,wBAAwB,GAAGjC,MAAM,CAAC,KAAD,CAAT,wJACnB;EAAA,IAAGI,KAAH,UAAGA,KAAH;EAAA,OAAeA,KAAK,CAACE,OAAN,CAAcO,IAA7B;AAAA,CADmB,CAA9B"}
@@ -1,7 +1,27 @@
1
1
  var _excluded = ["value", "options", "keyExtractor", "onSelect", "type", "labelExtractor", "placeholder", "onSearch", "searchBarPlaceholder", "hideSearchBar", "label", "disabled", "anchor", "displayTextProps", "selectAllLabel"];
2
2
 
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
+
3
9
  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
10
 
11
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
12
+
13
+ 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."); }
14
+
15
+ 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); }
16
+
17
+ 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; }
18
+
19
+ 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; }
20
+
21
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
22
+
23
+ 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; }
24
+
5
25
  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
26
 
7
27
  import { PressableInputContainer, Text } from '@tecsinapse/react-core';
@@ -33,11 +53,12 @@ export var Select = function Select(_ref) {
33
53
  displayTextProps = _ref.displayTextProps,
34
54
  _ref$selectAllLabel = _ref.selectAllLabel,
35
55
  selectAllLabel = _ref$selectAllLabel === void 0 ? 'Selecionar todos' : _ref$selectAllLabel,
36
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
56
+ rest = _objectWithoutProperties(_ref, _excluded);
37
57
 
38
58
  var _React$useState = React.useState(false),
39
- dropDownVisible = _React$useState[0],
40
- setDropDownVisible = _React$useState[1];
59
+ _React$useState2 = _slicedToArray(_React$useState, 2),
60
+ dropDownVisible = _React$useState2[0],
61
+ setDropDownVisible = _React$useState2[1];
41
62
 
42
63
  var refDropDown = React.useRef(null);
43
64
  useClickAwayListener(refDropDown, setDropDownVisible);
@@ -78,7 +99,7 @@ export var Select = function Select(_ref) {
78
99
  hideSearchBar: hideSearchBar,
79
100
  searchBarPlaceholder: searchBarPlaceholder,
80
101
  onSearch: onSearch,
81
- style: _extends({}, defaultStyles, transition[anchor][state]),
102
+ style: _objectSpread(_objectSpread({}, defaultStyles), transition[anchor][state]),
82
103
  setDropDownVisible: setDropDownVisible,
83
104
  anchor: anchor,
84
105
  selectAllLabel: selectAllLabel
@@ -1 +1 @@
1
- {"version":3,"file":"Select.js","names":["PressableInputContainer","Text","React","Transition","useClickAwayListener","defaultStyles","transition","Dropdown","getDisplayValue","RightComponent","StyledContainer","StyledInputContainer","Select","value","options","keyExtractor","onSelect","type","labelExtractor","placeholder","onSearch","searchBarPlaceholder","hideSearchBar","label","disabled","anchor","displayTextProps","selectAllLabel","rest","useState","dropDownVisible","setDropDownVisible","refDropDown","useRef","onlyLabel","hasValue","length","_placeholder","_label","undefined","displayValue","onPress","useCallback","prev","state"],"sources":["../../../../src/components/molecules/Select/Select.tsx"],"sourcesContent":["import {\n PressableInputContainer,\n Text,\n TextProps,\n} from '@tecsinapse/react-core';\nimport React from 'react';\nimport { Transition } from 'react-transition-group';\nimport { useClickAwayListener } from '../../../hooks';\nimport { defaultStyles, transition } from './animations';\nimport { Dropdown } from './Dropdown';\nimport { getDisplayValue } from './functions';\nimport {\n RightComponent,\n StyledContainer,\n StyledInputContainer,\n} from './styled';\n\nexport interface SelectProps<Data, Type extends 'single' | 'multi'>\n extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {\n options: Data[];\n onSelect: (\n option: Type extends 'single' ? Data | undefined : Data[]\n ) => never | void;\n value: Type extends 'single' ? Data | undefined : Data[];\n type: Type;\n keyExtractor: (t: Data, index?: number) => string;\n labelExtractor: (t: Data) => string;\n placeholder?: string;\n onSearch?: (searchArg: string) => void | never;\n searchBarPlaceholder?: string;\n hideSearchBar?: boolean;\n selectAllLabel?: string;\n disabled?: boolean;\n label?: string;\n anchor?: 'top' | 'bottom';\n displayTextProps?: TextProps;\n}\n\n/** NOTE: For better performance, you should memoize options and handlers */\nexport const Select = <Data, Type extends 'single' | 'multi'>({\n value,\n options,\n keyExtractor,\n onSelect,\n type,\n labelExtractor,\n placeholder,\n onSearch,\n searchBarPlaceholder = 'Busque a opção desejada',\n hideSearchBar = true,\n label,\n disabled = false,\n anchor = 'bottom',\n displayTextProps,\n selectAllLabel = 'Selecionar todos',\n ...rest\n}: SelectProps<Data, Type>): JSX.Element => {\n const [dropDownVisible, setDropDownVisible] = React.useState<boolean>(false);\n const refDropDown = React.useRef(null);\n useClickAwayListener(refDropDown, setDropDownVisible);\n\n const onlyLabel = label && !placeholder;\n const hasValue =\n type === 'single' ? !!value : ((value || []) as []).length > 0;\n const _placeholder = onlyLabel ? label : placeholder;\n const _label = hasValue ? label : undefined;\n\n const displayValue = getDisplayValue<Data>(\n type,\n value,\n options,\n _placeholder,\n keyExtractor,\n labelExtractor\n );\n\n const onPress = React.useCallback(\n () => setDropDownVisible(prev => !prev),\n [setDropDownVisible]\n );\n\n return (\n <StyledContainer ref={refDropDown} {...rest}>\n <StyledInputContainer>\n <PressableInputContainer\n label={_label}\n onPress={onPress}\n disabled={disabled}\n rightComponent={RightComponent}\n >\n <Text {...displayTextProps} ellipsizeMode=\"tail\" numberOfLines={1}>\n {displayValue}\n </Text>\n </PressableInputContainer>\n </StyledInputContainer>\n <Transition in={dropDownVisible} timeout={300}>\n {state => (\n <Dropdown\n options={options}\n onSelect={onSelect}\n value={value}\n type={type}\n keyExtractor={keyExtractor}\n labelExtractor={labelExtractor}\n hideSearchBar={hideSearchBar}\n searchBarPlaceholder={searchBarPlaceholder}\n onSearch={onSearch}\n style={{ ...defaultStyles, ...transition[anchor][state] }}\n setDropDownVisible={setDropDownVisible}\n anchor={anchor}\n selectAllLabel={selectAllLabel}\n />\n )}\n </Transition>\n </StyledContainer>\n );\n};\n\nexport default Select;\n"],"mappings":";;;;;;AAAA,SACEA,uBADF,EAEEC,IAFF,QAIO,wBAJP;AAKA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SAASC,UAAT,QAA2B,wBAA3B;AACA,SAASC,oBAAT;AACA,SAASC,aAAT,EAAwBC,UAAxB;AACA,SAASC,QAAT;AACA,SAASC,eAAT;AACA,SACEC,cADF,EAEEC,eAFF,EAGEC,oBAHF;AA4BA,OAAO,IAAMC,MAAM,GAAG,SAATA,MAAS,OAiBsB;EAAA,IAhB1CC,KAgB0C,QAhB1CA,KAgB0C;EAAA,IAf1CC,OAe0C,QAf1CA,OAe0C;EAAA,IAd1CC,YAc0C,QAd1CA,YAc0C;EAAA,IAb1CC,QAa0C,QAb1CA,QAa0C;EAAA,IAZ1CC,IAY0C,QAZ1CA,IAY0C;EAAA,IAX1CC,cAW0C,QAX1CA,cAW0C;EAAA,IAV1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MAAA,OAAI,CAACA,IAAL;IAAA,CAAL,CAAxB;EAAA,CADc,EAEd,CAACZ,kBAAD,CAFc,CAAhB;EAKA,OACE,oBAAC,eAAD;IAAiB,GAAG,EAAEC;EAAtB,GAAuCJ,IAAvC,GACE,oBAAC,oBAAD,QACE,oBAAC,uBAAD;IACE,KAAK,EAAEU,MADT;IAEE,OAAO,EAAEG,OAFX;IAGE,QAAQ,EAAEjB,QAHZ;IAIE,cAAc,EAAEf;EAJlB,GAME,oBAAC,IAAD,eAAUiB,gBAAV;IAA4B,aAAa,EAAC,MAA1C;IAAiD,aAAa,EAAE;EAAhE,IACGc,YADH,CANF,CADF,CADF,EAaE,oBAAC,UAAD;IAAY,MAAIV,eAAhB;IAAiC,OAAO,EAAE;EAA1C,GACG,UAAAc,KAAK;IAAA,OACJ,oBAAC,QAAD;MACE,OAAO,EAAE9B,OADX;MAEE,QAAQ,EAAEE,QAFZ;MAGE,KAAK,EAAEH,KAHT;MAIE,IAAI,EAAEI,IAJR;MAKE,YAAY,EAAEF,YALhB;MAME,cAAc,EAAEG,cANlB;MAOE,aAAa,EAAEI,aAPjB;MAQE,oBAAoB,EAAED,oBARxB;MASE,QAAQ,EAAED,QATZ;MAUE,KAAK,eAAOf,aAAP,EAAyBC,UAAU,CAACmB,MAAD,CAAV,CAAmBmB,KAAnB,CAAzB,CAVP;MAWE,kBAAkB,EAAEb,kBAXtB;MAYE,MAAM,EAAEN,MAZV;MAaE,cAAc,EAAEE;IAblB,EADI;EAAA,CADR,CAbF,CADF;AAmCD,CA7EM;AA+EP,eAAef,MAAf"}
1
+ {"version":3,"file":"Select.js","names":["PressableInputContainer","Text","React","Transition","useClickAwayListener","defaultStyles","transition","Dropdown","getDisplayValue","RightComponent","StyledContainer","StyledInputContainer","Select","value","options","keyExtractor","onSelect","type","labelExtractor","placeholder","onSearch","searchBarPlaceholder","hideSearchBar","label","disabled","anchor","displayTextProps","selectAllLabel","rest","useState","dropDownVisible","setDropDownVisible","refDropDown","useRef","onlyLabel","hasValue","length","_placeholder","_label","undefined","displayValue","onPress","useCallback","prev","state"],"sources":["../../../../src/components/molecules/Select/Select.tsx"],"sourcesContent":["import {\n PressableInputContainer,\n Text,\n TextProps,\n} from '@tecsinapse/react-core';\nimport React from 'react';\nimport { Transition } from 'react-transition-group';\nimport { useClickAwayListener } from '../../../hooks';\nimport { defaultStyles, transition } from './animations';\nimport { Dropdown } from './Dropdown';\nimport { getDisplayValue } from './functions';\nimport {\n RightComponent,\n StyledContainer,\n StyledInputContainer,\n} from './styled';\n\nexport interface SelectProps<Data, Type extends 'single' | 'multi'>\n extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {\n options: Data[];\n onSelect: (\n option: Type extends 'single' ? Data | undefined : Data[]\n ) => never | void;\n value: Type extends 'single' ? Data | undefined : Data[];\n type: Type;\n keyExtractor: (t: Data, index?: number) => string;\n labelExtractor: (t: Data) => string;\n placeholder?: string;\n onSearch?: (searchArg: string) => void | never;\n searchBarPlaceholder?: string;\n hideSearchBar?: boolean;\n selectAllLabel?: string;\n disabled?: boolean;\n label?: string;\n anchor?: 'top' | 'bottom';\n displayTextProps?: TextProps;\n}\n\n/** NOTE: For better performance, you should memoize options and handlers */\nexport const Select = <Data, Type extends 'single' | 'multi'>({\n value,\n options,\n keyExtractor,\n onSelect,\n type,\n labelExtractor,\n placeholder,\n onSearch,\n searchBarPlaceholder = 'Busque a opção desejada',\n hideSearchBar = true,\n label,\n disabled = false,\n anchor = 'bottom',\n displayTextProps,\n selectAllLabel = 'Selecionar todos',\n ...rest\n}: SelectProps<Data, Type>): JSX.Element => {\n const [dropDownVisible, setDropDownVisible] = React.useState<boolean>(false);\n const refDropDown = React.useRef(null);\n useClickAwayListener(refDropDown, setDropDownVisible);\n\n const onlyLabel = label && !placeholder;\n const hasValue =\n type === 'single' ? !!value : ((value || []) as []).length > 0;\n const _placeholder = onlyLabel ? label : placeholder;\n const _label = hasValue ? label : undefined;\n\n const displayValue = getDisplayValue<Data>(\n type,\n value,\n options,\n _placeholder,\n keyExtractor,\n labelExtractor\n );\n\n const onPress = React.useCallback(\n () => setDropDownVisible(prev => !prev),\n [setDropDownVisible]\n );\n\n return (\n <StyledContainer ref={refDropDown} {...rest}>\n <StyledInputContainer>\n <PressableInputContainer\n label={_label}\n onPress={onPress}\n disabled={disabled}\n rightComponent={RightComponent}\n >\n <Text {...displayTextProps} ellipsizeMode=\"tail\" numberOfLines={1}>\n {displayValue}\n </Text>\n </PressableInputContainer>\n </StyledInputContainer>\n <Transition in={dropDownVisible} timeout={300}>\n {state => (\n <Dropdown\n options={options}\n onSelect={onSelect}\n value={value}\n type={type}\n keyExtractor={keyExtractor}\n labelExtractor={labelExtractor}\n hideSearchBar={hideSearchBar}\n searchBarPlaceholder={searchBarPlaceholder}\n onSearch={onSearch}\n style={{ ...defaultStyles, ...transition[anchor][state] }}\n setDropDownVisible={setDropDownVisible}\n anchor={anchor}\n selectAllLabel={selectAllLabel}\n />\n )}\n </Transition>\n </StyledContainer>\n );\n};\n\nexport default Select;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SACEA,uBADF,EAEEC,IAFF,QAIO,wBAJP;AAKA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SAASC,UAAT,QAA2B,wBAA3B;AACA,SAASC,oBAAT;AACA,SAASC,aAAT,EAAwBC,UAAxB;AACA,SAASC,QAAT;AACA,SAASC,eAAT;AACA,SACEC,cADF,EAEEC,eAFF,EAGEC,oBAHF;AA4BA,OAAO,IAAMC,MAAM,GAAG,SAATA,MAAS,OAiBsB;EAAA,IAhB1CC,KAgB0C,QAhB1CA,KAgB0C;EAAA,IAf1CC,OAe0C,QAf1CA,OAe0C;EAAA,IAd1CC,YAc0C,QAd1CA,YAc0C;EAAA,IAb1CC,QAa0C,QAb1CA,QAa0C;EAAA,IAZ1CC,IAY0C,QAZ1CA,IAY0C;EAAA,IAX1CC,cAW0C,QAX1CA,cAW0C;EAAA,IAV1CC,WAU0C,QAV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AI,CAACA,IAAL;IAAA,CAAL,CAAxB;EAAA,CADc,EAEd,CAACZ,kBAAD,CAFc,CAAhB;EAKA,OACE,oBAAC,eAAD;IAAiB,GAAG,EAAEC;EAAtB,GAAuCJ,IAAvC,GACE,oBAAC,oBAAD,QACE,oBAAC,uBAAD;IACE,KAAK,EAAEU,MADT;IAEE,OAAO,EAAEG,OAFX;IAGE,QAAQ,EAAEjB,QAHZ;IAIE,cAAc,EAAEf;EAJlB,GAME,oBAAC,IAAD,eAAUiB,gBAAV;IAA4B,aAAa,EAAC,MAA1C;IAAiD,aAAa,EAAE;EAAhE,IACGc,YADH,CANF,CADF,CADF,EAaE,oBAAC,UAAD;IAAY,MAAIV,eAAhB;IAAiC,OAAO,EAAE;EAA1C,GACG,UAAAc,KAAK;IAAA,OACJ,oBAAC,QAAD;MACE,OAAO,EAAE9B,OADX;MAEE,QAAQ,EAAEE,QAFZ;MAGE,KAAK,EAAEH,KAHT;MAIE,IAAI,EAAEI,IAJR;MAKE,YAAY,EAAEF,YALhB;MAME,cAAc,EAAEG,cANlB;MAOE,aAAa,EAAEI,aAPjB;MAQE,oBAAoB,EAAED,oBARxB;MASE,QAAQ,EAAED,QATZ;MAUE,KAAK,kCAAOf,aAAP,GAAyBC,UAAU,CAACmB,MAAD,CAAV,CAAmBmB,KAAnB,CAAzB,CAVP;MAWE,kBAAkB,EAAEb,kBAXtB;MAYE,MAAM,EAAEN,MAZV;MAaE,cAAc,EAAEE;IAblB,EADI;EAAA,CADR,CAbF,CADF;AAmCD,CA7EM;AA+EP,eAAef,MAAf"}
@@ -1,3 +1,23 @@
1
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2
+
3
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+
5
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
6
+
7
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
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
+
1
21
  import React from 'react';
2
22
  import { Checkbox, Text } from '@tecsinapse/react-core';
3
23
  import { ContainerItemSelect, StyledContainerTextLabel, StyledSpan } from "./styled";
@@ -18,8 +38,9 @@ var SelectItem = function SelectItem(_ref) {
18
38
  var _React$useState = React.useState(value !== undefined && type === 'multi' && value.find(function (data) {
19
39
  return keyExtractor(data) === keyExtractor(item);
20
40
  }) !== undefined),
21
- checked = _React$useState[0],
22
- setChecked = _React$useState[1];
41
+ _React$useState2 = _slicedToArray(_React$useState, 2),
42
+ checked = _React$useState2[0],
43
+ setChecked = _React$useState2[1];
23
44
 
24
45
  React.useEffect(function () {
25
46
  if (!checked && value !== undefined && (type === 'multi' && value.find(function (data) {
@@ -41,15 +62,16 @@ var SelectItem = function SelectItem(_ref) {
41
62
  setChecked(!checked);
42
63
 
43
64
  if (auxChecked) {
44
- onSelect([].concat(_value, [key]));
45
- [].concat(_value, [key]).length === lenghtOptions && setCheckedAll(true);
65
+ onSelect([].concat(_toConsumableArray(_value), [key]));
66
+ [].concat(_toConsumableArray(_value), [key]).length === lenghtOptions && setCheckedAll(true);
46
67
  } else {
47
- var auxArray = [].concat(_value);
68
+ var auxArray = _toConsumableArray(_value);
69
+
48
70
  var indexToExclude = auxArray.findIndex(function (data) {
49
71
  return keyExtractor(data) === keyExtractor(key);
50
72
  });
51
73
  auxArray.splice(indexToExclude, 1);
52
- onSelect([].concat(auxArray));
74
+ onSelect(_toConsumableArray(auxArray));
53
75
  setCheckedAll(false);
54
76
  }
55
77
  } else {
@@ -1 +1 @@
1
- {"version":3,"file":"SelectItem.js","names":["React","Checkbox","Text","ContainerItemSelect","StyledContainerTextLabel","StyledSpan","SelectItem","item","onSelect","type","value","labelExtractor","setDropDownVisible","checkedAll","setCheckedAll","lenghtOptions","keyExtractor","isMulti","useState","undefined","find","data","checked","setChecked","useEffect","clickItem","useCallback","_value","key","Array","isArray","auxChecked","length","auxArray","indexToExclude","findIndex","splice","memo"],"sources":["../../../../../src/components/molecules/Select/SelectItem/SelectItem.tsx"],"sourcesContent":["import React from 'react';\nimport { Checkbox, Text } from '@tecsinapse/react-core';\nimport {\n ContainerItemSelect,\n StyledContainerTextLabel,\n StyledSpan,\n} from './styled';\n\ninterface SelectItemProps<Data, Type extends 'single' | 'multi'> {\n item: Data;\n type: Type;\n value: Type extends 'single' ? Data | undefined : Data[];\n onSelect: (\n option: Type extends 'single' ? Data | undefined : Data[]\n ) => never | void;\n keyExtractor: (t: Data, index?: number) => string;\n labelExtractor: (t: Data) => string;\n index: number;\n}\n\nconst SelectItem = <Data, Type extends 'single' | 'multi'>({\n item,\n onSelect,\n type,\n value,\n labelExtractor,\n setDropDownVisible,\n checkedAll,\n setCheckedAll,\n lenghtOptions,\n keyExtractor,\n}: SelectItemProps<Data, Type> & {\n setDropDownVisible: (t: boolean) => void;\n checkedAll: boolean;\n setCheckedAll: (t: boolean) => void;\n lenghtOptions: number;\n}): JSX.Element => {\n const isMulti = type === 'multi';\n const [checked, setChecked] = React.useState<boolean>(\n value !== undefined &&\n type === 'multi' &&\n (value as Data[]).find(\n data => keyExtractor(data) === keyExtractor(item)\n ) !== undefined\n );\n\n React.useEffect(() => {\n if (\n !checked &&\n value !== undefined &&\n ((type === 'multi' &&\n (value as Data[]).find(\n data => keyExtractor(data) === keyExtractor(item)\n )) ||\n (type === 'single' &&\n keyExtractor(value as Data) === keyExtractor(item)))\n )\n setChecked(true);\n }, [value, keyExtractor, type]);\n\n React.useEffect(() => {\n if (type === 'multi') {\n checkedAll\n ? setChecked(true)\n : setChecked(\n (value as Data[]).find(\n data => keyExtractor(data) === keyExtractor(item)\n ) !== undefined\n );\n }\n }, [checkedAll]);\n\n const clickItem = React.useCallback(\n (item, _value) => {\n // TS Workaround since TS won't infer the ternary operator's result type correctly\n type OnSelectArg = Parameters<typeof onSelect>[0];\n const key: Data = item;\n if (Array.isArray(_value)) {\n const auxChecked = !checked;\n setChecked(!checked);\n if (auxChecked) {\n onSelect([..._value, key] as OnSelectArg);\n [..._value, key].length === lenghtOptions && setCheckedAll(true);\n } else {\n const auxArray: Data[] = [..._value];\n const indexToExclude = auxArray.findIndex(\n data => keyExtractor(data) === keyExtractor(key)\n );\n auxArray.splice(indexToExclude, 1);\n onSelect([...auxArray] as OnSelectArg);\n setCheckedAll(false);\n }\n } else {\n onSelect(key as OnSelectArg);\n setDropDownVisible(false);\n }\n },\n [onSelect, setDropDownVisible, setCheckedAll, setChecked, checked]\n );\n\n return (\n <ContainerItemSelect onClick={() => clickItem(item, value)}>\n {isMulti && (\n <Checkbox checked={checked} onChange={() => clickItem(item, value)} />\n )}\n <StyledContainerTextLabel>\n <Text fontWeight=\"bold\" ellipsizeMode=\"tail\" numberOfLines={1}>\n <StyledSpan singleHighligh={type === 'single' && value === item}>\n {labelExtractor(item)}\n </StyledSpan>\n </Text>\n </StyledContainerTextLabel>\n </ContainerItemSelect>\n );\n};\n\nexport default React.memo(SelectItem) as typeof SelectItem;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,QAAT,EAAmBC,IAAnB,QAA+B,wBAA/B;AACA,SACEC,mBADF,EAEEC,wBAFF,EAGEC,UAHF;;AAkBA,IAAMC,UAAU,GAAG,SAAbA,UAAa,OAgBA;EAAA,IAfjBC,IAeiB,QAfjBA,IAeiB;EAAA,IAdjBC,QAciB,QAdjBA,QAciB;EAAA,IAbjBC,IAaiB,QAbjBA,IAaiB;EAAA,IAZjBC,KAYiB,QAZjBA,KAYiB;EAAA,IAXjBC,cAWiB,QAXjBA,cAWiB;EAAA,IAVjBC,kBAUiB,QAVjBA,kBAUiB;EAAA,IATjBC,UASiB,QATjBA,UASiB;EAAA,IARjBC,aAQiB,QARjBA,aAQiB;EAAA,IAPjBC,aAOiB,QAPjBA,aAOiB;EAAA,IANjBC,YAMiB,QANjBA,YAMiB;EACjB,IAAMC,OAAO,GAAGR,IAAI,KAAK,OAAzB;;EACA,sBAA8BT,KAAK,CAACkB,QAAN,CAC5BR,KAAK,KAAKS,SAAV,IACEV,IAAI,KAAK,OADX,IAEGC,KAAD,CAAkBU,IAAlB,CACE,UAAAC,IAAI;IAAA,OAAIL,YAAY,CAACK,IAAD,CAAZ,KAAuBL,YAAY,CAACT,IAAD,CAAvC;EAAA,CADN,MAEMY,SALoB,CAA9B;EAAA,IAAOG,OAAP;EAAA,IAA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AMmB,QAAgB,aAAON,MAAP,CAAtB;QACA,IAAMO,cAAc,GAAGD,QAAQ,CAACE,SAAT,CACrB,UAAAd,IAAI;UAAA,OAAIL,YAAY,CAACK,IAAD,CAAZ,KAAuBL,YAAY,CAACY,GAAD,CAAvC;QAAA,CADiB,CAAvB;QAGAK,QAAQ,CAACG,MAAT,CAAgBF,cAAhB,EAAgC,CAAhC;QACA1B,QAAQ,WAAKyB,QAAL,EAAR;QACAnB,aAAa,CAAC,KAAD,CAAb;MACD;IACF,CAfD,MAeO;MACLN,QAAQ,CAACoB,GAAD,CAAR;MACAhB,kBAAkB,CAAC,KAAD,CAAlB;IACD;EACF,CAxBe,EAyBhB,CAACJ,QAAD,EAAWI,kBAAX,EAA+BE,aAA/B,EAA8CS,UAA9C,EAA0DD,OAA1D,CAzBgB,CAAlB;EA4BA,OACE,oBAAC,mBAAD;IAAqB,OAAO,EAAE;MAAA,OAAMG,SAAS,CAAClB,IAAD,EAAOG,KAAP,CAAf;IAAA;EAA9B,GACGO,OAAO,IACN,oBAAC,QAAD;IAAU,OAAO,EAAEK,OAAnB;IAA4B,QAAQ,EAAE;MAAA,OAAMG,SAAS,CAAClB,IAAD,EAAOG,KAAP,CAAf;IAAA;EAAtC,EAFJ,EAIE,oBAAC,wBAAD,QACE,oBAAC,IAAD;IAAM,UAAU,EAAC,MAAjB;IAAwB,aAAa,EAAC,MAAtC;IAA6C,aAAa,EAAE;EAA5D,GACE,oBAAC,UAAD;IAAY,cAAc,EAAED,IAAI,KAAK,QAAT,IAAqBC,KAAK,KAAKH;EAA3D,GACGI,cAAc,CAACJ,IAAD,CADjB,CADF,CADF,CAJF,CADF;AAcD,CA9FD;;AAgGA,eAAeP,KAAK,CAACqC,IAAN,CAAW/B,UAAX,CAAf"}
1
+ {"version":3,"file":"SelectItem.js","names":["React","Checkbox","Text","ContainerItemSelect","StyledContainerTextLabel","StyledSpan","SelectItem","item","onSelect","type","value","labelExtractor","setDropDownVisible","checkedAll","setCheckedAll","lenghtOptions","keyExtractor","isMulti","useState","undefined","find","data","checked","setChecked","useEffect","clickItem","useCallback","_value","key","Array","isArray","auxChecked","length","auxArray","indexToExclude","findIndex","splice","memo"],"sources":["../../../../../src/components/molecules/Select/SelectItem/SelectItem.tsx"],"sourcesContent":["import React from 'react';\nimport { Checkbox, Text } from '@tecsinapse/react-core';\nimport {\n ContainerItemSelect,\n StyledContainerTextLabel,\n StyledSpan,\n} from './styled';\n\ninterface SelectItemProps<Data, Type extends 'single' | 'multi'> {\n item: Data;\n type: Type;\n value: Type extends 'single' ? Data | undefined : Data[];\n onSelect: (\n option: Type extends 'single' ? Data | undefined : Data[]\n ) => never | void;\n keyExtractor: (t: Data, index?: number) => string;\n labelExtractor: (t: Data) => string;\n index: number;\n}\n\nconst SelectItem = <Data, Type extends 'single' | 'multi'>({\n item,\n onSelect,\n type,\n value,\n labelExtractor,\n setDropDownVisible,\n checkedAll,\n setCheckedAll,\n lenghtOptions,\n keyExtractor,\n}: SelectItemProps<Data, Type> & {\n setDropDownVisible: (t: boolean) => void;\n checkedAll: boolean;\n setCheckedAll: (t: boolean) => void;\n lenghtOptions: number;\n}): JSX.Element => {\n const isMulti = type === 'multi';\n const [checked, setChecked] = React.useState<boolean>(\n value !== undefined &&\n type === 'multi' &&\n (value as Data[]).find(\n data => keyExtractor(data) === keyExtractor(item)\n ) !== undefined\n );\n\n React.useEffect(() => {\n if (\n !checked &&\n value !== undefined &&\n ((type === 'multi' &&\n (value as Data[]).find(\n data => keyExtractor(data) === keyExtractor(item)\n )) ||\n (type === 'single' &&\n keyExtractor(value as Data) === keyExtractor(item)))\n )\n setChecked(true);\n }, [value, keyExtractor, type]);\n\n React.useEffect(() => {\n if (type === 'multi') {\n checkedAll\n ? setChecked(true)\n : setChecked(\n (value as Data[]).find(\n data => keyExtractor(data) === keyExtractor(item)\n ) !== undefined\n );\n }\n }, [checkedAll]);\n\n const clickItem = React.useCallback(\n (item, _value) => {\n // TS Workaround since TS won't infer the ternary operator's result type correctly\n type OnSelectArg = Parameters<typeof onSelect>[0];\n const key: Data = item;\n if (Array.isArray(_value)) {\n const auxChecked = !checked;\n setChecked(!checked);\n if (auxChecked) {\n onSelect([..._value, key] as OnSelectArg);\n [..._value, key].length === lenghtOptions && setCheckedAll(true);\n } else {\n const auxArray: Data[] = [..._value];\n const indexToExclude = auxArray.findIndex(\n data => keyExtractor(data) === keyExtractor(key)\n );\n auxArray.splice(indexToExclude, 1);\n onSelect([...auxArray] as OnSelectArg);\n setCheckedAll(false);\n }\n } else {\n onSelect(key as OnSelectArg);\n setDropDownVisible(false);\n }\n },\n [onSelect, setDropDownVisible, setCheckedAll, setChecked, checked]\n );\n\n return (\n <ContainerItemSelect onClick={() => clickItem(item, value)}>\n {isMulti && (\n <Checkbox checked={checked} onChange={() => clickItem(item, value)} />\n )}\n <StyledContainerTextLabel>\n <Text fontWeight=\"bold\" ellipsizeMode=\"tail\" numberOfLines={1}>\n <StyledSpan singleHighligh={type === 'single' && value === item}>\n {labelExtractor(item)}\n </StyledSpan>\n </Text>\n </StyledContainerTextLabel>\n </ContainerItemSelect>\n );\n};\n\nexport default React.memo(SelectItem) as typeof SelectItem;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,QAAT,EAAmBC,IAAnB,QAA+B,wBAA/B;AACA,SACEC,mBADF,EAEEC,wBAFF,EAGEC,UAHF;;AAkBA,IAAMC,UAAU,GAAG,SAAbA,UAAa,OAgBA;EAAA,IAfjBC,IAeiB,QAfjBA,IAeiB;EAAA,IAdjBC,QAciB,QAdjBA,QAciB;EAAA,IAbjBC,IAaiB,QAbjBA,IAaiB;EAAA,IAZjBC,KAYiB,QAZjBA,KAYiB;EAAA,IAXjBC,cAWiB,QAXjBA,cAWiB;EAAA,IAVjBC,kBAUiB,QAVjBA,kBAUiB;EAAA,IATjBC,UASiB,QATjBA,UASiB;EAAA,IARjBC,aAQiB,QARjBA,aAQiB;EAAA,IAP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AAa,EAAC,MAAtC;IAA6C,aAAa,EAAE;EAA5D,GACE,oBAAC,UAAD;IAAY,cAAc,EAAED,IAAI,KAAK,QAAT,IAAqBC,KAAK,KAAKH;EAA3D,GACGI,cAAc,CAACJ,IAAD,CADjB,CADF,CADF,CAJF,CADF;AAcD,CA9FD;;AAgGA,eAAeP,KAAK,CAACqC,IAAN,CAAW/B,UAAX,CAAf"}
@@ -1,11 +1,11 @@
1
1
  var _templateObject, _templateObject2, _templateObject3;
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 ContainerItemSelect = styled('div')(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n padding: ", ";\n cursor: pointer;\n &:hover {\n background-color: ", ";\n }\n &:hover span {\n color: ", ";\n }\n flex-direction: row;\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])), function (_ref) {
6
+ export var ContainerItemSelect = styled('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: ", ";\n cursor: pointer;\n &:hover {\n background-color: ", ";\n }\n &:hover span {\n color: ", ";\n }\n flex-direction: row;\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])), function (_ref) {
7
7
  var theme = _ref.theme;
8
- return theme.spacing.mili + " " + theme.spacing.deca;
8
+ return "".concat(theme.spacing.mili, " ").concat(theme.spacing.deca);
9
9
  }, function (_ref2) {
10
10
  var theme = _ref2.theme;
11
11
  return theme.color.primary.xlight;
@@ -13,15 +13,15 @@ export var ContainerItemSelect = styled('div')(_templateObject || (_templateObje
13
13
  var theme = _ref3.theme;
14
14
  return theme.color.primary.medium;
15
15
  });
16
- export var StyledSpan = styled('span')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n color: ", ";\n padding: ", ";\n"])), function (_ref4) {
16
+ export var StyledSpan = styled('span')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n padding: ", ";\n"])), function (_ref4) {
17
17
  var theme = _ref4.theme,
18
18
  singleHighligh = _ref4.singleHighligh;
19
19
  return singleHighligh ? theme.color.primary.medium : theme.color.secondary.xdark;
20
20
  }, function (_ref5) {
21
21
  var theme = _ref5.theme;
22
- return theme.spacing.mili + " 0px";
22
+ return "".concat(theme.spacing.mili, " 0px");
23
23
  });
24
- export var StyledContainerTextLabel = styled('div')(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n padding-left: ", ";\n width: 100%;\n display: flex;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])), function (_ref6) {
24
+ export var StyledContainerTextLabel = styled('div')(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding-left: ", ";\n width: 100%;\n display: flex;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])), function (_ref6) {
25
25
  var theme = _ref6.theme;
26
26
  return theme.spacing.mili;
27
27
  });
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","names":["styled","ContainerItemSelect","theme","spacing","mili","deca","color","primary","xlight","medium","StyledSpan","singleHighligh","secondary","xdark","StyledContainerTextLabel"],"sources":["../../../../../src/components/molecules/Select/SelectItem/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { StyleProps } from '@tecsinapse/react-core';\n\nexport const ContainerItemSelect = styled('div')<Partial<StyleProps>>`\n padding: ${({ theme }) => `${theme.spacing.mili} ${theme.spacing.deca}`};\n cursor: pointer;\n &:hover {\n background-color: ${({ theme }) => theme.color.primary.xlight};\n }\n &:hover span {\n color: ${({ theme }) => theme.color.primary.medium};\n }\n flex-direction: row;\n display: flex;\n justify-content: space-between;\n align-items: center;\n`;\n\nexport const StyledSpan = styled('span')<\n Partial<StyleProps> & { singleHighligh: boolean }\n>`\n color: ${({ theme, singleHighligh }) =>\n singleHighligh ? theme.color.primary.medium : theme.color.secondary.xdark};\n padding: ${({ theme }) => `${theme.spacing.mili} 0px`};\n`;\n\nexport const StyledContainerTextLabel = styled('div')<Partial<StyleProps>>`\n padding-left: ${({ theme }) => theme.spacing.mili};\n width: 100%;\n display: flex;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AAGA,OAAO,IAAMC,mBAAmB,GAAGD,MAAM,CAAC,KAAD,CAAT,gTACnB;EAAA,IAAGE,KAAH,QAAGA,KAAH;EAAA,OAAkBA,KAAK,CAACC,OAAN,CAAcC,IAAhC,SAAwCF,KAAK,CAACC,OAAN,CAAcE,IAAtD;AAAA,CADmB,EAIR;EAAA,IAAGH,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACI,KAAN,CAAYC,OAAZ,CAAoBC,MAAnC;AAAA,CAJQ,EAOnB;EAAA,IAAGN,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACI,KAAN,CAAYC,OAAZ,CAAoBE,MAAnC;AAAA,CAPmB,CAAzB;AAeP,OAAO,IAAMC,UAAU,GAAGV,MAAM,CAAC,MAAD,CAAT,iHAGZ;EAAA,IAAGE,KAAH,SAAGA,KAAH;EAAA,IAAUS,cAAV,SAAUA,cAAV;EAAA,OACPA,cAAc,GAAGT,KAAK,CAACI,KAAN,CAAYC,OAAZ,CAAoBE,MAAvB,GAAgCP,KAAK,CAACI,KAAN,CAAYM,SAAZ,CAAsBC,KAD7D;AAAA,CAHY,EAKV;EAAA,IAAGX,KAAH,SAAGA,KAAH;EAAA,OAAkBA,KAAK,CAACC,OAAN,CAAcC,IAAhC;AAAA,CALU,CAAhB;AAQP,OAAO,IAAMU,wBAAwB,GAAGd,MAAM,CAAC,KAAD,CAAT,iNACnB;EAAA,IAAGE,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcC,IAA7B;AAAA,CADmB,CAA9B"}
1
+ {"version":3,"file":"styled.js","names":["styled","ContainerItemSelect","theme","spacing","mili","deca","color","primary","xlight","medium","StyledSpan","singleHighligh","secondary","xdark","StyledContainerTextLabel"],"sources":["../../../../../src/components/molecules/Select/SelectItem/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { StyleProps } from '@tecsinapse/react-core';\n\nexport const ContainerItemSelect = styled('div')<Partial<StyleProps>>`\n padding: ${({ theme }) => `${theme.spacing.mili} ${theme.spacing.deca}`};\n cursor: pointer;\n &:hover {\n background-color: ${({ theme }) => theme.color.primary.xlight};\n }\n &:hover span {\n color: ${({ theme }) => theme.color.primary.medium};\n }\n flex-direction: row;\n display: flex;\n justify-content: space-between;\n align-items: center;\n`;\n\nexport const StyledSpan = styled('span')<\n Partial<StyleProps> & { singleHighligh: boolean }\n>`\n color: ${({ theme, singleHighligh }) =>\n singleHighligh ? theme.color.primary.medium : theme.color.secondary.xdark};\n padding: ${({ theme }) => `${theme.spacing.mili} 0px`};\n`;\n\nexport const StyledContainerTextLabel = styled('div')<Partial<StyleProps>>`\n padding-left: ${({ theme }) => theme.spacing.mili};\n width: 100%;\n display: flex;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AAGA,OAAO,IAAMC,mBAAmB,GAAGD,MAAM,CAAC,KAAD,CAAT,2SACnB;EAAA,IAAGE,KAAH,QAAGA,KAAH;EAAA,iBAAkBA,KAAK,CAACC,OAAN,CAAcC,IAAhC,cAAwCF,KAAK,CAACC,OAAN,CAAcE,IAAtD;AAAA,CADmB,EAIR;EAAA,IAAGH,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACI,KAAN,CAAYC,OAAZ,CAAoBC,MAAnC;AAAA,CAJQ,EAOnB;EAAA,IAAGN,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACI,KAAN,CAAYC,OAAZ,CAAoBE,MAAnC;AAAA,CAPmB,CAAzB;AAeP,OAAO,IAAMC,UAAU,GAAGV,MAAM,CAAC,MAAD,CAAT,4GAGZ;EAAA,IAAGE,KAAH,SAAGA,KAAH;EAAA,IAAUS,cAAV,SAAUA,cAAV;EAAA,OACPA,cAAc,GAAGT,KAAK,CAACI,KAAN,CAAYC,OAAZ,CAAoBE,MAAvB,GAAgCP,KAAK,CAACI,KAAN,CAAYM,SAAZ,CAAsBC,KAD7D;AAAA,CAHY,EAKV;EAAA,IAAGX,KAAH,SAAGA,KAAH;EAAA,iBAAkBA,KAAK,CAACC,OAAN,CAAcC,IAAhC;AAAA,CALU,CAAhB;AAQP,OAAO,IAAMU,wBAAwB,GAAGd,MAAM,CAAC,KAAD,CAAT,4MACnB;EAAA,IAAGE,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcC,IAA7B;AAAA,CADmB,CAA9B"}
@@ -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 from '@emotion/styled';
6
6
  import { Icon } from '@tecsinapse/react-core';
7
7
  import React from 'react';
8
- export var StyledContainer = styled('div')(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n width: 100%;\n position: relative;\n"])));
9
- export var StyledInputContainer = styled('div')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n width: 100%;\n"])));
8
+ export var StyledContainer = styled('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n width: 100%;\n position: relative;\n"])));
9
+ export var StyledInputContainer = styled('div')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100%;\n"])));
10
10
  export var RightComponent = React.createElement(Icon, {
11
11
  name: "chevron-down",
12
12
  type: "material-community",
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","names":["styled","Icon","React","StyledContainer","StyledInputContainer","RightComponent","marginRight"],"sources":["../../../../src/components/molecules/Select/styled.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport { Icon, StyleProps } from '@tecsinapse/react-core';\nimport React from 'react';\n\nexport const StyledContainer = styled('div')<Partial<StyleProps>>`\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n width: 100%;\n position: relative;\n`;\n\nexport const StyledInputContainer = styled('div')<Partial<StyleProps>>`\n width: 100%;\n`;\n\nexport const RightComponent = (\n <Icon\n name=\"chevron-down\"\n type=\"material-community\"\n size=\"centi\"\n style={{ marginRight: 12 }}\n />\n);\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AACA,SAASC,IAAT,QAAiC,wBAAjC;AACA,OAAOC,KAAP,MAAkB,OAAlB;AAEA,OAAO,IAAMC,eAAe,GAAGH,MAAM,CAAC,KAAD,CAAT,oNAArB;AASP,OAAO,IAAMI,oBAAoB,GAAGJ,MAAM,CAAC,KAAD,CAAT,8FAA1B;AAIP,OAAO,IAAMK,cAAc,GACzB,oBAAC,IAAD;EACE,IAAI,EAAC,cADP;EAEE,IAAI,EAAC,oBAFP;EAGE,IAAI,EAAC,OAHP;EAIE,KAAK,EAAE;IAAEC,WAAW,EAAE;EAAf;AAJT,EADK"}
1
+ {"version":3,"file":"styled.js","names":["styled","Icon","React","StyledContainer","StyledInputContainer","RightComponent","marginRight"],"sources":["../../../../src/components/molecules/Select/styled.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport { Icon, StyleProps } from '@tecsinapse/react-core';\nimport React from 'react';\n\nexport const StyledContainer = styled('div')<Partial<StyleProps>>`\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n width: 100%;\n position: relative;\n`;\n\nexport const StyledInputContainer = styled('div')<Partial<StyleProps>>`\n width: 100%;\n`;\n\nexport const RightComponent = (\n <Icon\n name=\"chevron-down\"\n type=\"material-community\"\n size=\"centi\"\n style={{ marginRight: 12 }}\n />\n);\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AACA,SAASC,IAAT,QAAiC,wBAAjC;AACA,OAAOC,KAAP,MAAkB,OAAlB;AAEA,OAAO,IAAMC,eAAe,GAAGH,MAAM,CAAC,KAAD,CAAT,+MAArB;AASP,OAAO,IAAMI,oBAAoB,GAAGJ,MAAM,CAAC,KAAD,CAAT,yFAA1B;AAIP,OAAO,IAAMK,cAAc,GACzB,oBAAC,IAAD;EACE,IAAI,EAAC,cADP;EAEE,IAAI,EAAC,oBAFP;EAGE,IAAI,EAAC,OAHP;EAIE,KAAK,EAAE;IAAEC,WAAW,EAAE;EAAf;AAJT,EADK"}
@@ -2,6 +2,8 @@ var _excluded = ["value", "textProps"];
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';
@@ -14,7 +16,7 @@ export var Snackbar = function Snackbar(_ref) {
14
16
  colorVariant: 'primary',
15
17
  colorTone: 'medium'
16
18
  } : _ref$textProps,
17
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
19
+ rest = _objectWithoutProperties(_ref, _excluded);
18
20
 
19
21
  return React.createElement(SnackbarStyled, rest, React.createElement(Text, _extends({}, textProps, {
20
22
  fontWeight: "bold",
@@ -1 +1 @@
1
- {"version":3,"file":"Snackbar.js","names":["React","Text","SnackbarStyled","Snackbar","value","textProps","colorVariant","colorTone","rest"],"sources":["../../../../src/components/molecules/Snackbar/Snackbar.tsx"],"sourcesContent":["import React from 'react';\nimport {\n SnackbarProps as SnackPropsCore,\n Text,\n TextProps,\n} from '@tecsinapse/react-core';\nimport { SnackbarStyled } from './styled';\n\nexport interface SnackbarWebProps extends Omit<SnackPropsCore, 'children'> {\n value: string;\n textProps?: TextProps;\n}\n\nexport const Snackbar: React.FC<SnackbarWebProps> = ({\n value,\n textProps = { colorVariant: 'primary', colorTone: 'medium' },\n ...rest\n}) => {\n return (\n <SnackbarStyled {...rest}>\n <Text {...textProps} fontWeight=\"bold\" typography=\"base\">\n {value}\n </Text>\n </SnackbarStyled>\n );\n};\n\nexport default Snackbar;\n"],"mappings":";;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAEEC,IAFF,QAIO,wBAJP;AAKA,SAASC,cAAT;AAOA,OAAO,IAAMC,QAAoC,GAAG,SAAvCA,QAAuC,OAI9C;EAAA,IAHJC,KAGI,QAHJA,KAGI;EAAA,0BAFJC,SAEI;EAAA,IAFJA,SAEI,+BAFQ;IAAEC,YAAY,EAAE,SAAhB;IAA2BC,SAAS,EAAE;EAAtC,CAER;EAAA,IADDC,IACC;;EACJ,OACE,oBAAC,cAAD,EAAoBA,IAApB,EACE,oBAAC,IAAD,eAAUH,SAAV;IAAqB,UAAU,EAAC,MAAhC;IAAuC,UAAU,EAAC;EAAlD,IACGD,KADH,CADF,CADF;AAOD,CAZM;AAcP,eAAeD,QAAf"}
1
+ {"version":3,"file":"Snackbar.js","names":["React","Text","SnackbarStyled","Snackbar","value","textProps","colorVariant","colorTone","rest"],"sources":["../../../../src/components/molecules/Snackbar/Snackbar.tsx"],"sourcesContent":["import React from 'react';\nimport {\n SnackbarProps as SnackPropsCore,\n Text,\n TextProps,\n} from '@tecsinapse/react-core';\nimport { SnackbarStyled } from './styled';\n\nexport interface SnackbarWebProps extends Omit<SnackPropsCore, 'children'> {\n value: string;\n textProps?: TextProps;\n}\n\nexport const Snackbar: React.FC<SnackbarWebProps> = ({\n value,\n textProps = { colorVariant: 'primary', colorTone: 'medium' },\n ...rest\n}) => {\n return (\n <SnackbarStyled {...rest}>\n <Text {...textProps} fontWeight=\"bold\" typography=\"base\">\n {value}\n </Text>\n </SnackbarStyled>\n );\n};\n\nexport default Snackbar;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAEEC,IAFF,QAIO,wBAJP;AAKA,SAASC,cAAT;AAOA,OAAO,IAAMC,QAAoC,GAAG,SAAvCA,QAAuC,OAI9C;EAAA,IAHJC,KAGI,QAHJA,KAGI;EAAA,0BAFJC,SAEI;EAAA,IAFJA,SAEI,+BAFQ;IAAEC,YAAY,EAAE,SAAhB;IAA2BC,SAAS,EAAE;EAAtC,CAER;EAAA,IADDC,IACC;;EACJ,OACE,oBAAC,cAAD,EAAoBA,IAApB,EACE,oBAAC,IAAD,eAAUH,SAAV;IAAqB,UAAU,EAAC,MAAhC;IAAuC,UAAU,EAAC;EAAlD,IACGD,KADH,CADF,CADF;AAOD,CAZM;AAcP,eAAeD,QAAf"}
@@ -1,6 +1,6 @@
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 { Snackbar as SnackbarCore } from '@tecsinapse/react-core';
@@ -16,10 +16,10 @@ var baseStyles = function baseStyles() {
16
16
  };
17
17
 
18
18
  var webStyles = function webStyles() {
19
- return [css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n position: fixed;\n "])))];
19
+ return [css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: fixed;\n "])))];
20
20
  };
21
21
 
22
22
  export var SnackbarStyled = styled(SnackbarCore)(function () {
23
- return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n ", "\n ", "\n "])), baseStyles(), webStyles());
23
+ return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n ", "\n "])), baseStyles(), webStyles());
24
24
  });
25
25
  //# sourceMappingURL=styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","names":["styled","css","Snackbar","SnackbarCore","baseStyles","left","maxWidth","transform","translateX","webStyles","SnackbarStyled"],"sources":["../../../../src/components/molecules/Snackbar/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { Snackbar as SnackbarCore, StyleProps } from '@tecsinapse/react-core';\n\nconst baseStyles = () => [\n css({\n left: '50%',\n maxWidth: '600px',\n transform: [{ translateX: '-50%' as any }],\n }),\n];\n\nconst webStyles = () => [\n css`\n position: fixed;\n `,\n];\n\nexport const SnackbarStyled = styled(SnackbarCore)<Partial<StyleProps>>(\n () => css`\n ${baseStyles()}\n ${webStyles()}\n `\n);\n"],"mappings":";;;;AAAA,OAAOA,MAAP,IAAiBC,GAAjB,QAA4B,iBAA5B;AACA,SAASC,QAAQ,IAAIC,YAArB,QAAqD,wBAArD;;AAEA,IAAMC,UAAU,GAAG,SAAbA,UAAa;EAAA,OAAM,CACvBH,GAAG,CAAC;IACFI,IAAI,EAAE,KADJ;IAEFC,QAAQ,EAAE,OAFR;IAGFC,SAAS,EAAE,CAAC;MAAEC,UAAU,EAAE;IAAd,CAAD;EAHT,CAAD,CADoB,CAAN;AAAA,CAAnB;;AAQA,IAAMC,SAAS,GAAG,SAAZA,SAAY;EAAA,OAAM,CACtBR,GADsB,qGAAN;AAAA,CAAlB;;AAMA,OAAO,IAAMS,cAAc,GAAGV,MAAM,CAACG,YAAD,CAAN,CAC5B;EAAA,OAAMF,GAAN,qGACIG,UAAU,EADd,EAEIK,SAAS,EAFb;AAAA,CAD4B,CAAvB"}
1
+ {"version":3,"file":"styled.js","names":["styled","css","Snackbar","SnackbarCore","baseStyles","left","maxWidth","transform","translateX","webStyles","SnackbarStyled"],"sources":["../../../../src/components/molecules/Snackbar/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { Snackbar as SnackbarCore, StyleProps } from '@tecsinapse/react-core';\n\nconst baseStyles = () => [\n css({\n left: '50%',\n maxWidth: '600px',\n transform: [{ translateX: '-50%' as any }],\n }),\n];\n\nconst webStyles = () => [\n css`\n position: fixed;\n `,\n];\n\nexport const SnackbarStyled = styled(SnackbarCore)<Partial<StyleProps>>(\n () => css`\n ${baseStyles()}\n ${webStyles()}\n `\n);\n"],"mappings":";;;;AAAA,OAAOA,MAAP,IAAiBC,GAAjB,QAA4B,iBAA5B;AACA,SAASC,QAAQ,IAAIC,YAArB,QAAqD,wBAArD;;AAEA,IAAMC,UAAU,GAAG,SAAbA,UAAa;EAAA,OAAM,CACvBH,GAAG,CAAC;IACFI,IAAI,EAAE,KADJ;IAEFC,QAAQ,EAAE,OAFR;IAGFC,SAAS,EAAE,CAAC;MAAEC,UAAU,EAAE;IAAd,CAAD;EAHT,CAAD,CADoB,CAAN;AAAA,CAAnB;;AAQA,IAAMC,SAAS,GAAG,SAAZA,SAAY;EAAA,OAAM,CACtBR,GADsB,gGAAN;AAAA,CAAlB;;AAMA,OAAO,IAAMS,cAAc,GAAGV,MAAM,CAACG,YAAD,CAAN,CAC5B;EAAA,OAAMF,GAAN,gGACIG,UAAU,EADd,EAEIK,SAAS,EAFb;AAAA,CAD4B,CAAvB"}
@@ -2,6 +2,8 @@ var _excluded = ["label", "labelColor", "labelColorVariant", "labelColorTone", "
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';
@@ -35,7 +37,7 @@ var TextArea = function TextArea(_ref) {
35
37
  onBlur = _ref.onBlur,
36
38
  value = _ref.value,
37
39
  maxLength = _ref.maxLength,
38
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
40
+ rest = _objectWithoutProperties(_ref, _excluded);
39
41
 
40
42
  var _useInputFocus = useInputFocus(onFocus, onBlur, !disabled),
41
43
  focused = _useInputFocus.focused,
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.js","names":["React","useInputFocus","TextArea","TACore","Text","StyledWebInput","label","labelColor","labelColorVariant","labelColorTone","labelTypography","labelStack","labelWeight","leftComponent","rightComponent","disabled","style","borderColor","borderColorGradation","inputFontStack","inputFontWeight","inputContainerStyle","variant","hintComponent","hint","onFocus","onBlur","value","maxLength","rest","focused","handleBlur","handleFocus"],"sources":["../../../../src/components/molecules/TextArea/TextArea.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport {\n useInputFocus,\n TextAreaProps as ITACore,\n TextArea as TACore,\n Text,\n} from '@tecsinapse/react-core';\nimport { StyledWebInput } from './styled';\n\nexport type TextAreaProps = Omit<ITACore, 'TextComponent' | 'focused'>;\n\nconst TextArea: FC<TextAreaProps> = ({\n label,\n labelColor,\n labelColorVariant,\n labelColorTone,\n labelTypography,\n labelStack,\n labelWeight,\n leftComponent,\n rightComponent,\n disabled,\n style,\n borderColor,\n borderColorGradation,\n inputFontStack = 'default',\n inputFontWeight = 'bold',\n inputContainerStyle,\n variant = 'default',\n hintComponent,\n hint,\n onFocus,\n onBlur,\n value,\n maxLength,\n ...rest\n}) => {\n const { focused, handleBlur, handleFocus } = useInputFocus(\n onFocus,\n onBlur,\n !disabled\n );\n\n return (\n <TACore\n label={label}\n labelColor={labelColor}\n labelColorVariant={labelColorVariant}\n labelColorTone={labelColorTone}\n labelTypography={labelTypography}\n labelStack={labelStack}\n labelWeight={labelWeight}\n LabelComponent={Text}\n leftComponent={leftComponent}\n rightComponent={rightComponent}\n borderColor={borderColor}\n borderColorGradation={borderColorGradation}\n inputContainerStyle={inputContainerStyle}\n focused={focused}\n disabled={disabled}\n variant={variant}\n value={value}\n hintComponent={hintComponent}\n hint={hint}\n style={style}\n TextComponent={Text}\n maxLength={maxLength}\n >\n <StyledWebInput\n {...rest}\n fontStack={inputFontStack}\n fontWeight={inputFontWeight}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n textAlignVertical={'top'}\n multiline\n value={value}\n maxLength={maxLength}\n />\n </TACore>\n );\n};\n\nexport default TextArea;\n"],"mappings":";;;;;;AAAA,OAAOA,KAAP,MAA0B,OAA1B;AACA,SACEC,aADF,EAGEC,QAAQ,IAAIC,MAHd,EAIEC,IAJF,QAKO,wBALP;AAMA,SAASC,cAAT;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KE,eAAe,EAAEC,eALnB;IAME,UAAU,EAAEC,UANd;IAOE,WAAW,EAAEC,WAPf;IAQE,cAAc,EAAER,IARlB;IASE,aAAa,EAAES,aATjB;IAUE,cAAc,EAAEC,cAVlB;IAWE,WAAW,EAAEG,WAXf;IAYE,oBAAoB,EAAEC,oBAZxB;IAaE,mBAAmB,EAAEG,mBAbvB;IAcE,OAAO,EAAES,OAdX;IAeE,QAAQ,EAAEf,QAfZ;IAgBE,OAAO,EAAEO,OAhBX;IAiBE,KAAK,EAAEK,KAjBT;IAkBE,aAAa,EAAEJ,aAlBjB;IAmBE,IAAI,EAAEC,IAnBR;IAoBE,KAAK,EAAER,KApBT;IAqBE,aAAa,EAAEZ,IArBjB;IAsBE,SAAS,EAAEwB;EAtBb,GAwBE,oBAAC,cAAD,eACMC,IADN;IAEE,SAAS,EAAEV,cAFb;IAGE,UAAU,EAAEC,eAHd;IAIE,QAAQ,EAAEL,QAJZ;IAKE,OAAO,EAAEiB,WALX;IAME,MAAM,EAAED,UANV;IAOE,iBAAiB,EAAE,KAPrB;IAQE,SAAS,MARX;IASE,KAAK,EAAEJ,KATT;IAUE,SAAS,EAAEC;EAVb,GAxBF,CADF;AAuCD,CAvED;;AAyEA,eAAe1B,QAAf"}
1
+ {"version":3,"file":"TextArea.js","names":["React","useInputFocus","TextArea","TACore","Text","StyledWebInput","label","labelColor","labelColorVariant","labelColorTone","labelTypography","labelStack","labelWeight","leftComponent","rightComponent","disabled","style","borderColor","borderColorGradation","inputFontStack","inputFontWeight","inputContainerStyle","variant","hintComponent","hint","onFocus","onBlur","value","maxLength","rest","focused","handleBlur","handleFocus"],"sources":["../../../../src/components/molecules/TextArea/TextArea.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport {\n useInputFocus,\n TextAreaProps as ITACore,\n TextArea as TACore,\n Text,\n} from '@tecsinapse/react-core';\nimport { StyledWebInput } from './styled';\n\nexport type TextAreaProps = Omit<ITACore, 'TextComponent' | 'focused'>;\n\nconst TextArea: FC<TextAreaProps> = ({\n label,\n labelColor,\n labelColorVariant,\n labelColorTone,\n labelTypography,\n labelStack,\n labelWeight,\n leftComponent,\n rightComponent,\n disabled,\n style,\n borderColor,\n borderColorGradation,\n inputFontStack = 'default',\n inputFontWeight = 'bold',\n inputContainerStyle,\n variant = 'default',\n hintComponent,\n hint,\n onFocus,\n onBlur,\n value,\n maxLength,\n ...rest\n}) => {\n const { focused, handleBlur, handleFocus } = useInputFocus(\n onFocus,\n onBlur,\n !disabled\n );\n\n return (\n <TACore\n label={label}\n labelColor={labelColor}\n labelColorVariant={labelColorVariant}\n labelColorTone={labelColorTone}\n labelTypography={labelTypography}\n labelStack={labelStack}\n labelWeight={labelWeight}\n LabelComponent={Text}\n leftComponent={leftComponent}\n rightComponent={rightComponent}\n borderColor={borderColor}\n borderColorGradation={borderColorGradation}\n inputContainerStyle={inputContainerStyle}\n focused={focused}\n disabled={disabled}\n variant={variant}\n value={value}\n hintComponent={hintComponent}\n hint={hint}\n style={style}\n TextComponent={Text}\n maxLength={maxLength}\n >\n <StyledWebInput\n {...rest}\n fontStack={inputFontStack}\n fontWeight={inputFontWeight}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n textAlignVertical={'top'}\n multiline\n value={value}\n maxLength={maxLength}\n />\n </TACore>\n );\n};\n\nexport default TextArea;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAP,MAA0B,OAA1B;AACA,SACEC,aADF,EAGEC,QAAQ,IAAIC,MAHd,EAIEC,IAJF,QAKO,wBALP;AAMA,SAASC,cAAT;;AAIA,IAAMH,QAA2B,GAAG,SAA9BA,QAA8B,OAyB9B;EAAA,IAxBJI,KAwBI,QAxBJA,KAwBI;EAAA,IAvBJC,UAuBI,QAvBJA,UAuBI;EAAA,IAtBJC,iBAsBI,QAtBJA,iBAsBI;EAAA,IArBJC,cAqBI,QArBJA,cAqBI;EAAA,IApBJC,eAoBI,QApBJA,eAoBI;EAAA,IAnBJC,UAmBI,QAnBJ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Q,EAAEf,QAfZ;IAgBE,OAAO,EAAEO,OAhBX;IAiBE,KAAK,EAAEK,KAjBT;IAkBE,aAAa,EAAEJ,aAlBjB;IAmBE,IAAI,EAAEC,IAnBR;IAoBE,KAAK,EAAER,KApBT;IAqBE,aAAa,EAAEZ,IArBjB;IAsBE,SAAS,EAAEwB;EAtBb,GAwBE,oBAAC,cAAD,eACMC,IADN;IAEE,SAAS,EAAEV,cAFb;IAGE,UAAU,EAAEC,eAHd;IAIE,QAAQ,EAAEL,QAJZ;IAKE,OAAO,EAAEiB,WALX;IAME,MAAM,EAAED,UANV;IAOE,iBAAiB,EAAE,KAPrB;IAQE,SAAS,MARX;IASE,KAAK,EAAEJ,KATT;IAUE,SAAS,EAAEC;EAVb,GAxBF,CADF;AAuCD,CAvED;;AAyEA,eAAe1B,QAAf"}
@@ -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/native';
6
6
  import { TextAreaInputBase } from '@tecsinapse/react-core';
7
- export var StyledWebInput = styled(TextAreaInputBase)(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n font-weight: ", ";\n font-family: ", ";\n outline-width: 0;\n"])), function (_ref) {
7
+ export var StyledWebInput = styled(TextAreaInputBase)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-weight: ", ";\n font-family: ", ";\n outline-width: 0;\n"])), function (_ref) {
8
8
  var theme = _ref.theme,
9
9
  _ref$fontWeight = _ref.fontWeight,
10
10
  fontWeight = _ref$fontWeight === void 0 ? 'regular' : _ref$fontWeight;
@@ -13,6 +13,6 @@ export var StyledWebInput = styled(TextAreaInputBase)(_templateObject || (_templ
13
13
  var theme = _ref2.theme,
14
14
  _ref2$fontStack = _ref2.fontStack,
15
15
  fontStack = _ref2$fontStack === void 0 ? 'default' : _ref2$fontStack;
16
- return "'" + theme.font.stack[fontStack] + "'";
16
+ return "'".concat(theme.font.stack[fontStack], "'");
17
17
  });
18
18
  //# sourceMappingURL=styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","names":["styled","TextAreaInputBase","StyledWebInput","theme","fontWeight","font","weight","fontStack","stack"],"sources":["../../../../src/components/molecules/TextArea/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport {\n FontStackType,\n FontWeightType,\n StyleProps,\n TextAreaInputBase,\n} from '@tecsinapse/react-core';\nimport { TextAreaProps } from './TextArea';\n\ninterface Font {\n fontStack?: FontStackType;\n fontWeight?: FontWeightType;\n}\n\nexport const StyledWebInput = styled(TextAreaInputBase)<\n Font & Partial<TextAreaProps> & Partial<StyleProps>\n>`\n font-weight: ${({ theme, fontWeight = 'regular' }) =>\n theme.font.weight[fontWeight]};\n font-family: ${({ theme, fontStack = 'default' }) =>\n `'${theme.font.stack[fontStack]}'`};\n outline-width: 0;\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AACA,SAIEC,iBAJF,QAKO,wBALP;AAaA,OAAO,IAAMC,cAAc,GAAGF,MAAM,CAACC,iBAAD,CAAT,8IAGV;EAAA,IAAGE,KAAH,QAAGA,KAAH;EAAA,2BAAUC,UAAV;EAAA,IAAUA,UAAV,gCAAuB,SAAvB;EAAA,OACbD,KAAK,CAACE,IAAN,CAAWC,MAAX,CAAkBF,UAAlB,CADa;AAAA,CAHU,EAKV;EAAA,IAAGD,KAAH,SAAGA,KAAH;EAAA,4BAAUI,SAAV;EAAA,IAAUA,SAAV,gCAAsB,SAAtB;EAAA,aACTJ,KAAK,CAACE,IAAN,CAAWG,KAAX,CAAiBD,SAAjB,CADS;AAAA,CALU,CAApB"}
1
+ {"version":3,"file":"styled.js","names":["styled","TextAreaInputBase","StyledWebInput","theme","fontWeight","font","weight","fontStack","stack"],"sources":["../../../../src/components/molecules/TextArea/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport {\n FontStackType,\n FontWeightType,\n StyleProps,\n TextAreaInputBase,\n} from '@tecsinapse/react-core';\nimport { TextAreaProps } from './TextArea';\n\ninterface Font {\n fontStack?: FontStackType;\n fontWeight?: FontWeightType;\n}\n\nexport const StyledWebInput = styled(TextAreaInputBase)<\n Font & Partial<TextAreaProps> & Partial<StyleProps>\n>`\n font-weight: ${({ theme, fontWeight = 'regular' }) =>\n theme.font.weight[fontWeight]};\n font-family: ${({ theme, fontStack = 'default' }) =>\n `'${theme.font.stack[fontStack]}'`};\n outline-width: 0;\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AACA,SAIEC,iBAJF,QAKO,wBALP;AAaA,OAAO,IAAMC,cAAc,GAAGF,MAAM,CAACC,iBAAD,CAAT,yIAGV;EAAA,IAAGE,KAAH,QAAGA,KAAH;EAAA,2BAAUC,UAAV;EAAA,IAAUA,UAAV,gCAAuB,SAAvB;EAAA,OACbD,KAAK,CAACE,IAAN,CAAWC,MAAX,CAAkBF,UAAlB,CADa;AAAA,CAHU,EAKV;EAAA,IAAGD,KAAH,SAAGA,KAAH;EAAA,4BAAUI,SAAV;EAAA,IAAUA,SAAV,gCAAsB,SAAtB;EAAA,kBACTJ,KAAK,CAACE,IAAN,CAAWG,KAAX,CAAiBD,SAAjB,CADS;AAAA,CALU,CAApB"}