jornada-ui 0.4.15 → 0.4.16

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 (185) 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-journey-rectification → modal-edite-journey-rectification}/index.js +71 -65
  12. package/lib/commonjs/components/modals/modal-edite-journey-rectification/index.js.map +1 -0
  13. package/lib/commonjs/components/modals/modal-edite-journey-rectification/interface.d.js.map +1 -0
  14. package/lib/commonjs/components/notification-card/index.js +142 -0
  15. package/lib/commonjs/components/notification-card/index.js.map +1 -0
  16. package/lib/commonjs/components/notification-card/interface.js +6 -0
  17. package/lib/commonjs/components/notification-card/interface.js.map +1 -0
  18. package/lib/commonjs/components/notification-details-card/index.js +181 -0
  19. package/lib/commonjs/components/notification-details-card/index.js.map +1 -0
  20. package/lib/commonjs/components/notification-details-card/interface.js +6 -0
  21. package/lib/commonjs/components/notification-details-card/interface.js.map +1 -0
  22. package/lib/commonjs/components/user-journey-work-card/index.js +44 -4
  23. package/lib/commonjs/components/user-journey-work-card/index.js.map +1 -1
  24. package/lib/commonjs/index.js +19 -5
  25. package/lib/commonjs/index.js.map +1 -1
  26. package/lib/commonjs/stories/button/button.stories.js +0 -2
  27. package/lib/commonjs/stories/button/button.stories.js.map +1 -1
  28. package/lib/commonjs/stories/capture-photo/capture-photo.stories.js +0 -1
  29. package/lib/commonjs/stories/capture-photo/capture-photo.stories.js.map +1 -1
  30. package/lib/commonjs/stories/modal-journey-rectification/modal-journey-rectification.stories.js +3 -3
  31. package/lib/commonjs/stories/modal-journey-rectification/modal-journey-rectification.stories.js.map +1 -1
  32. package/lib/commonjs/stories/notification-card/notification-card.stories.js +100 -0
  33. package/lib/commonjs/stories/notification-card/notification-card.stories.js.map +1 -0
  34. package/lib/commonjs/stories/notification-details-card/notification-details-card.stories.js +112 -0
  35. package/lib/commonjs/stories/notification-details-card/notification-details-card.stories.js.map +1 -0
  36. package/lib/commonjs/stories/user-journey-work-card/user-journey-work-card.stories.js +12 -4
  37. package/lib/commonjs/stories/user-journey-work-card/user-journey-work-card.stories.js.map +1 -1
  38. package/lib/commonjs/styles/theme/theme.js +2 -1
  39. package/lib/commonjs/styles/theme/theme.js.map +1 -1
  40. package/lib/module/common/icons-svg/constants/index.js +2 -1
  41. package/lib/module/common/icons-svg/constants/index.js.map +1 -1
  42. package/lib/module/common/icons-svg/download/index.js +47 -0
  43. package/lib/module/common/icons-svg/download/index.js.map +1 -0
  44. package/lib/module/common/icons-svg/index.js +7 -0
  45. package/lib/module/common/icons-svg/index.js.map +1 -1
  46. package/lib/module/components/inputs/input-date-time/index.js +11 -9
  47. package/lib/module/components/inputs/input-date-time/index.js.map +1 -1
  48. package/lib/module/components/inputs/input-date-time/styles.js +6 -3
  49. package/lib/module/components/inputs/input-date-time/styles.js.map +1 -1
  50. package/lib/module/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/index.js +69 -63
  51. package/lib/module/components/modals/modal-edite-journey-rectification/index.js.map +1 -0
  52. package/lib/module/components/modals/modal-edite-journey-rectification/interface.d.js.map +1 -0
  53. package/lib/module/components/notification-card/index.js +135 -0
  54. package/lib/module/components/notification-card/index.js.map +1 -0
  55. package/lib/module/components/notification-card/interface.js +4 -0
  56. package/lib/module/components/notification-card/interface.js.map +1 -0
  57. package/lib/module/components/notification-details-card/index.js +183 -0
  58. package/lib/module/components/notification-details-card/index.js.map +1 -0
  59. package/lib/module/components/notification-details-card/interface.js +4 -0
  60. package/lib/module/components/notification-details-card/interface.js.map +1 -0
  61. package/lib/module/components/user-journey-work-card/index.js +44 -4
  62. package/lib/module/components/user-journey-work-card/index.js.map +1 -1
  63. package/lib/module/index.js +3 -1
  64. package/lib/module/index.js.map +1 -1
  65. package/lib/module/stories/button/button.stories.js +0 -1
  66. package/lib/module/stories/button/button.stories.js.map +1 -1
  67. package/lib/module/stories/capture-photo/capture-photo.stories.js +0 -1
  68. package/lib/module/stories/capture-photo/capture-photo.stories.js.map +1 -1
  69. package/lib/module/stories/modal-journey-rectification/modal-journey-rectification.stories.js +3 -3
  70. package/lib/module/stories/modal-journey-rectification/modal-journey-rectification.stories.js.map +1 -1
  71. package/lib/module/stories/notification-card/notification-card.stories.js +95 -0
  72. package/lib/module/stories/notification-card/notification-card.stories.js.map +1 -0
  73. package/lib/module/stories/notification-details-card/notification-details-card.stories.js +107 -0
  74. package/lib/module/stories/notification-details-card/notification-details-card.stories.js.map +1 -0
  75. package/lib/module/stories/user-journey-work-card/user-journey-work-card.stories.js +12 -4
  76. package/lib/module/stories/user-journey-work-card/user-journey-work-card.stories.js.map +1 -1
  77. package/lib/module/styles/theme/theme.js +2 -1
  78. package/lib/module/styles/theme/theme.js.map +1 -1
  79. package/lib/typescript/commonjs/src/common/icons-svg/constants/index.d.ts +1 -0
  80. package/lib/typescript/commonjs/src/common/icons-svg/constants/index.d.ts.map +1 -1
  81. package/lib/typescript/commonjs/src/common/icons-svg/download/index.d.ts +11 -0
  82. package/lib/typescript/commonjs/src/common/icons-svg/download/index.d.ts.map +1 -0
  83. package/lib/typescript/commonjs/src/common/icons-svg/index.d.ts.map +1 -1
  84. package/lib/typescript/commonjs/src/components/card-report/index.d.ts.map +1 -1
  85. package/lib/typescript/commonjs/src/components/card-scheduled-journey/index.d.ts +1 -1
  86. package/lib/typescript/commonjs/src/components/inputs/input-date-time/index.d.ts.map +1 -1
  87. package/lib/typescript/commonjs/src/components/inputs/input-date-time/styles.d.ts +2 -1
  88. package/lib/typescript/commonjs/src/components/inputs/input-date-time/styles.d.ts.map +1 -1
  89. package/lib/typescript/commonjs/src/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/index.d.ts +3 -0
  90. package/lib/typescript/commonjs/src/components/modals/modal-edite-journey-rectification/index.d.ts.map +1 -0
  91. package/lib/typescript/commonjs/src/components/notification-card/index.d.ts +11 -0
  92. package/lib/typescript/commonjs/src/components/notification-card/index.d.ts.map +1 -0
  93. package/lib/typescript/commonjs/src/components/notification-card/interface.d.ts +17 -0
  94. package/lib/typescript/commonjs/src/components/notification-card/interface.d.ts.map +1 -0
  95. package/lib/typescript/commonjs/src/components/notification-details-card/index.d.ts +11 -0
  96. package/lib/typescript/commonjs/src/components/notification-details-card/index.d.ts.map +1 -0
  97. package/lib/typescript/commonjs/src/components/notification-details-card/interface.d.ts +15 -0
  98. package/lib/typescript/commonjs/src/components/notification-details-card/interface.d.ts.map +1 -0
  99. package/lib/typescript/commonjs/src/components/selects/select-date-and-hours/index.d.ts +1 -1
  100. package/lib/typescript/commonjs/src/components/travel-history/index.d.ts.map +1 -1
  101. package/lib/typescript/commonjs/src/components/user-journey-work-card/index.d.ts +2 -0
  102. package/lib/typescript/commonjs/src/components/user-journey-work-card/index.d.ts.map +1 -1
  103. package/lib/typescript/commonjs/src/index.d.ts +3 -1
  104. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  105. package/lib/typescript/commonjs/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts +1 -1
  106. package/lib/typescript/commonjs/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts.map +1 -1
  107. package/lib/typescript/commonjs/src/stories/notification-card/notification-card.stories.d.ts +14 -0
  108. package/lib/typescript/commonjs/src/stories/notification-card/notification-card.stories.d.ts.map +1 -0
  109. package/lib/typescript/commonjs/src/stories/notification-details-card/notification-details-card.stories.d.ts +16 -0
  110. package/lib/typescript/commonjs/src/stories/notification-details-card/notification-details-card.stories.d.ts.map +1 -0
  111. package/lib/typescript/commonjs/src/stories/user-journey-work-card/user-journey-work-card.stories.d.ts.map +1 -1
  112. package/lib/typescript/commonjs/src/styles/global/theme-provider.d.ts +1 -0
  113. package/lib/typescript/commonjs/src/styles/global/theme-provider.d.ts.map +1 -1
  114. package/lib/typescript/commonjs/src/styles/theme/theme.d.ts +1 -0
  115. package/lib/typescript/commonjs/src/styles/theme/theme.d.ts.map +1 -1
  116. package/lib/typescript/module/src/common/icons-svg/constants/index.d.ts +1 -0
  117. package/lib/typescript/module/src/common/icons-svg/constants/index.d.ts.map +1 -1
  118. package/lib/typescript/module/src/common/icons-svg/download/index.d.ts +11 -0
  119. package/lib/typescript/module/src/common/icons-svg/download/index.d.ts.map +1 -0
  120. package/lib/typescript/module/src/common/icons-svg/index.d.ts.map +1 -1
  121. package/lib/typescript/module/src/components/card-report/index.d.ts.map +1 -1
  122. package/lib/typescript/module/src/components/card-scheduled-journey/index.d.ts +1 -1
  123. package/lib/typescript/module/src/components/inputs/input-date-time/index.d.ts.map +1 -1
  124. package/lib/typescript/module/src/components/inputs/input-date-time/styles.d.ts +2 -1
  125. package/lib/typescript/module/src/components/inputs/input-date-time/styles.d.ts.map +1 -1
  126. package/lib/typescript/module/src/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/index.d.ts +3 -0
  127. package/lib/typescript/module/src/components/modals/modal-edite-journey-rectification/index.d.ts.map +1 -0
  128. package/lib/typescript/module/src/components/notification-card/index.d.ts +11 -0
  129. package/lib/typescript/module/src/components/notification-card/index.d.ts.map +1 -0
  130. package/lib/typescript/module/src/components/notification-card/interface.d.ts +17 -0
  131. package/lib/typescript/module/src/components/notification-card/interface.d.ts.map +1 -0
  132. package/lib/typescript/module/src/components/notification-details-card/index.d.ts +11 -0
  133. package/lib/typescript/module/src/components/notification-details-card/index.d.ts.map +1 -0
  134. package/lib/typescript/module/src/components/notification-details-card/interface.d.ts +15 -0
  135. package/lib/typescript/module/src/components/notification-details-card/interface.d.ts.map +1 -0
  136. package/lib/typescript/module/src/components/selects/select-date-and-hours/index.d.ts +1 -1
  137. package/lib/typescript/module/src/components/travel-history/index.d.ts.map +1 -1
  138. package/lib/typescript/module/src/components/user-journey-work-card/index.d.ts +2 -0
  139. package/lib/typescript/module/src/components/user-journey-work-card/index.d.ts.map +1 -1
  140. package/lib/typescript/module/src/index.d.ts +3 -1
  141. package/lib/typescript/module/src/index.d.ts.map +1 -1
  142. package/lib/typescript/module/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts +1 -1
  143. package/lib/typescript/module/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts.map +1 -1
  144. package/lib/typescript/module/src/stories/notification-card/notification-card.stories.d.ts +14 -0
  145. package/lib/typescript/module/src/stories/notification-card/notification-card.stories.d.ts.map +1 -0
  146. package/lib/typescript/module/src/stories/notification-details-card/notification-details-card.stories.d.ts +16 -0
  147. package/lib/typescript/module/src/stories/notification-details-card/notification-details-card.stories.d.ts.map +1 -0
  148. package/lib/typescript/module/src/stories/user-journey-work-card/user-journey-work-card.stories.d.ts.map +1 -1
  149. package/lib/typescript/module/src/styles/global/theme-provider.d.ts +1 -0
  150. package/lib/typescript/module/src/styles/global/theme-provider.d.ts.map +1 -1
  151. package/lib/typescript/module/src/styles/theme/theme.d.ts +1 -0
  152. package/lib/typescript/module/src/styles/theme/theme.d.ts.map +1 -1
  153. package/package.json +1 -1
  154. package/src/common/icons-svg/constants/index.ts +1 -0
  155. package/src/common/icons-svg/download/index.tsx +52 -0
  156. package/src/common/icons-svg/index.tsx +4 -0
  157. package/src/components/card-report/interface.d.ts +1 -1
  158. package/src/components/inputs/input-date-time/index.tsx +13 -12
  159. package/src/components/inputs/input-date-time/styles.ts +64 -63
  160. package/src/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/index.tsx +78 -67
  161. package/src/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/interface.d.ts +10 -10
  162. package/src/components/monthly-summary-table/interface.d.ts +1 -1
  163. package/src/components/notification-card/index.tsx +123 -0
  164. package/src/components/notification-card/interface.ts +18 -0
  165. package/src/components/notification-details-card/index.tsx +180 -0
  166. package/src/components/notification-details-card/interface.ts +16 -0
  167. package/src/components/travel-history/interface.d.ts +1 -1
  168. package/src/components/user-journey-work-card/index.tsx +28 -1
  169. package/src/components/user-journey-work-card/interface.d.ts +149 -145
  170. package/src/index.tsx +3 -1
  171. package/src/stories/button/button.stories.tsx +1 -1
  172. package/src/stories/capture-photo/capture-photo.stories.tsx +1 -1
  173. package/src/stories/modal-journey-rectification/modal-journey-rectification.stories.tsx +60 -60
  174. package/src/stories/notification-card/notification-card.stories.tsx +93 -0
  175. package/src/stories/notification-details-card/notification-details-card.stories.tsx +109 -0
  176. package/src/stories/user-journey-work-card/user-journey-work-card.stories.tsx +71 -63
  177. package/src/styles/theme/theme.ts +1 -0
  178. package/lib/commonjs/components/modals/modal-journey-rectification/index.js.map +0 -1
  179. package/lib/commonjs/components/modals/modal-journey-rectification/interface.d.js.map +0 -1
  180. package/lib/module/components/modals/modal-journey-rectification/index.js.map +0 -1
  181. package/lib/module/components/modals/modal-journey-rectification/interface.d.js.map +0 -1
  182. package/lib/typescript/commonjs/src/components/modals/modal-journey-rectification/index.d.ts.map +0 -1
  183. package/lib/typescript/module/src/components/modals/modal-journey-rectification/index.d.ts.map +0 -1
  184. /package/lib/commonjs/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/interface.d.js +0 -0
  185. /package/lib/module/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/interface.d.js +0 -0
@@ -0,0 +1,16 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import NotificationDetailCard from "../../components/notification-details-card";
3
+ /**
4
+ * META
5
+ */
6
+ declare const meta: Meta<typeof NotificationDetailCard>;
7
+ export default meta;
8
+ type Story = StoryObj<typeof NotificationDetailCard>;
9
+ /**
10
+ * STORIES
11
+ */
12
+ export declare const SomenteTexto: Story;
13
+ export declare const TextoComImagem: Story;
14
+ export declare const TextoComPdf: Story;
15
+ export declare const TextoComCsv: Story;
16
+ //# sourceMappingURL=notification-details-card.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-details-card.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/stories/notification-details-card/notification-details-card.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,sBAAsB,MAAM,4CAA4C,CAAC;AAKhF;;GAEG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,sBAAsB,CA8C7C,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAQ1B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAQ5B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAQzB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAQzB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"user-journey-work-card.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/stories/user-journey-work-card/user-journey-work-card.stories.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,mBAAmB,MAAM,yCAAyC,CAAC;AAK1E,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,mBAAmB,CAiC1C,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,mBAAmB,EAAE,KAYjC,CAAC"}
1
+ {"version":3,"file":"user-journey-work-card.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/stories/user-journey-work-card/user-journey-work-card.stories.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,mBAAmB,MAAM,yCAAyC,CAAC;AAK1E,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,mBAAmB,CAsC1C,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,mBAAmB,EAAE,KAejC,CAAC"}
@@ -25,6 +25,7 @@ export declare const useTheme: () => {
25
25
  200: string;
26
26
  300: string;
27
27
  400: string;
28
+ 500: string;
28
29
  };
29
30
  black: {
30
31
  10: string;
@@ -1 +1 @@
1
- {"version":3,"file":"theme-provider.d.ts","sourceRoot":"","sources":["../../../../../../src/styles/global/theme-provider.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAoC,MAAM,OAAO,CAAC;AAOzD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAEjE,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAiC,CAAC"}
1
+ {"version":3,"file":"theme-provider.d.ts","sourceRoot":"","sources":["../../../../../../src/styles/global/theme-provider.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAoC,MAAM,OAAO,CAAC;AAOzD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAEjE,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAiC,CAAC"}
@@ -24,6 +24,7 @@ export declare const theme: {
24
24
  200: string;
25
25
  300: string;
26
26
  400: string;
27
+ 500: string;
27
28
  };
28
29
  black: {
29
30
  10: string;
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../../../src/styles/theme/theme.ts"],"names":[],"mappings":"AAAA;;GAEG;AAgLH;;GAEG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUjB,CAAC"}
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../../../src/styles/theme/theme.ts"],"names":[],"mappings":"AAAA;;GAEG;AAiLH;;GAEG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUjB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jornada-ui",
3
- "version": "0.4.15",
3
+ "version": "0.4.16",
4
4
  "description": "Biblioteca para desenvolvimento dos componentes para utilizar nos app",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",
@@ -59,6 +59,7 @@ const SVG_NAME = {
59
59
  CHEVRON_DOWN: "chevron-down",
60
60
  CHEVRON_UP: "chevron-up,",
61
61
  TRASH: "trash",
62
+ DOWNLOAD: "download",
62
63
  };
63
64
  /**
64
65
  * EXPORTS
@@ -0,0 +1,52 @@
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import * as React from "react";
5
+ import Svg, { Path } from "react-native-svg";
6
+
7
+ // typings
8
+ import { type ISvgProps } from "../interface";
9
+
10
+ const SvgIconDownload: React.FC<ISvgProps> = ({ color, size, background }) => (
11
+ <Svg
12
+ // @ts-ignore
13
+ xmlns="http://www.w3.org/2000/svg"
14
+ width={size ?? "40"}
15
+ height={size ?? "40"}
16
+ fill="none"
17
+ viewBox="0 0 40 40"
18
+ >
19
+ {/* Círculo de fundo opcional */}
20
+ {background && (
21
+ <Path
22
+ fill={background}
23
+ stroke={background}
24
+ strokeWidth="1.5"
25
+ d="M20 38c9.941 0 18-8.059 18-18S29.941 2 20 2 2 10.059 2 20s8.059 18 18 18"
26
+ />
27
+ )}
28
+
29
+ {/* Seta para baixo */}
30
+ <Path
31
+ stroke={color ?? "#000"}
32
+ strokeWidth="2"
33
+ strokeLinecap="round"
34
+ strokeLinejoin="round"
35
+ d="M20 10v16M13 19l7 7 7-7"
36
+ />
37
+
38
+ {/* Base de suporte */}
39
+ <Path
40
+ stroke={color ?? "#000"}
41
+ strokeWidth="2"
42
+ strokeLinecap="round"
43
+ strokeLinejoin="round"
44
+ d="M10 28h20"
45
+ />
46
+ </Svg>
47
+ );
48
+
49
+ /**
50
+ * EXPORTS
51
+ */
52
+ export { SvgIconDownload };
@@ -66,6 +66,7 @@ import { SvgIconHourglass } from "./hourglass";
66
66
  import { SvgIconIsland } from "./island";
67
67
  import { SvgIconPlusContainer } from "./plus-container";
68
68
  import { SvgIconPlusTrash } from "./trash";
69
+ import { SvgIconDownload } from "./download";
69
70
 
70
71
  const Icons: React.FC<ISvgProps> = ({ icon, color, size, background }) => {
71
72
  switch (icon) {
@@ -213,6 +214,9 @@ const Icons: React.FC<ISvgProps> = ({ icon, color, size, background }) => {
213
214
  case "RECUSED":
214
215
  return <SvgIconRecused color={color} size={size} icon={"RECUSED"} />;
215
216
 
217
+ case "DOWNLOAD":
218
+ return <SvgIconDownload color={color} size={size} icon={"BED"} />;
219
+
216
220
  case "EXCLAMATION_CIRCLE":
217
221
  return (
218
222
  <SvgIconExclamationCircle
@@ -1,4 +1,4 @@
1
- /* eslint-disable no-undef */
1
+
2
2
  /**
3
3
  * IMPORTS
4
4
  */
@@ -15,8 +15,9 @@ import type { IInputDateTimeProps } from "./interface";
15
15
  // styles
16
16
  import { styles } from "./styles";
17
17
  import { theme } from "../../../styles/theme/theme";
18
+ import Typography from "../../typography";
18
19
 
19
- /** formatadores no mesmo estilo simples dos seus componentes */
20
+ /** formatadores simples */
20
21
  function fmtDate(d: Date) {
21
22
  const dd = String(d.getDate()).padStart(2, "0");
22
23
  const mm = String(d.getMonth() + 1).padStart(2, "0");
@@ -47,7 +48,6 @@ const InputDateTime = forwardRef<any, IInputDateTimeProps>((props, ref): React.R
47
48
  testID,
48
49
  } = props;
49
50
 
50
- // estado interno quando o componente não é controlado
51
51
  const [inner, setInner] = useState<Date>(value ?? new Date());
52
52
  const [visible, setVisible] = useState(false);
53
53
 
@@ -83,14 +83,19 @@ const InputDateTime = forwardRef<any, IInputDateTimeProps>((props, ref): React.R
83
83
  disabled={disabled}
84
84
  >
85
85
  <Icons
86
- size={theme.fontSizes["md"]}
86
+ size={theme.fontSizes.md}
87
87
  color={theme.colors.blue[500]}
88
- icon={mode === "date" ? "CALENDAR" : "CALENDAR"}
88
+ icon={mode === "date" ? "CALENDAR" : "TIMER"}
89
89
  style={styles(styleProps).iconStandard}
90
90
  />
91
- <Text style={human ? styles(styleProps).selectedText : styles(styleProps).placeholderText}>
92
- {human || placeholder}
93
- </Text>
91
+
92
+ <Typography
93
+ text={`${human || placeholder}`}
94
+ color={theme.colors.blue[500]}
95
+ fontFamily={theme.fonts.inter_medium_500}
96
+ size={theme.fontSizes.md}
97
+ marginLeft={100}
98
+ />
94
99
  </TouchableOpacity>
95
100
 
96
101
  <Modal
@@ -104,11 +109,7 @@ const InputDateTime = forwardRef<any, IInputDateTimeProps>((props, ref): React.R
104
109
  <View style={styles(styleProps).modalContainer}>
105
110
  <View style={{ width: "100%", alignItems: "flex-end" }}>
106
111
  <TouchableOpacity testID="close-icon" onPress={() => setVisible(false)}>
107
- <Icons
108
- size={theme.fontSizes["md"]}
109
- color={theme.colors.blue[500]}
110
- icon={"CLOSED"}
111
- />
112
+ <Icons size={theme.fontSizes.md} color={theme.colors.blue[500]} icon="CLOSED" />
112
113
  </TouchableOpacity>
113
114
  </View>
114
115
 
@@ -1,63 +1,64 @@
1
- import { StyleSheet } from "react-native";
2
- import { theme } from "../../../styles/theme/theme";
3
- import type { IInputDateTimeProps } from "./interface";
4
-
5
- const styles = (props: IInputDateTimeProps) =>
6
- StyleSheet.create({
7
- container: {
8
- width: "100%",
9
- marginBottom: 16,
10
- opacity: props.disabled ? 0.6 : 1,
11
- },
12
- label: {
13
- fontSize: props.sizeTitleLabel ?? 16,
14
- fontWeight: "bold",
15
- color: props.colortitleLabel ?? theme.colors.black[100],
16
- marginBottom: 5,
17
- },
18
- selectBox: {
19
- flexDirection: "row",
20
- alignItems: "center",
21
- justifyContent: "center",
22
- width: "100%",
23
- height: 45,
24
- borderWidth: 1,
25
- borderColor: theme.colors.gray[700],
26
- borderRadius: 10,
27
- backgroundColor: props.backgroundColor ?? theme.colors.neutral[25],
28
- paddingHorizontal: 10,
29
- position: "relative",
30
- },
31
- selectedText: {
32
- flex: 1,
33
- fontSize: 14,
34
- textAlign: "center",
35
- color: theme.colors.gray[700],
36
- },
37
- placeholderText: {
38
- flex: 1,
39
- textAlign: "center",
40
- fontSize: 14,
41
- color: theme.colors.gray[700],
42
- },
43
- modalOverlay: {
44
- flex: 1,
45
- backgroundColor: "rgba(0,0,0,0.5)",
46
- justifyContent: "center",
47
- alignItems: "center",
48
- padding: 24,
49
- },
50
- modalContainer: {
51
- width: "100%",
52
- backgroundColor: theme.colors.neutral[25],
53
- borderRadius: 10,
54
- padding: 15,
55
- alignItems: "center",
56
- },
57
- iconStandard: {
58
- position: "absolute",
59
- left: 10,
60
- },
61
- });
62
-
63
- export { styles };
1
+ import { StyleSheet } from "react-native";
2
+ import { theme } from "../../../styles/theme/theme";
3
+ import type { IInputDateTimeProps } from "./interface";
4
+
5
+ const styles = (props: IInputDateTimeProps) =>
6
+ StyleSheet.create({
7
+ container: {
8
+ width: "100%",
9
+ marginBottom: 16,
10
+ opacity: props.disabled ? 0.6 : 1,
11
+ },
12
+ label: {
13
+ fontSize: props.sizeTitleLabel ?? 16,
14
+ fontWeight: "bold",
15
+ color: props.colortitleLabel ?? theme.colors.black[100],
16
+ marginBottom: 5,
17
+ },
18
+ selectBox: {
19
+ flexDirection: "row",
20
+ alignItems: "center",
21
+ justifyContent: "flex-start", // não centraliza o container todo
22
+ width: "100%",
23
+ height: 45,
24
+ borderWidth: 1,
25
+ borderColor: theme.colors.gray[700],
26
+ borderRadius: 10,
27
+ backgroundColor: props.backgroundColor ?? theme.colors.neutral[25],
28
+ paddingHorizontal: 10,
29
+ position: "relative",
30
+ },
31
+ selectedText: {
32
+ flex: 1,
33
+ fontSize: 14,
34
+ textAlign: "center", // centraliza o texto no espaço disponível
35
+ color: theme.colors.gray[700],
36
+ marginLeft: 44,
37
+ },
38
+ placeholderText: {
39
+ flex: 1,
40
+ textAlign: "center",
41
+ fontSize: 14,
42
+ color: theme.colors.gray[700],
43
+ },
44
+ modalOverlay: {
45
+ flex: 1,
46
+ backgroundColor: "rgba(0,0,0,0.5)",
47
+ justifyContent: "center",
48
+ alignItems: "center",
49
+ padding: 24,
50
+ },
51
+ modalContainer: {
52
+ width: "100%",
53
+ backgroundColor: theme.colors.neutral[25],
54
+ borderRadius: 10,
55
+ padding: 15,
56
+ alignItems: "center",
57
+ },
58
+ iconStandard: {
59
+ position: "absolute",
60
+ left: 12, // ícone fixo no canto esquerdo
61
+ },
62
+ });
63
+
64
+ export { styles };
@@ -10,6 +10,7 @@ import Typography from "../../typography";
10
10
  import Button from "../../button";
11
11
  import SelectOption from "../../selects/select-option";
12
12
  import InputDateTime from "../../inputs/input-date-time";
13
+ import MaintenanceDescriptionInput from "../../maintenance-description-input";
13
14
 
14
15
  // commons / svg
15
16
  import { Icons } from "../../../common/icons-svg";
@@ -22,44 +23,53 @@ import { asBaseComponent } from "../../../@types/as-base-component";
22
23
  import { theme } from "../../../styles/theme/theme";
23
24
 
24
25
  const options = [
25
- { label: "Disp com veículo parado", value: "option1" },
26
- { label: "Operação com veículo", value: "option2" },
27
- { label: "Em carga", value: "option3" },
28
- { label: "Em descarga", value: "option4" },
26
+ { label: "Disp com veículo parado", value: "8" },
27
+ { label: "Operação com veículo", value: "1" },
28
+ { label: "Em carga", value: "2" },
29
+ { label: "Em descarga", value: "3" },
29
30
  ];
30
31
 
32
+ /**
33
+ * Componente modal para edição de atividade para interação do usuário.
34
+ */
31
35
  const ModalJourneyRectification: React.FC<IModalJourneyRectificationProps> = ({
32
36
  visible,
33
37
  onClose,
34
38
  modalConfirm,
35
39
  textTitle,
40
+ isLoading,
36
41
  }) => {
37
- const [isLoading] = React.useState(false);
38
-
39
- // *** DEFAULTS: já começa com um motivo, data e hora atuais
40
42
  const defaultReason = options[0]?.value ?? null;
41
- const [selectedReason, setSelectedReason] = useState<string | null>(defaultReason); // ***
42
- const [selectedDate, setSelectedDate] = useState<Date>(new Date()); // ***
43
- const [selectedTime, setSelectedTime] = useState<Date>(new Date()); // ***
44
43
 
45
- // helpers de formatação
44
+ const [selectedReason, setSelectedReason] = useState<string | null>(defaultReason);
45
+ const [selectedDate, setSelectedDate] = useState<Date>(new Date());
46
+ const [selectedTime, setSelectedTime] = useState<Date>(new Date());
47
+
48
+ // motivo digitado pelo usuário
49
+ const [editReason, setEditReason] = useState<string>("");
50
+ const [errorReason, setErrorReason] = useState<string>("");
51
+
52
+ // helpers
46
53
  const fmtDate = (d: Date) =>
47
54
  `${String(d.getDate()).padStart(2, "0")}/${String(d.getMonth() + 1).padStart(2, "0")}/${d.getFullYear()}`;
48
-
49
55
  const fmtTime = (d: Date) =>
50
56
  `${String(d.getHours()).padStart(2, "0")}:${String(d.getMinutes()).padStart(2, "0")}`;
51
57
 
52
- // junta data + hora
53
- const mergeDateTime = (date: Date | null, time: Date | null): Date | null => {
54
- if (!date) return null;
55
- const out = new Date(date);
56
- if (time) {
57
- out.setHours(time.getHours());
58
- out.setMinutes(time.getMinutes());
59
- out.setSeconds(0);
60
- out.setMilliseconds(0);
58
+ const handleConfirm = () => {
59
+ if (!editReason.trim()) {
60
+ setErrorReason("Informe o motivo da edição!");
61
+ return;
61
62
  }
62
- return out;
63
+
64
+ const payload = {
65
+ jr_tipo_atividade_id: selectedReason,
66
+ description: options.find((o) => o.value === selectedReason)?.label ?? null,
67
+ date_start: selectedDate ? fmtDate(selectedDate) : null,
68
+ hours_start: selectedTime ? fmtTime(selectedTime) : null,
69
+ edit_reason: editReason.trim(),
70
+ };
71
+
72
+ modalConfirm(payload);
63
73
  };
64
74
 
65
75
  return (
@@ -73,11 +83,9 @@ const ModalJourneyRectification: React.FC<IModalJourneyRectificationProps> = ({
73
83
  }}
74
84
  >
75
85
  <Box
76
- width={"90%"}
86
+ width="90%"
77
87
  backgroundColor={theme.colors.orange[500]}
78
- borderStyled={{
79
- borderRadius: theme.borderWidths.thick_medium,
80
- }}
88
+ borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}
81
89
  paddingStyle={{
82
90
  paddingLeft: theme.paddings["2xs"],
83
91
  paddingRight: theme.paddings["2xs"],
@@ -85,6 +93,7 @@ const ModalJourneyRectification: React.FC<IModalJourneyRectificationProps> = ({
85
93
  paddingBottom: theme.paddings.sm,
86
94
  }}
87
95
  >
96
+ {/* Header */}
88
97
  <Box
89
98
  marginStyle={{ marginBottom: 10, marginLeft: 4 }}
90
99
  flexStyle={{ flexDirection: "row", alignItems: "center" }}
@@ -96,28 +105,28 @@ const ModalJourneyRectification: React.FC<IModalJourneyRectificationProps> = ({
96
105
  size={22}
97
106
  />
98
107
  <Typography
99
- text={`${textTitle ?? "Incluir atividade"}`}
108
+ text={textTitle ?? "Editar atividade"}
100
109
  color={theme.colors.neutral[25]}
101
110
  marginLeft={theme.margins["2xs"]}
102
- fontFamily={theme.fonts.inter_bold_700}
111
+ fontFamily={theme.fonts.inter_bold}
112
+ fontWeight="700"
103
113
  size={theme.fontSizes.lg}
104
114
  />
105
115
  </Box>
106
116
 
117
+ {/* Content */}
107
118
  <Box
108
119
  backgroundColor={theme.colors.neutral[300]}
109
- paddingStyle={{
110
- padding: theme.paddings.xs,
111
- }}
112
- borderStyled={{
113
- borderRadius: theme.borderWidths.thick_medium,
114
- }}
120
+ paddingStyle={{ padding: theme.paddings.xs }}
121
+ borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}
115
122
  >
116
123
  <Typography
117
- text={"Confirme as alterações antes de salvar."}
118
- color={theme.colors.black[25]}
124
+ text="Confirme as alterações antes de salvar."
125
+ color={theme.colors.black[100]}
119
126
  fontFamily={theme.fonts.inter_regular_400}
120
- size={theme.fontSizes.md}
127
+ fontWeight="400"
128
+ lineHeight={theme.lineHeight["2xl"]}
129
+ size={theme.fontSizes.sm}
121
130
  marginBottom={16}
122
131
  />
123
132
 
@@ -125,17 +134,15 @@ const ModalJourneyRectification: React.FC<IModalJourneyRectificationProps> = ({
125
134
  titleLabel="Selecione atividade"
126
135
  sizeTitleLabel={18}
127
136
  dataOption={options}
128
- // Onde o motivo é RECEBIDO: aqui no callback
129
- handleSelectDown={(value) => setSelectedReason(value)} // ***
137
+ handleSelectDown={(value) => setSelectedReason(value)}
130
138
  backgroundColor={theme.colors.neutral[300]}
131
139
  />
132
140
 
133
141
  <InputDateTime
134
142
  mode="date"
135
143
  titleLabel="Data"
136
- // Onde a data é RECEBIDA: no onChange abaixo
137
- value={selectedDate} // *** controlado
138
- onChange={(d) => setSelectedDate(d)} // ***
144
+ value={selectedDate}
145
+ onChange={(d) => setSelectedDate(d)}
139
146
  backgroundColor="#f5f5f5"
140
147
  colortitleLabel="#333"
141
148
  />
@@ -143,13 +150,27 @@ const ModalJourneyRectification: React.FC<IModalJourneyRectificationProps> = ({
143
150
  <InputDateTime
144
151
  mode="time"
145
152
  titleLabel="Horário"
146
- // Onde a hora é RECEBIDA: no onChange abaixo
147
- value={selectedTime} // *** controlado
148
- onChange={(d) => setSelectedTime(d)} // ***
153
+ value={selectedTime}
154
+ onChange={(d) => setSelectedTime(d)}
149
155
  backgroundColor="#f5f5f5"
150
156
  colortitleLabel="#333"
151
157
  />
152
158
 
159
+ <Box width="100%">
160
+ <MaintenanceDescriptionInput
161
+ label="Motivo da edição"
162
+ placeholderTextColor={theme.colors.gray[700]}
163
+ placeholder="Informe o motivo da edição"
164
+ value={editReason}
165
+ onChangeText={(text) => {
166
+ setEditReason(text);
167
+ if (text.trim()) setErrorReason("");
168
+ }}
169
+ error={errorReason}
170
+ />
171
+ </Box>
172
+
173
+ {/* Actions */}
153
174
  <Box
154
175
  marginStyle={{ marginTop: 4 }}
155
176
  flexStyle={{
@@ -160,14 +181,14 @@ const ModalJourneyRectification: React.FC<IModalJourneyRectificationProps> = ({
160
181
  <Button
161
182
  title="CANCELAR"
162
183
  onPress={onClose}
163
- width={"48%"}
184
+ width="48%"
164
185
  height={40}
165
- isLoading={isLoading}
186
+ isLoading={isLoading!}
166
187
  disabled={isLoading}
167
188
  backgroundColor={theme.colors.neutral[300]}
168
189
  buttonTextStyle={{
169
- color: theme.colors.blue[100],
170
- fontFamily: "Inter-Medium",
190
+ color: theme.colors.blue[500],
191
+ fontFamily: theme.fonts.inter_medium_500,
171
192
  fontSize: theme.fontSizes.xs,
172
193
  fontWeight: "500",
173
194
  }}
@@ -185,29 +206,16 @@ const ModalJourneyRectification: React.FC<IModalJourneyRectificationProps> = ({
185
206
  />
186
207
 
187
208
  <Button
188
- title="CONFIRMAR"
189
- onPress={() => {
190
- const merged = mergeDateTime(selectedDate, selectedTime);
191
-
192
- const payload = {
193
- reasonValue: selectedReason,
194
- reasonLabel: options.find((o) => o.value === selectedReason)?.label ?? null,
195
- date: selectedDate ? fmtDate(selectedDate) : null,
196
- time: selectedTime ? fmtTime(selectedTime) : null,
197
- dateTimeISO: merged ? merged.toISOString() : null,
198
- };
199
-
200
- modalConfirm(payload);
201
- onClose();
202
- }}
203
- width={"48%"}
209
+ title="ALTERAR"
210
+ onPress={handleConfirm}
211
+ width="48%"
204
212
  height={40}
205
- isLoading={isLoading}
213
+ isLoading={isLoading!}
206
214
  disabled={isLoading}
207
215
  backgroundColor={theme.colors.blue[500]}
208
216
  buttonTextStyle={{
209
217
  color: theme.colors.neutral[25],
210
- fontFamily: "Inter-Medium",
218
+ fontFamily: theme.fonts.inter_medium_500,
211
219
  fontSize: theme.fontSizes.xs,
212
220
  fontWeight: "500",
213
221
  }}
@@ -233,4 +241,7 @@ const ModalJourneyRectification: React.FC<IModalJourneyRectificationProps> = ({
233
241
 
234
242
  ModalJourneyRectification.displayName = "ModalJourneyRectification";
235
243
 
244
+ /**
245
+ * EXPORTS
246
+ */
236
247
  export default asBaseComponent(ModalJourneyRectification);
@@ -1,10 +1,10 @@
1
- /* eslint-disable no-undef */
2
- /* eslint-disable no-unused-vars */
3
- interface IModalJourneyRectificationProps {
4
- visible: boolean;
5
- onClose: () => void;
6
- modalConfirm: (value: T) => void;
7
- textTitle?: string;
8
- }
9
-
10
- export type { IModalJourneyRectificationProps };
1
+ /* eslint-disable no-unused-vars */
2
+ interface IModalJourneyRectificationProps {
3
+ visible: boolean;
4
+ onClose: () => void;
5
+ modalConfirm: (value: T) => void;
6
+ textTitle?: string;
7
+ isLoading?: boolean;
8
+ }
9
+
10
+ export type { IModalJourneyRectificationProps };
@@ -1,4 +1,4 @@
1
- /* eslint-disable no-undef */
1
+
2
2
  /* eslint-disable no-unused-vars */
3
3
  export interface DayInfo {
4
4
  semana?: string;