imbric-theme 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (397) hide show
  1. package/.babelrc.json +3 -0
  2. package/.commitlintrc.json +3 -0
  3. package/.dockerignore +14 -0
  4. package/.editorconfig +13 -0
  5. package/.eslintignore +1 -0
  6. package/.eslintrc.json +36 -0
  7. package/.huskyrc.json +6 -0
  8. package/.lintstagedrc.json +5 -0
  9. package/.nvmrc +1 -0
  10. package/.prettierignore +1 -0
  11. package/.prettierrc.json +4 -0
  12. package/.releaserc.json +13 -0
  13. package/.storybook/main.js +13 -0
  14. package/.storybook/preview-head.html +2 -0
  15. package/.storybook/preview.js +53 -0
  16. package/.stylelintrc.json +14 -0
  17. package/.vscode/launch.json +15 -0
  18. package/.vscode/settings.json +3 -0
  19. package/CHANGELOG.md +0 -0
  20. package/Dockerfile +17 -0
  21. package/README.md +69 -0
  22. package/atoms/AlertModal/AlertModal.js +69 -0
  23. package/atoms/AlertModal/AlertModal.module.css +3 -0
  24. package/atoms/AlertModal/AlertModal.stories.js +30 -0
  25. package/atoms/AlertModal/constants.js +4 -0
  26. package/atoms/AlertModal/index.js +3 -0
  27. package/atoms/Avatar/Avatar.js +36 -0
  28. package/atoms/Avatar/Avatar.module.css +3 -0
  29. package/atoms/Avatar/Avatar.stories.js +29 -0
  30. package/atoms/Avatar/__snapshots__/Avatar.stories.js.snap +105 -0
  31. package/atoms/Avatar/constants.js +3 -0
  32. package/atoms/Avatar/helpers.js +7 -0
  33. package/atoms/Avatar/index.js +3 -0
  34. package/atoms/Button/Button.js +83 -0
  35. package/atoms/Button/Button.module.css +85 -0
  36. package/atoms/Button/Button.stories.js +47 -0
  37. package/atoms/Button/Button.test.js +60 -0
  38. package/atoms/Button/__snapshots__/Button.stories.js.snap +191 -0
  39. package/atoms/Button/constants.js +3 -0
  40. package/atoms/Button/index.js +3 -0
  41. package/atoms/Card/Card.js +48 -0
  42. package/atoms/Card/Card.module.css +52 -0
  43. package/atoms/Card/Card.stories.js +41 -0
  44. package/atoms/Card/__snapshots__/Card.stories.js.snap +136 -0
  45. package/atoms/Card/constants.js +4 -0
  46. package/atoms/Card/index.js +3 -0
  47. package/atoms/Check/Check.js +28 -0
  48. package/atoms/Check/Check.module.css +11 -0
  49. package/atoms/Check/Check.stories.js +15 -0
  50. package/atoms/Check/__snapshots__/Check.stories.js.snap +67 -0
  51. package/atoms/Check/index.js +2 -0
  52. package/atoms/Checkbox/Checkbox.js +77 -0
  53. package/atoms/Checkbox/Checkbox.module.css +60 -0
  54. package/atoms/Checkbox/Checkbox.stories.js +30 -0
  55. package/atoms/Checkbox/constants.js +1 -0
  56. package/atoms/Checkbox/index.js +3 -0
  57. package/atoms/Divider/Divider.js +22 -0
  58. package/atoms/Divider/Divider.module.css +25 -0
  59. package/atoms/Divider/Divider.stories.js +23 -0
  60. package/atoms/Divider/__snapshots__/Divider.stories.js.snap +22 -0
  61. package/atoms/Divider/constants.js +3 -0
  62. package/atoms/Divider/index.js +3 -0
  63. package/atoms/Heading/Heading.js +37 -0
  64. package/atoms/Heading/Heading.module.css +70 -0
  65. package/atoms/Heading/Heading.stories.js +46 -0
  66. package/atoms/Heading/__snapshots__/Heading.stories.js.snap +189 -0
  67. package/atoms/Heading/constants.js +5 -0
  68. package/atoms/Heading/index.js +3 -0
  69. package/atoms/Icon/Icon.js +66 -0
  70. package/atoms/Icon/Icon.module.css +142 -0
  71. package/atoms/Icon/Icon.stories.js +48 -0
  72. package/atoms/Icon/__snapshots__/Icon.stories.js.snap +1311 -0
  73. package/atoms/Icon/constants.js +1091 -0
  74. package/atoms/Icon/helpers.js +9 -0
  75. package/atoms/Icon/index.js +3 -0
  76. package/atoms/Input/Input.js +229 -0
  77. package/atoms/Input/Input.module.css +83 -0
  78. package/atoms/Input/Input.stories.js +38 -0
  79. package/atoms/Input/__snapshots__/Input.stories.js.snap +101 -0
  80. package/atoms/Input/constants.js +3 -0
  81. package/atoms/Input/index.js +3 -0
  82. package/atoms/Label/Label.js +31 -0
  83. package/atoms/Label/Label.module.css +42 -0
  84. package/atoms/Label/Label.stories.js +26 -0
  85. package/atoms/Label/constants.js +1 -0
  86. package/atoms/Label/index.js +3 -0
  87. package/atoms/LinkItem/LinkItem.js +38 -0
  88. package/atoms/LinkItem/LinkItem.module.css +19 -0
  89. package/atoms/LinkItem/LinkItem.stories.js +30 -0
  90. package/atoms/LinkItem/__snapshots__/Link.stories.js.snap +118 -0
  91. package/atoms/LinkItem/constants.js +5 -0
  92. package/atoms/LinkItem/index.js +3 -0
  93. package/atoms/Loading/Loading.js +30 -0
  94. package/atoms/Loading/Loading.module.css +51 -0
  95. package/atoms/Loading/Loading.stories.js +17 -0
  96. package/atoms/Loading/__snapshots__/Loading.stories.js.snap +26 -0
  97. package/atoms/Loading/index.js +2 -0
  98. package/atoms/Modal/Modal.js +121 -0
  99. package/atoms/Modal/Modal.module.css +142 -0
  100. package/atoms/Modal/Modal.stories.js +43 -0
  101. package/atoms/Modal/__snapshots__/Modal.stories.js.snap +239 -0
  102. package/atoms/Modal/constants.js +1 -0
  103. package/atoms/Modal/index.js +3 -0
  104. package/atoms/Paragraph/Paragraph.js +56 -0
  105. package/atoms/Paragraph/Paragraph.module.css +72 -0
  106. package/atoms/Paragraph/Paragraph.stories.js +52 -0
  107. package/atoms/Paragraph/__snapshots__/Paragraph.stories.js.snap +230 -0
  108. package/atoms/Paragraph/constants.js +5 -0
  109. package/atoms/Paragraph/index.js +3 -0
  110. package/atoms/Picture/Picture.js +47 -0
  111. package/atoms/Picture/Picture.module.css +16 -0
  112. package/atoms/Picture/Picture.stories.js +32 -0
  113. package/atoms/Picture/__snapshots__/Picture.stories.js.snap +156 -0
  114. package/atoms/Picture/index.js +2 -0
  115. package/atoms/Tab/Tab.js +41 -0
  116. package/atoms/Tab/Tab.module.css +17 -0
  117. package/atoms/Tab/Tab.stories.js +27 -0
  118. package/atoms/Tab/constants.js +1 -0
  119. package/atoms/Tab/index.js +3 -0
  120. package/atoms/Textarea/Textarea.js +137 -0
  121. package/atoms/Textarea/Textarea.module.css +54 -0
  122. package/atoms/Textarea/Textarea.stories.js +16 -0
  123. package/atoms/Textarea/__snapshots__/Textarea.stories.js.snap +25 -0
  124. package/atoms/Textarea/index.js +2 -0
  125. package/atoms/Toggle/Toggle.js +56 -0
  126. package/atoms/Toggle/Toggle.module.css +41 -0
  127. package/atoms/Toggle/Toggle.stories.js +21 -0
  128. package/atoms/Toggle/constants.js +1 -0
  129. package/atoms/Toggle/index.js +3 -0
  130. package/codecov.yml +2 -0
  131. package/helpers/storybook.js +29 -0
  132. package/helpers/storybook.test.js +40 -0
  133. package/helpers/styles.js +37 -0
  134. package/helpers/styles.test.js +222 -0
  135. package/hocs/withStyles.js +17 -0
  136. package/hook/useAddColumn.js +40 -0
  137. package/hook/useMedia.js +22 -0
  138. package/hook/useStateDate.js +25 -0
  139. package/hook/useTable.js +54 -0
  140. package/index.js +71 -0
  141. package/jest.config.js +23 -0
  142. package/jest.setup.js +13 -0
  143. package/layout/CenteredContent/CenteredContent.js +30 -0
  144. package/layout/CenteredContent/CenteredContent.module.css +12 -0
  145. package/layout/CenteredContent/CenteredContent.stories.js +22 -0
  146. package/layout/CenteredContent/__snapshots__/CenteredContent.stories.js.snap +27 -0
  147. package/layout/CenteredContent/index.js +2 -0
  148. package/layout/Container/Container.js +29 -0
  149. package/layout/Container/Container.module.css +14 -0
  150. package/layout/Container/Container.stories.js +22 -0
  151. package/layout/Container/__snapshots__/Container.stories.js.snap +27 -0
  152. package/layout/Container/index.js +2 -0
  153. package/layout/DynamicTable/DynamicTable.js +372 -0
  154. package/layout/DynamicTable/DynamicTable.module.css +76 -0
  155. package/layout/DynamicTable/DynamicTable.stories.js +79 -0
  156. package/layout/DynamicTable/constants.js +323 -0
  157. package/layout/DynamicTable/index.js +3 -0
  158. package/layout/FlexColumnContent/FlexColumnContent.js +26 -0
  159. package/layout/FlexColumnContent/FlexColumnContent.module.css +5 -0
  160. package/layout/FlexColumnContent/FlexColumnContent.stories.js +28 -0
  161. package/layout/FlexColumnContent/constants.js +1 -0
  162. package/layout/FlexColumnContent/index.js +3 -0
  163. package/layout/FullHeightContent/FullHeightContent.js +40 -0
  164. package/layout/FullHeightContent/FullHeightContent.module.css +21 -0
  165. package/layout/FullHeightContent/FullHeightContent.stories.js +22 -0
  166. package/layout/FullHeightContent/__snapshots__/FullHeightContent.stories.js.snap +41 -0
  167. package/layout/FullHeightContent/index.js +2 -0
  168. package/layout/Navbar/Navbar.js +247 -0
  169. package/layout/Navbar/Navbar.module.css +35 -0
  170. package/layout/Navbar/Navbar.stories.js +20 -0
  171. package/layout/Navbar/constants.js +35 -0
  172. package/layout/Navbar/index.js +2 -0
  173. package/layout/Sidebar/Sidebar.js +115 -0
  174. package/layout/Sidebar/Sidebar.module.css +387 -0
  175. package/layout/Sidebar/Sidebar.stories.js +28 -0
  176. package/layout/Sidebar/constants.js +228 -0
  177. package/layout/Sidebar/index.js +3 -0
  178. package/layout/Spacer/Spacer.js +40 -0
  179. package/layout/Spacer/Spacer.module.css +12 -0
  180. package/layout/Spacer/Spacer.stories.js +25 -0
  181. package/layout/Spacer/__snapshots__/Spacer.stories.js.snap +97 -0
  182. package/layout/Spacer/components/Horizontal/Horizontal.js +43 -0
  183. package/layout/Spacer/components/Horizontal/Horizontal.stories.js +32 -0
  184. package/layout/Spacer/components/Horizontal/__snapshots__/Horizontal.stories.js.snap +97 -0
  185. package/layout/Spacer/components/Horizontal/index.js +1 -0
  186. package/layout/Spacer/components/Vertical/Vertical.js +31 -0
  187. package/layout/Spacer/components/Vertical/Vertical.stories.js +25 -0
  188. package/layout/Spacer/components/Vertical/__snapshots__/Vertical.stories.js.snap +85 -0
  189. package/layout/Spacer/components/Vertical/index.js +1 -0
  190. package/layout/Spacer/components/index.js +2 -0
  191. package/layout/Spacer/constants.js +5 -0
  192. package/layout/Spacer/helpers.js +3 -0
  193. package/layout/Spacer/index.js +3 -0
  194. package/molecules/Accordion/Accordion.js +70 -0
  195. package/molecules/Accordion/Accordion.module.css +12 -0
  196. package/molecules/Accordion/Accordion.stories.js +31 -0
  197. package/molecules/Accordion/__snapshots__/Accordion.stories.js.snap +228 -0
  198. package/molecules/Accordion/index.js +2 -0
  199. package/molecules/AddButton/AddButton.js +137 -0
  200. package/molecules/AddButton/AddButton.module.css +128 -0
  201. package/molecules/AddButton/AddButton.stories.js +47 -0
  202. package/molecules/AddButton/__snapshots__/AddButton.stories.js.snap +326 -0
  203. package/molecules/AddButton/constants.js +6 -0
  204. package/molecules/AddButton/handlers.js +58 -0
  205. package/molecules/AddButton/handlers.test.js +19 -0
  206. package/molecules/AddButton/helpers.js +6 -0
  207. package/molecules/AddButton/helpers.test.js +41 -0
  208. package/molecules/AddButton/hooks.js +14 -0
  209. package/molecules/AddButton/index.js +3 -0
  210. package/molecules/ButtonIcon/ButtonIcon.js +41 -0
  211. package/molecules/ButtonIcon/ButtonIcon.stories.js +27 -0
  212. package/molecules/ButtonIcon/__snapshots__/ButtonIcon.stories.js.snap +178 -0
  213. package/molecules/ButtonIcon/constants.js +6 -0
  214. package/molecules/ButtonIcon/index.js +2 -0
  215. package/molecules/CardDefault/CardDefault.js +65 -0
  216. package/molecules/CardDefault/CardDefault.module.css +19 -0
  217. package/molecules/CardDefault/CardDefault.stories.js +23 -0
  218. package/molecules/CardDefault/constants.js +1 -0
  219. package/molecules/CardDefault/index.js +3 -0
  220. package/molecules/CardProductTypesBooking/CardProductTypesBooking.js +89 -0
  221. package/molecules/CardProductTypesBooking/CardProductTypesBooking.module.css +118 -0
  222. package/molecules/CardProductTypesBooking/CardProductTypesBooking.stories.js +25 -0
  223. package/molecules/CardProductTypesBooking/constants.js +1 -0
  224. package/molecules/CardProductTypesBooking/index.js +3 -0
  225. package/molecules/CardServiceDetail/CardServiceDetail.js +400 -0
  226. package/molecules/CardServiceDetail/CardServiceDetail.module.css +222 -0
  227. package/molecules/CardServiceDetail/CardServiceDetail.stories.js +23 -0
  228. package/molecules/CardServiceDetail/constants.js +1 -0
  229. package/molecules/CardServiceDetail/index.js +3 -0
  230. package/molecules/CardServices/CardServices.js +461 -0
  231. package/molecules/CardServices/CardServices.module.css +213 -0
  232. package/molecules/CardServices/CardServices.stories.js +41 -0
  233. package/molecules/CardServices/constants.js +5 -0
  234. package/molecules/CardServices/index.js +3 -0
  235. package/molecules/CardServicesFinalized/CardServicesFinalized.js +381 -0
  236. package/molecules/CardServicesFinalized/CardServicesFinalized.module.css +213 -0
  237. package/molecules/CardServicesFinalized/CardServicesFinalized.stories.js +23 -0
  238. package/molecules/CardServicesFinalized/constants.js +1 -0
  239. package/molecules/CardServicesFinalized/index.js +3 -0
  240. package/molecules/CheckList/CheckList.js +135 -0
  241. package/molecules/CheckList/CheckList.module.css +94 -0
  242. package/molecules/CheckList/CheckList.stories.js +25 -0
  243. package/molecules/CheckList/constants.js +23 -0
  244. package/molecules/CheckList/index.js +3 -0
  245. package/molecules/ColumnTable/ColumnTable.js +154 -0
  246. package/molecules/ColumnTable/ColumnTable.module.css +51 -0
  247. package/molecules/ColumnTable/ColumnTable.stories.js +26 -0
  248. package/molecules/ColumnTable/constants.js +117 -0
  249. package/molecules/ColumnTable/index.js +3 -0
  250. package/molecules/DatePicker/DatePicker.js +242 -0
  251. package/molecules/DatePicker/DatePicker.module.css +38 -0
  252. package/molecules/DatePicker/DatePicker.stories.js +23 -0
  253. package/molecules/DatePicker/constants.js +3 -0
  254. package/molecules/DatePicker/index.js +3 -0
  255. package/molecules/DatePickerTime/DatePickerTime.js +133 -0
  256. package/molecules/DatePickerTime/DatePickerTime.module.css +3 -0
  257. package/molecules/DatePickerTime/DatePickerTime.stories.js +18 -0
  258. package/molecules/DatePickerTime/constants.js +1 -0
  259. package/molecules/DatePickerTime/index.js +3 -0
  260. package/molecules/Dropdown/Dropdown.js +62 -0
  261. package/molecules/Dropdown/Dropdown.module.css +52 -0
  262. package/molecules/Dropdown/Dropdown.stories.js +41 -0
  263. package/molecules/Dropdown/__snapshots__/Dropdown.stories.js.snap +181 -0
  264. package/molecules/Dropdown/index.js +2 -0
  265. package/molecules/DynamicSelect/DynamicSelect.js +186 -0
  266. package/molecules/DynamicSelect/DynamicSelect.module.css +10 -0
  267. package/molecules/DynamicSelect/DynamicSelect.stories.js +32 -0
  268. package/molecules/DynamicSelect/constants.js +7 -0
  269. package/molecules/DynamicSelect/index.js +3 -0
  270. package/molecules/Error/Error.js +35 -0
  271. package/molecules/Error/Error.module.css +12 -0
  272. package/molecules/Error/Error.stories.js +18 -0
  273. package/molecules/Error/__snapshots__/Error.stories.js.snap +134 -0
  274. package/molecules/Error/index.js +2 -0
  275. package/molecules/FooterTable/FooterTable.js +166 -0
  276. package/molecules/FooterTable/FooterTable.module.css +63 -0
  277. package/molecules/FooterTable/FooterTable.stories.js +23 -0
  278. package/molecules/FooterTable/constants.js +9 -0
  279. package/molecules/FooterTable/index.js +3 -0
  280. package/molecules/IconLabel/IconLabel.js +83 -0
  281. package/molecules/IconLabel/IconLabel.module.css +16 -0
  282. package/molecules/IconLabel/IconLabel.stories.js +25 -0
  283. package/molecules/IconLabel/__snapshots__/IconLabel.stories.js.snap +211 -0
  284. package/molecules/IconLabel/constants.js +6 -0
  285. package/molecules/IconLabel/index.js +3 -0
  286. package/molecules/InputAutocomplete/InputAutocomplete.js +221 -0
  287. package/molecules/InputAutocomplete/InputAutocomplete.module.css +55 -0
  288. package/molecules/InputAutocomplete/InputAutocomplete.stories.js +23 -0
  289. package/molecules/InputAutocomplete/constants.js +1 -0
  290. package/molecules/InputAutocomplete/index.js +3 -0
  291. package/molecules/ItemMenu/ItemMenu.js +134 -0
  292. package/molecules/ItemMenu/ItemMenu.module.css +363 -0
  293. package/molecules/ItemMenu/ItemMenu.stories.js +42 -0
  294. package/molecules/ItemMenu/constants.js +36 -0
  295. package/molecules/ItemMenu/index.js +3 -0
  296. package/molecules/LoadingError/LoadingError.js +31 -0
  297. package/molecules/LoadingError/LoadingError.stories.js +24 -0
  298. package/molecules/LoadingError/__snapshots__/LoadingError.stories.js.snap +109 -0
  299. package/molecules/LoadingError/index.js +1 -0
  300. package/molecules/RowTable/RowTable.js +928 -0
  301. package/molecules/RowTable/RowTable.module.css +63 -0
  302. package/molecules/RowTable/RowTable.stories.js +26 -0
  303. package/molecules/RowTable/constants.js +798 -0
  304. package/molecules/RowTable/index.js +3 -0
  305. package/molecules/Score/Score.js +61 -0
  306. package/molecules/Score/Score.module.css +11 -0
  307. package/molecules/Score/Score.stories.js +13 -0
  308. package/molecules/Score/__snapshots__/Score.stories.js.snap +100 -0
  309. package/molecules/Score/faces/happy.svg +7 -0
  310. package/molecules/Score/faces/normal.svg +6 -0
  311. package/molecules/Score/faces/sad.svg +6 -0
  312. package/molecules/Score/index.js +2 -0
  313. package/molecules/Tabs/Tabs.js +59 -0
  314. package/molecules/Tabs/Tabs.module.css +13 -0
  315. package/molecules/Tabs/Tabs.stories.js +34 -0
  316. package/molecules/Tabs/constants.js +34 -0
  317. package/molecules/Tabs/index.js +3 -0
  318. package/molecules/Task/Task.js +114 -0
  319. package/molecules/Task/Task.module.css +47 -0
  320. package/molecules/Task/Task.stories.js +47 -0
  321. package/molecules/Task/__snapshots__/Task.stories.js.snap +953 -0
  322. package/molecules/Task/constants.js +1 -0
  323. package/molecules/Task/index.js +3 -0
  324. package/molecules/TaskCounter/TaskCounter.js +74 -0
  325. package/molecules/TaskCounter/TaskCounter.module.css +11 -0
  326. package/molecules/TaskCounter/TaskCounter.stories.js +26 -0
  327. package/molecules/TaskCounter/__snapshots__/TaskCounter.stories.js.snap +177 -0
  328. package/molecules/TaskCounter/index.js +2 -0
  329. package/package.json +119 -0
  330. package/pages/Login/Login.js +102 -0
  331. package/pages/Login/Login.module.css +5 -0
  332. package/pages/Login/Login.stories.js +23 -0
  333. package/pages/Login/constants.js +1 -0
  334. package/pages/Login/index.js +3 -0
  335. package/pages/Login/validation/loginSchema.js +5 -0
  336. package/public/favicon.ico +0 -0
  337. package/public/static/google-maps.png +0 -0
  338. package/public/static/images/folders-folder.svg +26 -0
  339. package/public/static/images/permissions.svg +14 -0
  340. package/public/static/images/reports-results.svg +18 -0
  341. package/public/static/logo.svg +19 -0
  342. package/public/static/logologin.png +0 -0
  343. package/public/static/logologin.svg +16 -0
  344. package/public/static/logologintagos.svg +19 -0
  345. package/public/static/logotipo.svg +50 -0
  346. package/public/static/logotipoS.svg +26 -0
  347. package/public/static/taxisvalencia_logod.png +0 -0
  348. package/scripts/build-tokens.js +40 -0
  349. package/scripts/create-component.js +128 -0
  350. package/storybook.test.js +13 -0
  351. package/styles/GrupoMutua.css +391 -0
  352. package/styles/default.css +391 -0
  353. package/styles/globals.css +1524 -0
  354. package/styles/radiotaxiaragon.css +391 -0
  355. package/styles/spartan.css +391 -0
  356. package/styles/tagos.css +391 -0
  357. package/styles/taxisvalencia.css +391 -0
  358. package/styles/tokens.css +391 -0
  359. package/templates/component/Component.js +22 -0
  360. package/templates/component/Component.module.css +3 -0
  361. package/templates/component/Component.stories.js +23 -0
  362. package/templates/component/constants.js +1 -0
  363. package/templates/component/index.js +3 -0
  364. package/tokens/Token/Helper.js +30 -0
  365. package/tokens/Token/Token.js +13 -0
  366. package/tokens/Token/Token.module.css +64 -0
  367. package/tokens/Token/components/Color.js +21 -0
  368. package/tokens/Token/components/Color.stories.js +126 -0
  369. package/tokens/Token/components/FontFamily.js +24 -0
  370. package/tokens/Token/components/FontFamily.stories.js +32 -0
  371. package/tokens/Token/components/FontSize.js +24 -0
  372. package/tokens/Token/components/FontSize.stories.js +31 -0
  373. package/tokens/Token/components/FontWeight.js +24 -0
  374. package/tokens/Token/components/FontWeight.stories.js +31 -0
  375. package/tokens/Token/components/Spacing.js +24 -0
  376. package/tokens/Token/components/Spacing.stories.js +29 -0
  377. package/tokens/Token/components/__snapshots__/Color.stories.js.snap +7169 -0
  378. package/tokens/Token/components/__snapshots__/FontFamily.stories.js.snap +133 -0
  379. package/tokens/Token/components/__snapshots__/FontSize.stories.js.snap +261 -0
  380. package/tokens/Token/components/__snapshots__/FontWeight.stories.js.snap +317 -0
  381. package/tokens/Token/components/__snapshots__/Spacing.stories.js.snap +229 -0
  382. package/tokens/Token/components/index.js +5 -0
  383. package/tokens/Token/helpers.js +17 -0
  384. package/tokens/Token/index.js +1 -0
  385. package/tokens/index.js +472 -0
  386. package/utils/isEmpty.js +28 -0
  387. package/utils/isEmpty.test.js +125 -0
  388. package/utils/isObject.js +4 -0
  389. package/utils/keyboardCodes.js +6 -0
  390. package/utils/testUtils/matchMediaMock.js +14 -0
  391. package/utils/testUtils/svgrMock.js +2 -0
  392. package/utils/toCapitalize.js +4 -0
  393. package/utils/toKebabCase.js +8 -0
  394. package/utils/toPascalCase.js +20 -0
  395. package/webpack/cssModules.js +30 -0
  396. package/webpack/loadConfigs.js +6 -0
  397. package/webpack/reactInlineSvg.js +22 -0
@@ -0,0 +1,928 @@
1
+ import React, { useState } from 'react'
2
+ import PropTypes from 'prop-types'
3
+ import ReactTooltip from 'react-tooltip'
4
+
5
+ import styles from './RowTable.module.css'
6
+ import { options } from './constants'
7
+ import withStyles from '../../hocs/withStyles'
8
+
9
+ import Moment from 'react-moment'
10
+ import Icon from '../../atoms/Icon'
11
+ import Picture from '../../atoms/Picture'
12
+ import Toggle from '../../atoms/Toggle'
13
+
14
+
15
+ import { Horizontal, Vertical } from '../../layout/Spacer/components'
16
+
17
+ export const RowTable = ({
18
+ getStyles,
19
+ slice,
20
+ columnsData,
21
+ isClickRow,
22
+ onClickRow,
23
+ onClickActionUserView,
24
+ onClickActionListInvoice,
25
+ onClickActionListXLS,
26
+ onClickActionListCSV,
27
+ onClickActionListPDF,
28
+ onClickActionEdit,
29
+ onClickActionSendEmail,
30
+ onClickActionDelete,
31
+ onClickActionLink,
32
+ onClickActionClone,
33
+ txtTootipIconUserView,
34
+ txtTootipIconListInvoice,
35
+ txtTootipIconListListXLS,
36
+ txtTootipIconListListCSV,
37
+ txtTootipIconListListPDF,
38
+ txtTootipIconEdit,
39
+ txtTootipIconSendEmail,
40
+ txtTootipIconDelete,
41
+ txtTootipIconLink,
42
+ txtTootipIconClone,
43
+ colorRow,
44
+ }) => {
45
+
46
+
47
+ const [loading, setLoading] = useState(false)
48
+
49
+ // const handleEditStaff = (e, item) => {
50
+ // console.log(item)
51
+ // console.log(e)
52
+ // }
53
+
54
+
55
+ const handleClickCheckbox = (e, item) => {
56
+
57
+
58
+ for (const iterator of slice) {
59
+
60
+ if (iterator.id === item.id) {
61
+ item.isSelected ? iterator.isSelected = false : iterator.isSelected = true
62
+
63
+ iterator.isSelected = item.isSelected
64
+ }
65
+
66
+ }
67
+
68
+ setLoading(true)
69
+
70
+ hola()
71
+
72
+ // return slice
73
+
74
+ // console.log(e, item)
75
+ }
76
+
77
+ const hola = () => {
78
+
79
+ setTimeout(() => {
80
+ setLoading(false)
81
+ }, 100)
82
+
83
+
84
+
85
+ }
86
+
87
+ // STATE TOOLTIP
88
+ const [isToolTipMounted, setIsToolTipMounted] = useState(false)
89
+
90
+ // TOOLTIP
91
+ const handleMouseEnter = () => {
92
+ setIsToolTipMounted(true)
93
+ }
94
+ const handleMouseLeave = () => {
95
+ setIsToolTipMounted(false)
96
+ }
97
+
98
+
99
+
100
+ return (
101
+ // <div className={getStyles('tbl-content')}>
102
+ // <table className={getStyles('table')} cellPadding="0" cellSpacing="0" border="0">
103
+
104
+
105
+ <tbody>
106
+ {slice.map((item, index) => (
107
+
108
+ <tr style={{ background: item.colorRow }} className={getStyles({ 'tr-content': isClickRow }, 'tr')} onClick={(e) => { onClickRow(e, item) }} key={index}>
109
+
110
+ {columnsData.map((itemTd, indexTd) => (
111
+ itemTd.activeView ?
112
+ (
113
+
114
+
115
+ itemTd.isBoolean
116
+
117
+ ?
118
+ !loading ? (
119
+ <td
120
+ className={getStyles('td', 'tdacction')}
121
+ key={[itemTd.accessor] + (indexTd + index)}
122
+ >
123
+ {String(item[itemTd.accessor])}
124
+
125
+ </td>
126
+ )
127
+ : null
128
+ :
129
+
130
+
131
+ itemTd.isCheckbox
132
+
133
+ ?
134
+ !loading ? (
135
+ <td
136
+ className={getStyles('td', 'tdacction')}
137
+ key={[itemTd.accessor] + (indexTd + index)}
138
+ >
139
+
140
+ {/* <Check id={item[itemTd.accessor]} isChecked={item.isSelected} /> */}
141
+
142
+ <Toggle
143
+ id={'idToggle' + item.id}
144
+ checked={item.isSelected}
145
+ label=""
146
+ onChangeCheckbox={(e) => { handleClickCheckbox(e, item) }}
147
+ />
148
+
149
+ </td>
150
+ )
151
+ : null
152
+ :
153
+
154
+
155
+ itemTd.isArrayObject
156
+
157
+ ?
158
+
159
+ <td className={getStyles('td')} key={[itemTd.accessor] + (indexTd + index)}>
160
+
161
+ {console.log('TD: ' + [itemTd.accessor] + (indexTd + index))}
162
+
163
+ {item[itemTd.accessor].map((itemTdObj, indexAcc, array) => (
164
+
165
+ <>
166
+
167
+ <span className={getStyles('tdlabelAlt')} key={itemTdObj.id + 'label' + (indexAcc + index)}>
168
+ {console.log('A: ' + itemTdObj.id + 'label' + (indexAcc + index))}
169
+
170
+ {itemTdObj[itemTd.subAccessorAlt]}
171
+
172
+ {array.length - 1 !== indexAcc ?
173
+ <span>, </span> : null}
174
+ :&nbsp;
175
+ </span>
176
+
177
+ <span key={itemTdObj.id + 'Tdlabel' + (indexAcc + index)}>
178
+
179
+ {console.log('B: ' + itemTdObj.id + 'Tdlabel' + (indexAcc + index))}
180
+
181
+ {itemTdObj[itemTd.subAccessor]}
182
+
183
+ {array.length - 1 !== indexAcc ?
184
+ <span>, </span> : null}
185
+
186
+ </span>
187
+
188
+ </>
189
+
190
+ ))}
191
+
192
+ </td>
193
+
194
+ :
195
+
196
+
197
+ itemTd.isPicture
198
+
199
+ ?
200
+ <td className={getStyles('td', 'tdacction')} key={[itemTd.accessor] + (indexTd + index)}>
201
+ <Picture
202
+ src={item[itemTd.accessor]}
203
+ width={50}
204
+ />
205
+ </td>
206
+ :
207
+
208
+ itemTd.subAccessor === 'action'
209
+
210
+ ?
211
+
212
+ <td className={getStyles('td', 'tdacctionIcons')} key={[itemTd.accessor] + (indexTd + index)}>
213
+
214
+ {itemTd.viewUserView ?
215
+
216
+ item.viewUserView === undefined ?
217
+
218
+ <>
219
+ <span
220
+ data-tip
221
+ data-for='userView'
222
+ onMouseEnter={handleMouseEnter}
223
+ onMouseLeave={handleMouseLeave}
224
+ >
225
+ <>
226
+ <Icon
227
+ id="userView"
228
+ background="base"
229
+ name="userView"
230
+ onClick={(e) => { onClickActionUserView(e, item) }}
231
+ />
232
+ <Horizontal size="xs" />
233
+ </>
234
+
235
+ </span>
236
+
237
+ {isToolTipMounted ? (
238
+ <ReactTooltip id='userView' type='error'>
239
+ <span>{txtTootipIconUserView}</span>
240
+ </ReactTooltip>
241
+ ) : null}
242
+ </>
243
+
244
+ :
245
+
246
+ item.viewUserView ?
247
+
248
+ <>
249
+ <span
250
+ data-tip
251
+ data-for='userView'
252
+ onMouseEnter={handleMouseEnter}
253
+ onMouseLeave={handleMouseLeave}
254
+ >
255
+ <>
256
+ <Icon
257
+ id="userView"
258
+ background="base"
259
+ name="userView"
260
+ onClick={(e) => { onClickActionUserView(e, item) }}
261
+ />
262
+ <Horizontal size="xs" />
263
+ </>
264
+
265
+ </span>
266
+
267
+ {isToolTipMounted ? (
268
+ <ReactTooltip id='userView' type='error'>
269
+ <span>{txtTootipIconUserView}</span>
270
+ </ReactTooltip>
271
+ ) : null}
272
+ </>
273
+
274
+ : null
275
+
276
+ : null}
277
+
278
+
279
+ {itemTd.viewListInvoice ?
280
+
281
+
282
+ item.viewListInvoice === undefined ?
283
+
284
+ <>
285
+ <span
286
+ data-tip
287
+ data-for='listInvoice'
288
+ onMouseEnter={handleMouseEnter}
289
+ onMouseLeave={handleMouseLeave}
290
+ >
291
+ <>
292
+ <Icon
293
+ id={"listInvoice" + (indexTd + index)}
294
+ background="base"
295
+ name="listInvoice"
296
+ onClick={(e) => { onClickActionListInvoice(e, item) }}
297
+ />
298
+ <Horizontal size="xs" />
299
+ </>
300
+
301
+ </span>
302
+
303
+ {isToolTipMounted ? (
304
+ <ReactTooltip id='listInvoice' type='error' place='left'>
305
+ <span>{txtTootipIconListInvoice}</span>
306
+ </ReactTooltip>
307
+ ) : null}
308
+ </>
309
+
310
+ :
311
+
312
+ item.viewListInvoice ?
313
+
314
+ <>
315
+ <span
316
+ data-tip
317
+ data-for='listInvoice'
318
+ onMouseEnter={handleMouseEnter}
319
+ onMouseLeave={handleMouseLeave}
320
+ >
321
+ <>
322
+ <Icon
323
+ id={"listInvoice" + (indexTd + index)}
324
+ background="base"
325
+ name="listInvoice"
326
+ onClick={(e) => { onClickActionListInvoice(e, item) }}
327
+ />
328
+ <Horizontal size="xs" />
329
+ </>
330
+
331
+ </span>
332
+
333
+ {isToolTipMounted ? (
334
+ <ReactTooltip id='listInvoice' type='error'>
335
+ <span>{txtTootipIconListInvoice}</span>
336
+ </ReactTooltip>
337
+ ) : null}
338
+ </>
339
+
340
+ : null
341
+
342
+ : null}
343
+
344
+ {itemTd.viewListXLS && item.fileType === 'xls' ?
345
+
346
+ <>
347
+ <span
348
+ data-tip
349
+ data-for='listXLS'
350
+ onMouseEnter={handleMouseEnter}
351
+ onMouseLeave={handleMouseLeave}
352
+ >
353
+ <>
354
+ <Icon
355
+ id={"listXLS" + (indexTd + index)}
356
+ background="base"
357
+ name="listXLS"
358
+ onClick={(e) => { onClickActionListXLS(e, item) }}
359
+ />
360
+ <Horizontal size="xs" />
361
+ </>
362
+
363
+ </span>
364
+
365
+ {isToolTipMounted ? (
366
+ <ReactTooltip id='listXLS' type='error'>
367
+ <span>{txtTootipIconListListXLS}</span>
368
+ </ReactTooltip>
369
+ ) : null}
370
+ </>
371
+
372
+ : null}
373
+
374
+ {itemTd.viewListCSV && item.fileType === 'xml' ?
375
+
376
+ <>
377
+ <span
378
+ data-tip
379
+ data-for='listCSV'
380
+ onMouseEnter={handleMouseEnter}
381
+ onMouseLeave={handleMouseLeave}
382
+ >
383
+ <>
384
+ <Icon
385
+ id={"listCSV" + (indexTd + index)}
386
+ background="base"
387
+ name="listCSV"
388
+ onClick={(e) => { onClickActionListCSV(e, item) }}
389
+ />
390
+ <Horizontal size="xs" />
391
+ </>
392
+
393
+ </span>
394
+
395
+ {isToolTipMounted ? (
396
+ <ReactTooltip id='listCSV' type='error'>
397
+ <span>{txtTootipIconListListCSV}</span>
398
+ </ReactTooltip>
399
+ ) : null}
400
+ </>
401
+
402
+ : null}
403
+
404
+ {itemTd.viewListPDF && item.fileType === 'pdf' ?
405
+
406
+ <>
407
+ <span
408
+ data-tip
409
+ data-for='listPDF'
410
+ onMouseEnter={handleMouseEnter}
411
+ onMouseLeave={handleMouseLeave}
412
+ >
413
+ <>
414
+ <Icon
415
+ id={"listPDF" + (indexTd + index)}
416
+ background="base"
417
+ name="listPDF"
418
+ onClick={(e) => { onClickActionListPDF(e, item) }}
419
+ />
420
+ <Horizontal size="xs" />
421
+ </>
422
+
423
+ </span>
424
+
425
+ {isToolTipMounted ? (
426
+ <ReactTooltip id='listPDF' type='error'>
427
+ <span>{txtTootipIconListListPDF}</span>
428
+ </ReactTooltip>
429
+ ) : null}
430
+ </>
431
+
432
+ : null}
433
+
434
+ {itemTd.viewEdit ?
435
+
436
+ item.viewEdit === undefined ?
437
+ <>
438
+ <span
439
+ data-tip
440
+ data-for='edit'
441
+ onMouseEnter={handleMouseEnter}
442
+ onMouseLeave={handleMouseLeave}
443
+ >
444
+ <>
445
+ <Icon
446
+ id={"edit" + (indexTd + index)}
447
+ background="base"
448
+ name="edit"
449
+ onClick={(e) => { onClickActionEdit(e, item) }}
450
+ />
451
+ <Horizontal size="xs" />
452
+ </>
453
+
454
+ </span>
455
+
456
+ {isToolTipMounted ? (
457
+ <ReactTooltip id='edit' type='error'>
458
+ <span>{txtTootipIconEdit}</span>
459
+ </ReactTooltip>
460
+ ) : null}
461
+ </>
462
+ :
463
+
464
+ item.viewEdit ?
465
+
466
+ <>
467
+ <span
468
+ data-tip
469
+ data-for='edit'
470
+ onMouseEnter={handleMouseEnter}
471
+ onMouseLeave={handleMouseLeave}
472
+ >
473
+ <>
474
+ <Icon
475
+ id={"edit" + (indexTd + index)}
476
+ background="base"
477
+ name="edit"
478
+ onClick={(e) => { onClickActionEdit(e, item) }}
479
+ />
480
+ <Horizontal size="xs" />
481
+ </>
482
+
483
+ </span>
484
+
485
+ {isToolTipMounted ? (
486
+ <ReactTooltip id='edit' type='error'>
487
+ <span>{txtTootipIconEdit}</span>
488
+ </ReactTooltip>
489
+ ) : null}
490
+ </>
491
+
492
+ : null
493
+
494
+ : null}
495
+
496
+ {itemTd.viewEmailSend ?
497
+
498
+ item.viewEmailSend === undefined ?
499
+
500
+ <>
501
+ <span
502
+ data-tip
503
+ data-for='sendEmail'
504
+ onMouseEnter={handleMouseEnter}
505
+ onMouseLeave={handleMouseLeave}
506
+ >
507
+ <>
508
+ <Icon
509
+ background="base"
510
+ name="sendEmail"
511
+ onClick={e => { onClickActionSendEmail(e, item) }}
512
+ />
513
+ <Horizontal size="xs" />
514
+ </>
515
+
516
+ </span>
517
+
518
+ {isToolTipMounted ? (
519
+ <ReactTooltip id='sendEmail' type='error'>
520
+ <span>{txtTootipIconSendEmail}</span>
521
+ </ReactTooltip>
522
+ ) : null}
523
+ </>
524
+
525
+ :
526
+
527
+ item.viewEmailSend ?
528
+
529
+ <>
530
+ <span
531
+ data-tip
532
+ data-for='sendEmail'
533
+ onMouseEnter={handleMouseEnter}
534
+ onMouseLeave={handleMouseLeave}
535
+ >
536
+ <>
537
+ <Icon
538
+ background="base"
539
+ name="sendEmail"
540
+ onClick={e => { onClickActionSendEmail(e, item) }}
541
+ />
542
+ <Horizontal size="xs" />
543
+ </>
544
+
545
+ </span>
546
+
547
+ {isToolTipMounted ? (
548
+ <ReactTooltip id='sendEmail' type='error'>
549
+ <span>{txtTootipIconSendEmail}</span>
550
+ </ReactTooltip>
551
+ ) : null}
552
+ </>
553
+
554
+ : null
555
+
556
+ : null}
557
+
558
+ {itemTd.viewTrash ?
559
+
560
+ item.viewTrash === undefined ?
561
+
562
+ <>
563
+ <span
564
+ data-tip
565
+ data-for='trash'
566
+ onMouseEnter={handleMouseEnter}
567
+ onMouseLeave={handleMouseLeave}
568
+ >
569
+ <>
570
+ <Icon
571
+ background="base"
572
+ name="trash"
573
+ onClick={e => { onClickActionDelete(e, item) }}
574
+ />
575
+ <Horizontal size="xs" />
576
+ </>
577
+
578
+ </span>
579
+
580
+ {isToolTipMounted ? (
581
+ <ReactTooltip id='trash' type='error'>
582
+ <span>{txtTootipIconDelete}</span>
583
+ </ReactTooltip>
584
+ ) : null}
585
+ </>
586
+
587
+ :
588
+
589
+ item.viewTrash ?
590
+
591
+ <>
592
+ <span
593
+ data-tip
594
+ data-for='trash'
595
+ onMouseEnter={handleMouseEnter}
596
+ onMouseLeave={handleMouseLeave}
597
+ >
598
+ <>
599
+ <Icon
600
+ background="base"
601
+ name="trash"
602
+ onClick={e => { onClickActionDelete(e, item) }}
603
+ />
604
+ <Horizontal size="xs" />
605
+ </>
606
+
607
+ </span>
608
+
609
+ {isToolTipMounted ? (
610
+ <ReactTooltip id='trash' type='error'>
611
+ <span>{txtTootipIconDelete}</span>
612
+ </ReactTooltip>
613
+ ) : null}
614
+ </>
615
+
616
+ : null
617
+
618
+ : null}
619
+
620
+
621
+ {itemTd.viewLink ?
622
+
623
+ item.viewLink === undefined ?
624
+
625
+ <>
626
+ <span
627
+ data-tip
628
+ data-for='linkUser'
629
+ onMouseEnter={handleMouseEnter}
630
+ onMouseLeave={handleMouseLeave}
631
+ >
632
+ <>
633
+ <Icon
634
+ background="base"
635
+ name="linkUser"
636
+ // onClick={(e) => onClickEdit(e, item)}
637
+ onClick={e => { onClickActionLink(e, item) }}
638
+ />
639
+ <Horizontal size="xs" />
640
+ </>
641
+
642
+ </span>
643
+
644
+ {isToolTipMounted ? (
645
+ <ReactTooltip id='linkUser' type='error'>
646
+ <span>{txtTootipIconLink}</span>
647
+ </ReactTooltip>
648
+ ) : null}
649
+ </>
650
+
651
+ :
652
+
653
+ item.viewLink ?
654
+
655
+ <>
656
+ <span
657
+ data-tip
658
+ data-for='linkUser'
659
+ onMouseEnter={handleMouseEnter}
660
+ onMouseLeave={handleMouseLeave}
661
+ >
662
+ <>
663
+ <Icon
664
+ background="base"
665
+ name="linkUser"
666
+ // onClick={(e) => onClickEdit(e, item)}
667
+ onClick={e => { onClickActionLink(e, item) }}
668
+ />
669
+ <Horizontal size="xs" />
670
+ </>
671
+
672
+ </span>
673
+
674
+ {isToolTipMounted ? (
675
+ <ReactTooltip id='linkUser' type='error'>
676
+ <span>{txtTootipIconLink}</span>
677
+ </ReactTooltip>
678
+ ) : null}
679
+ </>
680
+
681
+ : null
682
+
683
+ : null}
684
+
685
+
686
+
687
+ {itemTd.viewClone ?
688
+
689
+ item.viewClone === undefined ?
690
+
691
+ <>
692
+ <span
693
+ data-tip
694
+ data-for='clone'
695
+ onMouseEnter={handleMouseEnter}
696
+ onMouseLeave={handleMouseLeave}
697
+ >
698
+ <>
699
+ <Icon
700
+ background="base"
701
+ name="cloneDefault"
702
+ onClick={e => { onClickActionClone(e, item) }}
703
+ />
704
+ <Horizontal size="xs" />
705
+ </>
706
+
707
+ </span>
708
+
709
+ {isToolTipMounted ? (
710
+ <ReactTooltip id='clone' type='error'>
711
+ <span>{txtTootipIconClone}</span>
712
+ </ReactTooltip>
713
+ ) : null}
714
+ </>
715
+
716
+ :
717
+
718
+ item.viewClone ?
719
+
720
+ <>
721
+ <span
722
+ data-tip
723
+ data-for='clone'
724
+ onMouseEnter={handleMouseEnter}
725
+ onMouseLeave={handleMouseLeave}
726
+ >
727
+ <>
728
+ <Icon
729
+ background="base"
730
+ name="clone"
731
+ onClick={e => { onClickActionClone(e, item) }}
732
+ />
733
+ <Horizontal size="xs" />
734
+ </>
735
+
736
+ </span>
737
+
738
+ {isToolTipMounted ? (
739
+ <ReactTooltip id='clone' type='error'>
740
+ <span>{txtTootipIconClone}</span>
741
+ </ReactTooltip>
742
+ ) : null}
743
+ </>
744
+
745
+ : null
746
+
747
+ : null}
748
+
749
+
750
+
751
+ </td>
752
+
753
+ :
754
+
755
+ itemTd.subAccessor !== ''
756
+
757
+ ?
758
+
759
+ <td className={getStyles('td')} key={[itemTd.accessor] + (indexTd + index)}>{item[itemTd.accessor][itemTd.subAccessor]}</td>
760
+
761
+ :
762
+
763
+ itemTd.typeFilter === 'date'
764
+
765
+ ?
766
+
767
+ itemTd.typeFilterSub === 'date_only' ?
768
+
769
+ <td className={getStyles('td')} key={[itemTd.accessor] + (indexTd + index)}>
770
+ <Moment format="DD/MM/YYYY">
771
+ {item[itemTd.accessor]}
772
+ </Moment>
773
+ </td>
774
+
775
+ :
776
+
777
+ <td className={getStyles('td')} key={[itemTd.accessor] + (indexTd + index)}>
778
+ {/* <Moment format="DD/MM/YYYY hh:mm:ss"> */}
779
+ <Moment format="DD/MM/YYYY HH:mm">
780
+ {item[itemTd.accessor]}
781
+ </Moment>
782
+ </td>
783
+ :
784
+
785
+ itemTd.typeFilter === 'select'
786
+
787
+ ?
788
+
789
+ itemTd.optionsSelect.map((itemSelect, indexSelect) => (
790
+
791
+
792
+ item[itemTd.accessor] === itemSelect.value ?
793
+
794
+ <td className={getStyles('td')} key={[itemTd.accessor] + (indexTd + index) + indexSelect}>
795
+ {itemSelect.label}
796
+ </td>
797
+
798
+ :
799
+
800
+ null
801
+ ))
802
+
803
+ :
804
+
805
+ itemTd.typeFilter === 'number'
806
+
807
+ ?
808
+
809
+ itemTd.subTypeFilter
810
+
811
+ ?
812
+
813
+ itemTd.characterExtra === 'km'
814
+ ?
815
+ <td className={getStyles('td')} key={[itemTd.accessor] + (indexTd + index)}>{(item[itemTd.accessor] / 1000).toString().replace(/\./g, ',')} {itemTd.characterExtra}</td>
816
+ :
817
+ <td className={getStyles('td')} key={[itemTd.accessor] + (indexTd + index)}>{item[itemTd.accessor].toFixed(2).toString().replace(/\./g, ',')} {itemTd.characterExtra}</td>
818
+ :
819
+ <td className={getStyles('td')} key={[itemTd.accessor] + (indexTd + index)}>{item[itemTd.accessor]}</td>
820
+
821
+ :
822
+
823
+ itemTd.subTypeFilter
824
+
825
+ ?
826
+ <td className={getStyles('td')} key={[itemTd.accessor] + (indexTd + index)}>{Number(item[itemTd.accessor]).toFixed(2).toString().replace(/\./g, ',')} {itemTd.characterExtra}</td>
827
+ :
828
+ <td className={getStyles('td')} key={[itemTd.accessor] + (indexTd + index)}>{item[itemTd.accessor]}</td>
829
+
830
+ // <>
831
+
832
+ // <td
833
+ // data-tip
834
+ // data-for={'td' + [itemTd.accessor] + index}
835
+ // onMouseEnter={handleMouseEnter}
836
+ // onMouseLeave={handleMouseLeave}
837
+ // className={getStyles('td')}
838
+ // key={[itemTd.accessor] + (indexTd + index)}
839
+ // >
840
+ // {item[itemTd.accessor]}
841
+
842
+ // {/*
843
+ // {isToolTipMounted ? (
844
+ // <ReactTooltip id={'td' + [itemTd.accessor] + index} type='info'>
845
+ // <span>{item[itemTd.accessor]}</span>
846
+ // </ReactTooltip>
847
+ // ) : null} */}
848
+
849
+ // </td>
850
+
851
+ // </>
852
+
853
+
854
+
855
+
856
+ ) : null
857
+ ))}
858
+ </tr>
859
+
860
+ ))}
861
+ </tbody>
862
+ // </table>
863
+
864
+ // </div>
865
+ )
866
+ }
867
+
868
+ RowTable.propTypes = {
869
+ getStyles: PropTypes.func.isRequired,
870
+ type: PropTypes.oneOf(options.types || []),
871
+ isClickRow: PropTypes.bool,
872
+ onClickRow: PropTypes.func,
873
+ onClickCheckbox: PropTypes.func,
874
+ onClickActionUserView: PropTypes.func,
875
+ onClickActionListInvoice: PropTypes.func,
876
+ onClickActionListXLS: PropTypes.func,
877
+ onClickActionListCSV: PropTypes.func,
878
+ onClickActionListPDF: PropTypes.func,
879
+ onClickActionEdit: PropTypes.func,
880
+ onClickActionSendEmail: PropTypes.func,
881
+ onClickActionDelete: PropTypes.func,
882
+ onClickActionLink: PropTypes.func,
883
+ onClickActionClone: PropTypes.func,
884
+ txtTootipIconUserView: PropTypes.string,
885
+ txtTootipIconListInvoice: PropTypes.string,
886
+ txtTootipIconListListXLS: PropTypes.string,
887
+ txtTootipIconListListCSV: PropTypes.string,
888
+ txtTootipIconListListPDF: PropTypes.string,
889
+ txtTootipIconEdit: PropTypes.string,
890
+ txtTootipIconSendEmail: PropTypes.string,
891
+ txtTootipIconDelete: PropTypes.string,
892
+ txtTootipIconLink: PropTypes.string,
893
+ txtTootipIconClone: PropTypes.string,
894
+ colorRow: PropTypes.string,
895
+ isCheckedCheckbox: PropTypes.bool
896
+ }
897
+
898
+ RowTable.defaultProps = {
899
+ getStyles: () => { },
900
+ isClickRow: false,
901
+ onClickRow: () => { },
902
+ onClickCheckbox: () => { },
903
+ onClickActionUserView: () => { },
904
+ onClickActionListInvoice: () => { },
905
+ onClickActionListXLS: () => { },
906
+ onClickActionListCSV: () => { },
907
+ onClickActionListPDF: () => { },
908
+ onClickActionEdit: () => { },
909
+ onClickActionSendEmail: () => { },
910
+ onClickActionDelete: () => { },
911
+ onClickActionLink: () => { },
912
+ onClickActionClone: () => { },
913
+ txtTootipIconUserView: '',
914
+ txtTootipIconListInvoice: '',
915
+ txtTootipIconListListXLS: '',
916
+ txtTootipIconListListCSV: '',
917
+ txtTootipIconListListPDF: '',
918
+ txtTootipIconEdit: '',
919
+ txtTootipIconSendEmail: '',
920
+ txtTootipIconDelete: '',
921
+ txtTootipIconLink: '',
922
+ txtTootipIconClone: '',
923
+
924
+ isCheckedCheckbox: false
925
+
926
+ }
927
+
928
+ export default withStyles(styles)(RowTable)