@tecsinapse/react-web-kit 1.18.6 → 1.20.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 (288) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/components/atoms/Accordion/Accordion.js.map +1 -1
  3. package/dist/components/atoms/Accordion/animations.js.map +1 -1
  4. package/dist/components/atoms/Accordion/index.js.map +1 -1
  5. package/dist/components/atoms/Accordion/styled.js +1 -1
  6. package/dist/components/atoms/Accordion/styled.js.map +1 -1
  7. package/dist/components/atoms/Badge/Badge.js +1 -1
  8. package/dist/components/atoms/Badge/Badge.js.map +1 -1
  9. package/dist/components/atoms/Badge/index.js.map +1 -1
  10. package/dist/components/atoms/Button/Button.d.ts +2 -0
  11. package/dist/components/atoms/Button/Button.js +19 -3
  12. package/dist/components/atoms/Button/Button.js.map +1 -1
  13. package/dist/components/atoms/Button/hooks/useMouseHover.d.ts +3 -3
  14. package/dist/components/atoms/Button/hooks/useMouseHover.js +13 -3
  15. package/dist/components/atoms/Button/hooks/useMouseHover.js.map +1 -1
  16. package/dist/components/atoms/Button/hooks/useMousePressed.d.ts +5 -0
  17. package/dist/components/atoms/Button/hooks/useMousePressed.js +32 -0
  18. package/dist/components/atoms/Button/hooks/useMousePressed.js.map +1 -0
  19. package/dist/components/atoms/Button/index.js.map +1 -1
  20. package/dist/components/atoms/Button/styled.js +9 -4
  21. package/dist/components/atoms/Button/styled.js.map +1 -1
  22. package/dist/components/atoms/Dropdown/index.js.map +1 -1
  23. package/dist/components/atoms/Dropdown/styled.js.map +1 -1
  24. package/dist/components/atoms/Input/Input.d.ts +4 -3
  25. package/dist/components/atoms/Input/Input.js +1 -1
  26. package/dist/components/atoms/Input/Input.js.map +1 -1
  27. package/dist/components/atoms/Input/index.js.map +1 -1
  28. package/dist/components/atoms/Input/styled.js.map +1 -1
  29. package/dist/components/atoms/InputMask/InputMask.d.ts +4 -3
  30. package/dist/components/atoms/InputMask/InputMask.js +1 -1
  31. package/dist/components/atoms/InputMask/InputMask.js.map +1 -1
  32. package/dist/components/atoms/InputMask/index.js.map +1 -1
  33. package/dist/components/atoms/InputMask/styled.js.map +1 -1
  34. package/dist/components/atoms/Modal/Modal.js +1 -1
  35. package/dist/components/atoms/Modal/Modal.js.map +1 -1
  36. package/dist/components/atoms/Modal/animations.js.map +1 -1
  37. package/dist/components/atoms/Modal/index.js.map +1 -1
  38. package/dist/components/atoms/Modal/styled.js.map +1 -1
  39. package/dist/components/atoms/Overlay/Overlay.js.map +1 -1
  40. package/dist/components/atoms/Overlay/animations.js.map +1 -1
  41. package/dist/components/atoms/Overlay/index.js.map +1 -1
  42. package/dist/components/atoms/Overlay/styled.js.map +1 -1
  43. package/dist/components/atoms/Skeleton/Skeleton.js +1 -1
  44. package/dist/components/atoms/Skeleton/Skeleton.js.map +1 -1
  45. package/dist/components/atoms/Skeleton/index.js.map +1 -1
  46. package/dist/components/atoms/Skeleton/styled.js.map +1 -1
  47. package/dist/components/atoms/Table/Body/TBody.js.map +1 -1
  48. package/dist/components/atoms/Table/Body/index.js.map +1 -1
  49. package/dist/components/atoms/Table/Cell/Td.js.map +1 -1
  50. package/dist/components/atoms/Table/Cell/index.js.map +1 -1
  51. package/dist/components/atoms/Table/Cell/styled.js.map +1 -1
  52. package/dist/components/atoms/Table/Container/TableContainer.js.map +1 -1
  53. package/dist/components/atoms/Table/Container/index.js.map +1 -1
  54. package/dist/components/atoms/Table/Container/styled.js.map +1 -1
  55. package/dist/components/atoms/Table/Footer/TFoot.js.map +1 -1
  56. package/dist/components/atoms/Table/Footer/index.js.map +1 -1
  57. package/dist/components/atoms/Table/Footer/styled.js.map +1 -1
  58. package/dist/components/atoms/Table/Header/THead.js.map +1 -1
  59. package/dist/components/atoms/Table/Header/Th.js.map +1 -1
  60. package/dist/components/atoms/Table/Header/index.js +4 -4
  61. package/dist/components/atoms/Table/Header/index.js.map +1 -1
  62. package/dist/components/atoms/Table/Header/styled.js +1 -1
  63. package/dist/components/atoms/Table/Header/styled.js.map +1 -1
  64. package/dist/components/atoms/Table/Row/Tr.js.map +1 -1
  65. package/dist/components/atoms/Table/Row/index.js.map +1 -1
  66. package/dist/components/atoms/Table/Row/styled.js.map +1 -1
  67. package/dist/components/atoms/Table/Table.js.map +1 -1
  68. package/dist/components/atoms/Table/Toolbar/TableToolbar.js.map +1 -1
  69. package/dist/components/atoms/Table/Toolbar/index.js.map +1 -1
  70. package/dist/components/atoms/Table/Toolbar/styled.js.map +1 -1
  71. package/dist/components/atoms/Table/index.js +18 -18
  72. package/dist/components/atoms/Table/index.js.map +1 -1
  73. package/dist/components/atoms/Table/styled.js.map +1 -1
  74. package/dist/components/atoms/Tag/Tag.js +1 -1
  75. package/dist/components/atoms/Tag/Tag.js.map +1 -1
  76. package/dist/components/atoms/Tag/index.js.map +1 -1
  77. package/dist/components/atoms/Tooltip/Tooltip.js.map +1 -1
  78. package/dist/components/atoms/Tooltip/index.js +4 -4
  79. package/dist/components/atoms/Tooltip/index.js.map +1 -1
  80. package/dist/components/atoms/Tooltip/styled.js +3 -1
  81. package/dist/components/atoms/Tooltip/styled.js.map +1 -1
  82. package/dist/components/molecules/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.js +1 -1
  83. package/dist/components/molecules/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.js.map +1 -1
  84. package/dist/components/molecules/Breadcrumbs/BreadcrumbItem/index.js.map +1 -1
  85. package/dist/components/molecules/Breadcrumbs/BreadcrumbItem/styled.js +1 -1
  86. package/dist/components/molecules/Breadcrumbs/BreadcrumbItem/styled.js.map +1 -1
  87. package/dist/components/molecules/Breadcrumbs/Breadcrumbs.js.map +1 -1
  88. package/dist/components/molecules/Breadcrumbs/index.js +6 -6
  89. package/dist/components/molecules/Breadcrumbs/index.js.map +1 -1
  90. package/dist/components/molecules/Breadcrumbs/styled.js.map +1 -1
  91. package/dist/components/molecules/DatePicker/DatePicker.js +1 -1
  92. package/dist/components/molecules/DatePicker/DatePicker.js.map +1 -1
  93. package/dist/components/molecules/DatePicker/Modal.js +1 -1
  94. package/dist/components/molecules/DatePicker/Modal.js.map +1 -1
  95. package/dist/components/molecules/DatePicker/index.js.map +1 -1
  96. package/dist/components/molecules/DatePicker/styled.js.map +1 -1
  97. package/dist/components/molecules/DateTimePicker/DateTimePicker.js +1 -1
  98. package/dist/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
  99. package/dist/components/molecules/DateTimePicker/Modal.js +1 -2
  100. package/dist/components/molecules/DateTimePicker/Modal.js.map +1 -1
  101. package/dist/components/molecules/DateTimePicker/index.js.map +1 -1
  102. package/dist/components/molecules/DateTimePicker/styled.js.map +1 -1
  103. package/dist/components/molecules/Drawer/Drawer.js +3 -1
  104. package/dist/components/molecules/Drawer/Drawer.js.map +1 -1
  105. package/dist/components/molecules/Drawer/animations.js +1 -1
  106. package/dist/components/molecules/Drawer/animations.js.map +1 -1
  107. package/dist/components/molecules/Drawer/index.js.map +1 -1
  108. package/dist/components/molecules/Drawer/styled.js +2 -0
  109. package/dist/components/molecules/Drawer/styled.js.map +1 -1
  110. package/dist/components/molecules/Grid/Grid.d.ts +3 -13
  111. package/dist/components/molecules/Grid/Grid.js +5 -3
  112. package/dist/components/molecules/Grid/Grid.js.map +1 -1
  113. package/dist/components/molecules/Grid/Item/Item.d.ts +6 -27
  114. package/dist/components/molecules/Grid/Item/Item.js +41 -19
  115. package/dist/components/molecules/Grid/Item/Item.js.map +1 -1
  116. package/dist/components/molecules/Grid/Item/functions.d.ts +2 -0
  117. package/dist/components/molecules/Grid/Item/functions.js +16 -0
  118. package/dist/components/molecules/Grid/Item/functions.js.map +1 -0
  119. package/dist/components/molecules/Grid/Item/index.d.ts +1 -1
  120. package/dist/components/molecules/Grid/Item/index.js.map +1 -1
  121. package/dist/components/molecules/Grid/index.d.ts +2 -2
  122. package/dist/components/molecules/Grid/index.js +4 -4
  123. package/dist/components/molecules/Grid/index.js.map +1 -1
  124. package/dist/components/molecules/IconTextButton/IconTextButton.d.ts +6 -0
  125. package/dist/components/molecules/IconTextButton/IconTextButton.js +64 -0
  126. package/dist/components/molecules/IconTextButton/IconTextButton.js.map +1 -0
  127. package/dist/components/molecules/IconTextButton/TextComponent.d.ts +12 -0
  128. package/dist/components/molecules/IconTextButton/TextComponent.js +32 -0
  129. package/dist/components/molecules/IconTextButton/TextComponent.js.map +1 -0
  130. package/dist/components/molecules/IconTextButton/hooks/useIconTextButton.d.ts +6 -0
  131. package/dist/components/molecules/IconTextButton/hooks/useIconTextButton.js +31 -0
  132. package/dist/components/molecules/IconTextButton/hooks/useIconTextButton.js.map +1 -0
  133. package/dist/components/molecules/IconTextButton/index.d.ts +1 -0
  134. package/dist/components/molecules/IconTextButton/index.js +24 -0
  135. package/dist/components/molecules/IconTextButton/index.js.map +1 -0
  136. package/dist/components/molecules/IconTextButton/styled.d.ts +1 -0
  137. package/dist/components/molecules/IconTextButton/styled.js +33 -0
  138. package/dist/components/molecules/IconTextButton/styled.js.map +1 -0
  139. package/dist/components/molecules/InputPassword/InputPassword.js +1 -1
  140. package/dist/components/molecules/InputPassword/InputPassword.js.map +1 -1
  141. package/dist/components/molecules/InputPassword/index.js.map +1 -1
  142. package/dist/components/molecules/LabeledSwitch/LabelComponent.d.ts +12 -0
  143. package/dist/components/molecules/LabeledSwitch/LabelComponent.js +38 -0
  144. package/dist/components/molecules/LabeledSwitch/LabelComponent.js.map +1 -0
  145. package/dist/components/molecules/LabeledSwitch/LabeledSwitch.d.ts +7 -0
  146. package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js +55 -0
  147. package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -0
  148. package/dist/components/molecules/LabeledSwitch/index.d.ts +1 -0
  149. package/dist/components/molecules/LabeledSwitch/index.js +24 -0
  150. package/dist/components/molecules/LabeledSwitch/index.js.map +1 -0
  151. package/dist/components/molecules/LabeledSwitch/styled.d.ts +8 -0
  152. package/dist/components/molecules/LabeledSwitch/styled.js +39 -0
  153. package/dist/components/molecules/LabeledSwitch/styled.js.map +1 -0
  154. package/dist/components/molecules/Masonry/Masonry.js.map +1 -1
  155. package/dist/components/molecules/Masonry/index.js.map +1 -1
  156. package/dist/components/molecules/Masonry/styled.js.map +1 -1
  157. package/dist/components/molecules/Menubar/MenuBlock/MenuBlock.js.map +1 -1
  158. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js +1 -1
  159. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js.map +1 -1
  160. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/SubMenuBlock.js +1 -1
  161. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/SubMenuBlock.js.map +1 -1
  162. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/index.js.map +1 -1
  163. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/styled.js +1 -1
  164. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/styled.js.map +1 -1
  165. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/index.js.map +1 -1
  166. package/dist/components/molecules/Menubar/MenuBlock/MenuItem/styled.js.map +1 -1
  167. package/dist/components/molecules/Menubar/MenuBlock/index.js.map +1 -1
  168. package/dist/components/molecules/Menubar/MenuBlock/styled.js +1 -1
  169. package/dist/components/molecules/Menubar/MenuBlock/styled.js.map +1 -1
  170. package/dist/components/molecules/Menubar/Menubar.js +1 -1
  171. package/dist/components/molecules/Menubar/Menubar.js.map +1 -1
  172. package/dist/components/molecules/Menubar/MostUsed/MostUsed.js +1 -1
  173. package/dist/components/molecules/Menubar/MostUsed/MostUsed.js.map +1 -1
  174. package/dist/components/molecules/Menubar/MostUsed/index.js.map +1 -1
  175. package/dist/components/molecules/Menubar/MostUsed/styled.js +1 -1
  176. package/dist/components/molecules/Menubar/MostUsed/styled.js.map +1 -1
  177. package/dist/components/molecules/Menubar/SearchResultItem/SearchResultItem.js +1 -1
  178. package/dist/components/molecules/Menubar/SearchResultItem/SearchResultItem.js.map +1 -1
  179. package/dist/components/molecules/Menubar/SearchResultItem/index.js.map +1 -1
  180. package/dist/components/molecules/Menubar/SearchResultItem/styled.js +1 -1
  181. package/dist/components/molecules/Menubar/SearchResultItem/styled.js.map +1 -1
  182. package/dist/components/molecules/Menubar/SearchResultItem/utils.d.ts +1 -1
  183. package/dist/components/molecules/Menubar/SearchResultItem/utils.js +2 -2
  184. package/dist/components/molecules/Menubar/SearchResultItem/utils.js.map +1 -1
  185. package/dist/components/molecules/Menubar/animations.js +1 -1
  186. package/dist/components/molecules/Menubar/animations.js.map +1 -1
  187. package/dist/components/molecules/Menubar/index.js +4 -4
  188. package/dist/components/molecules/Menubar/index.js.map +1 -1
  189. package/dist/components/molecules/Menubar/styled.js +1 -1
  190. package/dist/components/molecules/Menubar/styled.js.map +1 -1
  191. package/dist/components/molecules/Menubar/types.js.map +1 -1
  192. package/dist/components/molecules/Menubar/utils.js.map +1 -1
  193. package/dist/components/molecules/Select/Dropdown/Dropdown.js.map +1 -1
  194. package/dist/components/molecules/Select/Dropdown/components/SearchInput.js.map +1 -1
  195. package/dist/components/molecules/Select/Dropdown/components/index.js.map +1 -1
  196. package/dist/components/molecules/Select/Dropdown/index.js.map +1 -1
  197. package/dist/components/molecules/Select/Dropdown/styled.js +1 -1
  198. package/dist/components/molecules/Select/Dropdown/styled.js.map +1 -1
  199. package/dist/components/molecules/Select/Select.js +1 -1
  200. package/dist/components/molecules/Select/Select.js.map +1 -1
  201. package/dist/components/molecules/Select/SelectItem/SelectItem.js.map +1 -1
  202. package/dist/components/molecules/Select/SelectItem/index.js.map +1 -1
  203. package/dist/components/molecules/Select/SelectItem/styled.js +1 -1
  204. package/dist/components/molecules/Select/SelectItem/styled.js.map +1 -1
  205. package/dist/components/molecules/Select/animations.js.map +1 -1
  206. package/dist/components/molecules/Select/functions.js.map +1 -1
  207. package/dist/components/molecules/Select/index.js.map +1 -1
  208. package/dist/components/molecules/Select/styled.js +1 -1
  209. package/dist/components/molecules/Select/styled.js.map +1 -1
  210. package/dist/components/molecules/Snackbar/Snackbar.js +1 -1
  211. package/dist/components/molecules/Snackbar/Snackbar.js.map +1 -1
  212. package/dist/components/molecules/Snackbar/index.js.map +1 -1
  213. package/dist/components/molecules/Snackbar/styled.js.map +1 -1
  214. package/dist/components/molecules/TextArea/TextArea.js +1 -1
  215. package/dist/components/molecules/TextArea/TextArea.js.map +1 -1
  216. package/dist/components/molecules/TextArea/index.js.map +1 -1
  217. package/dist/components/molecules/TextArea/styled.js.map +1 -1
  218. package/dist/components/organisms/DataGrid/DataGrid.d.ts +1 -1
  219. package/dist/components/organisms/DataGrid/DataGrid.js.map +1 -1
  220. package/dist/components/organisms/DataGrid/Footer/Footer.js.map +1 -1
  221. package/dist/components/organisms/DataGrid/Footer/index.js.map +1 -1
  222. package/dist/components/organisms/DataGrid/Footer/styled.js +1 -1
  223. package/dist/components/organisms/DataGrid/Footer/styled.js.map +1 -1
  224. package/dist/components/organisms/DataGrid/Header/Header.d.ts +1 -1
  225. package/dist/components/organisms/DataGrid/Header/Header.js.map +1 -1
  226. package/dist/components/organisms/DataGrid/Header/index.js.map +1 -1
  227. package/dist/components/organisms/DataGrid/Header/styled.js.map +1 -1
  228. package/dist/components/organisms/DataGrid/Header/utils.js +1 -1
  229. package/dist/components/organisms/DataGrid/Header/utils.js.map +1 -1
  230. package/dist/components/organisms/DataGrid/Row/Row.js.map +1 -1
  231. package/dist/components/organisms/DataGrid/Row/index.js.map +1 -1
  232. package/dist/components/organisms/DataGrid/index.js.map +1 -1
  233. package/dist/components/organisms/DataGrid/styled.js.map +1 -1
  234. package/dist/components/organisms/DataGrid/types.js.map +1 -1
  235. package/dist/components/organisms/DataGrid/utils.js +1 -1
  236. package/dist/components/organisms/DataGrid/utils.js.map +1 -1
  237. package/dist/hooks/index.d.ts +2 -0
  238. package/dist/hooks/index.js +16 -0
  239. package/dist/hooks/index.js.map +1 -1
  240. package/dist/hooks/useBreakpoints.d.ts +6 -0
  241. package/dist/hooks/useBreakpoints.js +27 -0
  242. package/dist/hooks/useBreakpoints.js.map +1 -0
  243. package/dist/hooks/useClickAwayListener.js.map +1 -1
  244. package/dist/hooks/useWindowSize.d.ts +6 -0
  245. package/dist/hooks/useWindowSize.js +35 -0
  246. package/dist/hooks/useWindowSize.js.map +1 -0
  247. package/dist/index.d.ts +14 -13
  248. package/dist/index.js +155 -139
  249. package/dist/index.js.map +1 -1
  250. package/package.json +6 -6
  251. package/src/components/atoms/Button/Button.tsx +20 -1
  252. package/src/components/atoms/Button/hooks/useMouseHover.ts +17 -9
  253. package/src/components/atoms/Button/hooks/useMousePressed.ts +29 -0
  254. package/src/components/atoms/Button/styled.ts +23 -6
  255. package/src/components/atoms/Input/Input.tsx +4 -5
  256. package/src/components/atoms/InputMask/InputMask.tsx +4 -5
  257. package/src/components/molecules/DatePicker/Modal.tsx +11 -5
  258. package/src/components/molecules/DatePicker/index.ts +1 -1
  259. package/src/components/molecules/DatePicker/styled.ts +3 -3
  260. package/src/components/molecules/DateTimePicker/Modal.tsx +1 -5
  261. package/src/components/molecules/DateTimePicker/styled.ts +8 -5
  262. package/src/components/molecules/Grid/Grid.stories.tsx +198 -0
  263. package/src/components/molecules/Grid/Grid.tsx +7 -25
  264. package/src/components/molecules/Grid/Item/Item.tsx +57 -57
  265. package/src/components/molecules/Grid/Item/functions.ts +13 -0
  266. package/src/components/molecules/Grid/Item/index.ts +1 -1
  267. package/src/components/molecules/Grid/index.ts +2 -2
  268. package/src/components/molecules/IconTextButton/IconTextButton.stories.tsx +51 -0
  269. package/src/components/molecules/IconTextButton/IconTextButton.tsx +64 -0
  270. package/src/components/molecules/IconTextButton/TextComponent.tsx +39 -0
  271. package/src/components/molecules/IconTextButton/hooks/useIconTextButton.ts +31 -0
  272. package/src/components/molecules/IconTextButton/index.ts +4 -0
  273. package/src/components/molecules/IconTextButton/styled.ts +18 -0
  274. package/src/components/molecules/LabeledSwitch/LabelComponent.tsx +46 -0
  275. package/src/components/molecules/LabeledSwitch/LabeledSwitch.stories.tsx +41 -0
  276. package/src/components/molecules/LabeledSwitch/LabeledSwitch.tsx +58 -0
  277. package/src/components/molecules/LabeledSwitch/index.ts +4 -0
  278. package/src/components/molecules/LabeledSwitch/styled.ts +26 -0
  279. package/src/components/molecules/Menubar/Menubar.tsx +4 -3
  280. package/src/components/molecules/Menubar/SearchResultItem/utils.tsx +2 -2
  281. package/src/components/molecules/Select/Dropdown/Dropdown.tsx +4 -3
  282. package/src/components/molecules/Select/Select.tsx +10 -8
  283. package/src/components/organisms/DataGrid/DataGrid.tsx +16 -20
  284. package/src/components/organisms/DataGrid/Header/Header.tsx +1 -1
  285. package/src/hooks/index.ts +2 -0
  286. package/src/hooks/useBreakpoints.ts +18 -0
  287. package/src/hooks/useWindowSize.ts +25 -0
  288. package/src/index.ts +33 -24
package/CHANGELOG.md CHANGED
@@ -3,6 +3,47 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.20.0](https://github.com/tecsinapse/design-system/compare/@tecsinapse/react-web-kit@1.19.0...@tecsinapse/react-web-kit@1.20.0) (2022-09-02)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * cannot read values from emotion ([c1ec39b](https://github.com/tecsinapse/design-system/commit/c1ec39bd9c9bd57649e56fdcdb7026d3a73928d2))
12
+ * eslint and prettier ([c897f19](https://github.com/tecsinapse/design-system/commit/c897f190c5a17cfc53721237d314fcb255f5e68e))
13
+ * web-kit ref props ([5596532](https://github.com/tecsinapse/design-system/commit/55965320dfc89be211cb6125f527d97deb88a1ec))
14
+
15
+
16
+
17
+
18
+
19
+ # [1.19.0](https://github.com/tecsinapse/design-system/compare/@tecsinapse/react-web-kit@1.18.7...@tecsinapse/react-web-kit@1.19.0) (2022-08-24)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * change PressableSurface with Pressable on LabeledSwitch label ([5029a74](https://github.com/tecsinapse/design-system/commit/5029a74bfc272f5aecb3bdae9152f0920a36c8bb))
25
+ * LabeledSwitch disabled and react-core exports ([855f12f](https://github.com/tecsinapse/design-system/commit/855f12f0dff1ce4c5969eba723707340e60a3310))
26
+ * merge ([b32e31d](https://github.com/tecsinapse/design-system/commit/b32e31d0a73a0ec3d20d65aa672e198fd874997a))
27
+
28
+
29
+ ### Features
30
+
31
+ * grid web responsive support ([4111063](https://github.com/tecsinapse/design-system/commit/411106311d37d62bae4736c07f71038d5564319c))
32
+ * grid web responsive support ([fd91539](https://github.com/tecsinapse/design-system/commit/fd91539dae6df151beeb48ce3749623e2bb4dedc))
33
+ * LabeledSwitch implementation. ([519fe87](https://github.com/tecsinapse/design-system/commit/519fe8769d687f15af09c9fb77fe98a727f9078b))
34
+
35
+
36
+
37
+
38
+
39
+ ## [1.18.7](https://github.com/tecsinapse/design-system/compare/@tecsinapse/react-web-kit@1.18.6...@tecsinapse/react-web-kit@1.18.7) (2022-08-18)
40
+
41
+ **Note:** Version bump only for package @tecsinapse/react-web-kit
42
+
43
+
44
+
45
+
46
+
6
47
  ## [1.18.6](https://github.com/tecsinapse/design-system/compare/@tecsinapse/react-web-kit@1.18.5...@tecsinapse/react-web-kit@1.18.6) (2022-08-09)
7
48
 
8
49
  **Note:** Version bump only for package @tecsinapse/react-web-kit
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Accordion/Accordion.tsx"],"names":["Accordion","title","open","_open","onChange","transition","children","rest","setOpen","React","useState","contentHeight","setContentHeight","theme","ref","useEffect","useLayoutEffect","size","Array","from","current","reduce","prev","curr","clientHeight","handleClick","useCallback","state","htmlEl"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAMA;;AACA;;AAMA;;;;;;AAUA,MAAMA,SAAmC,GAAG,CAAC;AAC3CC,EAAAA,KAD2C;AAE3CC,EAAAA,IAAI,EAAEC,KAAK,GAAG,KAF6B;AAG3CC,EAAAA,QAH2C;AAI3CC,EAAAA,UAAU,GAAG,GAJ8B;AAK3CC,EAAAA,QAL2C;AAM3C,KAAGC;AANwC,CAAD,KAOtC;AACJ,QAAM,CAACL,IAAD,EAAOM,OAAP,IAAkBC,eAAMC,QAAN,CAAeP,KAAf,CAAxB;;AACA,QAAM,CAACQ,aAAD,EAAgBC,gBAAhB,IAAoCH,eAAMC,QAAN,CAAe,CAAf,CAA1C;;AACA,QAAMG,KAAK,GAAG,uBAAd;AAEA,QAAMC,GAAG,GAAG,mBAA8B,IAA9B,CAAZ;;AAEAL,iBAAMM,SAAN,CAAgB,MAAMP,OAAO,CAACL,KAAD,CAA7B,EAAsC,CAACA,KAAD,CAAtC;;AAEAM,iBAAMO,eAAN,CAAsB,MAAM;AAAA;;AAC1B,UAAMC,IAAI,GAAGC,KAAK,CAACC,IAAN,CACV,iBAAAL,GAAG,CAACM,OAAJ,8DAAad,QAAb,KAAyB,EADf,EAEXe,MAFW,CAEJ,CAACC,IAAD,EAAOC,IAAP,KAAgBD,IAAI,GAAGC,IAAI,CAACC,YAFxB,EAEsC,CAFtC,CAAb;AAGAZ,IAAAA,gBAAgB,CAACK,IAAD,CAAhB;AACD,GALD,EAKG,EALH;;AAOA,QAAMQ,WAAW,GAAGhB,eAAMiB,WAAN,CAAkB,MAAM;AAC1C,QAAItB,QAAJ,EAAc;AACZA,MAAAA,QAAQ;AACR;AACD;;AACDI,IAAAA,OAAO,CAACmB,KAAK,IAAI,CAACA,KAAX,CAAP;AACD,GANmB,EAMjB,CAACvB,QAAD,CANiB,CAApB;;AAQA,SACE,6BAAC,0BAAD,EAAwBG,IAAxB,EACE,6BAAC,sBAAD;AAAgB,IAAA,OAAO,EAAEkB;AAAzB,KACE,6BAAC,gCAAD;AAAY,IAAA,EAAE,EAAEvB,IAAhB;AAAsB,IAAA,OAAO,EAAEG;AAA/B,KACGsB,KAAK,IACJ,6BAAC,eAAD;AACE,IAAA,UAAU,EAAC,IADb;AAEE,IAAA,UAAU,EAAC,MAFb;AAGE,IAAA,KAAK,EAAE,EACL,GAAG,4BAAWtB,UAAX,EAAuBQ,KAAvB,CADE;AAEL,SAAG,iCAAgBA,KAAhB,EAAuBc,KAAvB;AAFE;AAHT,KAQG1B,KARH,CAFJ,CADF,EAeE,6BAAC,qBAAD,QACE,6BAAC,eAAD;AACE,IAAA,IAAI,EAAC,oBADP;AAEE,IAAA,IAAI,EAAEC,IAAI,GAAG,YAAH,GAAkB,cAF9B;AAGE,IAAA,IAAI,EAAC,MAHP;AAIE,IAAA,SAAS,EAAC;AAJZ,IADF,CAfF,CADF,EAyBE,6BAAC,gCAAD;AAAY,IAAA,EAAE,EAAEA,IAAhB;AAAsB,IAAA,OAAO,EAAEG;AAA/B,KACGsB,KAAK,IACJ,6BAAC,wBAAD;AACE,IAAA,GAAG,EAAEC,MAAM,IAAKd,GAAG,CAACM,OAAJ,GAAcQ,MADhC;AAEE,IAAA,KAAK,EAAE,EACL,GAAG,8BAAa1B,IAAb,EAAmBG,UAAnB,EAA+BM,aAA/B,EAA8CE,KAA9C,CADE;AAEL,SAAG,mCAAkBF,aAAlB,EAAiCE,KAAjC,EAAwCc,KAAxC;AAFE;AAFT,KAOGrB,QAPH,CAFJ,CAzBF,CADF;AAyCD,CAxED;;eA0EeN,S","sourcesContent":["import React, { useRef } from 'react';\nimport { Icon, Text, ThemeProp } from '@tecsinapse/react-core';\nimport {\n AccordionContainer,\n IconContainer,\n TitleContainer,\n ContentContainer,\n} from './styled';\nimport { Transition } from 'react-transition-group';\nimport {\n contentStyle,\n contentTransition,\n titleStyle,\n titleTransition,\n} from './animations';\nimport { useTheme } from '@emotion/react';\n\nexport interface AccordionProps extends React.HTMLAttributes<HTMLDivElement> {\n open?: boolean;\n onChange?: () => void;\n title: string;\n /** Transition time for collapse effect in ms */\n transition?: number;\n}\n\nconst Accordion: React.FC<AccordionProps> = ({\n title,\n open: _open = false,\n onChange,\n transition = 200,\n children,\n ...rest\n}) => {\n const [open, setOpen] = React.useState(_open);\n const [contentHeight, setContentHeight] = React.useState(0);\n const theme = useTheme() as ThemeProp;\n\n const ref = useRef<HTMLDivElement | null>(null);\n\n React.useEffect(() => setOpen(_open), [_open]);\n\n React.useLayoutEffect(() => {\n const size = Array.from(\n (ref.current?.children || []) as HTMLCollection\n ).reduce((prev, curr) => prev + curr.clientHeight, 0);\n setContentHeight(size);\n }, []);\n\n const handleClick = React.useCallback(() => {\n if (onChange) {\n onChange();\n return;\n }\n setOpen(state => !state);\n }, [onChange]);\n\n return (\n <AccordionContainer {...rest}>\n <TitleContainer onClick={handleClick}>\n <Transition in={open} timeout={transition}>\n {state => (\n <Text\n typography=\"h4\"\n fontWeight=\"bold\"\n style={{\n ...titleStyle(transition, theme),\n ...titleTransition(theme)[state],\n }}\n >\n {title}\n </Text>\n )}\n </Transition>\n <IconContainer>\n <Icon\n type=\"material-community\"\n name={open ? 'chevron-up' : 'chevron-down'}\n size=\"kilo\"\n fontColor=\"medium\"\n />\n </IconContainer>\n </TitleContainer>\n <Transition in={open} timeout={transition}>\n {state => (\n <ContentContainer\n ref={htmlEl => (ref.current = htmlEl)}\n style={{\n ...contentStyle(open, transition, contentHeight, theme),\n ...contentTransition(contentHeight, theme)[state],\n }}\n >\n {children}\n </ContentContainer>\n )}\n </Transition>\n </AccordionContainer>\n );\n};\n\nexport default Accordion;\n"],"file":"Accordion.js"}
1
+ {"version":3,"file":"Accordion.js","names":["Accordion","title","open","_open","onChange","transition","children","rest","setOpen","React","useState","contentHeight","setContentHeight","theme","useTheme","ref","useRef","useEffect","useLayoutEffect","size","Array","from","current","reduce","prev","curr","clientHeight","handleClick","useCallback","state","titleStyle","titleTransition","htmlEl","contentStyle","contentTransition"],"sources":["../../../../src/components/atoms/Accordion/Accordion.tsx"],"sourcesContent":["import React, { useRef } from 'react';\nimport { Icon, Text, ThemeProp } from '@tecsinapse/react-core';\nimport {\n AccordionContainer,\n IconContainer,\n TitleContainer,\n ContentContainer,\n} from './styled';\nimport { Transition } from 'react-transition-group';\nimport {\n contentStyle,\n contentTransition,\n titleStyle,\n titleTransition,\n} from './animations';\nimport { useTheme } from '@emotion/react';\n\nexport interface AccordionProps extends React.HTMLAttributes<HTMLDivElement> {\n open?: boolean;\n onChange?: () => void;\n title: string;\n /** Transition time for collapse effect in ms */\n transition?: number;\n}\n\nconst Accordion: React.FC<AccordionProps> = ({\n title,\n open: _open = false,\n onChange,\n transition = 200,\n children,\n ...rest\n}) => {\n const [open, setOpen] = React.useState(_open);\n const [contentHeight, setContentHeight] = React.useState(0);\n const theme = useTheme() as ThemeProp;\n\n const ref = useRef<HTMLDivElement | null>(null);\n\n React.useEffect(() => setOpen(_open), [_open]);\n\n React.useLayoutEffect(() => {\n const size = Array.from(\n (ref.current?.children || []) as HTMLCollection\n ).reduce((prev, curr) => prev + curr.clientHeight, 0);\n setContentHeight(size);\n }, []);\n\n const handleClick = React.useCallback(() => {\n if (onChange) {\n onChange();\n return;\n }\n setOpen(state => !state);\n }, [onChange]);\n\n return (\n <AccordionContainer {...rest}>\n <TitleContainer onClick={handleClick}>\n <Transition in={open} timeout={transition}>\n {state => (\n <Text\n typography=\"h4\"\n fontWeight=\"bold\"\n style={{\n ...titleStyle(transition, theme),\n ...titleTransition(theme)[state],\n }}\n >\n {title}\n </Text>\n )}\n </Transition>\n <IconContainer>\n <Icon\n type=\"material-community\"\n name={open ? 'chevron-up' : 'chevron-down'}\n size=\"kilo\"\n fontColor=\"medium\"\n />\n </IconContainer>\n </TitleContainer>\n <Transition in={open} timeout={transition}>\n {state => (\n <ContentContainer\n ref={htmlEl => (ref.current = htmlEl)}\n style={{\n ...contentStyle(open, transition, contentHeight, theme),\n ...contentTransition(contentHeight, theme)[state],\n }}\n >\n {children}\n </ContentContainer>\n )}\n </Transition>\n </AccordionContainer>\n );\n};\n\nexport default Accordion;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAMA;;AACA;;AAMA;;;;;;AAUA,MAAMA,SAAmC,GAAG,CAAC;EAC3CC,KAD2C;EAE3CC,IAAI,EAAEC,KAAK,GAAG,KAF6B;EAG3CC,QAH2C;EAI3CC,UAAU,GAAG,GAJ8B;EAK3CC,QAL2C;EAM3C,GAAGC;AANwC,CAAD,KAOtC;EACJ,MAAM,CAACL,IAAD,EAAOM,OAAP,IAAkBC,cAAA,CAAMC,QAAN,CAAeP,KAAf,CAAxB;;EACA,MAAM,CAACQ,aAAD,EAAgBC,gBAAhB,IAAoCH,cAAA,CAAMC,QAAN,CAAe,CAAf,CAA1C;;EACA,MAAMG,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAMC,GAAG,GAAG,IAAAC,aAAA,EAA8B,IAA9B,CAAZ;;EAEAP,cAAA,CAAMQ,SAAN,CAAgB,MAAMT,OAAO,CAACL,KAAD,CAA7B,EAAsC,CAACA,KAAD,CAAtC;;EAEAM,cAAA,CAAMS,eAAN,CAAsB,MAAM;IAAA;;IAC1B,MAAMC,IAAI,GAAGC,KAAK,CAACC,IAAN,CACV,iBAAAN,GAAG,CAACO,OAAJ,8DAAahB,QAAb,KAAyB,EADf,EAEXiB,MAFW,CAEJ,CAACC,IAAD,EAAOC,IAAP,KAAgBD,IAAI,GAAGC,IAAI,CAACC,YAFxB,EAEsC,CAFtC,CAAb;IAGAd,gBAAgB,CAACO,IAAD,CAAhB;EACD,CALD,EAKG,EALH;;EAOA,MAAMQ,WAAW,GAAGlB,cAAA,CAAMmB,WAAN,CAAkB,MAAM;IAC1C,IAAIxB,QAAJ,EAAc;MACZA,QAAQ;MACR;IACD;;IACDI,OAAO,CAACqB,KAAK,IAAI,CAACA,KAAX,CAAP;EACD,CANmB,EAMjB,CAACzB,QAAD,CANiB,CAApB;;EAQA,OACE,6BAAC,0BAAD,EAAwBG,IAAxB,EACE,6BAAC,sBAAD;IAAgB,OAAO,EAAEoB;EAAzB,GACE,6BAAC,gCAAD;IAAY,EAAE,EAAEzB,IAAhB;IAAsB,OAAO,EAAEG;EAA/B,GACGwB,KAAK,IACJ,6BAAC,eAAD;IACE,UAAU,EAAC,IADb;IAEE,UAAU,EAAC,MAFb;IAGE,KAAK,EAAE,EACL,GAAG,IAAAC,sBAAA,EAAWzB,UAAX,EAAuBQ,KAAvB,CADE;MAEL,GAAG,IAAAkB,2BAAA,EAAgBlB,KAAhB,EAAuBgB,KAAvB;IAFE;EAHT,GAQG5B,KARH,CAFJ,CADF,EAeE,6BAAC,qBAAD,QACE,6BAAC,eAAD;IACE,IAAI,EAAC,oBADP;IAEE,IAAI,EAAEC,IAAI,GAAG,YAAH,GAAkB,cAF9B;IAGE,IAAI,EAAC,MAHP;IAIE,SAAS,EAAC;EAJZ,EADF,CAfF,CADF,EAyBE,6BAAC,gCAAD;IAAY,EAAE,EAAEA,IAAhB;IAAsB,OAAO,EAAEG;EAA/B,GACGwB,KAAK,IACJ,6BAAC,wBAAD;IACE,GAAG,EAAEG,MAAM,IAAKjB,GAAG,CAACO,OAAJ,GAAcU,MADhC;IAEE,KAAK,EAAE,EACL,GAAG,IAAAC,wBAAA,EAAa/B,IAAb,EAAmBG,UAAnB,EAA+BM,aAA/B,EAA8CE,KAA9C,CADE;MAEL,GAAG,IAAAqB,6BAAA,EAAkBvB,aAAlB,EAAiCE,KAAjC,EAAwCgB,KAAxC;IAFE;EAFT,GAOGvB,QAPH,CAFJ,CAzBF,CADF;AAyCD,CAxED;;eA0EeN,S"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Accordion/animations.ts"],"names":["contentStyle","open","transition","value","theme","paddingBottom","spacing","kilo","height","contentTransition","entering","entered","exiting","exited","titleStyle","color","font","dark","titleTransition","orange"],"mappings":";;;;;;;AAAA;;AAEO,MAAMA,YAAY,GAAG,CAC1BC,IAD0B,EAE1BC,UAF0B,EAG1BC,KAH0B,EAI1BC,KAJ0B,MAKtB;AACJF,EAAAA,UAAU,EAAG,kBAAiBA,UAAU,GAAG,CAAE,0BAC3CA,UAAU,GAAG,CACd,gBAHG;AAIJG,EAAAA,aAAa,EAAEJ,IAAI,GAAG,yCAAyBG,KAAK,CAACE,OAAN,CAAcC,IAAvC,CAAH,GAAkD,CAJjE;AAKJC,EAAAA,MAAM,EAAEP,IAAI,GAAGE,KAAH,GAAW;AALnB,CALsB,CAArB;;;;AAaA,MAAMM,iBAAiB,GAAG,CAACN,KAAD,EAAgBC,KAAhB,KAAqC;AACpE,QAAMC,aAAa,GAAG,yCAAyBD,KAAK,CAACE,OAAN,CAAcC,IAAvC,CAAtB;AACA,SAAO;AACLG,IAAAA,QAAQ,EAAE;AACRL,MAAAA,aADQ;AAERG,MAAAA,MAAM,EAAEL;AAFA,KADL;AAKLQ,IAAAA,OAAO,EAAE;AACPN,MAAAA,aADO;AAEPG,MAAAA,MAAM,EAAEL;AAFD,KALJ;AASLS,IAAAA,OAAO,EAAE;AACPP,MAAAA,aADO;AAEPG,MAAAA,MAAM,EAAEL;AAFD,KATJ;AAaLU,IAAAA,MAAM,EAAE;AAAER,MAAAA,aAAa,EAAE,CAAjB;AAAoBG,MAAAA,MAAM,EAAE;AAA5B;AAbH,GAAP;AAeD,CAjBM;;;;AAmBA,MAAMM,UAAU,GAAG,CAACZ,UAAD,EAAqBE,KAArB,MAA2C;AACnEF,EAAAA,UAAU,EAAG,SAAQA,UAAU,GAAG,CAAE,gBAD+B;AAEnEa,EAAAA,KAAK,EAAEX,KAAK,CAACY,IAAN,CAAWD,KAAX,CAAiBE;AAF2C,CAA3C,CAAnB;;;;AAKA,MAAMC,eAAe,GAAId,KAAD,KAAuB;AACpDM,EAAAA,QAAQ,EAAE;AACRK,IAAAA,KAAK,EAAEX,KAAK,CAACY,IAAN,CAAWD,KAAX,CAAiBI;AADhB,GAD0C;AAIpDR,EAAAA,OAAO,EAAE;AACPI,IAAAA,KAAK,EAAEX,KAAK,CAACY,IAAN,CAAWD,KAAX,CAAiBI;AADjB,GAJ2C;AAOpDP,EAAAA,OAAO,EAAE;AACPG,IAAAA,KAAK,EAAEX,KAAK,CAACY,IAAN,CAAWD,KAAX,CAAiBI;AADjB,GAP2C;AAUpDN,EAAAA,MAAM,EAAE;AAAEE,IAAAA,KAAK,EAAEX,KAAK,CAACY,IAAN,CAAWD,KAAX,CAAiBE;AAA1B;AAV4C,CAAvB,CAAxB","sourcesContent":["import { ThemeProp, extractNumbersFromString } from '@tecsinapse/react-core';\n\nexport const contentStyle = (\n open: boolean,\n transition: number,\n value: number,\n theme: ThemeProp\n) => ({\n transition: `padding-bottom ${transition * 2}ms ease-in-out, height ${\n transition * 2\n }ms ease-in-out`,\n paddingBottom: open ? extractNumbersFromString(theme.spacing.kilo) : 0,\n height: open ? value : 0,\n});\n\nexport const contentTransition = (value: number, theme: ThemeProp) => {\n const paddingBottom = extractNumbersFromString(theme.spacing.kilo);\n return {\n entering: {\n paddingBottom,\n height: value,\n },\n entered: {\n paddingBottom,\n height: value,\n },\n exiting: {\n paddingBottom,\n height: value,\n },\n exited: { paddingBottom: 0, height: 0 },\n };\n};\n\nexport const titleStyle = (transition: number, theme: ThemeProp) => ({\n transition: `color ${transition * 2}ms ease-in-out`,\n color: theme.font.color.dark,\n});\n\nexport const titleTransition = (theme: ThemeProp) => ({\n entering: {\n color: theme.font.color.orange,\n },\n entered: {\n color: theme.font.color.orange,\n },\n exiting: {\n color: theme.font.color.orange,\n },\n exited: { color: theme.font.color.dark },\n});\n"],"file":"animations.js"}
1
+ {"version":3,"file":"animations.js","names":["contentStyle","open","transition","value","theme","paddingBottom","extractNumbersFromString","spacing","kilo","height","contentTransition","entering","entered","exiting","exited","titleStyle","color","font","dark","titleTransition","orange"],"sources":["../../../../src/components/atoms/Accordion/animations.ts"],"sourcesContent":["import { ThemeProp, extractNumbersFromString } from '@tecsinapse/react-core';\n\nexport const contentStyle = (\n open: boolean,\n transition: number,\n value: number,\n theme: ThemeProp\n) => ({\n transition: `padding-bottom ${transition * 2}ms ease-in-out, height ${\n transition * 2\n }ms ease-in-out`,\n paddingBottom: open ? extractNumbersFromString(theme.spacing.kilo) : 0,\n height: open ? value : 0,\n});\n\nexport const contentTransition = (value: number, theme: ThemeProp) => {\n const paddingBottom = extractNumbersFromString(theme.spacing.kilo);\n return {\n entering: {\n paddingBottom,\n height: value,\n },\n entered: {\n paddingBottom,\n height: value,\n },\n exiting: {\n paddingBottom,\n height: value,\n },\n exited: { paddingBottom: 0, height: 0 },\n };\n};\n\nexport const titleStyle = (transition: number, theme: ThemeProp) => ({\n transition: `color ${transition * 2}ms ease-in-out`,\n color: theme.font.color.dark,\n});\n\nexport const titleTransition = (theme: ThemeProp) => ({\n entering: {\n color: theme.font.color.orange,\n },\n entered: {\n color: theme.font.color.orange,\n },\n exiting: {\n color: theme.font.color.orange,\n },\n exited: { color: theme.font.color.dark },\n});\n"],"mappings":";;;;;;;AAAA;;AAEO,MAAMA,YAAY,GAAG,CAC1BC,IAD0B,EAE1BC,UAF0B,EAG1BC,KAH0B,EAI1BC,KAJ0B,MAKtB;EACJF,UAAU,EAAG,kBAAiBA,UAAU,GAAG,CAAE,0BAC3CA,UAAU,GAAG,CACd,gBAHG;EAIJG,aAAa,EAAEJ,IAAI,GAAG,IAAAK,mCAAA,EAAyBF,KAAK,CAACG,OAAN,CAAcC,IAAvC,CAAH,GAAkD,CAJjE;EAKJC,MAAM,EAAER,IAAI,GAAGE,KAAH,GAAW;AALnB,CALsB,CAArB;;;;AAaA,MAAMO,iBAAiB,GAAG,CAACP,KAAD,EAAgBC,KAAhB,KAAqC;EACpE,MAAMC,aAAa,GAAG,IAAAC,mCAAA,EAAyBF,KAAK,CAACG,OAAN,CAAcC,IAAvC,CAAtB;EACA,OAAO;IACLG,QAAQ,EAAE;MACRN,aADQ;MAERI,MAAM,EAAEN;IAFA,CADL;IAKLS,OAAO,EAAE;MACPP,aADO;MAEPI,MAAM,EAAEN;IAFD,CALJ;IASLU,OAAO,EAAE;MACPR,aADO;MAEPI,MAAM,EAAEN;IAFD,CATJ;IAaLW,MAAM,EAAE;MAAET,aAAa,EAAE,CAAjB;MAAoBI,MAAM,EAAE;IAA5B;EAbH,CAAP;AAeD,CAjBM;;;;AAmBA,MAAMM,UAAU,GAAG,CAACb,UAAD,EAAqBE,KAArB,MAA2C;EACnEF,UAAU,EAAG,SAAQA,UAAU,GAAG,CAAE,gBAD+B;EAEnEc,KAAK,EAAEZ,KAAK,CAACa,IAAN,CAAWD,KAAX,CAAiBE;AAF2C,CAA3C,CAAnB;;;;AAKA,MAAMC,eAAe,GAAIf,KAAD,KAAuB;EACpDO,QAAQ,EAAE;IACRK,KAAK,EAAEZ,KAAK,CAACa,IAAN,CAAWD,KAAX,CAAiBI;EADhB,CAD0C;EAIpDR,OAAO,EAAE;IACPI,KAAK,EAAEZ,KAAK,CAACa,IAAN,CAAWD,KAAX,CAAiBI;EADjB,CAJ2C;EAOpDP,OAAO,EAAE;IACPG,KAAK,EAAEZ,KAAK,CAACa,IAAN,CAAWD,KAAX,CAAiBI;EADjB,CAP2C;EAUpDN,MAAM,EAAE;IAAEE,KAAK,EAAEZ,KAAK,CAACa,IAAN,CAAWD,KAAX,CAAiBE;EAA1B;AAV4C,CAAvB,CAAxB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Accordion/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA","sourcesContent":["export { default as Accordion, AccordionProps } from './Accordion';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/Accordion/index.ts"],"sourcesContent":["export { default as Accordion, AccordionProps } from './Accordion';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA"}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.ContentContainer = exports.AccordionContainer = exports.TitleContainer = exports.IconContainer = void 0;
6
+ exports.TitleContainer = exports.IconContainer = exports.ContentContainer = exports.AccordionContainer = void 0;
7
7
 
8
8
  var _styled = _interopRequireDefault(require("@emotion/styled"));
9
9
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Accordion/styled.ts"],"names":["IconContainer","theme","borderRadius","mili","borderWidth","pico","color","secondary","light","TitleContainer","spacing","kilo","AccordionContainer","miscellaneous","surfaceColor","ContentContainer"],"mappings":";;;;;;;AAAA;;;;AAGO,MAAMA,aAAa,GAAG,qBAAO,KAAP,CAAmC;AAChE,mBAAmB,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACC,YAAN,CAAmBC,IAAK;AAC1D,YAAY,CAAC;AAAEF,EAAAA;AAAF,CAAD,KACP,GAAEA,KAAK,CAACG,WAAN,CAAkBC,IAAK,UAASJ,KAAK,CAACK,KAAN,CAAYC,SAAZ,CAAsBC,KAAM,EAAE;AACrE;AACA;AACA;AACA;AACA,CARO;;AAUA,MAAMC,cAAc,GAAG,qBAAO,KAAP,CAAmC;AACjE;AACA;AACA;AACA;AACA;AACA,aAAa,CAAC;AAAER,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACS,OAAN,CAAcC,IAAK;AAC/C,CAPO;;AASA,MAAMC,kBAAkB,GAAG,qBAAO,KAAP,CAAmC;AACrE;AACA;AACA,mBAAmB,CAAC;AAAEX,EAAAA;AAAF,CAAD,KACd,GAAEA,KAAK,CAACG,WAAN,CAAkBC,IAAK,UAASJ,KAAK,CAACK,KAAN,CAAYC,SAAZ,CAAsBC,KAAM,EAAE;AACrE,sBAAsB,CAAC;AAAEP,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACY,aAAN,CAAoBC,YAAa;AACtE,CANO;;AAQA,MAAMC,gBAAgB,GAAG,qBAAO,KAAP,CAAc;AAC9C;AACA;AACA;AACA,CAJO","sourcesContent":["import styled from '@emotion/styled';\nimport { StyleProps } from '@tecsinapse/react-core';\n\nexport const IconContainer = styled('div')<Partial<StyleProps>>`\n border-radius: ${({ theme }) => theme.borderRadius.mili};\n border: ${({ theme }) =>\n `${theme.borderWidth.pico} solid ${theme.color.secondary.light}`};\n display: flex;\n text-align: center;\n justify-content: center;\n align-items: center;\n`;\n\nexport const TitleContainer = styled('div')<Partial<StyleProps>>`\n display: flex;\n flex: 1;\n flex-direction: row;\n justify-content: space-between;\n cursor: pointer;\n padding: ${({ theme }) => theme.spacing.kilo} 0;\n`;\n\nexport const AccordionContainer = styled('div')<Partial<StyleProps>>`\n display: flex;\n flex-direction: column;\n border-bottom: ${({ theme }) =>\n `${theme.borderWidth.pico} solid ${theme.color.secondary.light}`};\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n`;\n\nexport const ContentContainer = styled('div')`\n display: flex;\n flex-direction: column;\n overflow: hidden;\n`;\n"],"file":"styled.js"}
1
+ {"version":3,"file":"styled.js","names":["IconContainer","styled","theme","borderRadius","mili","borderWidth","pico","color","secondary","light","TitleContainer","spacing","kilo","AccordionContainer","miscellaneous","surfaceColor","ContentContainer"],"sources":["../../../../src/components/atoms/Accordion/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { StyleProps } from '@tecsinapse/react-core';\n\nexport const IconContainer = styled('div')<Partial<StyleProps>>`\n border-radius: ${({ theme }) => theme.borderRadius.mili};\n border: ${({ theme }) =>\n `${theme.borderWidth.pico} solid ${theme.color.secondary.light}`};\n display: flex;\n text-align: center;\n justify-content: center;\n align-items: center;\n`;\n\nexport const TitleContainer = styled('div')<Partial<StyleProps>>`\n display: flex;\n flex: 1;\n flex-direction: row;\n justify-content: space-between;\n cursor: pointer;\n padding: ${({ theme }) => theme.spacing.kilo} 0;\n`;\n\nexport const AccordionContainer = styled('div')<Partial<StyleProps>>`\n display: flex;\n flex-direction: column;\n border-bottom: ${({ theme }) =>\n `${theme.borderWidth.pico} solid ${theme.color.secondary.light}`};\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n`;\n\nexport const ContentContainer = styled('div')`\n display: flex;\n flex-direction: column;\n overflow: hidden;\n`;\n"],"mappings":";;;;;;;AAAA;;;;AAGO,MAAMA,aAAa,GAAG,IAAAC,eAAA,EAAO,KAAP,CAAmC;AAChE,mBAAmB,CAAC;EAAEC;AAAF,CAAD,KAAeA,KAAK,CAACC,YAAN,CAAmBC,IAAK;AAC1D,YAAY,CAAC;EAAEF;AAAF,CAAD,KACP,GAAEA,KAAK,CAACG,WAAN,CAAkBC,IAAK,UAASJ,KAAK,CAACK,KAAN,CAAYC,SAAZ,CAAsBC,KAAM,EAAE;AACrE;AACA;AACA;AACA;AACA,CARO;;AAUA,MAAMC,cAAc,GAAG,IAAAT,eAAA,EAAO,KAAP,CAAmC;AACjE;AACA;AACA;AACA;AACA;AACA,aAAa,CAAC;EAAEC;AAAF,CAAD,KAAeA,KAAK,CAACS,OAAN,CAAcC,IAAK;AAC/C,CAPO;;AASA,MAAMC,kBAAkB,GAAG,IAAAZ,eAAA,EAAO,KAAP,CAAmC;AACrE;AACA;AACA,mBAAmB,CAAC;EAAEC;AAAF,CAAD,KACd,GAAEA,KAAK,CAACG,WAAN,CAAkBC,IAAK,UAASJ,KAAK,CAACK,KAAN,CAAYC,SAAZ,CAAsBC,KAAM,EAAE;AACrE,sBAAsB,CAAC;EAAEP;AAAF,CAAD,KAAeA,KAAK,CAACY,aAAN,CAAoBC,YAAa;AACtE,CANO;;AAQA,MAAMC,gBAAgB,GAAG,IAAAf,eAAA,EAAO,KAAP,CAAc;AAC9C;AACA;AACA;AACA,CAJO"}
@@ -11,7 +11,7 @@ var _react = _interopRequireDefault(require("react"));
11
11
 
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
 
14
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
14
+ 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); }
15
15
 
16
16
  const Badge = ({
17
17
  children,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Badge/Badge.tsx"],"names":["Badge","children","fontColor","value","props"],"mappings":";;;;;;;AAAA;;AAMA;;;;;;AAOA,MAAMA,KAAwB,GAAG,CAAC;AAChCC,EAAAA,QADgC;AAEhCC,EAAAA,SAAS,GAAG,OAFoB;AAGhCC,EAAAA,KAHgC;AAIhC,KAAGC;AAJ6B,CAAD,KAK3B;AACJ,SACE,6BAAC,gBAAD,eACMA,KADN;AAEE,IAAA,KAAK,EACH,6BAAC,eAAD;AAAM,MAAA,SAAS,EAAEF,SAAjB;AAA4B,MAAA,UAAU,EAAE,MAAxC;AAAgD,MAAA,UAAU,EAAE;AAA5D,OACGC,KADH;AAHJ,MAQGF,QARH,CADF;AAYD,CAlBD;;eAoBeD,K","sourcesContent":["import {\n BadgeProps,\n Badge as BadgeCore,\n Text,\n FontColorType,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\n\nexport interface BadgeWebProps extends Omit<BadgeProps, 'value'> {\n fontColor?: FontColorType;\n value: string | number;\n}\n\nconst Badge: FC<BadgeWebProps> = ({\n children,\n fontColor = 'light',\n value,\n ...props\n}) => {\n return (\n <BadgeCore\n {...props}\n value={\n <Text fontColor={fontColor} fontWeight={'bold'} typography={'label'}>\n {value}\n </Text>\n }\n >\n {children}\n </BadgeCore>\n );\n};\n\nexport default Badge;\n"],"file":"Badge.js"}
1
+ {"version":3,"file":"Badge.js","names":["Badge","children","fontColor","value","props"],"sources":["../../../../src/components/atoms/Badge/Badge.tsx"],"sourcesContent":["import {\n BadgeProps,\n Badge as BadgeCore,\n Text,\n FontColorType,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\n\nexport interface BadgeWebProps extends Omit<BadgeProps, 'value'> {\n fontColor?: FontColorType;\n value: string | number;\n}\n\nconst Badge: FC<BadgeWebProps> = ({\n children,\n fontColor = 'light',\n value,\n ...props\n}) => {\n return (\n <BadgeCore\n {...props}\n value={\n <Text fontColor={fontColor} fontWeight={'bold'} typography={'label'}>\n {value}\n </Text>\n }\n >\n {children}\n </BadgeCore>\n );\n};\n\nexport default Badge;\n"],"mappings":";;;;;;;AAAA;;AAMA;;;;;;AAOA,MAAMA,KAAwB,GAAG,CAAC;EAChCC,QADgC;EAEhCC,SAAS,GAAG,OAFoB;EAGhCC,KAHgC;EAIhC,GAAGC;AAJ6B,CAAD,KAK3B;EACJ,OACE,6BAAC,gBAAD,eACMA,KADN;IAEE,KAAK,EACH,6BAAC,eAAD;MAAM,SAAS,EAAEF,SAAjB;MAA4B,UAAU,EAAE,MAAxC;MAAgD,UAAU,EAAE;IAA5D,GACGC,KADH;EAHJ,IAQGF,QARH,CADF;AAYD,CAlBD;;eAoBeD,K"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Badge/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA","sourcesContent":["export { default as Badge, BadgeWebProps } from './Badge';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/Badge/index.ts"],"sourcesContent":["export { default as Badge, BadgeWebProps } from './Badge';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA"}
@@ -3,6 +3,8 @@ import { FC } from 'react';
3
3
  export declare type WebButtonProps = ButtonProps & {
4
4
  onMouseOver?: () => void;
5
5
  onMouseOut?: () => void;
6
+ onPressIn?: () => void;
7
+ onPressOut?: () => void;
6
8
  };
7
9
  declare const Button: FC<WebButtonProps>;
8
10
  export default Button;
@@ -9,17 +9,24 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _useMouseHover = require("./hooks/useMouseHover");
11
11
 
12
+ var _useMousePressed = require("./hooks/useMousePressed");
13
+
12
14
  var _styled = require("./styled");
13
15
 
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
17
 
16
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
18
+ 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); }
17
19
 
18
20
  const Button = ({
19
21
  children,
20
22
  disabled,
21
23
  frozen,
22
24
  state,
25
+ variant,
26
+ onMouseOut,
27
+ onMouseOver,
28
+ onPressIn,
29
+ onPressOut,
23
30
  ...rest
24
31
  }) => {
25
32
  const _frozen = frozen || state === 'loading';
@@ -28,14 +35,23 @@ const Button = ({
28
35
  mouseOver,
29
36
  handleMouseOut,
30
37
  handleMouseOver
31
- } = (0, _useMouseHover.useMouseHover)(!disabled && !_frozen);
38
+ } = (0, _useMouseHover.useMouseHover)(!disabled && !_frozen, onMouseOut, onMouseOver);
39
+ const {
40
+ pressed,
41
+ handlePressIn,
42
+ handlePressOut
43
+ } = (0, _useMousePressed.useMousePressed)(!disabled && !_frozen, onPressIn, onPressOut);
32
44
  return _react.default.createElement(_styled.StyledWebButton, _extends({}, rest, {
33
45
  disabled: disabled,
34
46
  frozen: _frozen,
35
47
  state: state,
36
48
  onMouseOver: handleMouseOver,
37
49
  onMouseOut: handleMouseOut,
38
- mouseOver: mouseOver
50
+ mouseOver: mouseOver,
51
+ onPressIn: handlePressIn,
52
+ onPressOut: handlePressOut,
53
+ pressed: pressed,
54
+ variant: variant
39
55
  }), children);
40
56
  };
41
57
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Button/Button.tsx"],"names":["Button","children","disabled","frozen","state","rest","_frozen","mouseOver","handleMouseOut","handleMouseOver"],"mappings":";;;;;;;AACA;;AACA;;AACA;;;;;;AAWA,MAAMA,MAA0B,GAAG,CAAC;AAClCC,EAAAA,QADkC;AAElCC,EAAAA,QAFkC;AAGlCC,EAAAA,MAHkC;AAIlCC,EAAAA,KAJkC;AAKlC,KAAGC;AAL+B,CAAD,KAMhB;AACjB,QAAMC,OAAO,GAAGH,MAAM,IAAIC,KAAK,KAAK,SAApC;;AACA,QAAM;AAAEG,IAAAA,SAAF;AAAaC,IAAAA,cAAb;AAA6BC,IAAAA;AAA7B,MAAiD,kCACrD,CAACP,QAAD,IAAa,CAACI,OADuC,CAAvD;AAIA,SACE,6BAAC,uBAAD,eACMD,IADN;AAEE,IAAA,QAAQ,EAAEH,QAFZ;AAGE,IAAA,MAAM,EAAEI,OAHV;AAIE,IAAA,KAAK,EAAEF,KAJT;AAKE,IAAA,WAAW,EAAEK,eALf;AAME,IAAA,UAAU,EAAED,cANd;AAOE,IAAA,SAAS,EAAED;AAPb,MASGN,QATH,CADF;AAaD,CAzBD;;eA2BeD,M","sourcesContent":["import { ButtonProps } from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { useMouseHover } from './hooks/useMouseHover';\nimport { StyledWebButton } from './styled';\n\n/**\n * TODO: Add a property 'defaultElement' to render a default\n * component and provide some button's state to it.\n */\nexport type WebButtonProps = ButtonProps & {\n onMouseOver?: () => void;\n onMouseOut?: () => void;\n};\n\nconst Button: FC<WebButtonProps> = ({\n children,\n disabled,\n frozen,\n state,\n ...rest\n}): JSX.Element => {\n const _frozen = frozen || state === 'loading';\n const { mouseOver, handleMouseOut, handleMouseOver } = useMouseHover(\n !disabled && !_frozen\n );\n\n return (\n <StyledWebButton\n {...rest}\n disabled={disabled}\n frozen={_frozen}\n state={state}\n onMouseOver={handleMouseOver}\n onMouseOut={handleMouseOut}\n mouseOver={mouseOver}\n >\n {children}\n </StyledWebButton>\n );\n};\n\nexport default Button;\n"],"file":"Button.js"}
1
+ {"version":3,"file":"Button.js","names":["Button","children","disabled","frozen","state","variant","onMouseOut","onMouseOver","onPressIn","onPressOut","rest","_frozen","mouseOver","handleMouseOut","handleMouseOver","useMouseHover","pressed","handlePressIn","handlePressOut","useMousePressed"],"sources":["../../../../src/components/atoms/Button/Button.tsx"],"sourcesContent":["import { ButtonProps } from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { useMouseHover } from './hooks/useMouseHover';\nimport { useMousePressed } from './hooks/useMousePressed';\nimport { StyledWebButton } from './styled';\n\n/**\n * TODO: Add a property 'defaultElement' to render a default\n * component and provide some button's state to it.\n */\nexport type WebButtonProps = ButtonProps & {\n onMouseOver?: () => void;\n onMouseOut?: () => void;\n onPressIn?: () => void;\n onPressOut?: () => void;\n};\n\nconst Button: FC<WebButtonProps> = ({\n children,\n disabled,\n frozen,\n state,\n variant,\n onMouseOut,\n onMouseOver,\n onPressIn,\n onPressOut,\n ...rest\n}): JSX.Element => {\n const _frozen = frozen || state === 'loading';\n const { mouseOver, handleMouseOut, handleMouseOver } = useMouseHover(\n !disabled && !_frozen,\n onMouseOut,\n onMouseOver\n );\n const { pressed, handlePressIn, handlePressOut } = useMousePressed(\n !disabled && !_frozen,\n onPressIn,\n onPressOut\n );\n\n return (\n <StyledWebButton\n {...rest}\n disabled={disabled}\n frozen={_frozen}\n state={state}\n onMouseOver={handleMouseOver}\n onMouseOut={handleMouseOut}\n mouseOver={mouseOver}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n pressed={pressed}\n variant={variant}\n >\n {children}\n </StyledWebButton>\n );\n};\n\nexport default Button;\n"],"mappings":";;;;;;;AACA;;AACA;;AACA;;AACA;;;;;;AAaA,MAAMA,MAA0B,GAAG,CAAC;EAClCC,QADkC;EAElCC,QAFkC;EAGlCC,MAHkC;EAIlCC,KAJkC;EAKlCC,OALkC;EAMlCC,UANkC;EAOlCC,WAPkC;EAQlCC,SARkC;EASlCC,UATkC;EAUlC,GAAGC;AAV+B,CAAD,KAWhB;EACjB,MAAMC,OAAO,GAAGR,MAAM,IAAIC,KAAK,KAAK,SAApC;;EACA,MAAM;IAAEQ,SAAF;IAAaC,cAAb;IAA6BC;EAA7B,IAAiD,IAAAC,4BAAA,EACrD,CAACb,QAAD,IAAa,CAACS,OADuC,EAErDL,UAFqD,EAGrDC,WAHqD,CAAvD;EAKA,MAAM;IAAES,OAAF;IAAWC,aAAX;IAA0BC;EAA1B,IAA6C,IAAAC,gCAAA,EACjD,CAACjB,QAAD,IAAa,CAACS,OADmC,EAEjDH,SAFiD,EAGjDC,UAHiD,CAAnD;EAMA,OACE,6BAAC,uBAAD,eACMC,IADN;IAEE,QAAQ,EAAER,QAFZ;IAGE,MAAM,EAAES,OAHV;IAIE,KAAK,EAAEP,KAJT;IAKE,WAAW,EAAEU,eALf;IAME,UAAU,EAAED,cANd;IAOE,SAAS,EAAED,SAPb;IAQE,SAAS,EAAEK,aARb;IASE,UAAU,EAAEC,cATd;IAUE,OAAO,EAAEF,OAVX;IAWE,OAAO,EAAEX;EAXX,IAaGJ,QAbH,CADF;AAiBD,CAzCD;;eA2CeD,M"}
@@ -1,5 +1,5 @@
1
- export declare const useMouseHover: (active: boolean) => {
1
+ export declare const useMouseHover: (active: boolean, onMouseOver?: (() => void) | undefined, onMouseOut?: (() => void) | undefined) => {
2
2
  mouseOver: boolean;
3
- handleMouseOver: () => false | void;
4
- handleMouseOut: () => false | void;
3
+ handleMouseOver: () => void;
4
+ handleMouseOut: () => void;
5
5
  };
@@ -7,10 +7,20 @@ exports.useMouseHover = void 0;
7
7
 
8
8
  var _react = require("react");
9
9
 
10
- const useMouseHover = active => {
10
+ const useMouseHover = (active, onMouseOver, onMouseOut) => {
11
11
  const [mouseOver, setMouseOver] = (0, _react.useState)(false);
12
- const handleMouseOver = (0, _react.useCallback)(() => active && setMouseOver(true), [active, setMouseOver]);
13
- const handleMouseOut = (0, _react.useCallback)(() => active && setMouseOver(false), [active, setMouseOver]);
12
+ const handleMouseOver = (0, _react.useCallback)(() => {
13
+ if (active) {
14
+ setMouseOver(true);
15
+ onMouseOver === null || onMouseOver === void 0 ? void 0 : onMouseOver();
16
+ }
17
+ }, [active, setMouseOver]);
18
+ const handleMouseOut = (0, _react.useCallback)(() => {
19
+ if (active) {
20
+ setMouseOver(false);
21
+ onMouseOut === null || onMouseOut === void 0 ? void 0 : onMouseOut();
22
+ }
23
+ }, [active, setMouseOver]);
14
24
  return {
15
25
  mouseOver,
16
26
  handleMouseOver,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/atoms/Button/hooks/useMouseHover.ts"],"names":["useMouseHover","active","mouseOver","setMouseOver","handleMouseOver","handleMouseOut"],"mappings":";;;;;;;AAAA;;AAEO,MAAMA,aAAa,GAAIC,MAAD,IAAqB;AAChD,QAAM,CAACC,SAAD,EAAYC,YAAZ,IAA4B,qBAAkB,KAAlB,CAAlC;AAEA,QAAMC,eAAe,GAAG,wBAAY,MAAMH,MAAM,IAAIE,YAAY,CAAC,IAAD,CAAxC,EAAgD,CACtEF,MADsE,EAEtEE,YAFsE,CAAhD,CAAxB;AAKA,QAAME,cAAc,GAAG,wBAAY,MAAMJ,MAAM,IAAIE,YAAY,CAAC,KAAD,CAAxC,EAAiD,CACtEF,MADsE,EAEtEE,YAFsE,CAAjD,CAAvB;AAKA,SAAO;AACLD,IAAAA,SADK;AAELE,IAAAA,eAFK;AAGLC,IAAAA;AAHK,GAAP;AAKD,CAlBM","sourcesContent":["import { useCallback, useState } from 'react';\n\nexport const useMouseHover = (active: boolean) => {\n const [mouseOver, setMouseOver] = useState<boolean>(false);\n\n const handleMouseOver = useCallback(() => active && setMouseOver(true), [\n active,\n setMouseOver,\n ]);\n\n const handleMouseOut = useCallback(() => active && setMouseOver(false), [\n active,\n setMouseOver,\n ]);\n\n return {\n mouseOver,\n handleMouseOver,\n handleMouseOut,\n };\n};\n"],"file":"useMouseHover.js"}
1
+ {"version":3,"file":"useMouseHover.js","names":["useMouseHover","active","onMouseOver","onMouseOut","mouseOver","setMouseOver","useState","handleMouseOver","useCallback","handleMouseOut"],"sources":["../../../../../src/components/atoms/Button/hooks/useMouseHover.ts"],"sourcesContent":["import { useCallback, useState } from 'react';\n\nexport const useMouseHover = (\n active: boolean,\n onMouseOver?: () => void,\n onMouseOut?: () => void\n) => {\n const [mouseOver, setMouseOver] = useState<boolean>(false);\n\n const handleMouseOver = useCallback(() => {\n if (active) {\n setMouseOver(true);\n onMouseOver?.();\n }\n }, [active, setMouseOver]);\n\n const handleMouseOut = useCallback(() => {\n if (active) {\n setMouseOver(false);\n onMouseOut?.();\n }\n }, [active, setMouseOver]);\n\n return {\n mouseOver,\n handleMouseOver,\n handleMouseOut,\n };\n};\n"],"mappings":";;;;;;;AAAA;;AAEO,MAAMA,aAAa,GAAG,CAC3BC,MAD2B,EAE3BC,WAF2B,EAG3BC,UAH2B,KAIxB;EACH,MAAM,CAACC,SAAD,EAAYC,YAAZ,IAA4B,IAAAC,eAAA,EAAkB,KAAlB,CAAlC;EAEA,MAAMC,eAAe,GAAG,IAAAC,kBAAA,EAAY,MAAM;IACxC,IAAIP,MAAJ,EAAY;MACVI,YAAY,CAAC,IAAD,CAAZ;MACAH,WAAW,SAAX,IAAAA,WAAW,WAAX,YAAAA,WAAW;IACZ;EACF,CALuB,EAKrB,CAACD,MAAD,EAASI,YAAT,CALqB,CAAxB;EAOA,MAAMI,cAAc,GAAG,IAAAD,kBAAA,EAAY,MAAM;IACvC,IAAIP,MAAJ,EAAY;MACVI,YAAY,CAAC,KAAD,CAAZ;MACAF,UAAU,SAAV,IAAAA,UAAU,WAAV,YAAAA,UAAU;IACX;EACF,CALsB,EAKpB,CAACF,MAAD,EAASI,YAAT,CALoB,CAAvB;EAOA,OAAO;IACLD,SADK;IAELG,eAFK;IAGLE;EAHK,CAAP;AAKD,CA1BM"}
@@ -0,0 +1,5 @@
1
+ export declare const useMousePressed: (active: boolean, onPressIn?: (() => void) | undefined, onPressOut?: (() => void) | undefined) => {
2
+ pressed: boolean;
3
+ handlePressIn: () => void;
4
+ handlePressOut: () => void;
5
+ };
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useMousePressed = void 0;
7
+
8
+ var _react = require("react");
9
+
10
+ const useMousePressed = (active, onPressIn, onPressOut) => {
11
+ const [pressed, setPressed] = (0, _react.useState)(false);
12
+ const handlePressIn = (0, _react.useCallback)(() => {
13
+ if (active) {
14
+ setPressed(true);
15
+ onPressIn === null || onPressIn === void 0 ? void 0 : onPressIn();
16
+ }
17
+ }, [active, setPressed]);
18
+ const handlePressOut = (0, _react.useCallback)(() => {
19
+ if (active) {
20
+ setPressed(false);
21
+ onPressOut === null || onPressOut === void 0 ? void 0 : onPressOut();
22
+ }
23
+ }, [active, setPressed]);
24
+ return {
25
+ pressed,
26
+ handlePressIn,
27
+ handlePressOut
28
+ };
29
+ };
30
+
31
+ exports.useMousePressed = useMousePressed;
32
+ //# sourceMappingURL=useMousePressed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMousePressed.js","names":["useMousePressed","active","onPressIn","onPressOut","pressed","setPressed","useState","handlePressIn","useCallback","handlePressOut"],"sources":["../../../../../src/components/atoms/Button/hooks/useMousePressed.ts"],"sourcesContent":["import { useCallback, useState } from 'react';\n\nexport const useMousePressed = (\n active: boolean,\n onPressIn?: () => void,\n onPressOut?: () => void\n) => {\n const [pressed, setPressed] = useState<boolean>(false);\n\n const handlePressIn = useCallback(() => {\n if (active) {\n setPressed(true);\n onPressIn?.();\n }\n }, [active, setPressed]);\n\n const handlePressOut = useCallback(() => {\n if (active) {\n setPressed(false);\n onPressOut?.();\n }\n }, [active, setPressed]);\n\n return {\n pressed,\n handlePressIn,\n handlePressOut,\n };\n};\n"],"mappings":";;;;;;;AAAA;;AAEO,MAAMA,eAAe,GAAG,CAC7BC,MAD6B,EAE7BC,SAF6B,EAG7BC,UAH6B,KAI1B;EACH,MAAM,CAACC,OAAD,EAAUC,UAAV,IAAwB,IAAAC,eAAA,EAAkB,KAAlB,CAA9B;EAEA,MAAMC,aAAa,GAAG,IAAAC,kBAAA,EAAY,MAAM;IACtC,IAAIP,MAAJ,EAAY;MACVI,UAAU,CAAC,IAAD,CAAV;MACAH,SAAS,SAAT,IAAAA,SAAS,WAAT,YAAAA,SAAS;IACV;EACF,CALqB,EAKnB,CAACD,MAAD,EAASI,UAAT,CALmB,CAAtB;EAOA,MAAMI,cAAc,GAAG,IAAAD,kBAAA,EAAY,MAAM;IACvC,IAAIP,MAAJ,EAAY;MACVI,UAAU,CAAC,KAAD,CAAV;MACAF,UAAU,SAAV,IAAAA,UAAU,WAAV,YAAAA,UAAU;IACX;EACF,CALsB,EAKpB,CAACF,MAAD,EAASI,UAAT,CALoB,CAAvB;EAOA,OAAO;IACLD,OADK;IAELG,aAFK;IAGLE;EAHK,CAAP;AAKD,CA1BM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Button/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export { default as Button, WebButtonProps } from './Button';\nexport * from './hooks/useMouseHover';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/Button/index.ts"],"sourcesContent":["export { default as Button, WebButtonProps } from './Button';\nexport * from './hooks/useMouseHover';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -23,13 +23,18 @@ const webStyles = () => {
23
23
 
24
24
  const hoverStyles = ({
25
25
  mouseOver,
26
+ pressed,
26
27
  theme,
27
- color = 'primary',
28
+ variant = 'filled',
28
29
  disabled
29
30
  }) => {
30
- return mouseOver && !disabled && (0, _native.css)`
31
- background-color: ${theme === null || theme === void 0 ? void 0 : theme.color[color].dark};
32
- border-color: ${theme === null || theme === void 0 ? void 0 : theme.color[color].dark};
31
+ const variantColor = _reactCore.colorVC[variant];
32
+ const variantColorGradation = _reactCore.colorGradationVC[variant];
33
+ const variantBorderColor = _reactCore.borderColorVC[variant];
34
+ const variantBorderColorGradation = _reactCore.borderColorGradationVC[variant];
35
+ return mouseOver && !disabled && !pressed && (0, _native.css)`
36
+ background-color: ${theme === null || theme === void 0 ? void 0 : theme.color[variantColor][variantColorGradation]};
37
+ border-color: ${theme === null || theme === void 0 ? void 0 : theme.color[variantBorderColor][variantBorderColorGradation]};
33
38
  `;
34
39
  };
35
40
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Button/styled.ts"],"names":["webStyles","hoverStyles","mouseOver","theme","color","disabled","dark","StyledWebButton","Button"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAGA,MAAMA,SAAS,GAAG,MAAM;AACtB,SAAO,gBAAI;AACb;AACA;AACA;AACA,GAJE;AAKD,CAND;;AAQA,MAAMC,WAAW,GAAG,CAAC;AACnBC,EAAAA,SADmB;AAEnBC,EAAAA,KAFmB;AAGnBC,EAAAA,KAAK,GAAG,SAHW;AAInBC,EAAAA;AAJmB,CAAD,KAKiD;AACnE,SACEH,SAAS,IACT,CAACG,QADD,IAEA,gBAAI;AACR,0BAA0BF,KADnB,aACmBA,KADnB,uBACmBA,KAAK,CAAEC,KAAP,CAAaA,KAAb,EAAoBE,IAAK;AACnD,sBAAsBH,KAFf,aAEeA,KAFf,uBAEeA,KAAK,CAAEC,KAAP,CAAaA,KAAb,EAAoBE,IAAK;AAC/C,KANE;AAQD,CAdD;;AAgBO,MAAMC,eAAe,GAAG,qBAAOC,iBAAP,EAE7BR,SAF6B,EAElBC,WAFkB,CAAxB","sourcesContent":["import styled, { css } from '@emotion/native';\nimport { Button, StyleProps } from '@tecsinapse/react-core';\nimport { WebButtonProps } from './Button';\n\nconst webStyles = () => {\n return css`\n & * {\n user-select: none;\n }\n `;\n};\n\nconst hoverStyles = ({\n mouseOver,\n theme,\n color = 'primary',\n disabled,\n}: { mouseOver: boolean } & WebButtonProps & Partial<StyleProps>) => {\n return (\n mouseOver &&\n !disabled &&\n css`\n background-color: ${theme?.color[color].dark};\n border-color: ${theme?.color[color].dark};\n `\n );\n};\n\nexport const StyledWebButton = styled(Button)<\n { mouseOver: boolean } & WebButtonProps & Partial<StyleProps>\n>(webStyles, hoverStyles);\n"],"file":"styled.js"}
1
+ {"version":3,"file":"styled.js","names":["webStyles","css","hoverStyles","mouseOver","pressed","theme","variant","disabled","variantColor","colorVC","variantColorGradation","colorGradationVC","variantBorderColor","borderColorVC","variantBorderColorGradation","borderColorGradationVC","color","StyledWebButton","styled","Button"],"sources":["../../../../src/components/atoms/Button/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport {\n borderColorGradationVC,\n borderColorVC,\n Button,\n colorGradationVC,\n colorVC,\n StyleProps,\n} from '@tecsinapse/react-core';\nimport { WebButtonProps } from './Button';\n\nconst webStyles = () => {\n return css`\n & * {\n user-select: none;\n }\n `;\n};\n\nconst hoverStyles = ({\n mouseOver,\n pressed,\n theme,\n variant = 'filled',\n disabled,\n}: { mouseOver: boolean; pressed: boolean } & WebButtonProps &\n Partial<StyleProps>) => {\n const variantColor = colorVC[variant];\n const variantColorGradation = colorGradationVC[variant];\n const variantBorderColor = borderColorVC[variant];\n const variantBorderColorGradation = borderColorGradationVC[variant];\n return (\n mouseOver &&\n !disabled &&\n !pressed &&\n css`\n background-color: ${theme?.color[variantColor][variantColorGradation]};\n border-color: ${theme?.color[variantBorderColor][\n variantBorderColorGradation\n ]};\n `\n );\n};\n\nexport const StyledWebButton = styled(Button)<\n { mouseOver: boolean; pressed: boolean } & WebButtonProps &\n Partial<StyleProps>\n>(webStyles, hoverStyles);\n"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAUA,MAAMA,SAAS,GAAG,MAAM;EACtB,OAAO,IAAAC,WAAA,CAAI;AACb;AACA;AACA;AACA,GAJE;AAKD,CAND;;AAQA,MAAMC,WAAW,GAAG,CAAC;EACnBC,SADmB;EAEnBC,OAFmB;EAGnBC,KAHmB;EAInBC,OAAO,GAAG,QAJS;EAKnBC;AALmB,CAAD,KAOM;EACxB,MAAMC,YAAY,GAAGC,kBAAA,CAAQH,OAAR,CAArB;EACA,MAAMI,qBAAqB,GAAGC,2BAAA,CAAiBL,OAAjB,CAA9B;EACA,MAAMM,kBAAkB,GAAGC,wBAAA,CAAcP,OAAd,CAA3B;EACA,MAAMQ,2BAA2B,GAAGC,iCAAA,CAAuBT,OAAvB,CAApC;EACA,OACEH,SAAS,IACT,CAACI,QADD,IAEA,CAACH,OAFD,IAGA,IAAAH,WAAA,CAAI;AACR,0BAA0BI,KADnB,aACmBA,KADnB,uBACmBA,KAAK,CAAEW,KAAP,CAAaR,YAAb,EAA2BE,qBAA3B,CAAkD;AAC5E,sBAAsBL,KAFf,aAEeA,KAFf,uBAEeA,KAAK,CAAEW,KAAP,CAAaJ,kBAAb,EACdE,2BADc,CAEd;AACR,KATE;AAWD,CAvBD;;AAyBO,MAAMG,eAAe,GAAG,IAAAC,eAAA,EAAOC,iBAAP,EAG7BnB,SAH6B,EAGlBE,WAHkB,CAAxB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Dropdown/index.tsx"],"names":["Component","visible","setVisible","children","refDropDown","React","useRef","state","defaultStyles","transition","Dropdown"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;;;;;AAOA,MAAMA,SAA8D,GAAG,CAAC;AACtEC,EAAAA,OADsE;AAEtEC,EAAAA,UAFsE;AAGtEC,EAAAA;AAHsE,CAAD,KAIpD;AACjB,QAAMC,WAAW,GAAGC,KAAK,CAACC,MAAN,CAAa,IAAb,CAApB;AACA,yCAAqBF,WAArB,EAAkCF,UAAlC;AAEA,SACE,oBAAC,gCAAD;AAAY,IAAA,EAAE,EAAED,OAAhB;AAAyB,IAAA,OAAO,EAAE;AAAlC,KACGM,KAAK,IACJ,oBAAC,+BAAD;AACE,IAAA,KAAK,EAAE,EAAE,GAAGC,yBAAL;AAAoB,SAAGC,uBAAW,QAAX,EAAqBF,KAArB;AAAvB,KADT;AAEE,IAAA,GAAG,EAAEH;AAFP,KAIGD,QAJH,CAFJ,CADF;AAYD,CApBD;;AAsBO,MAAMO,QAAQ,GAAGV,SAAjB","sourcesContent":["import * as React from 'react';\nimport { StyledContainerDropdown } from './styled';\nimport { Transition } from 'react-transition-group';\nimport { defaultStyles, transition } from '../../molecules/Select/animations';\nimport { Dispatch, SetStateAction } from 'react';\nimport { useClickAwayListener } from '@tecsinapse/react-web-kit';\n\nexport interface DropdownProps {\n visible: boolean;\n setVisible: Dispatch<SetStateAction<boolean>>;\n}\n\nconst Component: React.FC<DropdownProps & { children: JSX.Element }> = ({\n visible,\n setVisible,\n children,\n}): JSX.Element => {\n const refDropDown = React.useRef(null);\n useClickAwayListener(refDropDown, setVisible);\n\n return (\n <Transition in={visible} timeout={300}>\n {state => (\n <StyledContainerDropdown\n style={{ ...defaultStyles, ...transition['bottom'][state] }}\n ref={refDropDown}\n >\n {children}\n </StyledContainerDropdown>\n )}\n </Transition>\n );\n};\n\nexport const Dropdown = Component;\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":["Component","visible","setVisible","children","refDropDown","React","useRef","useClickAwayListener","state","defaultStyles","transition","Dropdown"],"sources":["../../../../src/components/atoms/Dropdown/index.tsx"],"sourcesContent":["import * as React from 'react';\nimport { StyledContainerDropdown } from './styled';\nimport { Transition } from 'react-transition-group';\nimport { defaultStyles, transition } from '../../molecules/Select/animations';\nimport { Dispatch, SetStateAction } from 'react';\nimport { useClickAwayListener } from '@tecsinapse/react-web-kit';\n\nexport interface DropdownProps {\n visible: boolean;\n setVisible: Dispatch<SetStateAction<boolean>>;\n}\n\nconst Component: React.FC<DropdownProps & { children: JSX.Element }> = ({\n visible,\n setVisible,\n children,\n}): JSX.Element => {\n const refDropDown = React.useRef(null);\n useClickAwayListener(refDropDown, setVisible);\n\n return (\n <Transition in={visible} timeout={300}>\n {state => (\n <StyledContainerDropdown\n style={{ ...defaultStyles, ...transition['bottom'][state] }}\n ref={refDropDown}\n >\n {children}\n </StyledContainerDropdown>\n )}\n </Transition>\n );\n};\n\nexport const Dropdown = Component;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;;;;;AAOA,MAAMA,SAA8D,GAAG,CAAC;EACtEC,OADsE;EAEtEC,UAFsE;EAGtEC;AAHsE,CAAD,KAIpD;EACjB,MAAMC,WAAW,GAAGC,KAAK,CAACC,MAAN,CAAa,IAAb,CAApB;EACA,IAAAC,iCAAA,EAAqBH,WAArB,EAAkCF,UAAlC;EAEA,OACE,oBAAC,gCAAD;IAAY,EAAE,EAAED,OAAhB;IAAyB,OAAO,EAAE;EAAlC,GACGO,KAAK,IACJ,oBAAC,+BAAD;IACE,KAAK,EAAE,EAAE,GAAGC,yBAAL;MAAoB,GAAGC,sBAAA,CAAW,QAAX,EAAqBF,KAArB;IAAvB,CADT;IAEE,GAAG,EAAEJ;EAFP,GAIGD,QAJH,CAFJ,CADF;AAYD,CApBD;;AAsBO,MAAMQ,QAAQ,GAAGX,SAAjB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Dropdown/styled.ts"],"names":["StyledContainerDropdown","theme","miscellaneous","surfaceColor","borderRadius","mili","shadow","spacing","zIndex","select"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEO,MAAMA,uBAAuB,GAAG,qBAAO,KAAP,CAAmC;AAC1E;AACA,sBAAsB,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAClBA,KAAK,CAACC,aAAN,CAAoBC,YAAa;AACrC,mBAAmB,CAAC;AAAEF,EAAAA;AAAF,CAAD,KAA2BA,KAAK,CAACG,YAAN,CAAmBC,IAAK;AACtE;AACA,MAAM,CAAC;AAAEJ,EAAAA;AAAF,CAAD,KAA2B,yBAASA,KAAK,CAACC,aAAN,CAAoBI,MAA7B,EAAqC,IAArC,CAA2C;AAC5E;AACA,oBAAoB,CAAC;AAAEL,EAAAA;AAAF,CAAD,KAA2BA,KAAK,CAACM,OAAN,CAAcF,IAAK;AAClE;AACA,aAAa,CAAC;AAAEJ,EAAAA;AAAF,CAAD,KAA2BA,KAAK,CAACO,MAAN,CAAaC,MAAO;AAC5D,CAXO","sourcesContent":["import styled from '@emotion/styled';\nimport { hex2rgba, StyleProps } from '@tecsinapse/react-core';\n\nexport const StyledContainerDropdown = styled('div')<Partial<StyleProps>>`\n width: auto;\n background-color: ${({ theme }: StyleProps) =>\n theme.miscellaneous.surfaceColor};\n border-radius: ${({ theme }: StyleProps) => theme.borderRadius.mili};\n box-shadow: 0 2px 8px\n ${({ theme }: StyleProps) => hex2rgba(theme.miscellaneous.shadow, 0.05)};\n position: absolute;\n padding-bottom: ${({ theme }: StyleProps) => theme.spacing.mili};\n margin-top: 8px;\n z-index: ${({ theme }: StyleProps) => theme.zIndex.select};\n`;\n"],"file":"styled.js"}
1
+ {"version":3,"file":"styled.js","names":["StyledContainerDropdown","styled","theme","miscellaneous","surfaceColor","borderRadius","mili","hex2rgba","shadow","spacing","zIndex","select"],"sources":["../../../../src/components/atoms/Dropdown/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { hex2rgba, StyleProps } from '@tecsinapse/react-core';\n\nexport const StyledContainerDropdown = styled('div')<Partial<StyleProps>>`\n width: auto;\n background-color: ${({ theme }: StyleProps) =>\n theme.miscellaneous.surfaceColor};\n border-radius: ${({ theme }: StyleProps) => theme.borderRadius.mili};\n box-shadow: 0 2px 8px\n ${({ theme }: StyleProps) => hex2rgba(theme.miscellaneous.shadow, 0.05)};\n position: absolute;\n padding-bottom: ${({ theme }: StyleProps) => theme.spacing.mili};\n margin-top: 8px;\n z-index: ${({ theme }: StyleProps) => theme.zIndex.select};\n`;\n"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEO,MAAMA,uBAAuB,GAAG,IAAAC,eAAA,EAAO,KAAP,CAAmC;AAC1E;AACA,sBAAsB,CAAC;EAAEC;AAAF,CAAD,KAClBA,KAAK,CAACC,aAAN,CAAoBC,YAAa;AACrC,mBAAmB,CAAC;EAAEF;AAAF,CAAD,KAA2BA,KAAK,CAACG,YAAN,CAAmBC,IAAK;AACtE;AACA,MAAM,CAAC;EAAEJ;AAAF,CAAD,KAA2B,IAAAK,mBAAA,EAASL,KAAK,CAACC,aAAN,CAAoBK,MAA7B,EAAqC,IAArC,CAA2C;AAC5E;AACA,oBAAoB,CAAC;EAAEN;AAAF,CAAD,KAA2BA,KAAK,CAACO,OAAN,CAAcH,IAAK;AAClE;AACA,aAAa,CAAC;EAAEJ;AAAF,CAAD,KAA2BA,KAAK,CAACQ,MAAN,CAAaC,MAAO;AAC5D,CAXO"}
@@ -1,6 +1,7 @@
1
1
  import { InputContainerProps, InputElementProps } from '@tecsinapse/react-core';
2
- import { FC } from 'react';
3
- export interface InputWebProps extends Omit<InputElementProps, 'style'>, InputContainerProps {
4
- }
2
+ import React, { FC } from 'react';
3
+ export declare type InputWebProps = Omit<InputElementProps, 'style'> & InputContainerProps & {
4
+ ref?: React.Ref<HTMLInputElement | undefined>;
5
+ };
5
6
  declare const Input: FC<InputWebProps>;
6
7
  export default Input;
@@ -15,7 +15,7 @@ var _styled = require("./styled");
15
15
 
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
17
 
18
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
18
+ 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); }
19
19
 
20
20
  const Input = _react.default.forwardRef(({
21
21
  label,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Input/Input.tsx"],"names":["Input","React","forwardRef","label","labelColor","labelColorVariant","labelColorTone","labelTypography","labelStack","labelWeight","leftComponent","rightComponent","disabled","style","borderColor","borderColorGradation","inputContainerStyle","variant","hintComponent","hint","onFocus","onBlur","placeholder","value","rest","ref","_hint","focused","handleBlur","handleFocus","onlyLabel","undefined","displayName"],"mappings":";;;;;;;AAAA;;AAOA;;AACA;;AACA;;;;;;AAMA,MAAMA,KAAwB,GAAGC,eAAMC,UAAN,CAC/B,CACE;AACEC,EAAAA,KADF;AAEEC,EAAAA,UAFF;AAGEC,EAAAA,iBAHF;AAIEC,EAAAA,cAJF;AAKEC,EAAAA,eALF;AAMEC,EAAAA,UANF;AAOEC,EAAAA,WAPF;AAQEC,EAAAA,aARF;AASEC,EAAAA,cATF;AAUEC,EAAAA,QAVF;AAWEC,EAAAA,KAXF;AAYEC,EAAAA,WAZF;AAaEC,EAAAA,oBAbF;AAcEC,EAAAA,mBAdF;AAeEC,EAAAA,OAAO,GAAG,SAfZ;AAgBEC,EAAAA,aAhBF;AAiBEC,EAAAA,IAjBF;AAkBEC,EAAAA,OAlBF;AAmBEC,EAAAA,MAnBF;AAoBEC,EAAAA,WApBF;AAqBEC,EAAAA,KArBF;AAsBE,KAAGC;AAtBL,CADF,EAyBEC,GAzBF,KA0BK;AACH,QAAMC,KAAK,GAAGR,aAAa,IAAI,6BAAC,eAAD;AAAM,IAAA,IAAI,EAAEC,IAAZ;AAAkB,IAAA,OAAO,EAAEF;AAA3B,IAA/B;;AACA,QAAM;AAAEU,IAAAA,OAAF;AAAWC,IAAAA,UAAX;AAAuBC,IAAAA;AAAvB,MAAuC,8BAC3CT,OAD2C,EAE3CC,MAF2C,EAG3C,CAACT,QAH0C,CAA7C;AAMA,QAAMkB,SAAS,GAAG3B,KAAK,IAAI,CAACmB,WAA5B;AAEA,SACE,6BAAC,oBAAD;AAAM,IAAA,KAAK,EAAET;AAAb,KACE,6BAAC,yBAAD;AACE,IAAA,KAAK,EAAEU,KAAK,GAAGpB,KAAH,GAAW4B,SADzB;AAEE,IAAA,UAAU,EAAE3B,UAFd;AAGE,IAAA,iBAAiB,EAAEC,iBAHrB;AAIE,IAAA,cAAc,EAAEC,cAJlB;AAKE,IAAA,eAAe,EAAEC,eALnB;AAME,IAAA,UAAU,EAAEC,UANd;AAOE,IAAA,WAAW,EAAEC,WAPf;AAQE,IAAA,aAAa,EAAEC,aARjB;AASE,IAAA,cAAc,EAAEC,cATlB;AAUE,IAAA,WAAW,EAAEG,WAVf;AAWE,IAAA,oBAAoB,EAAEC,oBAXxB;AAYE,IAAA,mBAAmB,EAAEC,mBAZvB;AAaE,IAAA,OAAO,EAAEW,OAbX;AAcE,IAAA,QAAQ,EAAEf,QAdZ;AAeE,IAAA,OAAO,EAAEK;AAfX,KAiBE,6BAAC,0BAAD,eACMO,IADN;AAEE,IAAA,WAAW,EAAEM,SAAS,GAAG3B,KAAH,GAAWmB,WAFnC;AAGE,IAAA,KAAK,EAAEC,KAHT;AAIE,IAAA,GAAG,EAAEE,GAJP;AAKE,IAAA,QAAQ,EAAEb,QALZ;AAME,IAAA,OAAO,EAAEiB,WANX;AAOE,IAAA,MAAM,EAAED;AAPV,KAjBF,CADF,EA4BGT,IAAI,IAAIO,KA5BX,CADF;AAgCD,CArE8B,CAAjC;;AAwEA1B,KAAK,CAACgC,WAAN,GAAoB,OAApB;eAEehC,K","sourcesContent":["import {\n Hint,\n InputContainer,\n InputContainerProps,\n InputElementProps,\n useInputFocus,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { View } from 'react-native';\nimport { StyledWebTextInput } from './styled';\n\nexport interface InputWebProps\n extends Omit<InputElementProps, 'style'>,\n InputContainerProps {}\n\nconst Input: FC<InputWebProps> = React.forwardRef(\n (\n {\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 inputContainerStyle,\n variant = 'default',\n hintComponent,\n hint,\n onFocus,\n onBlur,\n placeholder,\n value,\n ...rest\n },\n ref\n ) => {\n const _hint = hintComponent || <Hint text={hint} variant={variant} />;\n const { focused, handleBlur, handleFocus } = useInputFocus(\n onFocus,\n onBlur,\n !disabled\n );\n\n const onlyLabel = label && !placeholder;\n\n return (\n <View style={style}>\n <InputContainer\n label={value ? label : undefined}\n labelColor={labelColor}\n labelColorVariant={labelColorVariant}\n labelColorTone={labelColorTone}\n labelTypography={labelTypography}\n labelStack={labelStack}\n labelWeight={labelWeight}\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 >\n <StyledWebTextInput\n {...rest}\n placeholder={onlyLabel ? label : placeholder}\n value={value}\n ref={ref}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </InputContainer>\n {hint && _hint}\n </View>\n );\n }\n);\n\nInput.displayName = 'Input';\n\nexport default Input;\n"],"file":"Input.js"}
1
+ {"version":3,"file":"Input.js","names":["Input","React","forwardRef","label","labelColor","labelColorVariant","labelColorTone","labelTypography","labelStack","labelWeight","leftComponent","rightComponent","disabled","style","borderColor","borderColorGradation","inputContainerStyle","variant","hintComponent","hint","onFocus","onBlur","placeholder","value","rest","ref","_hint","focused","handleBlur","handleFocus","useInputFocus","onlyLabel","undefined","displayName"],"sources":["../../../../src/components/atoms/Input/Input.tsx"],"sourcesContent":["import {\n Hint,\n InputContainer,\n InputContainerProps,\n InputElementProps,\n useInputFocus,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { TextInput, View } from 'react-native';\nimport { StyledWebTextInput } from './styled';\n\nexport type InputWebProps = Omit<InputElementProps, 'style'> &\n InputContainerProps & { ref?: React.Ref<HTMLInputElement | undefined> };\n\nconst Input: FC<InputWebProps> = React.forwardRef(\n (\n {\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 inputContainerStyle,\n variant = 'default',\n hintComponent,\n hint,\n onFocus,\n onBlur,\n placeholder,\n value,\n ...rest\n },\n ref\n ) => {\n const _hint = hintComponent || <Hint text={hint} variant={variant} />;\n const { focused, handleBlur, handleFocus } = useInputFocus(\n onFocus,\n onBlur,\n !disabled\n );\n\n const onlyLabel = label && !placeholder;\n\n return (\n <View style={style}>\n <InputContainer\n label={value ? label : undefined}\n labelColor={labelColor}\n labelColorVariant={labelColorVariant}\n labelColorTone={labelColorTone}\n labelTypography={labelTypography}\n labelStack={labelStack}\n labelWeight={labelWeight}\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 >\n <StyledWebTextInput\n {...rest}\n placeholder={onlyLabel ? label : placeholder}\n value={value}\n ref={ref as React.Ref<TextInput>}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </InputContainer>\n {hint && _hint}\n </View>\n );\n }\n);\n\nInput.displayName = 'Input';\n\nexport default Input;\n"],"mappings":";;;;;;;AAAA;;AAOA;;AACA;;AACA;;;;;;AAKA,MAAMA,KAAwB,GAAGC,cAAA,CAAMC,UAAN,CAC/B,CACE;EACEC,KADF;EAEEC,UAFF;EAGEC,iBAHF;EAIEC,cAJF;EAKEC,eALF;EAMEC,UANF;EAOEC,WAPF;EAQEC,aARF;EASEC,cATF;EAUEC,QAVF;EAWEC,KAXF;EAYEC,WAZF;EAaEC,oBAbF;EAcEC,mBAdF;EAeEC,OAAO,GAAG,SAfZ;EAgBEC,aAhBF;EAiBEC,IAjBF;EAkBEC,OAlBF;EAmBEC,MAnBF;EAoBEC,WApBF;EAqBEC,KArBF;EAsBE,GAAGC;AAtBL,CADF,EAyBEC,GAzBF,KA0BK;EACH,MAAMC,KAAK,GAAGR,aAAa,IAAI,6BAAC,eAAD;IAAM,IAAI,EAAEC,IAAZ;IAAkB,OAAO,EAAEF;EAA3B,EAA/B;;EACA,MAAM;IAAEU,OAAF;IAAWC,UAAX;IAAuBC;EAAvB,IAAuC,IAAAC,wBAAA,EAC3CV,OAD2C,EAE3CC,MAF2C,EAG3C,CAACT,QAH0C,CAA7C;EAMA,MAAMmB,SAAS,GAAG5B,KAAK,IAAI,CAACmB,WAA5B;EAEA,OACE,6BAAC,oBAAD;IAAM,KAAK,EAAET;EAAb,GACE,6BAAC,yBAAD;IACE,KAAK,EAAEU,KAAK,GAAGpB,KAAH,GAAW6B,SADzB;IAEE,UAAU,EAAE5B,UAFd;IAGE,iBAAiB,EAAEC,iBAHrB;IAIE,cAAc,EAAEC,cAJlB;IAKE,eAAe,EAAEC,eALnB;IAME,UAAU,EAAEC,UANd;IAOE,WAAW,EAAEC,WAPf;IAQE,aAAa,EAAEC,aARjB;IASE,cAAc,EAAEC,cATlB;IAUE,WAAW,EAAEG,WAVf;IAWE,oBAAoB,EAAEC,oBAXxB;IAYE,mBAAmB,EAAEC,mBAZvB;IAaE,OAAO,EAAEW,OAbX;IAcE,QAAQ,EAAEf,QAdZ;IAeE,OAAO,EAAEK;EAfX,GAiBE,6BAAC,0BAAD,eACMO,IADN;IAEE,WAAW,EAAEO,SAAS,GAAG5B,KAAH,GAAWmB,WAFnC;IAGE,KAAK,EAAEC,KAHT;IAIE,GAAG,EAAEE,GAJP;IAKE,QAAQ,EAAEb,QALZ;IAME,OAAO,EAAEiB,WANX;IAOE,MAAM,EAAED;EAPV,GAjBF,CADF,EA4BGT,IAAI,IAAIO,KA5BX,CADF;AAgCD,CArE8B,CAAjC;;AAwEA1B,KAAK,CAACiC,WAAN,GAAoB,OAApB;eAEejC,K"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Input/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA","sourcesContent":["export { default as Input, InputWebProps } from './Input';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/Input/index.ts"],"sourcesContent":["export { default as Input, InputWebProps } from './Input';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Input/styled.ts"],"names":["StyledWebTextInput","InputElement"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEO,MAAMA,kBAAkB,GAAG,qBAAOC,uBAAP,CAA0C;AAC5E;AACA;AACA;AACA,CAJO","sourcesContent":["import styled from '@emotion/native';\nimport { InputElement, StyleProps } from '@tecsinapse/react-core';\n\nexport const StyledWebTextInput = styled(InputElement)<Partial<StyleProps>>`\n &:focus-visible {\n outline-width: 0;\n }\n`;\n"],"file":"styled.js"}
1
+ {"version":3,"file":"styled.js","names":["StyledWebTextInput","styled","InputElement"],"sources":["../../../../src/components/atoms/Input/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { InputElement, StyleProps } from '@tecsinapse/react-core';\n\nexport const StyledWebTextInput = styled(InputElement)<Partial<StyleProps>>`\n &:focus-visible {\n outline-width: 0;\n }\n`;\n"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEO,MAAMA,kBAAkB,GAAG,IAAAC,eAAA,EAAOC,uBAAP,CAA0C;AAC5E;AACA;AACA;AACA,CAJO"}
@@ -1,6 +1,7 @@
1
1
  import { InputContainerProps, InputMaskElementProps } from '@tecsinapse/react-core';
2
- import { FC } from 'react';
3
- export interface InputMaskWebProps extends Omit<InputMaskElementProps, 'style'>, InputContainerProps {
4
- }
2
+ import React, { FC } from 'react';
3
+ export declare type InputMaskWebProps = Omit<InputMaskElementProps, 'style'> & InputContainerProps & {
4
+ ref?: React.Ref<HTMLInputElement | undefined>;
5
+ };
5
6
  declare const InputMask: FC<InputMaskWebProps>;
6
7
  export default InputMask;
@@ -15,7 +15,7 @@ var _styled = require("./styled");
15
15
 
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
17
 
18
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
18
+ 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); }
19
19
 
20
20
  const InputMask = _react.default.forwardRef(({
21
21
  label,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/InputMask/InputMask.tsx"],"names":["InputMask","React","forwardRef","label","labelColor","labelColorVariant","labelColorTone","labelTypography","labelStack","labelWeight","leftComponent","rightComponent","disabled","style","borderColor","borderColorGradation","inputContainerStyle","variant","hintComponent","hint","onFocus","onBlur","value","placeholder","rest","ref","_hint","focused","handleBlur","handleFocus","onlyLabel","String","undefined","displayName"],"mappings":";;;;;;;AAAA;;AAOA;;AACA;;AACA;;;;;;AAMA,MAAMA,SAAgC,GAAGC,eAAMC,UAAN,CACvC,CACE;AACEC,EAAAA,KADF;AAEEC,EAAAA,UAFF;AAGEC,EAAAA,iBAHF;AAIEC,EAAAA,cAJF;AAKEC,EAAAA,eALF;AAMEC,EAAAA,UANF;AAOEC,EAAAA,WAPF;AAQEC,EAAAA,aARF;AASEC,EAAAA,cATF;AAUEC,EAAAA,QAVF;AAWEC,EAAAA,KAXF;AAYEC,EAAAA,WAZF;AAaEC,EAAAA,oBAbF;AAcEC,EAAAA,mBAdF;AAeEC,EAAAA,OAAO,GAAG,SAfZ;AAgBEC,EAAAA,aAhBF;AAiBEC,EAAAA,IAjBF;AAkBEC,EAAAA,OAlBF;AAmBEC,EAAAA,MAnBF;AAoBEC,EAAAA,KApBF;AAqBEC,EAAAA,WArBF;AAsBE,KAAGC;AAtBL,CADF,EAyBEC,GAzBF,KA0BK;AACH,QAAMC,KAAK,GAAGR,aAAa,IAAI,6BAAC,eAAD;AAAM,IAAA,IAAI,EAAEC,IAAZ;AAAkB,IAAA,OAAO,EAAEF;AAA3B,IAA/B;;AACA,QAAM;AAAEU,IAAAA,OAAF;AAAWC,IAAAA,UAAX;AAAuBC,IAAAA;AAAvB,MAAuC,8BAC3CT,OAD2C,EAE3CC,MAF2C,EAG3C,CAACT,QAH0C,CAA7C;AAMA,QAAMkB,SAAS,GAAG3B,KAAK,IAAI,CAACoB,WAA5B;AAEA,SACE,6BAAC,oBAAD;AAAM,IAAA,KAAK,EAAEV;AAAb,KACE,6BAAC,yBAAD;AACE,IAAA,KAAK,EAAEkB,MAAM,CAACT,KAAD,CAAN,GAAgBnB,KAAhB,GAAwB6B,SADjC;AAEE,IAAA,UAAU,EAAE5B,UAFd;AAGE,IAAA,iBAAiB,EAAEC,iBAHrB;AAIE,IAAA,cAAc,EAAEC,cAJlB;AAKE,IAAA,eAAe,EAAEC,eALnB;AAME,IAAA,UAAU,EAAEC,UANd;AAOE,IAAA,WAAW,EAAEC,WAPf;AAQE,IAAA,aAAa,EAAEC,aARjB;AASE,IAAA,cAAc,EAAEC,cATlB;AAUE,IAAA,WAAW,EAAEG,WAVf;AAWE,IAAA,oBAAoB,EAAEC,oBAXxB;AAYE,IAAA,mBAAmB,EAAEC,mBAZvB;AAaE,IAAA,OAAO,EAAEW,OAbX;AAcE,IAAA,QAAQ,EAAEf,QAdZ;AAeE,IAAA,OAAO,EAAEK;AAfX,KAiBE,6BAAC,8BAAD,eACMO,IADN;AAEE,IAAA,WAAW,EAAEM,SAAS,GAAG3B,KAAH,GAAWoB,WAFnC;AAGE,IAAA,KAAK,EAAED,KAHT;AAIE,IAAA,GAAG,EAAEG,GAJP;AAKE,IAAA,QAAQ,EAAEb,QALZ;AAME,IAAA,OAAO,EAAEiB,WANX;AAOE,IAAA,MAAM,EAAED;AAPV,KAjBF,CADF,EA4BGT,IAAI,IAAIO,KA5BX,CADF;AAgCD,CArEsC,CAAzC;;AAwEA1B,SAAS,CAACiC,WAAV,GAAwB,WAAxB;eAEejC,S","sourcesContent":["import {\n Hint,\n InputContainer,\n InputContainerProps,\n InputMaskElementProps,\n useInputFocus,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { View } from 'react-native';\nimport { StyledWebTextInputMask } from './styled';\n\nexport interface InputMaskWebProps\n extends Omit<InputMaskElementProps, 'style'>,\n InputContainerProps {}\n\nconst InputMask: FC<InputMaskWebProps> = React.forwardRef(\n (\n {\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 inputContainerStyle,\n variant = 'default',\n hintComponent,\n hint,\n onFocus,\n onBlur,\n value,\n placeholder,\n ...rest\n },\n ref\n ) => {\n const _hint = hintComponent || <Hint text={hint} variant={variant} />;\n const { focused, handleBlur, handleFocus } = useInputFocus(\n onFocus,\n onBlur,\n !disabled\n );\n\n const onlyLabel = label && !placeholder;\n\n return (\n <View style={style}>\n <InputContainer\n label={String(value) ? label : undefined}\n labelColor={labelColor}\n labelColorVariant={labelColorVariant}\n labelColorTone={labelColorTone}\n labelTypography={labelTypography}\n labelStack={labelStack}\n labelWeight={labelWeight}\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 >\n <StyledWebTextInputMask\n {...rest}\n placeholder={onlyLabel ? label : placeholder}\n value={value}\n ref={ref}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </InputContainer>\n {hint && _hint}\n </View>\n );\n }\n);\n\nInputMask.displayName = 'InputMask';\n\nexport default InputMask;\n"],"file":"InputMask.js"}
1
+ {"version":3,"file":"InputMask.js","names":["InputMask","React","forwardRef","label","labelColor","labelColorVariant","labelColorTone","labelTypography","labelStack","labelWeight","leftComponent","rightComponent","disabled","style","borderColor","borderColorGradation","inputContainerStyle","variant","hintComponent","hint","onFocus","onBlur","value","placeholder","rest","ref","_hint","focused","handleBlur","handleFocus","useInputFocus","onlyLabel","String","undefined","displayName"],"sources":["../../../../src/components/atoms/InputMask/InputMask.tsx"],"sourcesContent":["import {\n Hint,\n InputContainer,\n InputContainerProps,\n InputMaskElementProps,\n useInputFocus,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { TextInput, View } from 'react-native';\nimport { StyledWebTextInputMask } from './styled';\n\nexport type InputMaskWebProps = Omit<InputMaskElementProps, 'style'> &\n InputContainerProps & { ref?: React.Ref<HTMLInputElement | undefined> };\n\nconst InputMask: FC<InputMaskWebProps> = React.forwardRef(\n (\n {\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 inputContainerStyle,\n variant = 'default',\n hintComponent,\n hint,\n onFocus,\n onBlur,\n value,\n placeholder,\n ...rest\n },\n ref\n ) => {\n const _hint = hintComponent || <Hint text={hint} variant={variant} />;\n const { focused, handleBlur, handleFocus } = useInputFocus(\n onFocus,\n onBlur,\n !disabled\n );\n\n const onlyLabel = label && !placeholder;\n\n return (\n <View style={style}>\n <InputContainer\n label={String(value) ? label : undefined}\n labelColor={labelColor}\n labelColorVariant={labelColorVariant}\n labelColorTone={labelColorTone}\n labelTypography={labelTypography}\n labelStack={labelStack}\n labelWeight={labelWeight}\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 >\n <StyledWebTextInputMask\n {...rest}\n placeholder={onlyLabel ? label : placeholder}\n value={value}\n ref={ref as React.Ref<TextInput>}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </InputContainer>\n {hint && _hint}\n </View>\n );\n }\n);\n\nInputMask.displayName = 'InputMask';\n\nexport default InputMask;\n"],"mappings":";;;;;;;AAAA;;AAOA;;AACA;;AACA;;;;;;AAKA,MAAMA,SAAgC,GAAGC,cAAA,CAAMC,UAAN,CACvC,CACE;EACEC,KADF;EAEEC,UAFF;EAGEC,iBAHF;EAIEC,cAJF;EAKEC,eALF;EAMEC,UANF;EAOEC,WAPF;EAQEC,aARF;EASEC,cATF;EAUEC,QAVF;EAWEC,KAXF;EAYEC,WAZF;EAaEC,oBAbF;EAcEC,mBAdF;EAeEC,OAAO,GAAG,SAfZ;EAgBEC,aAhBF;EAiBEC,IAjBF;EAkBEC,OAlBF;EAmBEC,MAnBF;EAoBEC,KApBF;EAqBEC,WArBF;EAsBE,GAAGC;AAtBL,CADF,EAyBEC,GAzBF,KA0BK;EACH,MAAMC,KAAK,GAAGR,aAAa,IAAI,6BAAC,eAAD;IAAM,IAAI,EAAEC,IAAZ;IAAkB,OAAO,EAAEF;EAA3B,EAA/B;;EACA,MAAM;IAAEU,OAAF;IAAWC,UAAX;IAAuBC;EAAvB,IAAuC,IAAAC,wBAAA,EAC3CV,OAD2C,EAE3CC,MAF2C,EAG3C,CAACT,QAH0C,CAA7C;EAMA,MAAMmB,SAAS,GAAG5B,KAAK,IAAI,CAACoB,WAA5B;EAEA,OACE,6BAAC,oBAAD;IAAM,KAAK,EAAEV;EAAb,GACE,6BAAC,yBAAD;IACE,KAAK,EAAEmB,MAAM,CAACV,KAAD,CAAN,GAAgBnB,KAAhB,GAAwB8B,SADjC;IAEE,UAAU,EAAE7B,UAFd;IAGE,iBAAiB,EAAEC,iBAHrB;IAIE,cAAc,EAAEC,cAJlB;IAKE,eAAe,EAAEC,eALnB;IAME,UAAU,EAAEC,UANd;IAOE,WAAW,EAAEC,WAPf;IAQE,aAAa,EAAEC,aARjB;IASE,cAAc,EAAEC,cATlB;IAUE,WAAW,EAAEG,WAVf;IAWE,oBAAoB,EAAEC,oBAXxB;IAYE,mBAAmB,EAAEC,mBAZvB;IAaE,OAAO,EAAEW,OAbX;IAcE,QAAQ,EAAEf,QAdZ;IAeE,OAAO,EAAEK;EAfX,GAiBE,6BAAC,8BAAD,eACMO,IADN;IAEE,WAAW,EAAEO,SAAS,GAAG5B,KAAH,GAAWoB,WAFnC;IAGE,KAAK,EAAED,KAHT;IAIE,GAAG,EAAEG,GAJP;IAKE,QAAQ,EAAEb,QALZ;IAME,OAAO,EAAEiB,WANX;IAOE,MAAM,EAAED;EAPV,GAjBF,CADF,EA4BGT,IAAI,IAAIO,KA5BX,CADF;AAgCD,CArEsC,CAAzC;;AAwEA1B,SAAS,CAACkC,WAAV,GAAwB,WAAxB;eAEelC,S"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/InputMask/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA","sourcesContent":["export { default as InputMask, InputMaskWebProps } from './InputMask';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/InputMask/index.ts"],"sourcesContent":["export { default as InputMask, InputMaskWebProps } from './InputMask';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/InputMask/styled.ts"],"names":["StyledWebTextInputMask","InputMaskElement"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEO,MAAMA,sBAAsB,GAAG,qBAAOC,2BAAP,CAEpC;AACF;AACA;AACA;AACA,CANO","sourcesContent":["import styled from '@emotion/native';\nimport { InputMaskElement, StyleProps } from '@tecsinapse/react-core';\n\nexport const StyledWebTextInputMask = styled(InputMaskElement)<\n Partial<StyleProps>\n>`\n &:focus-visible {\n outline-width: 0;\n }\n`;\n"],"file":"styled.js"}
1
+ {"version":3,"file":"styled.js","names":["StyledWebTextInputMask","styled","InputMaskElement"],"sources":["../../../../src/components/atoms/InputMask/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { InputMaskElement, StyleProps } from '@tecsinapse/react-core';\n\nexport const StyledWebTextInputMask = styled(InputMaskElement)<\n Partial<StyleProps>\n>`\n &:focus-visible {\n outline-width: 0;\n }\n`;\n"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEO,MAAMA,sBAAsB,GAAG,IAAAC,eAAA,EAAOC,2BAAP,CAEpC;AACF;AACA;AACA;AACA,CANO"}
@@ -17,7 +17,7 @@ var _animations = require("./animations");
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
19
 
20
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
20
+ 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); }
21
21
 
22
22
  const Modal = ({
23
23
  children,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Modal/Modal.tsx"],"names":["Modal","children","open","onClose","style","rest","state","defaultStyleOverlay","transitionStylesOverlay"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAOA,MAAMA,KAA2B,GAAG,CAAC;AACnCC,EAAAA,QADmC;AAEnCC,EAAAA,IAFmC;AAGnCC,EAAAA,OAHmC;AAInCC,EAAAA,KAJmC;AAKnC,KAAGC;AALgC,CAAD,KAM9B;AACJ,SACE,4DACE,6BAAC,gBAAD;AAAS,IAAA,IAAI,EAAEH,IAAf;AAAqB,IAAA,OAAO,EAAEC,OAA9B;AAAuC,IAAA,MAAM,EAAC;AAA9C,IADF,EAEE,6BAAC,gCAAD;AAAY,IAAA,EAAE,EAAED,IAAhB;AAAsB,IAAA,OAAO,EAAE;AAA/B,KACGI,KAAK,IACJ,6BAAC,sBAAD;AACE,IAAA,KAAK,EAAE,EACL,GAAGF,KADE;AAEL,SAAGG,+BAFE;AAGL,SAAGC,oCAAwBF,KAAxB;AAHE;AADT,KAMMD,IANN,GAQGJ,QARH,CAFJ,CAFF,CADF;AAmBD,CA1BD;;eA4BeD,K","sourcesContent":["import React from 'react';\nimport { Transition } from 'react-transition-group';\nimport { Overlay } from '../Overlay';\nimport { ModalContainer } from './styled';\nimport { defaultStyleOverlay, transitionStylesOverlay } from './animations';\n\nexport interface ModalProps extends React.HTMLAttributes<HTMLDivElement> {\n open: boolean;\n onClose: () => void;\n}\n\nconst Modal: React.FC<ModalProps> = ({\n children,\n open,\n onClose,\n style,\n ...rest\n}) => {\n return (\n <>\n <Overlay open={open} onClose={onClose} zIndex=\"modal\" />\n <Transition in={open} timeout={400}>\n {state => (\n <ModalContainer\n style={{\n ...style,\n ...defaultStyleOverlay,\n ...transitionStylesOverlay[state],\n }}\n {...rest}\n >\n {children}\n </ModalContainer>\n )}\n </Transition>\n </>\n );\n};\n\nexport default Modal;\n"],"file":"Modal.js"}
1
+ {"version":3,"file":"Modal.js","names":["Modal","children","open","onClose","style","rest","state","defaultStyleOverlay","transitionStylesOverlay"],"sources":["../../../../src/components/atoms/Modal/Modal.tsx"],"sourcesContent":["import React from 'react';\nimport { Transition } from 'react-transition-group';\nimport { Overlay } from '../Overlay';\nimport { ModalContainer } from './styled';\nimport { defaultStyleOverlay, transitionStylesOverlay } from './animations';\n\nexport interface ModalProps extends React.HTMLAttributes<HTMLDivElement> {\n open: boolean;\n onClose: () => void;\n}\n\nconst Modal: React.FC<ModalProps> = ({\n children,\n open,\n onClose,\n style,\n ...rest\n}) => {\n return (\n <>\n <Overlay open={open} onClose={onClose} zIndex=\"modal\" />\n <Transition in={open} timeout={400}>\n {state => (\n <ModalContainer\n style={{\n ...style,\n ...defaultStyleOverlay,\n ...transitionStylesOverlay[state],\n }}\n {...rest}\n >\n {children}\n </ModalContainer>\n )}\n </Transition>\n </>\n );\n};\n\nexport default Modal;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAOA,MAAMA,KAA2B,GAAG,CAAC;EACnCC,QADmC;EAEnCC,IAFmC;EAGnCC,OAHmC;EAInCC,KAJmC;EAKnC,GAAGC;AALgC,CAAD,KAM9B;EACJ,OACE,4DACE,6BAAC,gBAAD;IAAS,IAAI,EAAEH,IAAf;IAAqB,OAAO,EAAEC,OAA9B;IAAuC,MAAM,EAAC;EAA9C,EADF,EAEE,6BAAC,gCAAD;IAAY,EAAE,EAAED,IAAhB;IAAsB,OAAO,EAAE;EAA/B,GACGI,KAAK,IACJ,6BAAC,sBAAD;IACE,KAAK,EAAE,EACL,GAAGF,KADE;MAEL,GAAGG,+BAFE;MAGL,GAAGC,mCAAA,CAAwBF,KAAxB;IAHE;EADT,GAMMD,IANN,GAQGJ,QARH,CAFJ,CAFF,CADF;AAmBD,CA1BD;;eA4BeD,K"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Modal/animations.ts"],"names":["defaultStyleOverlay","transition","opacity","visibility","transitionStylesOverlay","entering","entered","exiting","exited"],"mappings":";;;;;;AAAO,MAAMA,mBAAmB,GAAG;AACjCC,EAAAA,UAAU,EAAG,yDADoB;AAEjCC,EAAAA,OAAO,EAAE,CAFwB;AAGjCC,EAAAA,UAAU,EAAE;AAHqB,CAA5B;;AAMA,MAAMC,uBAAuB,GAAG;AACrCC,EAAAA,QAAQ,EAAE;AAAEH,IAAAA,OAAO,EAAE,CAAX;AAAcC,IAAAA,UAAU,EAAE;AAA1B,GAD2B;AAErCG,EAAAA,OAAO,EAAE;AAAEJ,IAAAA,OAAO,EAAE,CAAX;AAAcC,IAAAA,UAAU,EAAE;AAA1B,GAF4B;AAGrCI,EAAAA,OAAO,EAAE;AAAEL,IAAAA,OAAO,EAAE,CAAX;AAAcC,IAAAA,UAAU,EAAE;AAA1B,GAH4B;AAIrCK,EAAAA,MAAM,EAAE;AAAEN,IAAAA,OAAO,EAAE,CAAX;AAAcC,IAAAA,UAAU,EAAE;AAA1B;AAJ6B,CAAhC","sourcesContent":["export const defaultStyleOverlay = {\n transition: `opacity 800ms ease-in-out, visibility 600ms ease-in-out`,\n opacity: 0,\n visibility: 'hidden',\n};\n\nexport const transitionStylesOverlay = {\n entering: { opacity: 1, visibility: 'visible' },\n entered: { opacity: 1, visibility: 'visible' },\n exiting: { opacity: 0, visibility: 'visible' },\n exited: { opacity: 0, visibility: 'hidden' },\n};\n"],"file":"animations.js"}
1
+ {"version":3,"file":"animations.js","names":["defaultStyleOverlay","transition","opacity","visibility","transitionStylesOverlay","entering","entered","exiting","exited"],"sources":["../../../../src/components/atoms/Modal/animations.ts"],"sourcesContent":["export const defaultStyleOverlay = {\n transition: `opacity 800ms ease-in-out, visibility 600ms ease-in-out`,\n opacity: 0,\n visibility: 'hidden',\n};\n\nexport const transitionStylesOverlay = {\n entering: { opacity: 1, visibility: 'visible' },\n entered: { opacity: 1, visibility: 'visible' },\n exiting: { opacity: 0, visibility: 'visible' },\n exited: { opacity: 0, visibility: 'hidden' },\n};\n"],"mappings":";;;;;;AAAO,MAAMA,mBAAmB,GAAG;EACjCC,UAAU,EAAG,yDADoB;EAEjCC,OAAO,EAAE,CAFwB;EAGjCC,UAAU,EAAE;AAHqB,CAA5B;;AAMA,MAAMC,uBAAuB,GAAG;EACrCC,QAAQ,EAAE;IAAEH,OAAO,EAAE,CAAX;IAAcC,UAAU,EAAE;EAA1B,CAD2B;EAErCG,OAAO,EAAE;IAAEJ,OAAO,EAAE,CAAX;IAAcC,UAAU,EAAE;EAA1B,CAF4B;EAGrCI,OAAO,EAAE;IAAEL,OAAO,EAAE,CAAX;IAAcC,UAAU,EAAE;EAA1B,CAH4B;EAIrCK,MAAM,EAAE;IAAEN,OAAO,EAAE,CAAX;IAAcC,UAAU,EAAE;EAA1B;AAJ6B,CAAhC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Modal/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA","sourcesContent":["export { default as Modal, ModalProps } from './Modal';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/Modal/index.ts"],"sourcesContent":["export { default as Modal, ModalProps } from './Modal';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Modal/styled.ts"],"names":["ModalContainer","theme","miscellaneous","surfaceColor","zIndex","modal","borderRadius","micro","spacing","kilo","shadow"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEO,MAAMA,cAAc,GAAG,qBAAO,KAAP,CAAmC;AACjE,sBAAsB,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACC,aAAN,CAAoBC,YAAa;AACtE;AACA;AACA,aAAa,CAAC;AAAEF,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACG,MAAN,CAAaC,KAAM;AAC/C;AACA;AACA;AACA,mBAAmB,CAAC;AAAEJ,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACK,YAAN,CAAmBC,KAAM;AAC3D,aAAa,CAAC;AAAEN,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACO,OAAN,CAAcC,IAAK;AAC/C;AACA;AACA,MAAM,CAAC;AAAER,EAAAA;AAAF,CAAD,KAAe,yBAASA,KAAK,CAACC,aAAN,CAAoBQ,MAA7B,EAAqC,IAArC,CAA2C;AAChE,CAbO","sourcesContent":["import styled from '@emotion/styled';\nimport { hex2rgba, StyleProps } from '@tecsinapse/react-core';\n\nexport const ModalContainer = styled('div')<Partial<StyleProps>>`\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n margin: auto;\n position: fixed;\n z-index: ${({ theme }) => theme.zIndex.modal};\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n border-radius: ${({ theme }) => theme.borderRadius.micro};\n padding: ${({ theme }) => theme.spacing.kilo};\n display: flex;\n box-shadow: 0 2px 8px\n ${({ theme }) => hex2rgba(theme.miscellaneous.shadow, 0.05)};\n`;\n"],"file":"styled.js"}
1
+ {"version":3,"file":"styled.js","names":["ModalContainer","styled","theme","miscellaneous","surfaceColor","zIndex","modal","borderRadius","micro","spacing","kilo","hex2rgba","shadow"],"sources":["../../../../src/components/atoms/Modal/styled.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { hex2rgba, StyleProps } from '@tecsinapse/react-core';\n\nexport const ModalContainer = styled('div')<Partial<StyleProps>>`\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n margin: auto;\n position: fixed;\n z-index: ${({ theme }) => theme.zIndex.modal};\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n border-radius: ${({ theme }) => theme.borderRadius.micro};\n padding: ${({ theme }) => theme.spacing.kilo};\n display: flex;\n box-shadow: 0 2px 8px\n ${({ theme }) => hex2rgba(theme.miscellaneous.shadow, 0.05)};\n`;\n"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEO,MAAMA,cAAc,GAAG,IAAAC,eAAA,EAAO,KAAP,CAAmC;AACjE,sBAAsB,CAAC;EAAEC;AAAF,CAAD,KAAeA,KAAK,CAACC,aAAN,CAAoBC,YAAa;AACtE;AACA;AACA,aAAa,CAAC;EAAEF;AAAF,CAAD,KAAeA,KAAK,CAACG,MAAN,CAAaC,KAAM;AAC/C;AACA;AACA;AACA,mBAAmB,CAAC;EAAEJ;AAAF,CAAD,KAAeA,KAAK,CAACK,YAAN,CAAmBC,KAAM;AAC3D,aAAa,CAAC;EAAEN;AAAF,CAAD,KAAeA,KAAK,CAACO,OAAN,CAAcC,IAAK;AAC/C;AACA;AACA,MAAM,CAAC;EAAER;AAAF,CAAD,KAAe,IAAAS,mBAAA,EAAST,KAAK,CAACC,aAAN,CAAoBS,MAA7B,EAAqC,IAArC,CAA2C;AAChE,CAbO"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Overlay/Overlay.tsx"],"names":["Overlay","timeout","open","onClose","zIndex","children","state","defaultStyleOverlay","transitionStylesOverlay","undefined"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;AASA,MAAMA,OAA+B,GAAG,CAAC;AACvCC,EAAAA,OAAO,GAAG,GAD6B;AAEvCC,EAAAA,IAFuC;AAGvCC,EAAAA,OAHuC;AAIvCC,EAAAA,MAAM,GAAG,SAJ8B;AAKvCC,EAAAA;AALuC,CAAD,KAMlC;AACJ,SACE,6BAAC,gCAAD;AAAY,IAAA,EAAE,EAAEH,IAAhB;AAAsB,IAAA,OAAO,EAAED;AAA/B,KACGK,KAAK,IACJ,6BAAC,qBAAD;AACE,IAAA,KAAK,EAAE,EACL,GAAGC,+BADE;AAEL,SAAGC,oCAAwBF,KAAxB;AAFE,KADT;AAKE,IAAA,OAAO,EAAEJ,IAAI,GAAGC,OAAH,GAAaM,SAL5B;AAME,IAAA,IAAI,EAAEP,IANR;AAOE,IAAA,MAAM,EAAEE;AAPV,KASGC,QATH,CAFJ,CADF;AAiBD,CAxBD;;eA0BeL,O","sourcesContent":["import React from 'react';\nimport { Transition } from 'react-transition-group';\nimport { ZIndex } from '@tecsinapse/react-core';\nimport { defaultStyleOverlay, transitionStylesOverlay } from './animations';\nimport { StyledOverlay } from './styled';\n\nexport interface OverlayProps {\n timeout?: number;\n open: boolean;\n onClose: () => void;\n zIndex: keyof ZIndex;\n}\n\nconst Overlay: React.FC<OverlayProps> = ({\n timeout = 300,\n open,\n onClose,\n zIndex = 'default',\n children,\n}) => {\n return (\n <Transition in={open} timeout={timeout}>\n {state => (\n <StyledOverlay\n style={{\n ...defaultStyleOverlay,\n ...transitionStylesOverlay[state],\n }}\n onClick={open ? onClose : undefined}\n show={open}\n zIndex={zIndex}\n >\n {children}\n </StyledOverlay>\n )}\n </Transition>\n );\n};\n\nexport default Overlay;\n"],"file":"Overlay.js"}
1
+ {"version":3,"file":"Overlay.js","names":["Overlay","timeout","open","onClose","zIndex","children","state","defaultStyleOverlay","transitionStylesOverlay","undefined"],"sources":["../../../../src/components/atoms/Overlay/Overlay.tsx"],"sourcesContent":["import React from 'react';\nimport { Transition } from 'react-transition-group';\nimport { ZIndex } from '@tecsinapse/react-core';\nimport { defaultStyleOverlay, transitionStylesOverlay } from './animations';\nimport { StyledOverlay } from './styled';\n\nexport interface OverlayProps {\n timeout?: number;\n open: boolean;\n onClose: () => void;\n zIndex: keyof ZIndex;\n}\n\nconst Overlay: React.FC<OverlayProps> = ({\n timeout = 300,\n open,\n onClose,\n zIndex = 'default',\n children,\n}) => {\n return (\n <Transition in={open} timeout={timeout}>\n {state => (\n <StyledOverlay\n style={{\n ...defaultStyleOverlay,\n ...transitionStylesOverlay[state],\n }}\n onClick={open ? onClose : undefined}\n show={open}\n zIndex={zIndex}\n >\n {children}\n </StyledOverlay>\n )}\n </Transition>\n );\n};\n\nexport default Overlay;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;AASA,MAAMA,OAA+B,GAAG,CAAC;EACvCC,OAAO,GAAG,GAD6B;EAEvCC,IAFuC;EAGvCC,OAHuC;EAIvCC,MAAM,GAAG,SAJ8B;EAKvCC;AALuC,CAAD,KAMlC;EACJ,OACE,6BAAC,gCAAD;IAAY,EAAE,EAAEH,IAAhB;IAAsB,OAAO,EAAED;EAA/B,GACGK,KAAK,IACJ,6BAAC,qBAAD;IACE,KAAK,EAAE,EACL,GAAGC,+BADE;MAEL,GAAGC,mCAAA,CAAwBF,KAAxB;IAFE,CADT;IAKE,OAAO,EAAEJ,IAAI,GAAGC,OAAH,GAAaM,SAL5B;IAME,IAAI,EAAEP,IANR;IAOE,MAAM,EAAEE;EAPV,GASGC,QATH,CAFJ,CADF;AAiBD,CAxBD;;eA0BeL,O"}