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,286 @@
|
|
|
1
|
+
import { StoryObj, Meta } from "@storybook/react";
|
|
2
|
+
import { Input } from "../../components/input";
|
|
3
|
+
|
|
4
|
+
import { theme } from "../../styles/theme/theme";
|
|
5
|
+
import React from "react";
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof Input> = {
|
|
8
|
+
title: "componente/Input",
|
|
9
|
+
component: Input,
|
|
10
|
+
|
|
11
|
+
args: {
|
|
12
|
+
testID: "",
|
|
13
|
+
name: "",
|
|
14
|
+
textLabel: "",
|
|
15
|
+
width: "100%",
|
|
16
|
+
height: 70,
|
|
17
|
+
placeholder: "",
|
|
18
|
+
|
|
19
|
+
backgroundColor: theme.colors.neutral[50],
|
|
20
|
+
borderStyled: { borderBottomWidth: 1, borderBottomColor: theme.colors.blue[500] },
|
|
21
|
+
placeholderTextColor: theme.colors.gray[700],
|
|
22
|
+
onChange: (text: any) => {
|
|
23
|
+
return text;
|
|
24
|
+
},
|
|
25
|
+
onBlur: () => {},
|
|
26
|
+
onFocus: () => {},
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
parameters: {
|
|
30
|
+
notes: `
|
|
31
|
+
# Input
|
|
32
|
+
Este é um componente de Input.
|
|
33
|
+
Você usa assim:
|
|
34
|
+
\`\`\`tsx
|
|
35
|
+
<Input text="Eu sou um Input!" />
|
|
36
|
+
\`\`\`
|
|
37
|
+
`,
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default meta;
|
|
42
|
+
|
|
43
|
+
type Story = StoryObj<typeof meta>;
|
|
44
|
+
let isFocusHigherSpeed = false;
|
|
45
|
+
export const Basic: Story = {
|
|
46
|
+
name: "input-basic",
|
|
47
|
+
render: (args) => {
|
|
48
|
+
const [isFocusHigherSpeed, setIsFocusHigherSpeed] = React.useState<boolean>(false);
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<Input
|
|
52
|
+
{...args}
|
|
53
|
+
onFocus={(e) => {
|
|
54
|
+
setIsFocusHigherSpeed(true);
|
|
55
|
+
args.onFocus?.(e);
|
|
56
|
+
}}
|
|
57
|
+
onBlur={(e) => {
|
|
58
|
+
setIsFocusHigherSpeed(false);
|
|
59
|
+
args.onBlur?.(e);
|
|
60
|
+
}}
|
|
61
|
+
borderStyled={{
|
|
62
|
+
borderBottomWidth: 3,
|
|
63
|
+
borderColor: isFocusHigherSpeed ? theme.colors.neutral[75] : theme.colors.blue[350],
|
|
64
|
+
}}
|
|
65
|
+
|
|
66
|
+
// podendo usar direto as props ou style
|
|
67
|
+
|
|
68
|
+
// style={[
|
|
69
|
+
// args.style,
|
|
70
|
+
// {
|
|
71
|
+
// borderBottomWidth: 2,
|
|
72
|
+
// borderColor: isFocusHigherSpeed ? "green" : theme.colors.blue[350],
|
|
73
|
+
// },
|
|
74
|
+
// ]}
|
|
75
|
+
/>
|
|
76
|
+
);
|
|
77
|
+
},
|
|
78
|
+
args: {
|
|
79
|
+
testID: "maior_velocidade_atingida",
|
|
80
|
+
name: "maior_velocidade_atingida",
|
|
81
|
+
textLabel: "Maior velocidade do dia",
|
|
82
|
+
width: "100%",
|
|
83
|
+
paddingStyle: { paddingTop: 20, paddingBottom: 20, paddingLeft: 20, paddingRight: 20 },
|
|
84
|
+
placeholder: "informe a velocidade do dia",
|
|
85
|
+
backgroundColor: theme.colors.neutral[200],
|
|
86
|
+
borderStyled: {
|
|
87
|
+
borderBottomWidth: 3,
|
|
88
|
+
borderColor: theme.colors.blue[350],
|
|
89
|
+
},
|
|
90
|
+
color: { colorText: theme.colors.neutral[75] },
|
|
91
|
+
placeholderTextColor: theme.colors.gray[900],
|
|
92
|
+
|
|
93
|
+
onChange: (text: any) => {
|
|
94
|
+
return text;
|
|
95
|
+
},
|
|
96
|
+
onBlur: () => (isFocusHigherSpeed = true),
|
|
97
|
+
onFocus: () => {
|
|
98
|
+
isFocusHigherSpeed = true;
|
|
99
|
+
return isFocusHigherSpeed;
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export const Append: Story = {
|
|
105
|
+
name: "input-append",
|
|
106
|
+
args: {
|
|
107
|
+
testID: "maior_velocidade_atingida",
|
|
108
|
+
name: "append",
|
|
109
|
+
textLabel: "Input para usar com append",
|
|
110
|
+
width: "100%",
|
|
111
|
+
paddingStyle: { paddingTop: 20, paddingBottom: 20, paddingLeft: 20, paddingRight: 20 },
|
|
112
|
+
placeholder: "append",
|
|
113
|
+
backgroundColor: theme.colors.neutral[200],
|
|
114
|
+
borderStyled: {
|
|
115
|
+
borderBottomWidth: 3,
|
|
116
|
+
borderColor: isFocusHigherSpeed ? theme.colors.blue[500] : theme.colors.blue[350],
|
|
117
|
+
},
|
|
118
|
+
color: { colorText: theme.colors.neutral[75] },
|
|
119
|
+
placeholderTextColor: theme.colors.gray[900],
|
|
120
|
+
onChange: (text: any) => {
|
|
121
|
+
return text;
|
|
122
|
+
},
|
|
123
|
+
onBlur: () => {},
|
|
124
|
+
onFocus: () => {},
|
|
125
|
+
append: {
|
|
126
|
+
appendText: "aqui mostra Append Text",
|
|
127
|
+
appendColor: theme.colors.yellow[100],
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
};
|
|
131
|
+
export const Password: Story = {
|
|
132
|
+
name: "input-password",
|
|
133
|
+
args: {
|
|
134
|
+
testID: "password",
|
|
135
|
+
name: "senha",
|
|
136
|
+
width: "100%",
|
|
137
|
+
paddingStyle: { paddingTop: 20, paddingBottom: 20, paddingLeft: 20, paddingRight: 20 },
|
|
138
|
+
placeholder: "digite sua senha",
|
|
139
|
+
backgroundColor: theme.colors.neutral[200],
|
|
140
|
+
borderStyled: {
|
|
141
|
+
borderBottomWidth: 3,
|
|
142
|
+
borderColor: isFocusHigherSpeed ? theme.colors.blue[500] : theme.colors.blue[350],
|
|
143
|
+
},
|
|
144
|
+
placeholderTextColor: theme.colors.gray[900],
|
|
145
|
+
secureTextEntry: false,
|
|
146
|
+
onChange: (text: any) => {
|
|
147
|
+
return text;
|
|
148
|
+
},
|
|
149
|
+
onBlur: () => {},
|
|
150
|
+
onFocus: () => {},
|
|
151
|
+
},
|
|
152
|
+
};
|
|
153
|
+
export const Data: Story = {
|
|
154
|
+
name: "input-data",
|
|
155
|
+
args: {
|
|
156
|
+
testID: "data",
|
|
157
|
+
name: "data",
|
|
158
|
+
width: "100%",
|
|
159
|
+
paddingStyle: { paddingTop: 20, paddingBottom: 20, paddingLeft: 20, paddingRight: 20 },
|
|
160
|
+
placeholder: "digite sua data ",
|
|
161
|
+
backgroundColor: theme.colors.neutral[200],
|
|
162
|
+
borderStyled: {
|
|
163
|
+
borderBottomWidth: 3,
|
|
164
|
+
borderColor: theme.colors.blue[500],
|
|
165
|
+
},
|
|
166
|
+
placeholderTextColor: theme.colors.gray[900],
|
|
167
|
+
onChange: (text: any) => {
|
|
168
|
+
return text;
|
|
169
|
+
},
|
|
170
|
+
onBlur: () => {},
|
|
171
|
+
onFocus: () => {},
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
export const Hours: Story = {
|
|
175
|
+
name: "input-hours",
|
|
176
|
+
args: {
|
|
177
|
+
testID: "hours",
|
|
178
|
+
name: "hours",
|
|
179
|
+
width: "100%",
|
|
180
|
+
paddingStyle: { paddingTop: 20, paddingBottom: 20, paddingLeft: 20, paddingRight: 20 },
|
|
181
|
+
placeholder: "digite a hora",
|
|
182
|
+
backgroundColor: theme.colors.neutral[200],
|
|
183
|
+
borderStyled: {
|
|
184
|
+
borderBottomWidth: 3,
|
|
185
|
+
borderColor: isFocusHigherSpeed ? theme.colors.blue[500] : theme.colors.blue[350],
|
|
186
|
+
},
|
|
187
|
+
placeholderTextColor: theme.colors.gray[900],
|
|
188
|
+
onChange: (text: any) => {
|
|
189
|
+
return text;
|
|
190
|
+
},
|
|
191
|
+
onBlur: () => {},
|
|
192
|
+
onFocus: () => {},
|
|
193
|
+
},
|
|
194
|
+
};
|
|
195
|
+
export const Litragem: Story = {
|
|
196
|
+
name: "input-litragem",
|
|
197
|
+
args: {
|
|
198
|
+
testID: "litragem",
|
|
199
|
+
name: "litragem",
|
|
200
|
+
width: "100%",
|
|
201
|
+
paddingStyle: { paddingTop: 20, paddingBottom: 20, paddingLeft: 20, paddingRight: 20 },
|
|
202
|
+
placeholder: "digite sua litragem",
|
|
203
|
+
backgroundColor: theme.colors.neutral[200],
|
|
204
|
+
borderStyled: {
|
|
205
|
+
borderBottomWidth: 3,
|
|
206
|
+
borderColor: isFocusHigherSpeed ? theme.colors.blue[500] : theme.colors.blue[350],
|
|
207
|
+
},
|
|
208
|
+
placeholderTextColor: theme.colors.gray[900],
|
|
209
|
+
onChange: (text: any) => {
|
|
210
|
+
return text;
|
|
211
|
+
},
|
|
212
|
+
onBlur: () => {},
|
|
213
|
+
onFocus: () => {},
|
|
214
|
+
},
|
|
215
|
+
};
|
|
216
|
+
export const Value: Story = {
|
|
217
|
+
name: "input-value",
|
|
218
|
+
args: {
|
|
219
|
+
testID: "value",
|
|
220
|
+
name: "value",
|
|
221
|
+
width: "100%",
|
|
222
|
+
paddingStyle: { paddingTop: 20, paddingBottom: 20, paddingLeft: 20, paddingRight: 20 },
|
|
223
|
+
placeholder: "digite o valor",
|
|
224
|
+
backgroundColor: theme.colors.neutral[200],
|
|
225
|
+
borderStyled: {
|
|
226
|
+
borderBottomWidth: 3,
|
|
227
|
+
borderColor: theme.colors.blue[350],
|
|
228
|
+
},
|
|
229
|
+
placeholderTextColor: theme.colors.gray[900],
|
|
230
|
+
onChange: (text: any) => {
|
|
231
|
+
return text;
|
|
232
|
+
},
|
|
233
|
+
onBlur: () => {},
|
|
234
|
+
onFocus: () => {},
|
|
235
|
+
},
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
export const Label: Story = {
|
|
239
|
+
name: "input-com-label",
|
|
240
|
+
args: {
|
|
241
|
+
testID: "input-com-label",
|
|
242
|
+
name: "label",
|
|
243
|
+
textLabel: "Informe seu Km",
|
|
244
|
+
textLabelPlaceholder: "Km",
|
|
245
|
+
width: "100%",
|
|
246
|
+
paddingStyle: { paddingTop: 20, paddingBottom: 20, paddingLeft: 20, paddingRight: 20 },
|
|
247
|
+
placeholder: "digite o valor do KM",
|
|
248
|
+
backgroundColor: theme.colors.neutral[200],
|
|
249
|
+
borderStyled: {
|
|
250
|
+
borderBottomWidth: 3,
|
|
251
|
+
borderColor: theme.colors.blue[350],
|
|
252
|
+
},
|
|
253
|
+
color: { colorText: theme.colors.neutral[75] },
|
|
254
|
+
placeholderTextColor: theme.colors.gray[900],
|
|
255
|
+
messageError: "",
|
|
256
|
+
onChange: (text: any) => {
|
|
257
|
+
return text;
|
|
258
|
+
},
|
|
259
|
+
onBlur: () => {},
|
|
260
|
+
onFocus: () => {},
|
|
261
|
+
},
|
|
262
|
+
};
|
|
263
|
+
export const MessageError: Story = {
|
|
264
|
+
name: "input-message-error",
|
|
265
|
+
args: {
|
|
266
|
+
testID: "value",
|
|
267
|
+
name: "messageError",
|
|
268
|
+
textLabel: "mensagem de erro",
|
|
269
|
+
width: "100%",
|
|
270
|
+
paddingStyle: { paddingTop: 20, paddingBottom: 20, paddingLeft: 20, paddingRight: 20 },
|
|
271
|
+
placeholder: "digite o valor",
|
|
272
|
+
backgroundColor: theme.colors.neutral[200],
|
|
273
|
+
borderStyled: {
|
|
274
|
+
borderBottomWidth: 3,
|
|
275
|
+
borderColor: theme.colors.red[400],
|
|
276
|
+
},
|
|
277
|
+
color: { colorText: theme.colors.neutral[75] },
|
|
278
|
+
placeholderTextColor: theme.colors.gray[900],
|
|
279
|
+
messageError: "Message error",
|
|
280
|
+
onChange: (text: any) => {
|
|
281
|
+
return text;
|
|
282
|
+
},
|
|
283
|
+
onBlur: () => {},
|
|
284
|
+
onFocus: () => {},
|
|
285
|
+
},
|
|
286
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { StoryObj, Meta } from "@storybook/react";
|
|
2
|
+
import { ScheduledJourneyIndicators } from "../../components/scheduled-journey-indicators";
|
|
3
|
+
|
|
4
|
+
// import { theme } from "../../styles/theme/theme";
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof ScheduledJourneyIndicators> = {
|
|
7
|
+
title: "componente/ScheduledJourneyIndicators",
|
|
8
|
+
component: ScheduledJourneyIndicators,
|
|
9
|
+
args: {
|
|
10
|
+
journey: {},
|
|
11
|
+
isEdit: true,
|
|
12
|
+
handleOpenEditModal: () => {},
|
|
13
|
+
},
|
|
14
|
+
parameters: {
|
|
15
|
+
notes: `
|
|
16
|
+
# ScheduledJourneyIndicators
|
|
17
|
+
|
|
18
|
+
Este é um componente de indicadores da jornada marcada .
|
|
19
|
+
Você usa assim:
|
|
20
|
+
\`\`\`tsx
|
|
21
|
+
<ScheduledJourneyIndicators
|
|
22
|
+
journey={journey}
|
|
23
|
+
isEdit={false}
|
|
24
|
+
handleOpenEditModal={() => {}}
|
|
25
|
+
/>
|
|
26
|
+
\`\`\`
|
|
27
|
+
`,
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const journey = { descricao: "Horas trabalhadas no dia", duracao_horas: "05H" };
|
|
32
|
+
const journeyKM = { descricao: "Km percorrido", duracao_horas: "100km" };
|
|
33
|
+
const journeyEngine = { descricao: "Horas com motor ligado", duracao_horas: "09H" };
|
|
34
|
+
const journeyMiddleSpeed = { descricao: "velocidade média", duracao_horas: "40km/h" };
|
|
35
|
+
|
|
36
|
+
export default meta;
|
|
37
|
+
|
|
38
|
+
type Story = StoryObj<typeof meta>;
|
|
39
|
+
|
|
40
|
+
export const ScheduledJourneyWork: Story = {
|
|
41
|
+
name: "working-hours",
|
|
42
|
+
args: {
|
|
43
|
+
journey,
|
|
44
|
+
isEdit: false,
|
|
45
|
+
handleOpenEditModal: () => {},
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const ScheduledJourneyKm: Story = {
|
|
50
|
+
name: "km-traveled",
|
|
51
|
+
args: {
|
|
52
|
+
journey: journeyKM,
|
|
53
|
+
isEdit: true,
|
|
54
|
+
handleOpenEditModal: () => {},
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const ScheduledJourneyEngine: Story = {
|
|
59
|
+
name: "engine-running",
|
|
60
|
+
args: {
|
|
61
|
+
journey: journeyEngine,
|
|
62
|
+
isEdit: true,
|
|
63
|
+
handleOpenEditModal: () => {},
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export const ScheduledJourneyMiddleSpeed: Story = {
|
|
68
|
+
name: "middle-speed",
|
|
69
|
+
args: {
|
|
70
|
+
journey: journeyMiddleSpeed,
|
|
71
|
+
isEdit: false,
|
|
72
|
+
handleOpenEditModal: () => {},
|
|
73
|
+
},
|
|
74
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { StoryObj, Meta } from "@storybook/react";
|
|
2
|
+
import { SelectOption } from "../../components/selects/select-option";
|
|
3
|
+
|
|
4
|
+
import { theme } from "../../styles/theme/theme";
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof SelectOption> = {
|
|
7
|
+
title: "componente/SelectOption",
|
|
8
|
+
component: SelectOption,
|
|
9
|
+
args: { dataOption: [] },
|
|
10
|
+
parameters: {
|
|
11
|
+
notes: `
|
|
12
|
+
# SelectOption
|
|
13
|
+
|
|
14
|
+
Este é um componente de select.
|
|
15
|
+
Você usa assim:
|
|
16
|
+
\`\`\`tsx
|
|
17
|
+
<SelectOption
|
|
18
|
+
titleLabel="Selecione um motivo"
|
|
19
|
+
sizeTitleLabel={18}
|
|
20
|
+
dataOption={options}
|
|
21
|
+
handleSelectDown={() => {}}
|
|
22
|
+
/>
|
|
23
|
+
\`\`\`
|
|
24
|
+
`,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const options = [
|
|
29
|
+
{ label: "Local com infraestrutura ruim", value: "option1" },
|
|
30
|
+
{ label: "Pretendo fazer o repouso em casa ou outro local", value: "option2" },
|
|
31
|
+
{ label: "Outro motivo", value: "option3" },
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
export default meta;
|
|
35
|
+
|
|
36
|
+
type Story = StoryObj<typeof meta>;
|
|
37
|
+
|
|
38
|
+
export const SelectRefuseRest: Story = {
|
|
39
|
+
name: "select-refuse-rest-week",
|
|
40
|
+
args: {
|
|
41
|
+
dataOption: options,
|
|
42
|
+
handleSelectDown: () => {},
|
|
43
|
+
titleLabel: "Selecione uma opção",
|
|
44
|
+
colortitleLabel: theme.colors.neutral[25],
|
|
45
|
+
},
|
|
46
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
// components
|
|
4
|
+
import { StepIndicator } from "../../components/step-indicator";
|
|
5
|
+
|
|
6
|
+
// styles
|
|
7
|
+
import { theme } from "../../styles/theme/theme";
|
|
8
|
+
|
|
9
|
+
const meta: Meta<typeof StepIndicator> = {
|
|
10
|
+
title: "Componente/StepIndicator",
|
|
11
|
+
component: StepIndicator,
|
|
12
|
+
args: {
|
|
13
|
+
data: [],
|
|
14
|
+
backgroundColorBall: theme.colors.blue[500],
|
|
15
|
+
titleColor: theme.colors.neutral[25],
|
|
16
|
+
titleNumberColor: theme.colors.neutral[25],
|
|
17
|
+
},
|
|
18
|
+
parameters: {
|
|
19
|
+
notes: `
|
|
20
|
+
# StepIndicator
|
|
21
|
+
|
|
22
|
+
Este é um componente de step indicator.
|
|
23
|
+
Você usa assim:
|
|
24
|
+
\`\`\`tsx
|
|
25
|
+
<StepIndicator
|
|
26
|
+
backgroundColorBall="#050022"
|
|
27
|
+
type="default"
|
|
28
|
+
data={dataMock}
|
|
29
|
+
/>
|
|
30
|
+
\`\`\`
|
|
31
|
+
`,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default meta;
|
|
36
|
+
|
|
37
|
+
type Story = StoryObj<typeof meta>;
|
|
38
|
+
|
|
39
|
+
const dataMock = [
|
|
40
|
+
{
|
|
41
|
+
id: 1,
|
|
42
|
+
titleLabel: "Repouso Noturno",
|
|
43
|
+
data_inicio: "07/03/2024 14:52",
|
|
44
|
+
data_fim: "07/03/2024 17:52",
|
|
45
|
+
description: "01:00",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: 2,
|
|
49
|
+
titleLabel: "Descarga",
|
|
50
|
+
data_inicio: "06/03/2024 14:52",
|
|
51
|
+
data_fim: "06/03/2024 16:52",
|
|
52
|
+
description: "02:00",
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
|
|
56
|
+
const dataMockCustom = [
|
|
57
|
+
{
|
|
58
|
+
id: 1,
|
|
59
|
+
titleLabel: "Pedido Realizado",
|
|
60
|
+
data_inicio: "",
|
|
61
|
+
data_fim: "",
|
|
62
|
+
description: "",
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: 2,
|
|
66
|
+
titleLabel: "Pagamento Aprovado",
|
|
67
|
+
data_inicio: "07/03/2024 14:52",
|
|
68
|
+
data_fim: "07/03/2024 17:52",
|
|
69
|
+
description: "01:00",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: 3,
|
|
73
|
+
titleLabel: "Pedido Faturado",
|
|
74
|
+
data_inicio: "",
|
|
75
|
+
data_fim: "",
|
|
76
|
+
description: "",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: 4,
|
|
80
|
+
titleLabel: "Pedido Enviado",
|
|
81
|
+
data_inicio: "",
|
|
82
|
+
data_fim: "",
|
|
83
|
+
description: "",
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: 4,
|
|
87
|
+
titleLabel: "Pedido Entregue",
|
|
88
|
+
data_inicio: "07/03/2024 14:52",
|
|
89
|
+
data_fim: "07/03/2024 17:52",
|
|
90
|
+
description: "01:00",
|
|
91
|
+
},
|
|
92
|
+
];
|
|
93
|
+
|
|
94
|
+
export const StepIndicatorDefault: Story = {
|
|
95
|
+
name: "step-indicator-default",
|
|
96
|
+
args: {
|
|
97
|
+
data: dataMock,
|
|
98
|
+
type: "default",
|
|
99
|
+
backgroundColorBall: theme.colors.blue[500],
|
|
100
|
+
titleColor: theme.colors.neutral[25],
|
|
101
|
+
textColorDescription: theme.colors.gray[300],
|
|
102
|
+
titleNumberColor: theme.colors.neutral[25],
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export const StepIndicationCustom: Story = {
|
|
107
|
+
name: "step-indicator-custom",
|
|
108
|
+
args: {
|
|
109
|
+
data: dataMockCustom,
|
|
110
|
+
type: "custom",
|
|
111
|
+
backgroundColorBall: theme.colors.orange[150],
|
|
112
|
+
titleColor: theme.colors.blue[500],
|
|
113
|
+
textColorDescription: theme.colors.gray[300],
|
|
114
|
+
titleNumberColor: theme.colors.neutral[25],
|
|
115
|
+
},
|
|
116
|
+
};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Typography } from "../../components/typography";
|
|
3
|
+
import { theme } from "../../styles/theme/theme";
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof Typography> = {
|
|
6
|
+
title: "Componente/Typography",
|
|
7
|
+
component: Typography,
|
|
8
|
+
args: {
|
|
9
|
+
onPress: () => {},
|
|
10
|
+
},
|
|
11
|
+
parameters: {
|
|
12
|
+
notes: `
|
|
13
|
+
# Typography
|
|
14
|
+
|
|
15
|
+
Este é um componente de texto.
|
|
16
|
+
Você usa assim:
|
|
17
|
+
\`\`\`tsx
|
|
18
|
+
<Typography text={'Ola Dev'} marginBottom={8} />
|
|
19
|
+
\`\`\`
|
|
20
|
+
`,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default meta;
|
|
25
|
+
|
|
26
|
+
type Story = StoryObj<typeof meta>;
|
|
27
|
+
|
|
28
|
+
export const Typography2XS: Story = {
|
|
29
|
+
name: "Typography-2xs",
|
|
30
|
+
args: {
|
|
31
|
+
text: "(2XS) Expresso Figueiredo",
|
|
32
|
+
align: "center",
|
|
33
|
+
color: theme.colors.neutral[25],
|
|
34
|
+
size: theme.fontSizes["2xs"],
|
|
35
|
+
fontFamily: theme.fonts.inter_regular_400,
|
|
36
|
+
fontWeight: "400",
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export const TypographyXS: Story = {
|
|
41
|
+
name: "Typography-xs",
|
|
42
|
+
args: {
|
|
43
|
+
text: "(XS) Expresso Figueiredo",
|
|
44
|
+
align: "center",
|
|
45
|
+
color: theme.colors.neutral[25],
|
|
46
|
+
size: theme.fontSizes["xs"],
|
|
47
|
+
fontFamily: theme.fonts.inter_regular_400,
|
|
48
|
+
fontWeight: "400",
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export const TypographySM: Story = {
|
|
53
|
+
name: "Typography-sm",
|
|
54
|
+
args: {
|
|
55
|
+
text: "(SM) Expresso Figueiredo",
|
|
56
|
+
align: "center",
|
|
57
|
+
color: theme.colors.neutral[25],
|
|
58
|
+
size: theme.fontSizes["sm"],
|
|
59
|
+
fontFamily: theme.fonts.inter_regular_400,
|
|
60
|
+
fontWeight: "400",
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const TypographyMD: Story = {
|
|
65
|
+
name: "Typography-md",
|
|
66
|
+
args: {
|
|
67
|
+
text: "(MD) Expresso Figueiredo",
|
|
68
|
+
align: "center",
|
|
69
|
+
color: theme.colors.neutral[25],
|
|
70
|
+
size: theme.fontSizes["md"],
|
|
71
|
+
fontFamily: theme.fonts.inter_regular_400,
|
|
72
|
+
fontWeight: "400",
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export const TypographyLG: Story = {
|
|
77
|
+
name: "Typography-lg",
|
|
78
|
+
args: {
|
|
79
|
+
text: "(LG) Expresso Figueiredo",
|
|
80
|
+
align: "center",
|
|
81
|
+
color: theme.colors.neutral[25],
|
|
82
|
+
size: theme.fontSizes["lg"],
|
|
83
|
+
fontFamily: theme.fonts.inter_regular_400,
|
|
84
|
+
fontWeight: "400",
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export const TypographyXL: Story = {
|
|
89
|
+
name: "Typography-xl",
|
|
90
|
+
args: {
|
|
91
|
+
text: "(XL) Expresso Figueiredo",
|
|
92
|
+
align: "center",
|
|
93
|
+
color: theme.colors.neutral[25],
|
|
94
|
+
size: theme.fontSizes["xl"],
|
|
95
|
+
fontFamily: theme.fonts.inter_regular_400,
|
|
96
|
+
fontWeight: "400",
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export const Typography2XL: Story = {
|
|
101
|
+
name: "Typography-2xl",
|
|
102
|
+
args: {
|
|
103
|
+
text: "(2XL) Expresso Figueiredo",
|
|
104
|
+
align: "center",
|
|
105
|
+
color: theme.colors.neutral[25],
|
|
106
|
+
size: theme.fontSizes["2xl"],
|
|
107
|
+
fontFamily: theme.fonts.inter_regular_400,
|
|
108
|
+
fontWeight: "400",
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export const Typography3XL: Story = {
|
|
113
|
+
name: "Typography-3xl",
|
|
114
|
+
args: {
|
|
115
|
+
text: "(3XL) Expresso Figueiredo",
|
|
116
|
+
align: "center",
|
|
117
|
+
color: theme.colors.neutral[25],
|
|
118
|
+
size: theme.fontSizes["3xl"],
|
|
119
|
+
fontFamily: theme.fonts.inter_regular_400,
|
|
120
|
+
fontWeight: "400",
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export const Typography4XL: Story = {
|
|
125
|
+
name: "Typography-4xl",
|
|
126
|
+
args: {
|
|
127
|
+
text: "(4XL) Expresso Figueiredo",
|
|
128
|
+
align: "center",
|
|
129
|
+
color: theme.colors.neutral[25],
|
|
130
|
+
size: theme.fontSizes["4xl"],
|
|
131
|
+
fontFamily: theme.fonts.inter_regular_400,
|
|
132
|
+
fontWeight: "400",
|
|
133
|
+
},
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
export const Typography5XL: Story = {
|
|
137
|
+
name: "Typography-5xl",
|
|
138
|
+
args: {
|
|
139
|
+
text: "(5XL) Expresso Figueiredo",
|
|
140
|
+
align: "center",
|
|
141
|
+
color: theme.colors.neutral[25],
|
|
142
|
+
size: theme.fontSizes["5xl"],
|
|
143
|
+
fontFamily: theme.fonts.inter_regular_400,
|
|
144
|
+
fontWeight: "400",
|
|
145
|
+
},
|
|
146
|
+
};
|