jornada-ui 0.4.15 → 0.4.17

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 (222) hide show
  1. package/lib/commonjs/common/icons-svg/constants/index.js +2 -1
  2. package/lib/commonjs/common/icons-svg/constants/index.js.map +1 -1
  3. package/lib/commonjs/common/icons-svg/download/index.js +53 -0
  4. package/lib/commonjs/common/icons-svg/download/index.js.map +1 -0
  5. package/lib/commonjs/common/icons-svg/index.js +7 -0
  6. package/lib/commonjs/common/icons-svg/index.js.map +1 -1
  7. package/lib/commonjs/components/inputs/input-date-time/index.js +11 -9
  8. package/lib/commonjs/components/inputs/input-date-time/index.js.map +1 -1
  9. package/lib/commonjs/components/inputs/input-date-time/styles.js +6 -3
  10. package/lib/commonjs/components/inputs/input-date-time/styles.js.map +1 -1
  11. package/lib/commonjs/components/modals/modal-change-activitie-history/helpers/index.js +35 -0
  12. package/lib/commonjs/components/modals/modal-change-activitie-history/helpers/index.js.map +1 -0
  13. package/lib/commonjs/components/modals/modal-change-activitie-history/index.js +203 -0
  14. package/lib/commonjs/components/modals/modal-change-activitie-history/index.js.map +1 -0
  15. package/lib/commonjs/components/modals/modal-change-activitie-history/interface.js +6 -0
  16. package/lib/commonjs/components/modals/modal-change-activitie-history/interface.js.map +1 -0
  17. package/lib/commonjs/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/index.js +71 -65
  18. package/lib/commonjs/components/modals/modal-edite-journey-rectification/index.js.map +1 -0
  19. package/lib/commonjs/components/modals/modal-edite-journey-rectification/interface.d.js.map +1 -0
  20. package/lib/commonjs/components/notification-card/index.js +142 -0
  21. package/lib/commonjs/components/notification-card/index.js.map +1 -0
  22. package/lib/commonjs/components/notification-card/interface.js +6 -0
  23. package/lib/commonjs/components/notification-card/interface.js.map +1 -0
  24. package/lib/commonjs/components/notification-details-card/index.js +181 -0
  25. package/lib/commonjs/components/notification-details-card/index.js.map +1 -0
  26. package/lib/commonjs/components/notification-details-card/interface.js +6 -0
  27. package/lib/commonjs/components/notification-details-card/interface.js.map +1 -0
  28. package/lib/commonjs/components/step-indicator/index.js +131 -68
  29. package/lib/commonjs/components/step-indicator/index.js.map +1 -1
  30. package/lib/commonjs/components/user-journey-work-card/index.js +44 -4
  31. package/lib/commonjs/components/user-journey-work-card/index.js.map +1 -1
  32. package/lib/commonjs/index.js +19 -5
  33. package/lib/commonjs/index.js.map +1 -1
  34. package/lib/commonjs/stories/button/button.stories.js +0 -2
  35. package/lib/commonjs/stories/button/button.stories.js.map +1 -1
  36. package/lib/commonjs/stories/capture-photo/capture-photo.stories.js +0 -1
  37. package/lib/commonjs/stories/capture-photo/capture-photo.stories.js.map +1 -1
  38. package/lib/commonjs/stories/modal-journey-rectification/modal-journey-rectification.stories.js +3 -3
  39. package/lib/commonjs/stories/modal-journey-rectification/modal-journey-rectification.stories.js.map +1 -1
  40. package/lib/commonjs/stories/notification-card/notification-card.stories.js +100 -0
  41. package/lib/commonjs/stories/notification-card/notification-card.stories.js.map +1 -0
  42. package/lib/commonjs/stories/notification-details-card/notification-details-card.stories.js +112 -0
  43. package/lib/commonjs/stories/notification-details-card/notification-details-card.stories.js.map +1 -0
  44. package/lib/commonjs/stories/user-journey-work-card/user-journey-work-card.stories.js +12 -4
  45. package/lib/commonjs/stories/user-journey-work-card/user-journey-work-card.stories.js.map +1 -1
  46. package/lib/commonjs/styles/theme/theme.js +2 -1
  47. package/lib/commonjs/styles/theme/theme.js.map +1 -1
  48. package/lib/module/common/icons-svg/constants/index.js +2 -1
  49. package/lib/module/common/icons-svg/constants/index.js.map +1 -1
  50. package/lib/module/common/icons-svg/download/index.js +47 -0
  51. package/lib/module/common/icons-svg/download/index.js.map +1 -0
  52. package/lib/module/common/icons-svg/index.js +7 -0
  53. package/lib/module/common/icons-svg/index.js.map +1 -1
  54. package/lib/module/components/inputs/input-date-time/index.js +11 -9
  55. package/lib/module/components/inputs/input-date-time/index.js.map +1 -1
  56. package/lib/module/components/inputs/input-date-time/styles.js +6 -3
  57. package/lib/module/components/inputs/input-date-time/styles.js.map +1 -1
  58. package/lib/module/components/modals/modal-change-activitie-history/helpers/index.js +32 -0
  59. package/lib/module/components/modals/modal-change-activitie-history/helpers/index.js.map +1 -0
  60. package/lib/module/components/modals/modal-change-activitie-history/index.js +196 -0
  61. package/lib/module/components/modals/modal-change-activitie-history/index.js.map +1 -0
  62. package/lib/module/components/modals/modal-change-activitie-history/interface.js +4 -0
  63. package/lib/module/components/modals/modal-change-activitie-history/interface.js.map +1 -0
  64. package/lib/module/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/index.js +69 -63
  65. package/lib/module/components/modals/modal-edite-journey-rectification/index.js.map +1 -0
  66. package/lib/module/components/modals/modal-edite-journey-rectification/interface.d.js.map +1 -0
  67. package/lib/module/components/notification-card/index.js +135 -0
  68. package/lib/module/components/notification-card/index.js.map +1 -0
  69. package/lib/module/components/notification-card/interface.js +4 -0
  70. package/lib/module/components/notification-card/interface.js.map +1 -0
  71. package/lib/module/components/notification-details-card/index.js +183 -0
  72. package/lib/module/components/notification-details-card/index.js.map +1 -0
  73. package/lib/module/components/notification-details-card/interface.js +4 -0
  74. package/lib/module/components/notification-details-card/interface.js.map +1 -0
  75. package/lib/module/components/step-indicator/index.js +129 -65
  76. package/lib/module/components/step-indicator/index.js.map +1 -1
  77. package/lib/module/components/user-journey-work-card/index.js +44 -4
  78. package/lib/module/components/user-journey-work-card/index.js.map +1 -1
  79. package/lib/module/index.js +3 -1
  80. package/lib/module/index.js.map +1 -1
  81. package/lib/module/stories/button/button.stories.js +0 -1
  82. package/lib/module/stories/button/button.stories.js.map +1 -1
  83. package/lib/module/stories/capture-photo/capture-photo.stories.js +0 -1
  84. package/lib/module/stories/capture-photo/capture-photo.stories.js.map +1 -1
  85. package/lib/module/stories/modal-journey-rectification/modal-journey-rectification.stories.js +3 -3
  86. package/lib/module/stories/modal-journey-rectification/modal-journey-rectification.stories.js.map +1 -1
  87. package/lib/module/stories/notification-card/notification-card.stories.js +95 -0
  88. package/lib/module/stories/notification-card/notification-card.stories.js.map +1 -0
  89. package/lib/module/stories/notification-details-card/notification-details-card.stories.js +107 -0
  90. package/lib/module/stories/notification-details-card/notification-details-card.stories.js.map +1 -0
  91. package/lib/module/stories/user-journey-work-card/user-journey-work-card.stories.js +12 -4
  92. package/lib/module/stories/user-journey-work-card/user-journey-work-card.stories.js.map +1 -1
  93. package/lib/module/styles/theme/theme.js +2 -1
  94. package/lib/module/styles/theme/theme.js.map +1 -1
  95. package/lib/typescript/commonjs/src/common/icons-svg/constants/index.d.ts +1 -0
  96. package/lib/typescript/commonjs/src/common/icons-svg/constants/index.d.ts.map +1 -1
  97. package/lib/typescript/commonjs/src/common/icons-svg/download/index.d.ts +11 -0
  98. package/lib/typescript/commonjs/src/common/icons-svg/download/index.d.ts.map +1 -0
  99. package/lib/typescript/commonjs/src/common/icons-svg/index.d.ts.map +1 -1
  100. package/lib/typescript/commonjs/src/components/card-report/index.d.ts.map +1 -1
  101. package/lib/typescript/commonjs/src/components/card-scheduled-journey/index.d.ts +1 -1
  102. package/lib/typescript/commonjs/src/components/inputs/input-date-time/index.d.ts.map +1 -1
  103. package/lib/typescript/commonjs/src/components/inputs/input-date-time/styles.d.ts +2 -1
  104. package/lib/typescript/commonjs/src/components/inputs/input-date-time/styles.d.ts.map +1 -1
  105. package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/helpers/index.d.ts +13 -0
  106. package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/helpers/index.d.ts.map +1 -0
  107. package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/index.d.ts +10 -0
  108. package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/index.d.ts.map +1 -0
  109. package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/interface.d.ts +18 -0
  110. package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/interface.d.ts.map +1 -0
  111. package/lib/typescript/commonjs/src/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/index.d.ts +3 -0
  112. package/lib/typescript/commonjs/src/components/modals/modal-edite-journey-rectification/index.d.ts.map +1 -0
  113. package/lib/typescript/commonjs/src/components/notification-card/index.d.ts +11 -0
  114. package/lib/typescript/commonjs/src/components/notification-card/index.d.ts.map +1 -0
  115. package/lib/typescript/commonjs/src/components/notification-card/interface.d.ts +17 -0
  116. package/lib/typescript/commonjs/src/components/notification-card/interface.d.ts.map +1 -0
  117. package/lib/typescript/commonjs/src/components/notification-details-card/index.d.ts +11 -0
  118. package/lib/typescript/commonjs/src/components/notification-details-card/index.d.ts.map +1 -0
  119. package/lib/typescript/commonjs/src/components/notification-details-card/interface.d.ts +15 -0
  120. package/lib/typescript/commonjs/src/components/notification-details-card/interface.d.ts.map +1 -0
  121. package/lib/typescript/commonjs/src/components/selects/select-date-and-hours/index.d.ts +1 -1
  122. package/lib/typescript/commonjs/src/components/step-indicator/index.d.ts +3 -9
  123. package/lib/typescript/commonjs/src/components/step-indicator/index.d.ts.map +1 -1
  124. package/lib/typescript/commonjs/src/components/travel-history/index.d.ts.map +1 -1
  125. package/lib/typescript/commonjs/src/components/user-journey-work-card/index.d.ts +2 -0
  126. package/lib/typescript/commonjs/src/components/user-journey-work-card/index.d.ts.map +1 -1
  127. package/lib/typescript/commonjs/src/index.d.ts +3 -1
  128. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  129. package/lib/typescript/commonjs/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts +1 -1
  130. package/lib/typescript/commonjs/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts.map +1 -1
  131. package/lib/typescript/commonjs/src/stories/notification-card/notification-card.stories.d.ts +14 -0
  132. package/lib/typescript/commonjs/src/stories/notification-card/notification-card.stories.d.ts.map +1 -0
  133. package/lib/typescript/commonjs/src/stories/notification-details-card/notification-details-card.stories.d.ts +16 -0
  134. package/lib/typescript/commonjs/src/stories/notification-details-card/notification-details-card.stories.d.ts.map +1 -0
  135. package/lib/typescript/commonjs/src/stories/user-journey-work-card/user-journey-work-card.stories.d.ts.map +1 -1
  136. package/lib/typescript/commonjs/src/styles/global/theme-provider.d.ts +1 -0
  137. package/lib/typescript/commonjs/src/styles/global/theme-provider.d.ts.map +1 -1
  138. package/lib/typescript/commonjs/src/styles/theme/theme.d.ts +1 -0
  139. package/lib/typescript/commonjs/src/styles/theme/theme.d.ts.map +1 -1
  140. package/lib/typescript/module/src/common/icons-svg/constants/index.d.ts +1 -0
  141. package/lib/typescript/module/src/common/icons-svg/constants/index.d.ts.map +1 -1
  142. package/lib/typescript/module/src/common/icons-svg/download/index.d.ts +11 -0
  143. package/lib/typescript/module/src/common/icons-svg/download/index.d.ts.map +1 -0
  144. package/lib/typescript/module/src/common/icons-svg/index.d.ts.map +1 -1
  145. package/lib/typescript/module/src/components/card-report/index.d.ts.map +1 -1
  146. package/lib/typescript/module/src/components/card-scheduled-journey/index.d.ts +1 -1
  147. package/lib/typescript/module/src/components/inputs/input-date-time/index.d.ts.map +1 -1
  148. package/lib/typescript/module/src/components/inputs/input-date-time/styles.d.ts +2 -1
  149. package/lib/typescript/module/src/components/inputs/input-date-time/styles.d.ts.map +1 -1
  150. package/lib/typescript/module/src/components/modals/modal-change-activitie-history/helpers/index.d.ts +13 -0
  151. package/lib/typescript/module/src/components/modals/modal-change-activitie-history/helpers/index.d.ts.map +1 -0
  152. package/lib/typescript/module/src/components/modals/modal-change-activitie-history/index.d.ts +10 -0
  153. package/lib/typescript/module/src/components/modals/modal-change-activitie-history/index.d.ts.map +1 -0
  154. package/lib/typescript/module/src/components/modals/modal-change-activitie-history/interface.d.ts +18 -0
  155. package/lib/typescript/module/src/components/modals/modal-change-activitie-history/interface.d.ts.map +1 -0
  156. package/lib/typescript/module/src/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/index.d.ts +3 -0
  157. package/lib/typescript/module/src/components/modals/modal-edite-journey-rectification/index.d.ts.map +1 -0
  158. package/lib/typescript/module/src/components/notification-card/index.d.ts +11 -0
  159. package/lib/typescript/module/src/components/notification-card/index.d.ts.map +1 -0
  160. package/lib/typescript/module/src/components/notification-card/interface.d.ts +17 -0
  161. package/lib/typescript/module/src/components/notification-card/interface.d.ts.map +1 -0
  162. package/lib/typescript/module/src/components/notification-details-card/index.d.ts +11 -0
  163. package/lib/typescript/module/src/components/notification-details-card/index.d.ts.map +1 -0
  164. package/lib/typescript/module/src/components/notification-details-card/interface.d.ts +15 -0
  165. package/lib/typescript/module/src/components/notification-details-card/interface.d.ts.map +1 -0
  166. package/lib/typescript/module/src/components/selects/select-date-and-hours/index.d.ts +1 -1
  167. package/lib/typescript/module/src/components/step-indicator/index.d.ts +3 -9
  168. package/lib/typescript/module/src/components/step-indicator/index.d.ts.map +1 -1
  169. package/lib/typescript/module/src/components/travel-history/index.d.ts.map +1 -1
  170. package/lib/typescript/module/src/components/user-journey-work-card/index.d.ts +2 -0
  171. package/lib/typescript/module/src/components/user-journey-work-card/index.d.ts.map +1 -1
  172. package/lib/typescript/module/src/index.d.ts +3 -1
  173. package/lib/typescript/module/src/index.d.ts.map +1 -1
  174. package/lib/typescript/module/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts +1 -1
  175. package/lib/typescript/module/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts.map +1 -1
  176. package/lib/typescript/module/src/stories/notification-card/notification-card.stories.d.ts +14 -0
  177. package/lib/typescript/module/src/stories/notification-card/notification-card.stories.d.ts.map +1 -0
  178. package/lib/typescript/module/src/stories/notification-details-card/notification-details-card.stories.d.ts +16 -0
  179. package/lib/typescript/module/src/stories/notification-details-card/notification-details-card.stories.d.ts.map +1 -0
  180. package/lib/typescript/module/src/stories/user-journey-work-card/user-journey-work-card.stories.d.ts.map +1 -1
  181. package/lib/typescript/module/src/styles/global/theme-provider.d.ts +1 -0
  182. package/lib/typescript/module/src/styles/global/theme-provider.d.ts.map +1 -1
  183. package/lib/typescript/module/src/styles/theme/theme.d.ts +1 -0
  184. package/lib/typescript/module/src/styles/theme/theme.d.ts.map +1 -1
  185. package/package.json +1 -1
  186. package/src/common/icons-svg/constants/index.ts +1 -0
  187. package/src/common/icons-svg/download/index.tsx +52 -0
  188. package/src/common/icons-svg/index.tsx +4 -0
  189. package/src/components/card-report/interface.d.ts +1 -1
  190. package/src/components/inputs/input-date-time/index.tsx +13 -12
  191. package/src/components/inputs/input-date-time/styles.ts +64 -63
  192. package/src/components/modals/modal-change-activitie-history/helpers/index.ts +15 -0
  193. package/src/components/modals/modal-change-activitie-history/index.tsx +189 -0
  194. package/src/components/modals/modal-change-activitie-history/interface.ts +16 -0
  195. package/src/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/index.tsx +78 -67
  196. package/src/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/interface.d.ts +10 -10
  197. package/src/components/monthly-summary-table/interface.d.ts +1 -1
  198. package/src/components/notification-card/index.tsx +123 -0
  199. package/src/components/notification-card/interface.ts +18 -0
  200. package/src/components/notification-details-card/index.tsx +180 -0
  201. package/src/components/notification-details-card/interface.ts +16 -0
  202. package/src/components/step-indicator/index.tsx +226 -155
  203. package/src/components/step-indicator/interface.d.ts +3 -2
  204. package/src/components/travel-history/interface.d.ts +1 -1
  205. package/src/components/user-journey-work-card/index.tsx +28 -1
  206. package/src/components/user-journey-work-card/interface.d.ts +149 -145
  207. package/src/index.tsx +3 -1
  208. package/src/stories/button/button.stories.tsx +1 -1
  209. package/src/stories/capture-photo/capture-photo.stories.tsx +1 -1
  210. package/src/stories/modal-journey-rectification/modal-journey-rectification.stories.tsx +60 -60
  211. package/src/stories/notification-card/notification-card.stories.tsx +93 -0
  212. package/src/stories/notification-details-card/notification-details-card.stories.tsx +109 -0
  213. package/src/stories/user-journey-work-card/user-journey-work-card.stories.tsx +71 -63
  214. package/src/styles/theme/theme.ts +1 -0
  215. package/lib/commonjs/components/modals/modal-journey-rectification/index.js.map +0 -1
  216. package/lib/commonjs/components/modals/modal-journey-rectification/interface.d.js.map +0 -1
  217. package/lib/module/components/modals/modal-journey-rectification/index.js.map +0 -1
  218. package/lib/module/components/modals/modal-journey-rectification/interface.d.js.map +0 -1
  219. package/lib/typescript/commonjs/src/components/modals/modal-journey-rectification/index.d.ts.map +0 -1
  220. package/lib/typescript/module/src/components/modals/modal-journey-rectification/index.d.ts.map +0 -1
  221. /package/lib/commonjs/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/interface.d.js +0 -0
  222. /package/lib/module/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/interface.d.js +0 -0
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * CONSTANTS
5
+ */
6
+ const optionsActivities = [{
7
+ label: "Selecione atividade",
8
+ value: "none",
9
+ key: 0
10
+ }, {
11
+ label: "Descanso",
12
+ value: "descanso",
13
+ key: 9
14
+ }, {
15
+ label: "Repouso Noturno",
16
+ value: "repouso_noturno",
17
+ key: 6
18
+ }, {
19
+ label: "Refeição",
20
+ value: "refeição",
21
+ key: 7
22
+ }, {
23
+ label: "Repouso Semanal",
24
+ value: "repouso_semanal",
25
+ key: 5
26
+ }];
27
+
28
+ /**
29
+ * EXPORTS
30
+ */
31
+ export { optionsActivities };
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["optionsActivities","label","value","key"],"sourceRoot":"..\\..\\..\\..\\..\\..\\src","sources":["components/modals/modal-change-activitie-history/helpers/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA,MAAMA,iBAAiB,GAAG,CACxB;EAAEC,KAAK,EAAE,qBAAqB;EAAEC,KAAK,EAAE,MAAM;EAAEC,GAAG,EAAE;AAAE,CAAC,EACvD;EAAEF,KAAK,EAAE,UAAU;EAAEC,KAAK,EAAE,UAAU;EAAEC,GAAG,EAAE;AAAE,CAAC,EAChD;EAAEF,KAAK,EAAE,iBAAiB;EAAEC,KAAK,EAAE,iBAAiB;EAAEC,GAAG,EAAE;AAAE,CAAC,EAC9D;EAAEF,KAAK,EAAE,UAAU;EAAEC,KAAK,EAAE,UAAU;EAAEC,GAAG,EAAE;AAAE,CAAC,EAChD;EAAEF,KAAK,EAAE,iBAAiB;EAAEC,KAAK,EAAE,iBAAiB;EAAEC,GAAG,EAAE;AAAE,CAAC,CAC/D;;AAED;AACA;AACA;AACA,SAASH,iBAAiB","ignoreList":[]}
@@ -0,0 +1,196 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * IMPORTS
5
+ */
6
+ import React from "react";
7
+ // libs RN
8
+ import { Modal, View } from "react-native";
9
+
10
+ // componentes
11
+ import Box from "../../box/index.js";
12
+ import Button from "../../button/index.js";
13
+ import Typography from "../../typography/index.js";
14
+ import SelectOption from "../../selects/select-option/index.js";
15
+
16
+ // assets / icons
17
+ import { Icons } from "../../../common/icons-svg/index.js";
18
+
19
+ // helpers / data
20
+ import { optionsActivities } from "./helpers/index.js";
21
+
22
+ // typings
23
+
24
+ // styles / theme
25
+ import { theme } from "../../../styles/theme/theme.js";
26
+
27
+ /**
28
+ * Componente Modal para alteração de atividade.
29
+ */
30
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
31
+ export const ModalChangeActivity = ({
32
+ visible,
33
+ onClose,
34
+ modalConfirm,
35
+ descricao
36
+ }) => {
37
+ const [isLoading] = React.useState(false);
38
+ const initial = (descricao ?? "").toLowerCase().replace(/\s+/g, "_");
39
+ const [selectedOption, setSelectedOption] = React.useState(initial || "none");
40
+ const handleConfirm = () => {
41
+ const selected = optionsActivities?.find(activity => activity.value === selectedOption);
42
+ if (selected && selected.value !== "none") {
43
+ modalConfirm({
44
+ label: selected.label,
45
+ value: selected.value,
46
+ key: selected.key
47
+ });
48
+ }
49
+
50
+ // sempre fechar o modal
51
+ onClose();
52
+ };
53
+ const handleSelectDown = activity => {
54
+ const option = optionsActivities.find(o => o.label === activity || o.value === activity);
55
+ if (option) setSelectedOption(option.value);
56
+ };
57
+ return /*#__PURE__*/_jsx(Modal, {
58
+ animationType: "fade",
59
+ transparent: true,
60
+ visible: visible,
61
+ children: /*#__PURE__*/_jsx(View, {
62
+ style: {
63
+ flex: 1,
64
+ justifyContent: "center",
65
+ alignItems: "center",
66
+ backgroundColor: "rgba(0,0,0,0.6)"
67
+ },
68
+ children: /*#__PURE__*/_jsxs(Box, {
69
+ width: 346,
70
+ backgroundColor: theme.colors.orange[500],
71
+ borderStyled: {
72
+ borderRadius: theme.borderWidths.thick_medium
73
+ },
74
+ paddingStyle: {
75
+ paddingLeft: theme.paddings["2xs"],
76
+ paddingRight: theme.paddings["2xs"],
77
+ paddingTop: theme.paddings.sm,
78
+ paddingBottom: theme.paddings.sm
79
+ },
80
+ children: [/*#__PURE__*/_jsxs(Box, {
81
+ marginStyle: {
82
+ marginBottom: theme.margins["2xs"],
83
+ marginLeft: theme.margins["1xs"]
84
+ },
85
+ flexStyle: {
86
+ flexDirection: "row",
87
+ alignItems: "center"
88
+ },
89
+ children: [/*#__PURE__*/_jsx(Icons, {
90
+ icon: "EXCLAMATION_TRIANGLE",
91
+ color: theme.colors.black[10],
92
+ background: theme.colors.yellow[50],
93
+ size: theme.fontSizes["2xl"]
94
+ }), /*#__PURE__*/_jsx(Typography, {
95
+ text: "Alterar Atividade",
96
+ color: "#fff",
97
+ marginLeft: theme.margins["2xs"],
98
+ fontFamily: theme.fonts.inter_bold_700,
99
+ size: theme.fontSizes.md
100
+ })]
101
+ }), /*#__PURE__*/_jsxs(Box, {
102
+ backgroundColor: theme.colors.neutral[300],
103
+ paddingStyle: {
104
+ padding: theme.paddings.xs
105
+ },
106
+ borderStyled: {
107
+ borderRadius: theme.borderWidths.thick_medium
108
+ },
109
+ children: [/*#__PURE__*/_jsx(Box, {
110
+ flexStyle: {
111
+ flexDirection: "row",
112
+ justifyContent: "flex-start"
113
+ },
114
+ width: "100%",
115
+ children: /*#__PURE__*/_jsx(Typography, {
116
+ text: `Deseja realmente alterar sua atividade?`,
117
+ color: theme.colors.black[25],
118
+ fontFamily: theme.fonts.inter_medium_500,
119
+ size: theme.fontSizes.xs,
120
+ style: {
121
+ flexWrap: "wrap",
122
+ maxWidth: "100%"
123
+ }
124
+ })
125
+ }), /*#__PURE__*/_jsx(SelectOption, {
126
+ titleLabel: "Selecione atividade",
127
+ sizeTitleLabel: theme.fontSizes.xs,
128
+ dataOption: optionsActivities,
129
+ handleSelectDown: handleSelectDown,
130
+ backgroundColor: theme.colors.neutral[300]
131
+ }), /*#__PURE__*/_jsxs(Box, {
132
+ marginStyle: {
133
+ marginTop: theme.margins["1xs"]
134
+ },
135
+ flexStyle: {
136
+ flexDirection: "row",
137
+ justifyContent: "space-between"
138
+ },
139
+ children: [/*#__PURE__*/_jsx(Button, {
140
+ title: "CANCELAR",
141
+ onPress: onClose,
142
+ width: "48%",
143
+ height: 36,
144
+ isLoading: isLoading,
145
+ disabled: isLoading,
146
+ backgroundColor: theme.colors.neutral[300],
147
+ buttonTextStyle: {
148
+ color: theme.colors.blue[100],
149
+ fontFamily: "Inter-Medium",
150
+ fontSize: theme.fontSizes.xs,
151
+ fontWeight: "500"
152
+ },
153
+ flexStyle: {
154
+ flexDirection: "row",
155
+ alignItems: "center",
156
+ justifyContent: "center",
157
+ textAlign: "center"
158
+ },
159
+ borderStyled: {
160
+ borderWidth: theme.borderWidths.thin,
161
+ borderColor: theme.colors.blue[100],
162
+ borderRadius: theme.borderWidths.thick_medium
163
+ }
164
+ }), /*#__PURE__*/_jsx(Button, {
165
+ title: "CONFIRMAR",
166
+ onPress: handleConfirm,
167
+ width: "48%",
168
+ height: 36,
169
+ isLoading: isLoading,
170
+ disabled: isLoading,
171
+ backgroundColor: theme.colors.blue[100],
172
+ buttonTextStyle: {
173
+ color: "#fff",
174
+ fontFamily: "Inter-Medium",
175
+ fontSize: theme.fontSizes.xs,
176
+ fontWeight: "500"
177
+ },
178
+ flexStyle: {
179
+ flexDirection: "row",
180
+ alignItems: "center",
181
+ justifyContent: "center",
182
+ textAlign: "center"
183
+ },
184
+ borderStyled: {
185
+ borderWidth: theme.borderWidths.thin,
186
+ borderColor: theme.colors.blue[100],
187
+ borderRadius: theme.borderWidths.thick_medium
188
+ }
189
+ })]
190
+ })]
191
+ })]
192
+ })
193
+ })
194
+ });
195
+ };
196
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Modal","View","Box","Button","Typography","SelectOption","Icons","optionsActivities","theme","jsx","_jsx","jsxs","_jsxs","ModalChangeActivity","visible","onClose","modalConfirm","descricao","isLoading","useState","initial","toLowerCase","replace","selectedOption","setSelectedOption","handleConfirm","selected","find","activity","value","label","key","handleSelectDown","option","o","animationType","transparent","children","style","flex","justifyContent","alignItems","backgroundColor","width","colors","orange","borderStyled","borderRadius","borderWidths","thick_medium","paddingStyle","paddingLeft","paddings","paddingRight","paddingTop","sm","paddingBottom","marginStyle","marginBottom","margins","marginLeft","flexStyle","flexDirection","icon","color","black","background","yellow","size","fontSizes","text","fontFamily","fonts","inter_bold_700","md","neutral","padding","xs","inter_medium_500","flexWrap","maxWidth","titleLabel","sizeTitleLabel","dataOption","marginTop","title","onPress","height","disabled","buttonTextStyle","blue","fontSize","fontWeight","textAlign","borderWidth","thin","borderColor"],"sourceRoot":"..\\..\\..\\..\\..\\src","sources":["components/modals/modal-change-activitie-history/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB;AACA,SAASC,KAAK,EAAEC,IAAI,QAAQ,cAAc;;AAE1C;AACA,OAAOC,GAAG,MAAM,oBAAW;AAC3B,OAAOC,MAAM,MAAM,uBAAc;AACjC,OAAOC,UAAU,MAAM,2BAAkB;AACzC,OAAOC,YAAY,MAAM,sCAA6B;;AAEtD;AACA,SAASC,KAAK,QAAQ,oCAA2B;;AAEjD;AACA,SAASC,iBAAiB,QAAQ,oBAAW;;AAE7C;;AAGA;AACA,SAASC,KAAK,QAAQ,gCAA6B;;AAEnD;AACA;AACA;AAFA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGA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oC,MAAM,CAAC8C,IAAI,CAAC,GAAG,CAAE;cACxCD,eAAe,EAAE;gBACfzB,KAAK,EAAE,MAAM;gBACbO,UAAU,EAAE,cAAc;gBAC1BoB,QAAQ,EAAEnF,KAAK,CAAC6D,SAAS,CAACQ,EAAE;gBAC5Be,UAAU,EAAE;cACd,CAAE;cACF/B,SAAS,EAAE;gBACTC,aAAa,EAAE,KAAK;gBACpBrB,UAAU,EAAE,QAAQ;gBACpBD,cAAc,EAAE,QAAQ;gBACxBqD,SAAS,EAAE;cACb,CAAE;cACF/C,YAAY,EAAE;gBACZgD,WAAW,EAAEtF,KAAK,CAACwC,YAAY,CAAC+C,IAAI;gBACpCC,WAAW,EAAExF,KAAK,CAACoC,MAAM,CAAC8C,IAAI,CAAC,GAAG,CAAC;gBACnC3C,YAAY,EAAEvC,KAAK,CAACwC,YAAY,CAACC;cACnC;YAAE,CACH,CAAC;UAAA,CACC,CAAC;QAAA,CACH,CAAC;MAAA,CACH;IAAC,CACF;EAAC,CACF,CAAC;AAEZ,CAAC","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"..\\..\\..\\..\\..\\src","sources":["components/modals/modal-change-activitie-history/interface.ts"],"mappings":"","ignoreList":[]}
@@ -12,6 +12,7 @@ import Typography from "../../typography/index.js";
12
12
  import Button from "../../button/index.js";
13
13
  import SelectOption from "../../selects/select-option/index.js";
14
14
  import InputDateTime from "../../inputs/input-date-time/index.js";
15
+ import MaintenanceDescriptionInput from "../../maintenance-description-input/index.js";
15
16
 
16
17
  // commons / svg
17
18
  import { Icons } from "../../../common/icons-svg/index.js";
@@ -25,46 +26,53 @@ import { theme } from "../../../styles/theme/theme.js";
25
26
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
26
27
  const options = [{
27
28
  label: "Disp com veículo parado",
28
- value: "option1"
29
+ value: "8"
29
30
  }, {
30
31
  label: "Operação com veículo",
31
- value: "option2"
32
+ value: "1"
32
33
  }, {
33
34
  label: "Em carga",
34
- value: "option3"
35
+ value: "2"
35
36
  }, {
36
37
  label: "Em descarga",
37
- value: "option4"
38
+ value: "3"
38
39
  }];
40
+
41
+ /**
42
+ * Componente modal para edição de atividade para interação do usuário.
43
+ */
39
44
  const ModalJourneyRectification = ({
40
45
  visible,
41
46
  onClose,
42
47
  modalConfirm,
43
- textTitle
48
+ textTitle,
49
+ isLoading
44
50
  }) => {
45
- const [isLoading] = React.useState(false);
46
-
47
- // *** DEFAULTS: já começa com um motivo, data e hora atuais
48
51
  const defaultReason = options[0]?.value ?? null;
49
- const [selectedReason, setSelectedReason] = useState(defaultReason); // ***
50
- const [selectedDate, setSelectedDate] = useState(new Date()); // ***
51
- const [selectedTime, setSelectedTime] = useState(new Date()); // ***
52
+ const [selectedReason, setSelectedReason] = useState(defaultReason);
53
+ const [selectedDate, setSelectedDate] = useState(new Date());
54
+ const [selectedTime, setSelectedTime] = useState(new Date());
55
+
56
+ // motivo digitado pelo usuário
57
+ const [editReason, setEditReason] = useState("");
58
+ const [errorReason, setErrorReason] = useState("");
52
59
 
53
- // helpers de formatação
60
+ // helpers
54
61
  const fmtDate = d => `${String(d.getDate()).padStart(2, "0")}/${String(d.getMonth() + 1).padStart(2, "0")}/${d.getFullYear()}`;
55
62
  const fmtTime = d => `${String(d.getHours()).padStart(2, "0")}:${String(d.getMinutes()).padStart(2, "0")}`;
56
-
57
- // junta data + hora
58
- const mergeDateTime = (date, time) => {
59
- if (!date) return null;
60
- const out = new Date(date);
61
- if (time) {
62
- out.setHours(time.getHours());
63
- out.setMinutes(time.getMinutes());
64
- out.setSeconds(0);
65
- out.setMilliseconds(0);
63
+ const handleConfirm = () => {
64
+ if (!editReason.trim()) {
65
+ setErrorReason("Informe o motivo da edição!");
66
+ return;
66
67
  }
67
- return out;
68
+ const payload = {
69
+ jr_tipo_atividade_id: selectedReason,
70
+ description: options.find(o => o.value === selectedReason)?.label ?? null,
71
+ date_start: selectedDate ? fmtDate(selectedDate) : null,
72
+ hours_start: selectedTime ? fmtTime(selectedTime) : null,
73
+ edit_reason: editReason.trim()
74
+ };
75
+ modalConfirm(payload);
68
76
  };
69
77
  return /*#__PURE__*/_jsx(Modal, {
70
78
  animationType: "fade",
@@ -104,10 +112,11 @@ const ModalJourneyRectification = ({
104
112
  background: theme.colors.neutral[300],
105
113
  size: 22
106
114
  }), /*#__PURE__*/_jsx(Typography, {
107
- text: `${textTitle ?? "Incluir atividade"}`,
115
+ text: textTitle ?? "Editar atividade",
108
116
  color: theme.colors.neutral[25],
109
117
  marginLeft: theme.margins["2xs"],
110
- fontFamily: theme.fonts.inter_bold_700,
118
+ fontFamily: theme.fonts.inter_bold,
119
+ fontWeight: "700",
111
120
  size: theme.fontSizes.lg
112
121
  })]
113
122
  }), /*#__PURE__*/_jsxs(Box, {
@@ -119,42 +128,46 @@ const ModalJourneyRectification = ({
119
128
  borderRadius: theme.borderWidths.thick_medium
120
129
  },
121
130
  children: [/*#__PURE__*/_jsx(Typography, {
122
- text: "Confirme as alterações antes de salvar.",
123
- color: theme.colors.black[25],
131
+ text: "Confirme as altera\xE7\xF5es antes de salvar.",
132
+ color: theme.colors.black[100],
124
133
  fontFamily: theme.fonts.inter_regular_400,
125
- size: theme.fontSizes.md,
134
+ fontWeight: "400",
135
+ lineHeight: theme.lineHeight["2xl"],
136
+ size: theme.fontSizes.sm,
126
137
  marginBottom: 16
127
138
  }), /*#__PURE__*/_jsx(SelectOption, {
128
139
  titleLabel: "Selecione atividade",
129
140
  sizeTitleLabel: 18,
130
- dataOption: options
131
- // Onde o motivo é RECEBIDO: aqui no callback
132
- ,
133
- handleSelectDown: value => setSelectedReason(value) // ***
134
- ,
141
+ dataOption: options,
142
+ handleSelectDown: value => setSelectedReason(value),
135
143
  backgroundColor: theme.colors.neutral[300]
136
144
  }), /*#__PURE__*/_jsx(InputDateTime, {
137
145
  mode: "date",
138
- titleLabel: "Data"
139
- // Onde a data é RECEBIDA: no onChange abaixo
140
- ,
141
- value: selectedDate // *** controlado
142
- ,
143
- onChange: d => setSelectedDate(d) // ***
144
- ,
146
+ titleLabel: "Data",
147
+ value: selectedDate,
148
+ onChange: d => setSelectedDate(d),
145
149
  backgroundColor: "#f5f5f5",
146
150
  colortitleLabel: "#333"
147
151
  }), /*#__PURE__*/_jsx(InputDateTime, {
148
152
  mode: "time",
149
- titleLabel: "Hor\xE1rio"
150
- // Onde a hora é RECEBIDA: no onChange abaixo
151
- ,
152
- value: selectedTime // *** controlado
153
- ,
154
- onChange: d => setSelectedTime(d) // ***
155
- ,
153
+ titleLabel: "Hor\xE1rio",
154
+ value: selectedTime,
155
+ onChange: d => setSelectedTime(d),
156
156
  backgroundColor: "#f5f5f5",
157
157
  colortitleLabel: "#333"
158
+ }), /*#__PURE__*/_jsx(Box, {
159
+ width: "100%",
160
+ children: /*#__PURE__*/_jsx(MaintenanceDescriptionInput, {
161
+ label: "Motivo da edi\xE7\xE3o",
162
+ placeholderTextColor: theme.colors.gray[700],
163
+ placeholder: "Informe o motivo da edi\xE7\xE3o",
164
+ value: editReason,
165
+ onChangeText: text => {
166
+ setEditReason(text);
167
+ if (text.trim()) setErrorReason("");
168
+ },
169
+ error: errorReason
170
+ })
158
171
  }), /*#__PURE__*/_jsxs(Box, {
159
172
  marginStyle: {
160
173
  marginTop: 4
@@ -172,8 +185,8 @@ const ModalJourneyRectification = ({
172
185
  disabled: isLoading,
173
186
  backgroundColor: theme.colors.neutral[300],
174
187
  buttonTextStyle: {
175
- color: theme.colors.blue[100],
176
- fontFamily: "Inter-Medium",
188
+ color: theme.colors.blue[500],
189
+ fontFamily: theme.fonts.inter_medium_500,
177
190
  fontSize: theme.fontSizes.xs,
178
191
  fontWeight: "500"
179
192
  },
@@ -189,19 +202,8 @@ const ModalJourneyRectification = ({
189
202
  borderRadius: theme.borderWidths.thick_medium
190
203
  }
191
204
  }), /*#__PURE__*/_jsx(Button, {
192
- title: "CONFIRMAR",
193
- onPress: () => {
194
- const merged = mergeDateTime(selectedDate, selectedTime);
195
- const payload = {
196
- reasonValue: selectedReason,
197
- reasonLabel: options.find(o => o.value === selectedReason)?.label ?? null,
198
- date: selectedDate ? fmtDate(selectedDate) : null,
199
- time: selectedTime ? fmtTime(selectedTime) : null,
200
- dateTimeISO: merged ? merged.toISOString() : null
201
- };
202
- modalConfirm(payload);
203
- onClose();
204
- },
205
+ title: "ALTERAR",
206
+ onPress: handleConfirm,
205
207
  width: "48%",
206
208
  height: 40,
207
209
  isLoading: isLoading,
@@ -209,7 +211,7 @@ const ModalJourneyRectification = ({
209
211
  backgroundColor: theme.colors.blue[500],
210
212
  buttonTextStyle: {
211
213
  color: theme.colors.neutral[25],
212
- fontFamily: "Inter-Medium",
214
+ fontFamily: theme.fonts.inter_medium_500,
213
215
  fontSize: theme.fontSizes.xs,
214
216
  fontWeight: "500"
215
217
  },
@@ -232,5 +234,9 @@ const ModalJourneyRectification = ({
232
234
  });
233
235
  };
234
236
  ModalJourneyRectification.displayName = "ModalJourneyRectification";
237
+
238
+ /**
239
+ * EXPORTS
240
+ */
235
241
  export default asBaseComponent(ModalJourneyRectification);
236
242
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useState","Modal","View","Box","Typography","Button","SelectOption","InputDateTime","MaintenanceDescriptionInput","Icons","asBaseComponent","theme","jsx","_jsx","jsxs","_jsxs","options","label","value","ModalJourneyRectification","visible","onClose","modalConfirm","textTitle","isLoading","defaultReason","selectedReason","setSelectedReason","selectedDate","setSelectedDate","Date","selectedTime","setSelectedTime","editReason","setEditReason","errorReason","setErrorReason","fmtDate","d","String","getDate","padStart","getMonth","getFullYear","fmtTime","getHours","getMinutes","handleConfirm","trim","payload","jr_tipo_atividade_id","description","find","o","date_start","hours_start","edit_reason","animationType","transparent","children","style","flex","justifyContent","alignItems","backgroundColor","width","colors","orange","borderStyled","borderRadius","borderWidths","thick_medium","paddingStyle","paddingLeft","paddings","paddingRight","paddingTop","sm","paddingBottom","marginStyle","marginBottom","marginLeft","flexStyle","flexDirection","icon","color","background","neutral","size","text","margins","fontFamily","fonts","inter_bold","fontWeight","fontSizes","lg","padding","xs","black","inter_regular_400","lineHeight","titleLabel","sizeTitleLabel","dataOption","handleSelectDown","mode","onChange","colortitleLabel","placeholderTextColor","gray","placeholder","onChangeText","error","marginTop","title","onPress","height","disabled","buttonTextStyle","blue","inter_medium_500","fontSize","textAlign","borderWidth","thin","borderColor","displayName"],"sourceRoot":"..\\..\\..\\..\\..\\src","sources":["components/modals/modal-edite-journey-rectification/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,KAAK,EAAEC,IAAI,QAAQ,cAAc;;AAE1C;AACA,OAAOC,GAAG,MAAM,oBAAW;AAC3B,OAAOC,UAAU,MAAM,2BAAkB;AACzC,OAAOC,MAAM,MAAM,uBAAc;AACjC,OAAOC,YAAY,MAAM,sCAA6B;AACtD,OAAOC,aAAa,MAAM,uCAA8B;AACxD,OAAOC,2BAA2B,MAAM,8CAAqC;;AAE7E;AACA,SAASC,KAAK,QAAQ,oCAA2B;;AAEjD;;AAEA,SAASC,eAAe,QAAQ,sCAAmC;;AAEnE;AACA,SAASC,KAAK,QAAQ,gCAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEpD,MAAMC,OAAO,GAAG,CACd;EAAEC,KAAK,EAAE,yBAAyB;EAAEC,KAAK,EAAE;AAAI,CAAC,EAChD;EAAED,KAAK,EAAE,sBAAsB;EAAEC,KAAK,EAAE;AAAI,CAAC,EAC7C;EAAED,KAAK,EAAE,UAAU;EAAEC,KAAK,EAAE;AAAI,CAAC,EACjC;EAAED,KAAK,EAAE,aAAa;EAAEC,KAAK,EAAE;AAAI,CAAC,CACrC;;AAED;AACA;AACA;AACA,MAAMC,yBAAoE,GAAGA,CAA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KAAK,EAAC,SAAS;cACfC,OAAO,EAAErE,aAAc;cACvBkB,KAAK,EAAC,KAAK;cACXoD,MAAM,EAAE,EAAG;cACX7F,SAAS,EAAEA,SAAW;cACtB8F,QAAQ,EAAE9F,SAAU;cACpBwC,eAAe,EAAErD,KAAK,CAACuD,MAAM,CAACsD,IAAI,CAAC,GAAG,CAAE;cACxCD,eAAe,EAAE;gBACflC,KAAK,EAAE1E,KAAK,CAACuD,MAAM,CAACqB,OAAO,CAAC,EAAE,CAAC;gBAC/BI,UAAU,EAAEhF,KAAK,CAACiF,KAAK,CAAC6B,gBAAgB;gBACxCC,QAAQ,EAAE/G,KAAK,CAACoF,SAAS,CAACG,EAAE;gBAC5BJ,UAAU,EAAE;cACd,CAAE;cACFZ,SAAS,EAAE;gBACTC,aAAa,EAAE,KAAK;gBACpBpB,UAAU,EAAE,QAAQ;gBACpBD,cAAc,EAAE,QAAQ;gBACxB6D,SAAS,EAAE;cACb,CAAE;cACFvD,YAAY,EAAE;gBACZwD,WAAW,EAAEjH,KAAK,CAAC2D,YAAY,CAACuD,IAAI;gBACpCC,WAAW,EAAEnH,KAAK,CAACuD,MAAM,CAACsD,IAAI,CAAC,GAAG,CAAC;gBACnCnD,YAAY,EAAE1D,KAAK,CAAC2D,YAAY,CAACC;cACnC;YAAE,CACH,CAAC;UAAA,CACC,CAAC;QAAA,CACH,CAAC;MAAA,CACH;IAAC,CACF;EAAC,CACF,CAAC;AAEZ,CAAC;AAEDpD,yBAAyB,CAAC4G,WAAW,GAAG,2BAA2B;;AAEnE;AACA;AACA;AACA,eAAerH,eAAe,CAACS,yBAAyB,CAAC","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"..\\..\\..\\..\\..\\src","sources":["components/modals/modal-edite-journey-rectification/interface.d.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * IMPORTS
5
+ */
6
+ import React, { forwardRef } from "react";
7
+ import { TouchableOpacity } from "react-native";
8
+
9
+ // commons / icons
10
+ import { Icons } from "../../common/icons-svg/index.js";
11
+
12
+ // components
13
+ import Box from "../box/index.js";
14
+ import Typography from "../typography/index.js";
15
+ import Button from "../button/index.js";
16
+
17
+ // styles / theme
18
+ import { theme } from "../../styles/theme/theme.js";
19
+
20
+ // typings
21
+ import { asBaseComponent } from "../../@types/as-base-component.js";
22
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
+ /**
24
+ * Componente NotificationCard
25
+ */
26
+ const NotificationCard = /*#__PURE__*/forwardRef(({
27
+ variant = "read",
28
+ title,
29
+ description,
30
+ actionLabel,
31
+ onPress,
32
+ onPressAction,
33
+ testID
34
+ }, ref) => {
35
+ const isWarning = variant === "unread";
36
+
37
+ // cor da borda lateral
38
+ const borderColor = isWarning ? theme.colors.orange[150] : theme.colors.blue[525];
39
+ return /*#__PURE__*/_jsx(TouchableOpacity, {
40
+ onPress: onPress,
41
+ activeOpacity: 0.7,
42
+ children: /*#__PURE__*/_jsxs(Box, {
43
+ ref: ref,
44
+ testID: testID ?? "notification-card",
45
+ flexStyle: {
46
+ flexDirection: "row"
47
+ },
48
+ borderStyled: {
49
+ borderWidth: 1,
50
+ borderColor: isWarning ? theme.colors.orange[150] : theme.colors.neutral[200],
51
+ borderRadius: theme.borderWidths.thick_medium
52
+ },
53
+ marginStyle: {
54
+ marginBottom: 12
55
+ },
56
+ backgroundColor: isWarning ? theme.colors.neutral[500] : theme.colors.neutral[25],
57
+ children: [/*#__PURE__*/_jsx(Box, {
58
+ width: 8,
59
+ backgroundColor: borderColor,
60
+ borderStyled: {
61
+ borderTopLeftRadius: theme.borderWidths.thick_medium,
62
+ borderBottomLeftRadius: theme.borderWidths.thick_medium
63
+ }
64
+ }), /*#__PURE__*/_jsxs(Box, {
65
+ flexStyle: {
66
+ flex: 1
67
+ },
68
+ paddingStyle: {
69
+ padding: theme.paddings.sm
70
+ },
71
+ children: [/*#__PURE__*/_jsxs(Box, {
72
+ flexStyle: {
73
+ flexDirection: "row",
74
+ alignItems: "center"
75
+ },
76
+ marginStyle: {
77
+ marginBottom: 6
78
+ },
79
+ children: [/*#__PURE__*/_jsx(Icons, {
80
+ icon: "BELL",
81
+ color: borderColor,
82
+ size: 20
83
+ }), /*#__PURE__*/_jsx(Typography, {
84
+ text: title,
85
+ fontFamily: theme.fonts.inter_bold,
86
+ fontWeight: "700",
87
+ size: theme.fontSizes.md,
88
+ color: theme.colors.black[100],
89
+ marginLeft: 8
90
+ })]
91
+ }), /*#__PURE__*/_jsx(Typography, {
92
+ text: description,
93
+ numberOfLines: isWarning ? 2 : 4,
94
+ ellipsizeMode: "tail",
95
+ size: theme.fontSizes.sm,
96
+ lineHeight: theme.lineHeight.md,
97
+ fontFamily: theme.fonts.inter_regular_400,
98
+ color: theme.colors.gray[700],
99
+ marginBottom: isWarning && actionLabel ? 12 : 0
100
+ }), actionLabel && onPressAction && /*#__PURE__*/_jsx(Button, {
101
+ isLoading: false,
102
+ title: actionLabel,
103
+ onPress: onPressAction,
104
+ backgroundColor: theme.colors.neutral[25],
105
+ borderStyled: {
106
+ borderWidth: 1,
107
+ borderColor: theme.colors.red[500],
108
+ borderRadius: 12
109
+ },
110
+ buttonTextStyle: {
111
+ color: theme.colors.red[500],
112
+ fontSize: theme.fontSizes.sm,
113
+ fontFamily: theme.fonts.inter_medium_500
114
+ },
115
+ flexStyle: {
116
+ flexDirection: "row",
117
+ alignItems: "center",
118
+ justifyContent: "center"
119
+ },
120
+ style: {
121
+ alignSelf: "flex-start",
122
+ paddingHorizontal: 12
123
+ }
124
+ })]
125
+ })]
126
+ })
127
+ });
128
+ });
129
+ NotificationCard.displayName = "NotificationCard";
130
+
131
+ /**
132
+ * EXPORTS
133
+ */
134
+ export default asBaseComponent(NotificationCard);
135
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","forwardRef","TouchableOpacity","Icons","Box","Typography","Button","theme","asBaseComponent","jsx","_jsx","jsxs","_jsxs","NotificationCard","variant","title","description","actionLabel","onPress","onPressAction","testID","ref","isWarning","borderColor","colors","orange","blue","activeOpacity","children","flexStyle","flexDirection","borderStyled","borderWidth","neutral","borderRadius","borderWidths","thick_medium","marginStyle","marginBottom","backgroundColor","width","borderTopLeftRadius","borderBottomLeftRadius","flex","paddingStyle","padding","paddings","sm","alignItems","icon","color","size","text","fontFamily","fonts","inter_bold","fontWeight","fontSizes","md","black","marginLeft","numberOfLines","ellipsizeMode","lineHeight","inter_regular_400","gray","isLoading","red","buttonTextStyle","fontSize","inter_medium_500","justifyContent","style","alignSelf","paddingHorizontal","displayName"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/notification-card/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,gBAAgB,QAAc,cAAc;;AAErD;AACA,SAASC,KAAK,QAAQ,iCAAwB;;AAE9C;AACA,OAAOC,GAAG,MAAM,iBAAQ;AACxB,OAAOC,UAAU,MAAM,wBAAe;AACtC,OAAOC,MAAM,MAAM,oBAAW;;AAE9B;AACA,SAASC,KAAK,QAAQ,6BAA0B;;AAEhD;AACA,SAASC,eAAe,QAAQ,mCAAgC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGjE;AACA;AACA;AACA,MAAMC,gBAAkD,gBAAGZ,UAAU,CACnE,CAAC;EAAEa,OAAO,GAAG,MAAM;EAAEC,KAAK;EAAEC,WAAW;EAAEC,WAAW;EAAEC,OAAO;EAAEC,aAAa;EAAEC;AAAO,CAAC,EAAEC,GAAG,KAAK;EAC9F,MAAMC,SAAS,GAAGR,OAAO,KAAK,QAAQ;;EAEtC;EACA,MAAMS,WAAW,GAAGD,SAAS,GAAGf,KAAK,CAACiB,MAAM,CAACC,MAAM,CAAC,GAAG,CAAC,GAAGlB,KAAK,CAACiB,MAAM,CAACE,IAAI,CAAC,GAAG,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G,CAAC;YAClCjC,YAAY,EAAE;UAChB,CAAE;UACFkC,eAAe,EAAE;YACflB,KAAK,EAAE3C,KAAK,CAACiB,MAAM,CAAC2C,GAAG,CAAC,GAAG,CAAC;YAC5BE,QAAQ,EAAE9D,KAAK,CAACkD,SAAS,CAACV,EAAE;YAC5BM,UAAU,EAAE9C,KAAK,CAAC+C,KAAK,CAACgB;UAC1B,CAAE;UACFzC,SAAS,EAAE;YACTC,aAAa,EAAE,KAAK;YACpBkB,UAAU,EAAE,QAAQ;YACpBuB,cAAc,EAAE;UAClB,CAAE;UACFC,KAAK,EAAE;YAAEC,SAAS,EAAE,YAAY;YAAEC,iBAAiB,EAAE;UAAG;QAAE,CAC3D,CACF;MAAA,CACE,CAAC;IAAA,CACH;EAAC,CACU,CAAC;AAEvB,CACF,CAAC;AAED7D,gBAAgB,CAAC8D,WAAW,GAAG,kBAAkB;;AAEjD;AACA;AACA;AACA,eAAenE,eAAe,CAACK,gBAAgB,CAAC","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/notification-card/interface.ts"],"mappings":"","ignoreList":[]}