react-native-exp-fig 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/README.md +119 -0
- package/package.json +200 -0
- package/react-native.config.js +4 -0
- package/src/assets/fonts/Inter-Black.ttf +0 -0
- package/src/assets/fonts/Inter-Bold.ttf +0 -0
- package/src/assets/fonts/Inter-ExtraBold.ttf +0 -0
- package/src/assets/fonts/Inter-ExtraLight.ttf +0 -0
- package/src/assets/fonts/Inter-Light.ttf +0 -0
- package/src/assets/fonts/Inter-Medium.ttf +0 -0
- package/src/assets/fonts/Inter-Regular.ttf +0 -0
- package/src/assets/fonts/Inter-SemiBold.ttf +0 -0
- package/src/assets/fonts/Inter-Thin.ttf +0 -0
- package/src/common/icons-svg/arrow-drop-down/index.tsx +28 -0
- package/src/common/icons-svg/arrow-left/index.tsx +32 -0
- package/src/common/icons-svg/bluetooth/index.tsx +37 -0
- package/src/common/icons-svg/bluetooth-connected/index.tsx +41 -0
- package/src/common/icons-svg/calendar/index.tsx +40 -0
- package/src/common/icons-svg/call-bell/index.tsx +29 -0
- package/src/common/icons-svg/camera-plus/index.tsx +40 -0
- package/src/common/icons-svg/check-box-fill/index.tsx +30 -0
- package/src/common/icons-svg/check-box-outline/index.tsx +30 -0
- package/src/common/icons-svg/check-circle/index.tsx +27 -0
- package/src/common/icons-svg/closed/index.tsx +34 -0
- package/src/common/icons-svg/constants/index.ts +43 -0
- package/src/common/icons-svg/credit-card/index.tsx +32 -0
- package/src/common/icons-svg/currency/index.tsx +39 -0
- package/src/common/icons-svg/eye/index.tsx +31 -0
- package/src/common/icons-svg/eye-slash/index.tsx +31 -0
- package/src/common/icons-svg/file-text/index.tsx +39 -0
- package/src/common/icons-svg/gas-pump/index.tsx +39 -0
- package/src/common/icons-svg/gauge/index.tsx +39 -0
- package/src/common/icons-svg/gear/index.tsx +39 -0
- package/src/common/icons-svg/index.tsx +149 -0
- package/src/common/icons-svg/interface.d.ts +18 -0
- package/src/common/icons-svg/list/index.tsx +58 -0
- package/src/common/icons-svg/moon-stars/index.tsx +29 -0
- package/src/common/icons-svg/note-pincel/index.tsx +40 -0
- package/src/common/icons-svg/package-check/index.tsx +45 -0
- package/src/common/icons-svg/shopping-cart/index.tsx +39 -0
- package/src/common/icons-svg/steering-wheel/index.tsx +49 -0
- package/src/common/icons-svg/steering-wheel-fill/index.tsx +36 -0
- package/src/common/icons-svg/timer/index.tsx +39 -0
- package/src/common/icons-svg/trophy/index.tsx +29 -0
- package/src/common/icons-svg/truck/index.tsx +39 -0
- package/src/common/icons-svg/wifi-high/index.tsx +43 -0
- package/src/common/icons-svg/wifi-x/index.tsx +50 -0
- package/src/components/box/index.tsx +47 -0
- package/src/components/box/interface.d.ts +31 -0
- package/src/components/box/styles.ts +21 -0
- package/src/components/button/index.tsx +61 -0
- package/src/components/button/interface.d.ts +40 -0
- package/src/components/button/styles.ts +34 -0
- package/src/components/capture-photo/index.tsx +125 -0
- package/src/components/capture-photo/interface.d.ts +44 -0
- package/src/components/capture-photo/styles.ts +24 -0
- package/src/components/card-hours/index.tsx +118 -0
- package/src/components/card-hours/interface.d.ts +37 -0
- package/src/components/card-scheduled-journey/index.tsx +138 -0
- package/src/components/card-scheduled-journey/interface.ts +42 -0
- package/src/components/card-scheduled-journey/styles.ts +26 -0
- package/src/components/header-profile/index.tsx +128 -0
- package/src/components/header-profile/interface.d.ts +52 -0
- package/src/components/input/index.tsx +180 -0
- package/src/components/input/interface.d.ts +55 -0
- package/src/components/input/styles.ts +23 -0
- package/src/components/scheduled-journey-indicators/index.tsx +99 -0
- package/src/components/scheduled-journey-indicators/interface.d.ts +18 -0
- package/src/components/selects/select-option/index.tsx +104 -0
- package/src/components/selects/select-option/interface.d.ts +18 -0
- package/src/components/selects/select-option/styles.ts +75 -0
- package/src/components/step-indicator/helpers/get-icon-by-status.tsx +20 -0
- package/src/components/step-indicator/index.tsx +164 -0
- package/src/components/step-indicator/interface.d.ts +34 -0
- package/src/components/step-indicator/styles.ts +67 -0
- package/src/components/typography/index.tsx +67 -0
- package/src/components/typography/interface.d.ts +102 -0
- package/src/components/typography/styles.ts +34 -0
- package/src/index.tsx +23 -0
- package/src/stories/box/box.stories.tsx +106 -0
- package/src/stories/button/button.stories.tsx +143 -0
- package/src/stories/capture-photo/capture-photo.stories.tsx +170 -0
- package/src/stories/card-hours/card-hours.stories.tsx +102 -0
- package/src/stories/card-scheduled-journey/card-scheduled-journey.stories.tsx +101 -0
- package/src/stories/header-profile/header-profile.stories.tsx +84 -0
- package/src/stories/input/input.stories.tsx +286 -0
- package/src/stories/scheduled-journey-indicators/sheduled-journey-indicators.stories.tsx +74 -0
- package/src/stories/select-option/select-option.stories.tsx +46 -0
- package/src/stories/step-indicator/step-indicator.stories.tsx +116 -0
- package/src/stories/typography/typography.stories.tsx +146 -0
- package/src/styles/global/interface.d.ts +131 -0
- package/src/styles/global/styles.ts +63 -0
- package/src/styles/global/theme-provider.tsx +10 -0
- package/src/styles/theme/theme.ts +156 -0
- package/src/utils/format-data/index.ts +14 -0
- package/src/utils/mutiply/index.ts +3 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/* eslint-disable no-undef */
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
|
|
4
|
+
import { Button } from "../../components/button";
|
|
5
|
+
import { theme } from "../../styles/theme/theme";
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof Button> = {
|
|
8
|
+
title: "Componente/Button",
|
|
9
|
+
component: Button,
|
|
10
|
+
args: {
|
|
11
|
+
onPress: () => {},
|
|
12
|
+
},
|
|
13
|
+
parameters: {
|
|
14
|
+
notes: `
|
|
15
|
+
# Button
|
|
16
|
+
|
|
17
|
+
Este é um componente de button.
|
|
18
|
+
Você usa assim:
|
|
19
|
+
\`\`\`tsx
|
|
20
|
+
<Button text="Eu sou um button!"
|
|
21
|
+
/>
|
|
22
|
+
\`\`\`
|
|
23
|
+
`,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default meta;
|
|
28
|
+
|
|
29
|
+
type Story = StoryObj<typeof meta>;
|
|
30
|
+
|
|
31
|
+
export const Basic: Story = {
|
|
32
|
+
name: "button-basic",
|
|
33
|
+
args: {
|
|
34
|
+
title: "Button",
|
|
35
|
+
backgroundColor: theme.colors.blue[500],
|
|
36
|
+
onPress: () => alert("Clicou!"),
|
|
37
|
+
width: "100%",
|
|
38
|
+
height: 45,
|
|
39
|
+
flexStyle: {
|
|
40
|
+
alignItems: "center",
|
|
41
|
+
justifyContent: "center",
|
|
42
|
+
textAlign: "center",
|
|
43
|
+
},
|
|
44
|
+
borderStyled: {
|
|
45
|
+
borderWidth: 1,
|
|
46
|
+
borderColor: theme.colors.blue[500],
|
|
47
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
buttonTextStyle: {
|
|
51
|
+
fontFamily: theme.fonts.inter_regular_400,
|
|
52
|
+
fontSize: theme.fontSizes.lg,
|
|
53
|
+
color: theme.colors.neutral[25],
|
|
54
|
+
fontWeight: "500",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const ButtonConfirm: Story = {
|
|
60
|
+
name: "button-confirm",
|
|
61
|
+
args: {
|
|
62
|
+
testID: "button-confirmar-test-id",
|
|
63
|
+
title: "CONFIRMAR RELATÓRIO",
|
|
64
|
+
backgroundColor: theme.colors.blue[500],
|
|
65
|
+
onPress: () => alert("Clicou!"),
|
|
66
|
+
width: "100%",
|
|
67
|
+
height: 45,
|
|
68
|
+
flexStyle: {
|
|
69
|
+
alignItems: "center",
|
|
70
|
+
justifyContent: "center",
|
|
71
|
+
textAlign: "center",
|
|
72
|
+
},
|
|
73
|
+
borderStyled: {
|
|
74
|
+
borderWidth: 1,
|
|
75
|
+
borderColor: theme.colors.blue[500],
|
|
76
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
77
|
+
},
|
|
78
|
+
buttonTextStyle: {
|
|
79
|
+
fontFamily: theme.fonts.inter_medium_500,
|
|
80
|
+
fontSize: theme.fontSizes.lg,
|
|
81
|
+
color: theme.colors.neutral[25],
|
|
82
|
+
fontWeight: "500",
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export const ButtonCancel: Story = {
|
|
88
|
+
name: "button-cancel",
|
|
89
|
+
args: {
|
|
90
|
+
testID: "button-confirmar-test-id",
|
|
91
|
+
title: "CANCELAR EDIÇÃO",
|
|
92
|
+
backgroundColor: theme.colors.red[900],
|
|
93
|
+
onPress: () => alert("Clicou!"),
|
|
94
|
+
width: "100%",
|
|
95
|
+
height: 45,
|
|
96
|
+
flexStyle: {
|
|
97
|
+
alignItems: "center",
|
|
98
|
+
justifyContent: "center",
|
|
99
|
+
textAlign: "center",
|
|
100
|
+
},
|
|
101
|
+
borderStyled: {
|
|
102
|
+
borderWidth: 1,
|
|
103
|
+
borderColor: theme.colors.red[900],
|
|
104
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
105
|
+
},
|
|
106
|
+
buttonTextStyle: {
|
|
107
|
+
fontFamily: theme.fonts.inter_bold_700,
|
|
108
|
+
fontSize: theme.fontSizes.lg,
|
|
109
|
+
color: theme.colors.neutral[25],
|
|
110
|
+
fontWeight: "500",
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export const ButtonRectifyJourney: Story = {
|
|
116
|
+
name: "button-rectify-journey",
|
|
117
|
+
|
|
118
|
+
args: {
|
|
119
|
+
testID: "button-rectify-test-id",
|
|
120
|
+
title: "RETIFICAR JORNADA",
|
|
121
|
+
backgroundColor: theme.colors.orange[450],
|
|
122
|
+
onPress: () => alert("Clicou!"),
|
|
123
|
+
width: "100%",
|
|
124
|
+
height: 45,
|
|
125
|
+
|
|
126
|
+
flexStyle: {
|
|
127
|
+
alignItems: "center",
|
|
128
|
+
justifyContent: "center",
|
|
129
|
+
textAlign: "center",
|
|
130
|
+
},
|
|
131
|
+
borderStyled: {
|
|
132
|
+
borderWidth: 1,
|
|
133
|
+
borderColor: theme.colors.orange[450],
|
|
134
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
135
|
+
},
|
|
136
|
+
buttonTextStyle: {
|
|
137
|
+
fontFamily: theme.fonts.inter_medium_500,
|
|
138
|
+
fontSize: theme.fontSizes.lg,
|
|
139
|
+
color: theme.colors.neutral[25],
|
|
140
|
+
fontWeight: "700",
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
};
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import type { StoryObj, Meta } from "@storybook/react";
|
|
2
|
+
import { CapturePhoto } from "../../components/capture-photo";
|
|
3
|
+
|
|
4
|
+
import { theme } from "../../styles/theme/theme";
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof CapturePhoto> = {
|
|
7
|
+
title: "componente/ CapturePhoto",
|
|
8
|
+
component: CapturePhoto,
|
|
9
|
+
args: {
|
|
10
|
+
takePhotoWithImagePicker: () => {},
|
|
11
|
+
imageComprovante: null,
|
|
12
|
+
onPress: () => {},
|
|
13
|
+
},
|
|
14
|
+
parameters: {
|
|
15
|
+
notes: `
|
|
16
|
+
# CapturePhoto
|
|
17
|
+
|
|
18
|
+
Este é um componente de Captura de Foto.
|
|
19
|
+
Você usa assim:
|
|
20
|
+
\`\`\`tsx
|
|
21
|
+
<CapturePhoto
|
|
22
|
+
takePhotoWithImagePicker={() => takePhotoWithImagePicker}
|
|
23
|
+
imageComprovante={null}
|
|
24
|
+
flexStyle={{
|
|
25
|
+
textAlign: "center",
|
|
26
|
+
justifyContent: "center",
|
|
27
|
+
flexDirection: "column",
|
|
28
|
+
alignItems: "center",
|
|
29
|
+
}}
|
|
30
|
+
color={{ colorSvg: "#050022", colorText: "gray" }}
|
|
31
|
+
borderStyled={{
|
|
32
|
+
borderWidth: 2,
|
|
33
|
+
borderRadius: 8,
|
|
34
|
+
borderStyle: "dashed",
|
|
35
|
+
borderColor: "#050022",
|
|
36
|
+
}}
|
|
37
|
+
title={{
|
|
38
|
+
text: "Sem foto capturada...",
|
|
39
|
+
textSmallPhoto: "",
|
|
40
|
+
}}
|
|
41
|
+
smallText={false}
|
|
42
|
+
/>
|
|
43
|
+
\`\`\`
|
|
44
|
+
`,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export default meta;
|
|
49
|
+
|
|
50
|
+
type story = StoryObj<typeof CapturePhoto>;
|
|
51
|
+
|
|
52
|
+
/* eslint-disable no-undef */
|
|
53
|
+
export const CaptureSimple: story = {
|
|
54
|
+
name: "capture-simple",
|
|
55
|
+
args: {
|
|
56
|
+
takePhotoWithImagePicker: () => alert("capturar foto..."),
|
|
57
|
+
testID: "capture-simple",
|
|
58
|
+
opacity: 0.7,
|
|
59
|
+
marginStyle: {
|
|
60
|
+
marginBottom: 24,
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
width: "100%",
|
|
64
|
+
height: 168,
|
|
65
|
+
borderStyled: {
|
|
66
|
+
borderWidth: 2,
|
|
67
|
+
borderColor: theme.colors.blue[500],
|
|
68
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
69
|
+
borderStyle: "dashed",
|
|
70
|
+
},
|
|
71
|
+
flexStyle: {
|
|
72
|
+
textAlign: "center",
|
|
73
|
+
justifyContent: "center",
|
|
74
|
+
flexDirection: "column",
|
|
75
|
+
alignItems: "center",
|
|
76
|
+
},
|
|
77
|
+
color: {
|
|
78
|
+
colorSvg: theme.colors.gray[875],
|
|
79
|
+
colorText: theme.colors.green[200],
|
|
80
|
+
},
|
|
81
|
+
fontStyle: {
|
|
82
|
+
fontSize: 16,
|
|
83
|
+
fontWeight: "500",
|
|
84
|
+
fontFamily: "inter_medium_500",
|
|
85
|
+
lineHeight: 24,
|
|
86
|
+
letterSpacing: "regular",
|
|
87
|
+
},
|
|
88
|
+
title: {
|
|
89
|
+
text: "Sem foto capturada...",
|
|
90
|
+
},
|
|
91
|
+
smallText: false,
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
export const CaptureSmallPhoto: story = {
|
|
95
|
+
name: "capture-small-photo",
|
|
96
|
+
args: {
|
|
97
|
+
takePhotoWithImagePicker: () => alert("capturar foto da manutenção..."),
|
|
98
|
+
testID: "capture-small",
|
|
99
|
+
opacity: 0.7,
|
|
100
|
+
marginStyle: {
|
|
101
|
+
marginBottom: 24,
|
|
102
|
+
},
|
|
103
|
+
paddingStyle: { paddingTop: 8, paddingBottom: 8 },
|
|
104
|
+
width: 126,
|
|
105
|
+
borderStyled: {
|
|
106
|
+
borderWidth: 2,
|
|
107
|
+
borderColor: theme.colors.blue[500],
|
|
108
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
109
|
+
borderStyle: "solid",
|
|
110
|
+
},
|
|
111
|
+
flexStyle: {
|
|
112
|
+
textAlign: "center",
|
|
113
|
+
justifyContent: "center",
|
|
114
|
+
flexDirection: "column",
|
|
115
|
+
alignItems: "center",
|
|
116
|
+
},
|
|
117
|
+
color: {
|
|
118
|
+
colorSvg: theme.colors.gray[875],
|
|
119
|
+
colorText: theme.colors.green[200],
|
|
120
|
+
},
|
|
121
|
+
fontStyle: {
|
|
122
|
+
fontSize: 16,
|
|
123
|
+
fontWeight: "500",
|
|
124
|
+
fontFamily: "inter_medium_500",
|
|
125
|
+
lineHeight: 24,
|
|
126
|
+
letterSpacing: "regular",
|
|
127
|
+
},
|
|
128
|
+
title: {
|
|
129
|
+
text: "foto 1 ",
|
|
130
|
+
textSmallPhoto: "frente do caminhão",
|
|
131
|
+
},
|
|
132
|
+
smallText: true,
|
|
133
|
+
},
|
|
134
|
+
};
|
|
135
|
+
export const CaptureSimplePhoto: story = {
|
|
136
|
+
name: "capture-simples-photo",
|
|
137
|
+
args: {
|
|
138
|
+
imageComprovante:
|
|
139
|
+
"https://media.gettyimages.com/id/78766489/pt/foto/close-up-of-hand-on-steering-wheel.jpg?s=612x612&w=0&k=20&c=utmC6gNhwrCD-p4S6iBpsOG6CA7UCud1VMh4AAhaaE8=",
|
|
140
|
+
takePhotoWithImagePicker: () => alert("tirar outra foto"),
|
|
141
|
+
testID: "capture-photo",
|
|
142
|
+
|
|
143
|
+
width: 300,
|
|
144
|
+
height: 168,
|
|
145
|
+
borderStyled: {
|
|
146
|
+
borderWidth: theme.borderWidths.thin,
|
|
147
|
+
borderColor: theme.colors.blue[500],
|
|
148
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
149
|
+
borderStyle: "solid",
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
};
|
|
153
|
+
export const CaptureSmallWithPhoto: story = {
|
|
154
|
+
name: "capture-small-with-photo",
|
|
155
|
+
args: {
|
|
156
|
+
imageComprovante:
|
|
157
|
+
"https://media.gettyimages.com/id/163031041/pt/foto/pneu-furado-em-um-semi-reboque.jpg?s=612x612&w=0&k=20&c=YBz1gLqUOf8HvXM1yHgBEOMllo3eNAL6oHlSylkMwo0=",
|
|
158
|
+
takePhotoWithImagePicker: () => alert("tirar outra foto"),
|
|
159
|
+
testID: "capture-small-photo",
|
|
160
|
+
|
|
161
|
+
width: 123,
|
|
162
|
+
height: 120,
|
|
163
|
+
borderStyled: {
|
|
164
|
+
borderWidth: 2,
|
|
165
|
+
borderColor: theme.colors.blue[500],
|
|
166
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
167
|
+
borderStyle: "dashed",
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { StoryObj, Meta } from "@storybook/react";
|
|
2
|
+
import { CardHours } from "../../components/card-hours";
|
|
3
|
+
|
|
4
|
+
import { theme } from "../../styles/theme/theme";
|
|
5
|
+
import { formatDate } from "../../utils/format-data";
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof CardHours> = {
|
|
8
|
+
title: "componente/CardHours",
|
|
9
|
+
component: CardHours,
|
|
10
|
+
args: {
|
|
11
|
+
handleFormatDataInDayMonthYearNotHours: () => new Date(),
|
|
12
|
+
},
|
|
13
|
+
parameters: {
|
|
14
|
+
notes: `
|
|
15
|
+
# CardHours
|
|
16
|
+
|
|
17
|
+
Este é um componente de Card de horas.
|
|
18
|
+
Você usa assim:
|
|
19
|
+
\`\`\`tsx
|
|
20
|
+
<CardHours
|
|
21
|
+
hoursWorked={"10:20"}
|
|
22
|
+
handleFormatDataInDayMonthYearNotHours={(date: Date) => formatDate(date)}
|
|
23
|
+
text="Hours Worked"
|
|
24
|
+
width={"100%"}
|
|
25
|
+
backgroundColor={theme.colors.neutral[25]}
|
|
26
|
+
color={{
|
|
27
|
+
colorText: theme.colors.gray[700],
|
|
28
|
+
colorTextBold: theme.colors.orange[150],
|
|
29
|
+
colorTextData: theme.colors.gray[700],
|
|
30
|
+
}}
|
|
31
|
+
marginStyle={{
|
|
32
|
+
marginBottom: 10
|
|
33
|
+
}}
|
|
34
|
+
borderStyled={{
|
|
35
|
+
borderWidth: theme.borderWidths.thin,
|
|
36
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
37
|
+
borderStyle: "solid",
|
|
38
|
+
borderColor: theme.colors.blue[500],
|
|
39
|
+
}}
|
|
40
|
+
sizeHours={theme.fontSizes["3xl"]}
|
|
41
|
+
sizeDescription={theme.fontSizes.xs}
|
|
42
|
+
/>
|
|
43
|
+
\`\`\`
|
|
44
|
+
`,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export default meta;
|
|
49
|
+
|
|
50
|
+
type Story = StoryObj<typeof meta>;
|
|
51
|
+
|
|
52
|
+
export const CardTrabalho: Story = {
|
|
53
|
+
name: "card-hours-work",
|
|
54
|
+
args: {
|
|
55
|
+
width: "100%",
|
|
56
|
+
text: "Total horas de trabalho:",
|
|
57
|
+
sizeHours: 34,
|
|
58
|
+
sizeDescription: 14,
|
|
59
|
+
hoursWorked: "18:32 H",
|
|
60
|
+
fontStyle: {
|
|
61
|
+
fontFamily: theme.fonts.inter_medium_500 as "inter_medium_500",
|
|
62
|
+
fontSize: theme.fontSizes["2xl"],
|
|
63
|
+
},
|
|
64
|
+
borderStyled: {
|
|
65
|
+
borderWidth: theme.borderWidths.thin,
|
|
66
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
67
|
+
borderStyle: "solid",
|
|
68
|
+
borderColor: theme.colors.gray[300],
|
|
69
|
+
},
|
|
70
|
+
color: {
|
|
71
|
+
colorText: theme.colors.gray[700],
|
|
72
|
+
colorTextBold: theme.colors.black[100],
|
|
73
|
+
colorTextData: theme.colors.gray[700],
|
|
74
|
+
},
|
|
75
|
+
handleFormatDataInDayMonthYearNotHours: () => formatDate(new Date()),
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export const CardPendente: Story = {
|
|
80
|
+
name: "card-hours-pending",
|
|
81
|
+
args: {
|
|
82
|
+
text: "Total horas pendentes:",
|
|
83
|
+
width: "100%",
|
|
84
|
+
hoursWorked: "22:12 H",
|
|
85
|
+
fontStyle: {
|
|
86
|
+
fontFamily: theme.fonts.inter_bold_700 as "inter_bold_700",
|
|
87
|
+
fontSize: theme.fontSizes["2xl"],
|
|
88
|
+
},
|
|
89
|
+
borderStyled: {
|
|
90
|
+
borderWidth: theme.borderWidths.thin,
|
|
91
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
92
|
+
borderStyle: "solid",
|
|
93
|
+
borderColor: theme.colors.gray[300],
|
|
94
|
+
},
|
|
95
|
+
color: {
|
|
96
|
+
colorText: theme.colors.gray[700],
|
|
97
|
+
colorTextBold: theme.colors.orange[150],
|
|
98
|
+
colorTextData: theme.colors.gray[700],
|
|
99
|
+
},
|
|
100
|
+
handleFormatDataInDayMonthYearNotHours: () => formatDate(new Date()),
|
|
101
|
+
},
|
|
102
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { StoryObj, Meta } from "@storybook/react";
|
|
2
|
+
import { CardScheduledJourney } from "../../components/card-scheduled-journey";
|
|
3
|
+
|
|
4
|
+
import { theme } from "../../styles/theme/theme";
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof CardScheduledJourney> = {
|
|
7
|
+
title: "componente/CardScheduledJourney",
|
|
8
|
+
component: CardScheduledJourney,
|
|
9
|
+
args: {
|
|
10
|
+
width: "100%",
|
|
11
|
+
height: 58,
|
|
12
|
+
widthChildren: "100%",
|
|
13
|
+
icon: "STEERING_WHEEL",
|
|
14
|
+
title: "Tempo total de trabalho do dia",
|
|
15
|
+
duracao: "10:00 H",
|
|
16
|
+
backgroundColor: theme.colors.neutral[25],
|
|
17
|
+
borderRight: theme.colors.green[400],
|
|
18
|
+
},
|
|
19
|
+
parameters: {
|
|
20
|
+
notes: `
|
|
21
|
+
# CardScheduledJourney
|
|
22
|
+
|
|
23
|
+
Este é um componente de resumo de trabalho, abrangente para diversos apps.
|
|
24
|
+
Você usa assim:
|
|
25
|
+
\`\`\`tsx
|
|
26
|
+
<CardScheduledJourney
|
|
27
|
+
|
|
28
|
+
/>
|
|
29
|
+
\`\`\`
|
|
30
|
+
`,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default meta;
|
|
35
|
+
|
|
36
|
+
type Story = StoryObj<typeof meta>;
|
|
37
|
+
|
|
38
|
+
export const CardWorkTime: Story = {
|
|
39
|
+
name: "Tempo Trabalho - Simples",
|
|
40
|
+
args: {
|
|
41
|
+
width: "100%",
|
|
42
|
+
widthChildren: "100%",
|
|
43
|
+
icon: "STEERING_WHEEL",
|
|
44
|
+
title: "Tempo total de trabalho do dia",
|
|
45
|
+
duracao: "10:00 H",
|
|
46
|
+
backgroundColor: theme.colors.neutral[25],
|
|
47
|
+
borderRight: theme.colors.green[400],
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const CardMealInterval: Story = {
|
|
52
|
+
name: "Intervalo Refeição - Refeição",
|
|
53
|
+
args: {
|
|
54
|
+
width: "100%",
|
|
55
|
+
height: 58,
|
|
56
|
+
// widthChildren: "100%",
|
|
57
|
+
icon: "CALL_BELL",
|
|
58
|
+
title: "Intervalo de refeição",
|
|
59
|
+
duracao: "01:00 H",
|
|
60
|
+
borderRight: theme.colors.orange[150],
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const CardNightBreak: Story = {
|
|
65
|
+
name: "Intervalo Noturno - Repouso",
|
|
66
|
+
args: {
|
|
67
|
+
width: "100%",
|
|
68
|
+
height: 58,
|
|
69
|
+
widthChildren: "100%",
|
|
70
|
+
icon: "MOON_STARS",
|
|
71
|
+
title: "Intervalo interjonada anterior",
|
|
72
|
+
duracao: "10:00 H",
|
|
73
|
+
borderRight: theme.colors.gray[700],
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const CardHoursExtra: Story = {
|
|
78
|
+
name: "Horas Extras - Extras",
|
|
79
|
+
args: {
|
|
80
|
+
width: "100%",
|
|
81
|
+
height: 58,
|
|
82
|
+
widthChildren: "100%",
|
|
83
|
+
icon: "STEERING_WHEEL_FILL",
|
|
84
|
+
title: "TOTAL",
|
|
85
|
+
duracao: "16:20 H",
|
|
86
|
+
borderRight: theme.colors.green[400],
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export const CardRankingWeek: Story = {
|
|
91
|
+
name: "Raking Semanal - RANKING",
|
|
92
|
+
args: {
|
|
93
|
+
width: "100%",
|
|
94
|
+
height: 58,
|
|
95
|
+
widthChildren: "100%",
|
|
96
|
+
icon: "TROPHY",
|
|
97
|
+
title: "FATOR RANKING DA SEMANA",
|
|
98
|
+
duracao: "46:35 H",
|
|
99
|
+
borderRight: theme.colors.orange[150],
|
|
100
|
+
},
|
|
101
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { StoryObj, Meta } from "@storybook/react";
|
|
2
|
+
import { Header } from "../../components/header-profile";
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof Header> = {
|
|
5
|
+
title: "componente/Header",
|
|
6
|
+
component: Header,
|
|
7
|
+
args: {
|
|
8
|
+
testID: "header",
|
|
9
|
+
arrow: false,
|
|
10
|
+
title: "aqui",
|
|
11
|
+
handleNavigation: () => {},
|
|
12
|
+
permission: false,
|
|
13
|
+
bluetoothIsConnected: false,
|
|
14
|
+
isInternetReachable: true,
|
|
15
|
+
},
|
|
16
|
+
parameters: {
|
|
17
|
+
notes: `
|
|
18
|
+
# Header
|
|
19
|
+
|
|
20
|
+
Este é um componente de Card de horas.
|
|
21
|
+
Você usa assim:
|
|
22
|
+
\`\`\`tsx
|
|
23
|
+
<Header
|
|
24
|
+
|
|
25
|
+
/>
|
|
26
|
+
\`\`\`
|
|
27
|
+
`,
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default meta;
|
|
32
|
+
|
|
33
|
+
type Story = StoryObj<typeof meta>;
|
|
34
|
+
|
|
35
|
+
export const HeaderLogin: Story = {
|
|
36
|
+
name: "header-login",
|
|
37
|
+
args: {
|
|
38
|
+
testID: "header",
|
|
39
|
+
arrow: false,
|
|
40
|
+
title: "Login",
|
|
41
|
+
handleNavigation: () => {},
|
|
42
|
+
permission: false,
|
|
43
|
+
bluetoothIsConnected: false,
|
|
44
|
+
isInternetReachable: true,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
export const HeaderArrow: Story = {
|
|
48
|
+
name: "header-arrow",
|
|
49
|
+
args: {
|
|
50
|
+
testID: "header",
|
|
51
|
+
arrow: true,
|
|
52
|
+
title: "SINCRONIZAR ATIVIDADES",
|
|
53
|
+
handleNavigation: () => {},
|
|
54
|
+
permission: false,
|
|
55
|
+
bluetoothIsConnected: false,
|
|
56
|
+
isInternetReachable: false,
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const HeaderList: Story = {
|
|
61
|
+
name: "header-list",
|
|
62
|
+
args: {
|
|
63
|
+
testID: "header",
|
|
64
|
+
arrow: true,
|
|
65
|
+
title: "Controle de Jornada",
|
|
66
|
+
handleNavigation: () => {},
|
|
67
|
+
permission: false,
|
|
68
|
+
bluetoothIsConnected: true,
|
|
69
|
+
isInternetReachable: true,
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export const HeaderPermission: Story = {
|
|
74
|
+
name: "header-permission",
|
|
75
|
+
args: {
|
|
76
|
+
testID: "header",
|
|
77
|
+
arrow: true,
|
|
78
|
+
title: "Permission",
|
|
79
|
+
handleNavigation: () => {},
|
|
80
|
+
permission: true,
|
|
81
|
+
bluetoothIsConnected: true,
|
|
82
|
+
isInternetReachable: true,
|
|
83
|
+
},
|
|
84
|
+
};
|