jornada-ui 0.4.19 → 0.4.20
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.
- package/lib/commonjs/components/box/index.js +5 -5
- package/lib/commonjs/components/box/index.js.map +1 -1
- package/lib/commonjs/components/button/index.js +5 -5
- package/lib/commonjs/components/button/index.js.map +1 -1
- package/lib/commonjs/components/capture-photo/index.js +1 -1
- package/lib/commonjs/components/capture-photo/index.js.map +1 -1
- package/lib/commonjs/components/card-hours/index.js +5 -5
- package/lib/commonjs/components/card-hours/index.js.map +1 -1
- package/lib/commonjs/components/card-maintenance/index.js +3 -0
- package/lib/commonjs/components/card-maintenance/index.js.map +1 -1
- package/lib/commonjs/components/maintenance-description-input/index.js +5 -1
- package/lib/commonjs/components/maintenance-description-input/index.js.map +1 -1
- package/lib/commonjs/components/modal-maintenance/index.js +2 -0
- package/lib/commonjs/components/modal-maintenance/index.js.map +1 -1
- package/lib/commonjs/components/modal-type-activities/index.js +10 -4
- package/lib/commonjs/components/modal-type-activities/index.js.map +1 -1
- package/lib/commonjs/components/modals/modal-change-activitie-history/index.js +2 -0
- package/lib/commonjs/components/modals/modal-change-activitie-history/index.js.map +1 -1
- package/lib/commonjs/components/report-bobinas/index.js +12 -6
- package/lib/commonjs/components/report-bobinas/index.js.map +1 -1
- package/lib/commonjs/components/resume-raking/index.js +5 -0
- package/lib/commonjs/components/resume-raking/index.js.map +1 -1
- package/lib/commonjs/components/step-indicator/index.js +12 -4
- package/lib/commonjs/components/step-indicator/index.js.map +1 -1
- package/lib/commonjs/components/toast-message/index.js +10 -6
- package/lib/commonjs/components/toast-message/index.js.map +1 -1
- package/lib/commonjs/components/toggle-fuel/index.js +1 -0
- package/lib/commonjs/components/toggle-fuel/index.js.map +1 -1
- package/lib/commonjs/components/typography/index.js +2 -0
- package/lib/commonjs/components/typography/index.js.map +1 -1
- package/lib/commonjs/components/user-journey-work-card/index.js +14 -0
- package/lib/commonjs/components/user-journey-work-card/index.js.map +1 -1
- package/lib/commonjs/components/user-profile/index.js +9 -1
- package/lib/commonjs/components/user-profile/index.js.map +1 -1
- package/lib/commonjs/components/weekly-hours-balance/index.js +2 -0
- package/lib/commonjs/components/weekly-hours-balance/index.js.map +1 -1
- package/lib/module/components/box/index.js +5 -5
- package/lib/module/components/box/index.js.map +1 -1
- package/lib/module/components/button/index.js +5 -5
- package/lib/module/components/button/index.js.map +1 -1
- package/lib/module/components/capture-photo/index.js +1 -1
- package/lib/module/components/capture-photo/index.js.map +1 -1
- package/lib/module/components/card-hours/index.js +5 -5
- package/lib/module/components/card-hours/index.js.map +1 -1
- package/lib/module/components/card-maintenance/index.js +3 -0
- package/lib/module/components/card-maintenance/index.js.map +1 -1
- package/lib/module/components/maintenance-description-input/index.js +5 -1
- package/lib/module/components/maintenance-description-input/index.js.map +1 -1
- package/lib/module/components/modal-maintenance/index.js +2 -0
- package/lib/module/components/modal-maintenance/index.js.map +1 -1
- package/lib/module/components/modal-type-activities/index.js +10 -4
- package/lib/module/components/modal-type-activities/index.js.map +1 -1
- package/lib/module/components/modals/modal-change-activitie-history/index.js +2 -0
- package/lib/module/components/modals/modal-change-activitie-history/index.js.map +1 -1
- package/lib/module/components/report-bobinas/index.js +12 -6
- package/lib/module/components/report-bobinas/index.js.map +1 -1
- package/lib/module/components/resume-raking/index.js +5 -0
- package/lib/module/components/resume-raking/index.js.map +1 -1
- package/lib/module/components/step-indicator/index.js +12 -4
- package/lib/module/components/step-indicator/index.js.map +1 -1
- package/lib/module/components/toast-message/index.js +10 -6
- package/lib/module/components/toast-message/index.js.map +1 -1
- package/lib/module/components/toggle-fuel/index.js +1 -0
- package/lib/module/components/toggle-fuel/index.js.map +1 -1
- package/lib/module/components/typography/index.js +2 -0
- package/lib/module/components/typography/index.js.map +1 -1
- package/lib/module/components/user-journey-work-card/index.js +14 -0
- package/lib/module/components/user-journey-work-card/index.js.map +1 -1
- package/lib/module/components/user-profile/index.js +9 -1
- package/lib/module/components/user-profile/index.js.map +1 -1
- package/lib/module/components/weekly-hours-balance/index.js +2 -0
- package/lib/module/components/weekly-hours-balance/index.js.map +1 -1
- package/lib/typescript/commonjs/src/components/box/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/button/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/capture-photo/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/card-hours/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/card-maintenance/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/maintenance-description-input/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/modal-maintenance/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/modal-type-activities/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/modal-type-activities/interface.d.ts +2 -0
- package/lib/typescript/commonjs/src/components/modal-type-activities/interface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/interface.d.ts +4 -0
- package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/interface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/report-bobinas/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/resume-raking/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/resume-raking/interface.d.ts +13 -0
- package/lib/typescript/commonjs/src/components/resume-raking/interface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/step-indicator/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/components/step-indicator/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/toast-message/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/toast-message/interface.d.ts +1 -0
- package/lib/typescript/commonjs/src/components/toast-message/interface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/toggle-fuel/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/typography/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/components/typography/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/user-journey-work-card/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/user-profile/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/weekly-hours-balance/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/box/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/button/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/capture-photo/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/card-hours/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/card-maintenance/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/maintenance-description-input/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modal-maintenance/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modal-type-activities/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modal-type-activities/interface.d.ts +2 -0
- package/lib/typescript/module/src/components/modal-type-activities/interface.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modals/modal-change-activitie-history/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modals/modal-change-activitie-history/interface.d.ts +4 -0
- package/lib/typescript/module/src/components/modals/modal-change-activitie-history/interface.d.ts.map +1 -1
- package/lib/typescript/module/src/components/report-bobinas/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/resume-raking/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/resume-raking/interface.d.ts +13 -0
- package/lib/typescript/module/src/components/resume-raking/interface.d.ts.map +1 -1
- package/lib/typescript/module/src/components/step-indicator/index.d.ts +3 -0
- package/lib/typescript/module/src/components/step-indicator/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/toast-message/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/toast-message/interface.d.ts +1 -0
- package/lib/typescript/module/src/components/toast-message/interface.d.ts.map +1 -1
- package/lib/typescript/module/src/components/toggle-fuel/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/typography/index.d.ts +1 -0
- package/lib/typescript/module/src/components/typography/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/user-journey-work-card/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/user-profile/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/weekly-hours-balance/index.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/components/box/index.tsx +53 -53
- package/src/components/button/index.tsx +76 -76
- package/src/components/capture-photo/index.tsx +1 -1
- package/src/components/card-hours/index.tsx +121 -121
- package/src/components/card-maintenance/index.tsx +8 -2
- package/src/components/card-maintenance/interface.d.ts +4 -0
- package/src/components/maintenance-description-input/index.tsx +11 -4
- package/src/components/modal-maintenance/index.tsx +2 -1
- package/src/components/modal-maintenance/interface.d.ts +1 -0
- package/src/components/modal-type-activities/index.tsx +23 -5
- package/src/components/modal-type-activities/interface.ts +3 -0
- package/src/components/modals/modal-change-activitie-history/index.tsx +2 -1
- package/src/components/modals/modal-change-activitie-history/interface.ts +4 -0
- package/src/components/report-bobinas/index.tsx +185 -175
- package/src/components/resume-raking/index.tsx +5 -1
- package/src/components/resume-raking/interface.ts +16 -0
- package/src/components/step-indicator/index.tsx +26 -8
- package/src/components/step-indicator/interface.d.ts +3 -0
- package/src/components/toast-message/index.tsx +77 -75
- package/src/components/toast-message/interface.ts +18 -17
- package/src/components/toggle-fuel/index.tsx +1 -0
- package/src/components/typography/index.tsx +2 -0
- package/src/components/typography/interface.d.ts +104 -102
- package/src/components/user-journey-work-card/index.tsx +23 -2
- package/src/components/user-profile/index.tsx +10 -1
- package/src/components/weekly-hours-balance/index.tsx +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/toast-message/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/toast-message/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AA8D1D;;GAEG;;AACH,wBAA6C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../../../src/components/toast-message/interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,KAAK,sBAAsB,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;CACxC,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;CACxC,CAAC;AAEF;;GAEG;AACH,YAAY,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../../../src/components/toast-message/interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,KAAK,sBAAsB,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;CACxC,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;CACxC,CAAC;AAEF;;GAEG;AACH,YAAY,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/toggle-fuel/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAwC,MAAM,OAAO,CAAC;AAI7D,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/toggle-fuel/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAwC,MAAM,OAAO,CAAC;AAI7D,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,aAAa,CAAC;AAmFjE;;GAEG;;AACH,wBAA2C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/typography/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAqB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/typography/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAqB,MAAM,OAAO,CAAC;AAyE1C;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AACH,wBAA2C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/user-journey-work-card/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAqB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/user-journey-work-card/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAqB,MAAM,OAAO,CAAC;AA2O1C;;GAEG;;;;;;;;;;;;;mBA7MK,CAAC;oBAGW,CAAC;4BAGb,CAAC;2BACD,CAAF;+BAC8B,CAAC;8BACD,CAAC;mBAE7B,CAAJ;uBAA8C,CAAC;wBAEtC,CAAC;sBAGN,CAAC;yBAEC,CAAV;mBACoB,CAAC;yBACH,CAAC;uBACP,CAAR;wBACM,CAAT;sBAES,CAAH;;;kBAOS,CAAL;iBACkB,CAAA;YAEY,CAAC;qBAEhC,CAAT;gBAEoC,CAAC;iBAChB,CAAC;sBAEL,CAAC;;;cAUJ,CAAC;kBAEE,CAAR;mBACQ,CAAf;iBACe,CAAT;oBACS,CAAT;;;eAQoC,CAAC;mBAChC,CAAF;oBAEE,CAAX;kBACe,CAAC;qBACH,CAAL;;;;;;;gBAiCiB,CAAC;iBACjB,CAAL;qBACK,CAAT;qBAA2B,CAAC;;;AAsG/B,wBAAoD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/user-profile/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAqB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/user-profile/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAqB,MAAM,OAAO,CAAC;AA4N1C;;GAEG;;;;;;;;;;;;mBArMK,CAAC;oBAIL,CAAC;4BAID,CAAH;2BAGK,CAAA;+BAEA,CAAH;8BAAsD,CAAC;mBACpB,CAAA;uBACM,CAAC;wBAG5B,CAAC;sBACuB,CAAC;yBAAiD,CAAC;mBAEtF,CAAH;yBAEO,CAAR;uBACQ,CAAP;wBACY,CAAC;sBACK,CAAC;;;kBAUL,CAAC;iBAGJ,CAAH;YAGG,CAAJ;qBACO,CAAC;gBAGV,CAAD;iBAIC,CAAD;sBAE6B,CAAA;;;cAcK,CAAC;kBAE7B,CAAC;mBAA2C,CAAC;iBACxB,CAAC;oBACM,CAAC;;;eAU9B,CAAL;mBACK,CAAH;oBACG,CAAZ;kBACU,CAAL;qBAGK,CAAA;;;;;;;gBAyC+B,CAAC;iBACzB,CAAC;qBACL,CAAC;qBAA4B,CAAC;;;AAqE3C,wBAA4C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/weekly-hours-balance/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAA+B,MAAM,OAAO,CAAC;;;;mBAezB,CAAC;oBAEjB,CAAC;4BAAmD,CAAC;2BAEtD,CAAA;+
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/weekly-hours-balance/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAA+B,MAAM,OAAO,CAAC;;;;mBAezB,CAAC;oBAEjB,CAAC;4BAAmD,CAAC;2BAEtD,CAAA;+BAEA,CAAA;8BAEN,CAAD;mBACK,CAAC;uBAGF,CAAC;wBAGA,CAAA;sBAEI,CAAC;yBACH,CAAC;mBACmB,CAAC;yBACvB,CAAF;uBAGI,CAAN;wBACM,CAAA;sBAA4B,CAAC;;;kBAOJ,CAAC;iBAI1B,CAAH;YAGqC,CAAC;qBACV,CAAC;gBAEf,CAAC;iBACD,CAAC;sBAEL,CAAC;;;cAeQ,CAAC;kBACL,CAAC;mBACE,CAAC;iBACZ,CAAD;oBACU,CAAC;;;eAQd,CAAN;mBAGA,CAAF;oBAI6B,CAAA;kBAEf,CAAC;qBACR,CAAC;;;;;;;gBAAi0C,CAAC;iBAAuB,CAAC;qBAA2B,CAAC;qBAA2B,CAAC;;;;AAD55C,wBAAmD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jornada-ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.20",
|
|
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",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"scripts": {
|
|
44
44
|
"example": "yarn workspace jornada-ui-example",
|
|
45
45
|
"test": "jest",
|
|
46
|
+
"test:snapshots": "jest -- -u",
|
|
46
47
|
"storybook": "storybook dev -p 6006",
|
|
47
48
|
"typecheck": "tsc",
|
|
48
49
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
import React, { forwardRef } from "react";
|
|
5
|
-
import { View } from "react-native";
|
|
6
|
-
|
|
7
|
-
// typings
|
|
8
|
-
import { asBaseComponent } from "../../@types/as-base-component";
|
|
9
|
-
import type { IBoxInterface } from "./interface";
|
|
10
|
-
|
|
11
|
-
// styles
|
|
12
|
-
import { styles } from "./styles";
|
|
13
|
-
|
|
14
|
-
const Box = forwardRef<any, IBoxInterface>((props, ref): React.ReactElement => {
|
|
15
|
-
const {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
style,
|
|
27
|
-
} = props;
|
|
28
|
-
|
|
29
|
-
const styleProps = {
|
|
30
|
-
width,
|
|
31
|
-
height,
|
|
32
|
-
backgroundColor,
|
|
33
|
-
borderStyled,
|
|
34
|
-
flexStyle,
|
|
35
|
-
paddingStyle,
|
|
36
|
-
marginStyle,
|
|
37
|
-
opacity,
|
|
38
|
-
style,
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<View ref={ref} testID={testID} style={[styles(styleProps).boxStyle, style]}>
|
|
43
|
-
{children}
|
|
44
|
-
</View>
|
|
45
|
-
);
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
Box.displayName = "Box";
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Componente Box para a interação da ui.
|
|
52
|
-
*/
|
|
53
|
-
export default asBaseComponent(Box);
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React, { forwardRef } from "react";
|
|
5
|
+
import { View } from "react-native";
|
|
6
|
+
|
|
7
|
+
// typings
|
|
8
|
+
import { asBaseComponent } from "../../@types/as-base-component";
|
|
9
|
+
import type { IBoxInterface } from "./interface";
|
|
10
|
+
|
|
11
|
+
// styles
|
|
12
|
+
import { styles } from "./styles";
|
|
13
|
+
|
|
14
|
+
const Box = forwardRef<any, IBoxInterface>((props, ref): React.ReactElement => {
|
|
15
|
+
const {
|
|
16
|
+
testID = "box",
|
|
17
|
+
children,
|
|
18
|
+
width,
|
|
19
|
+
height,
|
|
20
|
+
backgroundColor,
|
|
21
|
+
borderStyled,
|
|
22
|
+
flexStyle,
|
|
23
|
+
paddingStyle,
|
|
24
|
+
marginStyle,
|
|
25
|
+
opacity = 1,
|
|
26
|
+
style,
|
|
27
|
+
} = props;
|
|
28
|
+
|
|
29
|
+
const styleProps = {
|
|
30
|
+
width,
|
|
31
|
+
height,
|
|
32
|
+
backgroundColor,
|
|
33
|
+
borderStyled,
|
|
34
|
+
flexStyle,
|
|
35
|
+
paddingStyle,
|
|
36
|
+
marginStyle,
|
|
37
|
+
opacity,
|
|
38
|
+
style,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<View ref={ref} testID={testID} style={[styles(styleProps).boxStyle, style]}>
|
|
43
|
+
{children}
|
|
44
|
+
</View>
|
|
45
|
+
);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
Box.displayName = "Box";
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Componente Box para a interação da ui.
|
|
52
|
+
*/
|
|
53
|
+
export default asBaseComponent(Box);
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
import React, { forwardRef } from "react";
|
|
5
|
-
import { Text, TouchableOpacity, type TextStyle, ActivityIndicator, View } from "react-native";
|
|
6
|
-
// typings
|
|
7
|
-
import { asBaseComponent } from "../../@types/as-base-component";
|
|
8
|
-
import { type IButtonProps } from "./interface";
|
|
9
|
-
|
|
10
|
-
// styles
|
|
11
|
-
import { styles } from "./styles";
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Componente Button para a interação da ui.
|
|
15
|
-
*/
|
|
16
|
-
const Button = forwardRef<any, IButtonProps>((props, ref): React.ReactElement => {
|
|
17
|
-
const {
|
|
18
|
-
title = "Button",
|
|
19
|
-
width,
|
|
20
|
-
height,
|
|
21
|
-
backgroundColor,
|
|
22
|
-
borderStyled,
|
|
23
|
-
flexStyle,
|
|
24
|
-
paddingStyle,
|
|
25
|
-
marginStyle,
|
|
26
|
-
testID,
|
|
27
|
-
opacity = 1,
|
|
28
|
-
children,
|
|
29
|
-
style,
|
|
30
|
-
fontStyle,
|
|
31
|
-
buttonTextStyle,
|
|
32
|
-
onPress,
|
|
33
|
-
isLoading,
|
|
34
|
-
...res
|
|
35
|
-
} = props;
|
|
36
|
-
|
|
37
|
-
const styleProps = {
|
|
38
|
-
testID,
|
|
39
|
-
width,
|
|
40
|
-
height,
|
|
41
|
-
opacity,
|
|
42
|
-
backgroundColor,
|
|
43
|
-
children,
|
|
44
|
-
borderStyled,
|
|
45
|
-
flexStyle,
|
|
46
|
-
paddingStyle,
|
|
47
|
-
marginStyle,
|
|
48
|
-
fontStyle,
|
|
49
|
-
buttonTextStyle,
|
|
50
|
-
isLoading,
|
|
51
|
-
style,
|
|
52
|
-
} as IButtonProps;
|
|
53
|
-
|
|
54
|
-
Button.displayName = "Button";
|
|
55
|
-
|
|
56
|
-
return (
|
|
57
|
-
<TouchableOpacity
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
style={[styles(styleProps).buttonStyle, style]}
|
|
62
|
-
onPress={onPress}
|
|
63
|
-
{...res}
|
|
64
|
-
>
|
|
65
|
-
{isLoading ? (
|
|
66
|
-
<ActivityIndicator testID="button-loading" size="small" color="white" />
|
|
67
|
-
) : (
|
|
68
|
-
<Text style={[styles(styleProps).buttonTextStyle as TextStyle]}>{title}</Text>
|
|
69
|
-
)}
|
|
70
|
-
|
|
71
|
-
<View />
|
|
72
|
-
</TouchableOpacity>
|
|
73
|
-
);
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
export default asBaseComponent(Button);
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React, { forwardRef } from "react";
|
|
5
|
+
import { Text, TouchableOpacity, type TextStyle, ActivityIndicator, View } from "react-native";
|
|
6
|
+
// typings
|
|
7
|
+
import { asBaseComponent } from "../../@types/as-base-component";
|
|
8
|
+
import { type IButtonProps } from "./interface";
|
|
9
|
+
|
|
10
|
+
// styles
|
|
11
|
+
import { styles } from "./styles";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Componente Button para a interação da ui.
|
|
15
|
+
*/
|
|
16
|
+
const Button = forwardRef<any, IButtonProps>((props, ref): React.ReactElement => {
|
|
17
|
+
const {
|
|
18
|
+
title = "Button",
|
|
19
|
+
width,
|
|
20
|
+
height,
|
|
21
|
+
backgroundColor,
|
|
22
|
+
borderStyled,
|
|
23
|
+
flexStyle,
|
|
24
|
+
paddingStyle,
|
|
25
|
+
marginStyle,
|
|
26
|
+
testID,
|
|
27
|
+
opacity = 1,
|
|
28
|
+
children,
|
|
29
|
+
style,
|
|
30
|
+
fontStyle,
|
|
31
|
+
buttonTextStyle,
|
|
32
|
+
onPress,
|
|
33
|
+
isLoading,
|
|
34
|
+
...res
|
|
35
|
+
} = props;
|
|
36
|
+
|
|
37
|
+
const styleProps = {
|
|
38
|
+
testID,
|
|
39
|
+
width,
|
|
40
|
+
height,
|
|
41
|
+
opacity,
|
|
42
|
+
backgroundColor,
|
|
43
|
+
children,
|
|
44
|
+
borderStyled,
|
|
45
|
+
flexStyle,
|
|
46
|
+
paddingStyle,
|
|
47
|
+
marginStyle,
|
|
48
|
+
fontStyle,
|
|
49
|
+
buttonTextStyle,
|
|
50
|
+
isLoading,
|
|
51
|
+
style,
|
|
52
|
+
} as IButtonProps;
|
|
53
|
+
|
|
54
|
+
Button.displayName = "Button";
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<TouchableOpacity
|
|
58
|
+
testID={testID}
|
|
59
|
+
ref={ref}
|
|
60
|
+
activeOpacity={0.7}
|
|
61
|
+
style={[styles(styleProps).buttonStyle, style]}
|
|
62
|
+
onPress={onPress}
|
|
63
|
+
{...res}
|
|
64
|
+
>
|
|
65
|
+
{isLoading ? (
|
|
66
|
+
<ActivityIndicator testID="button-loading" size="small" color="white" />
|
|
67
|
+
) : (
|
|
68
|
+
<Text style={[styles(styleProps).buttonTextStyle as TextStyle]}>{title}</Text>
|
|
69
|
+
)}
|
|
70
|
+
|
|
71
|
+
<View />
|
|
72
|
+
</TouchableOpacity>
|
|
73
|
+
);
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
export default asBaseComponent(Button);
|
|
@@ -62,10 +62,10 @@ const CapturePhoto = forwardRef<any, ICapturePhotoProps>((props, ref): React.Rea
|
|
|
62
62
|
|
|
63
63
|
return (
|
|
64
64
|
<TouchableOpacity
|
|
65
|
+
testID={testID}
|
|
65
66
|
ref={ref}
|
|
66
67
|
activeOpacity={0.7}
|
|
67
68
|
onPress={takePhotoWithImagePicker}
|
|
68
|
-
testID={testID}
|
|
69
69
|
style={[styles.capturePhoto, containerStyle, style]} // <- container SEMPRE aqui
|
|
70
70
|
>
|
|
71
71
|
{imageComprovante ? (
|
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/ import React, { forwardRef } from "react";
|
|
4
|
-
|
|
5
|
-
// components
|
|
6
|
-
import Box from "../box";
|
|
7
|
-
import Typography from "../typography";
|
|
8
|
-
|
|
9
|
-
// typing
|
|
10
|
-
import { asBaseComponent } from "../../@types/as-base-component";
|
|
11
|
-
import { type ICardHoursProps } from "./interface";
|
|
12
|
-
|
|
13
|
-
// styles
|
|
14
|
-
import { theme } from "../../styles/theme/theme";
|
|
15
|
-
|
|
16
|
-
const CardHours = forwardRef<any, ICardHoursProps>((props, ref): React.ReactElement => {
|
|
17
|
-
const {
|
|
18
|
-
testID,
|
|
19
|
-
width,
|
|
20
|
-
height,
|
|
21
|
-
hoursWorked,
|
|
22
|
-
flexStyle,
|
|
23
|
-
marginStyle,
|
|
24
|
-
paddingStyle,
|
|
25
|
-
text,
|
|
26
|
-
color,
|
|
27
|
-
fontStyle,
|
|
28
|
-
borderStyled,
|
|
29
|
-
backgroundColor,
|
|
30
|
-
sizeHours,
|
|
31
|
-
sizeDescription,
|
|
32
|
-
handleFormatDataInDayMonthYearNotHours,
|
|
33
|
-
style,
|
|
34
|
-
} = props;
|
|
35
|
-
|
|
36
|
-
const styleProps = {
|
|
37
|
-
testID,
|
|
38
|
-
width,
|
|
39
|
-
height,
|
|
40
|
-
marginStyle,
|
|
41
|
-
paddingStyle,
|
|
42
|
-
flexStyle,
|
|
43
|
-
text,
|
|
44
|
-
borderStyled,
|
|
45
|
-
color,
|
|
46
|
-
fontStyle,
|
|
47
|
-
backgroundColor,
|
|
48
|
-
sizeHours,
|
|
49
|
-
sizeDescription,
|
|
50
|
-
style,
|
|
51
|
-
} as ICardHoursProps;
|
|
52
|
-
return (
|
|
53
|
-
<Box
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
width={width ?? "100%"}
|
|
57
|
-
height={height}
|
|
58
|
-
backgroundColor={backgroundColor ?? theme.colors.neutral[25]}
|
|
59
|
-
borderStyled={{
|
|
60
|
-
borderWidth: borderStyled?.borderWidth ?? theme.borderWidths.thin,
|
|
61
|
-
borderColor: borderStyled?.borderColor ?? theme.colors.gray[400],
|
|
62
|
-
borderRadius: borderStyled?.borderRadius ?? theme.borderWidths.thick_medium,
|
|
63
|
-
}}
|
|
64
|
-
>
|
|
65
|
-
<Typography
|
|
66
|
-
text={text ?? "Informe texto:"}
|
|
67
|
-
size={Number(styleProps.fontStyle?.fontSize)}
|
|
68
|
-
fontFamily={styleProps.fontStyle?.fontFamily}
|
|
69
|
-
color={color?.colorText ?? theme.colors.gray[700]}
|
|
70
|
-
lineHeight={fontStyle?.lineHeight ?? theme.fontSizes.xl}
|
|
71
|
-
letterSpacing={"regular"}
|
|
72
|
-
paddingTop={theme.paddings["2xs"]}
|
|
73
|
-
paddingLeft={theme.paddings["2xs"]}
|
|
74
|
-
/>
|
|
75
|
-
|
|
76
|
-
<Box
|
|
77
|
-
flexStyle={{
|
|
78
|
-
flexDirection: "row",
|
|
79
|
-
alignItems: "flex-end",
|
|
80
|
-
justifyContent: "space-between",
|
|
81
|
-
}}
|
|
82
|
-
paddingStyle={{
|
|
83
|
-
paddingLeft: theme.paddings["2xs"],
|
|
84
|
-
paddingRight: theme.paddings["2xs"],
|
|
85
|
-
}}
|
|
86
|
-
backgroundColor={backgroundColor ?? theme.colors.neutral[25]}
|
|
87
|
-
width={"100%"}
|
|
88
|
-
borderStyled={{
|
|
89
|
-
borderBottomLeftRadius:
|
|
90
|
-
borderStyled?.borderBottomLeftRadius ?? theme.borderWidths.thick_medium,
|
|
91
|
-
borderBottomRightRadius:
|
|
92
|
-
borderStyled?.borderBottomRightRadius ?? theme.borderWidths.thick_medium,
|
|
93
|
-
}}
|
|
94
|
-
>
|
|
95
|
-
<Typography
|
|
96
|
-
text={`${hoursWorked ?? "00:00 H"}`}
|
|
97
|
-
size={sizeHours ?? theme.fontSizes["3xl"]}
|
|
98
|
-
fontFamily={theme.fonts.inter_bold ?? "inter_bold"}
|
|
99
|
-
fontWeight="700"
|
|
100
|
-
color={color?.colorTextBold ?? theme.colors.orange[150]}
|
|
101
|
-
lineHeight={fontStyle?.lineHeight ?? theme.fontSizes["5xl"]}
|
|
102
|
-
letterSpacing={"regular"}
|
|
103
|
-
/>
|
|
104
|
-
|
|
105
|
-
<Typography
|
|
106
|
-
text={`Última atualização: ${handleFormatDataInDayMonthYearNotHours(new Date())}`}
|
|
107
|
-
size={sizeDescription ?? theme.fontSizes.xs}
|
|
108
|
-
fontFamily={"inter_light_300"}
|
|
109
|
-
color={color?.colorTextData ?? theme.colors.gray[700]}
|
|
110
|
-
lineHeight={fontStyle?.lineHeight ?? theme.fontSizes["xl"]}
|
|
111
|
-
letterSpacing={"regular"}
|
|
112
|
-
/>
|
|
113
|
-
</Box>
|
|
114
|
-
</Box>
|
|
115
|
-
);
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Componente CardHours para a interação da ui.
|
|
120
|
-
*/
|
|
121
|
-
export default asBaseComponent(CardHours);
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/ import React, { forwardRef } from "react";
|
|
4
|
+
|
|
5
|
+
// components
|
|
6
|
+
import Box from "../box";
|
|
7
|
+
import Typography from "../typography";
|
|
8
|
+
|
|
9
|
+
// typing
|
|
10
|
+
import { asBaseComponent } from "../../@types/as-base-component";
|
|
11
|
+
import { type ICardHoursProps } from "./interface";
|
|
12
|
+
|
|
13
|
+
// styles
|
|
14
|
+
import { theme } from "../../styles/theme/theme";
|
|
15
|
+
|
|
16
|
+
const CardHours = forwardRef<any, ICardHoursProps>((props, ref): React.ReactElement => {
|
|
17
|
+
const {
|
|
18
|
+
testID,
|
|
19
|
+
width,
|
|
20
|
+
height,
|
|
21
|
+
hoursWorked,
|
|
22
|
+
flexStyle,
|
|
23
|
+
marginStyle,
|
|
24
|
+
paddingStyle,
|
|
25
|
+
text,
|
|
26
|
+
color,
|
|
27
|
+
fontStyle,
|
|
28
|
+
borderStyled,
|
|
29
|
+
backgroundColor,
|
|
30
|
+
sizeHours,
|
|
31
|
+
sizeDescription,
|
|
32
|
+
handleFormatDataInDayMonthYearNotHours,
|
|
33
|
+
style,
|
|
34
|
+
} = props;
|
|
35
|
+
|
|
36
|
+
const styleProps = {
|
|
37
|
+
testID,
|
|
38
|
+
width,
|
|
39
|
+
height,
|
|
40
|
+
marginStyle,
|
|
41
|
+
paddingStyle,
|
|
42
|
+
flexStyle,
|
|
43
|
+
text,
|
|
44
|
+
borderStyled,
|
|
45
|
+
color,
|
|
46
|
+
fontStyle,
|
|
47
|
+
backgroundColor,
|
|
48
|
+
sizeHours,
|
|
49
|
+
sizeDescription,
|
|
50
|
+
style,
|
|
51
|
+
} as ICardHoursProps;
|
|
52
|
+
return (
|
|
53
|
+
<Box
|
|
54
|
+
testID={testID}
|
|
55
|
+
ref={ref}
|
|
56
|
+
width={width ?? "100%"}
|
|
57
|
+
height={height}
|
|
58
|
+
backgroundColor={backgroundColor ?? theme.colors.neutral[25]}
|
|
59
|
+
borderStyled={{
|
|
60
|
+
borderWidth: borderStyled?.borderWidth ?? theme.borderWidths.thin,
|
|
61
|
+
borderColor: borderStyled?.borderColor ?? theme.colors.gray[400],
|
|
62
|
+
borderRadius: borderStyled?.borderRadius ?? theme.borderWidths.thick_medium,
|
|
63
|
+
}}
|
|
64
|
+
>
|
|
65
|
+
<Typography
|
|
66
|
+
text={text ?? "Informe texto:"}
|
|
67
|
+
size={Number(styleProps.fontStyle?.fontSize)}
|
|
68
|
+
fontFamily={styleProps.fontStyle?.fontFamily}
|
|
69
|
+
color={color?.colorText ?? theme.colors.gray[700]}
|
|
70
|
+
lineHeight={fontStyle?.lineHeight ?? theme.fontSizes.xl}
|
|
71
|
+
letterSpacing={"regular"}
|
|
72
|
+
paddingTop={theme.paddings["2xs"]}
|
|
73
|
+
paddingLeft={theme.paddings["2xs"]}
|
|
74
|
+
/>
|
|
75
|
+
|
|
76
|
+
<Box
|
|
77
|
+
flexStyle={{
|
|
78
|
+
flexDirection: "row",
|
|
79
|
+
alignItems: "flex-end",
|
|
80
|
+
justifyContent: "space-between",
|
|
81
|
+
}}
|
|
82
|
+
paddingStyle={{
|
|
83
|
+
paddingLeft: theme.paddings["2xs"],
|
|
84
|
+
paddingRight: theme.paddings["2xs"],
|
|
85
|
+
}}
|
|
86
|
+
backgroundColor={backgroundColor ?? theme.colors.neutral[25]}
|
|
87
|
+
width={"100%"}
|
|
88
|
+
borderStyled={{
|
|
89
|
+
borderBottomLeftRadius:
|
|
90
|
+
borderStyled?.borderBottomLeftRadius ?? theme.borderWidths.thick_medium,
|
|
91
|
+
borderBottomRightRadius:
|
|
92
|
+
borderStyled?.borderBottomRightRadius ?? theme.borderWidths.thick_medium,
|
|
93
|
+
}}
|
|
94
|
+
>
|
|
95
|
+
<Typography
|
|
96
|
+
text={`${hoursWorked ?? "00:00 H"}`}
|
|
97
|
+
size={sizeHours ?? theme.fontSizes["3xl"]}
|
|
98
|
+
fontFamily={theme.fonts.inter_bold ?? "inter_bold"}
|
|
99
|
+
fontWeight="700"
|
|
100
|
+
color={color?.colorTextBold ?? theme.colors.orange[150]}
|
|
101
|
+
lineHeight={fontStyle?.lineHeight ?? theme.fontSizes["5xl"]}
|
|
102
|
+
letterSpacing={"regular"}
|
|
103
|
+
/>
|
|
104
|
+
|
|
105
|
+
<Typography
|
|
106
|
+
text={`Última atualização: ${handleFormatDataInDayMonthYearNotHours(new Date())}`}
|
|
107
|
+
size={sizeDescription ?? theme.fontSizes.xs}
|
|
108
|
+
fontFamily={"inter_light_300"}
|
|
109
|
+
color={color?.colorTextData ?? theme.colors.gray[700]}
|
|
110
|
+
lineHeight={fontStyle?.lineHeight ?? theme.fontSizes["xl"]}
|
|
111
|
+
letterSpacing={"regular"}
|
|
112
|
+
/>
|
|
113
|
+
</Box>
|
|
114
|
+
</Box>
|
|
115
|
+
);
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Componente CardHours para a interação da ui.
|
|
120
|
+
*/
|
|
121
|
+
export default asBaseComponent(CardHours);
|
|
@@ -24,12 +24,17 @@ import { getStatusColorHex } from "../../utils/get-status-color";
|
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
26
|
const CardMaintenance = forwardRef<any, ICardMaintenance>((props, ref): React.ReactElement => {
|
|
27
|
-
const { numero, dataRegistro, cavalo, imagemUrl, descricao, status, titutlo } = props;
|
|
27
|
+
const { testID, numero, dataRegistro, cavalo, imagemUrl, descricao, status, titutlo } = props;
|
|
28
28
|
const [showModal, setShowModal] = useState(false);
|
|
29
29
|
|
|
30
30
|
return (
|
|
31
31
|
<>
|
|
32
|
-
<TouchableOpacity
|
|
32
|
+
<TouchableOpacity
|
|
33
|
+
testID={testID}
|
|
34
|
+
ref={ref}
|
|
35
|
+
onPress={() => setShowModal(true)}
|
|
36
|
+
activeOpacity={0.9}
|
|
37
|
+
>
|
|
33
38
|
<Box
|
|
34
39
|
width={"100%"}
|
|
35
40
|
flexStyle={{ flexDirection: "row" }}
|
|
@@ -128,6 +133,7 @@ const CardMaintenance = forwardRef<any, ICardMaintenance>((props, ref): React.Re
|
|
|
128
133
|
</TouchableOpacity>
|
|
129
134
|
|
|
130
135
|
<ModalMaintenance
|
|
136
|
+
testID={`${testID}-modal`}
|
|
131
137
|
visible={showModal}
|
|
132
138
|
onClose={() => setShowModal(false)}
|
|
133
139
|
imagemUrl={imagemUrl}
|