react-native-exp-fig 0.1.8 → 0.1.10
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/common/icons-svg/check-box/index.js +6 -6
- package/lib/commonjs/common/icons-svg/constants/index.js +4 -4
- package/lib/commonjs/common/icons-svg/index.js +10 -7
- package/lib/commonjs/common/icons-svg/index.js.map +1 -1
- package/lib/commonjs/components/card-work-session/index.js +35 -3
- package/lib/commonjs/components/card-work-session/index.js.map +1 -1
- package/lib/commonjs/components/check-box/index.js +6 -6
- package/lib/commonjs/components/coil/index.js +14 -8
- package/lib/commonjs/components/coil/index.js.map +1 -1
- package/lib/commonjs/components/header-profile/index.js +6 -6
- package/lib/commonjs/stories/card-work-session/card-work-session.stories.js +18 -3
- package/lib/commonjs/stories/card-work-session/card-work-session.stories.js.map +1 -1
- package/lib/commonjs/stories/coil/coil.stories.js +6 -5
- package/lib/commonjs/stories/coil/coil.stories.js.map +1 -1
- package/lib/commonjs/styles/theme/theme.js +1 -0
- package/lib/commonjs/styles/theme/theme.js.map +1 -1
- package/lib/module/common/icons-svg/check-box/index.js +6 -6
- package/lib/module/common/icons-svg/constants/index.js +4 -4
- package/lib/module/common/icons-svg/index.js +10 -7
- package/lib/module/common/icons-svg/index.js.map +1 -1
- package/lib/module/components/card-work-session/index.js +35 -3
- package/lib/module/components/card-work-session/index.js.map +1 -1
- package/lib/module/components/check-box/index.js +6 -6
- package/lib/module/components/coil/index.js +14 -8
- package/lib/module/components/coil/index.js.map +1 -1
- package/lib/module/components/header-profile/index.js +6 -6
- package/lib/module/stories/card-work-session/card-work-session.stories.js +17 -2
- package/lib/module/stories/card-work-session/card-work-session.stories.js.map +1 -1
- package/lib/module/stories/coil/coil.stories.js +6 -5
- package/lib/module/stories/coil/coil.stories.js.map +1 -1
- package/lib/module/styles/theme/theme.js +1 -0
- package/lib/module/styles/theme/theme.js.map +1 -1
- package/lib/typescript/commonjs/src/common/icons-svg/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/card-work-session/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/coil/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/stories/card-work-session/card-work-session.stories.d.ts +1 -0
- package/lib/typescript/commonjs/src/stories/card-work-session/card-work-session.stories.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/stories/coil/coil.stories.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/styles/global/theme-provider.d.ts +1 -0
- package/lib/typescript/commonjs/src/styles/global/theme-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/styles/theme/theme.d.ts +1 -0
- package/lib/typescript/commonjs/src/styles/theme/theme.d.ts.map +1 -1
- package/lib/typescript/module/src/common/icons-svg/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/card-work-session/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/coil/index.d.ts.map +1 -1
- package/lib/typescript/module/src/stories/card-work-session/card-work-session.stories.d.ts +1 -0
- package/lib/typescript/module/src/stories/card-work-session/card-work-session.stories.d.ts.map +1 -1
- package/lib/typescript/module/src/stories/coil/coil.stories.d.ts.map +1 -1
- package/lib/typescript/module/src/styles/global/theme-provider.d.ts +1 -0
- package/lib/typescript/module/src/styles/global/theme-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/styles/theme/theme.d.ts +1 -0
- package/lib/typescript/module/src/styles/theme/theme.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/common/icons-svg/agent/index.tsx +40 -0
- package/src/common/icons-svg/bed/index.tsx +41 -0
- package/src/common/icons-svg/car/index.tsx +29 -0
- package/src/common/icons-svg/check-box/index.tsx +28 -28
- package/src/common/icons-svg/check-outline/index.tsx +42 -0
- package/src/common/icons-svg/coffee/index.tsx +43 -0
- package/src/common/icons-svg/constants/index.ts +8 -0
- package/src/common/icons-svg/index.tsx +57 -5
- package/src/common/icons-svg/pencil/index.tsx +32 -0
- package/src/common/icons-svg/refresh-ccw-dot/index.tsx +32 -0
- package/src/common/icons-svg/truck-activity/index.tsx +29 -0
- package/src/components/activities-daily/index.tsx +116 -0
- package/src/components/activities-daily/interface.d.ts +22 -0
- package/src/components/activities-progress/index.tsx +162 -0
- package/src/components/activities-progress/interface.d.ts +41 -0
- package/src/components/avatar-profile/index.tsx +95 -0
- package/src/components/avatar-profile/interface.d.ts +39 -0
- package/src/components/card-history/index.tsx +149 -150
- package/src/components/card-loading/index.tsx +16 -1
- package/src/components/card-work-session/index.tsx +187 -161
- package/src/components/card-work-session/interface.d.ts +5 -0
- package/src/components/check-box/index.tsx +22 -53
- package/src/components/check-box/interface.d.ts +31 -27
- package/src/components/coil/index.tsx +103 -90
- package/src/components/coil/interface.d.ts +26 -26
- package/src/components/filter-date-selector/index.tsx +101 -89
- package/src/components/header-profile/index.tsx +132 -132
- package/src/components/history-details/index.tsx +100 -0
- package/src/components/history-details/interface.d.ts +18 -0
- package/src/components/image-capture-with-remove/index.tsx +8 -2
- package/src/components/image-capture-with-remove/interface.d.ts +3 -0
- package/src/components/notification-loading/index.tsx +18 -7
- package/src/components/notification-loading/interface.d.ts +4 -0
- package/src/components/profile-menu-option/index.tsx +65 -0
- package/src/components/profile-menu-option/interface.d.ts +42 -0
- package/src/components/step-indicator/index.tsx +164 -164
- package/src/components/step-indicator/interface.d.ts +34 -34
- package/src/components/user-profile/index.tsx +58 -70
- package/src/index.ts +42 -37
- package/src/stories/activities-daily/activities-daily.stories.tsx +40 -0
- package/src/stories/activities-progress/activities-progress.stories.tsx +61 -0
- package/src/stories/avatar-profile/avatar-profile.stories.tsx +32 -0
- package/src/stories/card-loading/card-loading.stories.tsx +2 -2
- package/src/stories/card-work-session/card-work-session.stories.tsx +16 -1
- package/src/stories/check-box/check-box.stories.tsx +81 -83
- package/src/stories/coil/coil.stories.tsx +98 -74
- package/src/stories/filter-date-selector/filter-date-selector.stories.tsx +122 -93
- package/src/stories/header-profile/header-profile.stories.tsx +103 -103
- package/src/stories/history-details/history-details.stories.tsx +36 -0
- package/src/stories/image-capture-with-remove/image-capture-with-remove.stories.tsx +10 -0
- package/src/stories/notification-loading/notification-loading.stories.tsx +15 -0
- package/src/stories/profile-menu-option/profile-menu-option.stories.tsx +70 -0
- package/src/stories/step-indicator/step-indicator.stories.tsx +124 -116
- package/src/styles/global/interface.d.ts +10 -0
- package/src/styles/theme/theme.ts +3 -0
- package/src/utils/format-data/index.ts +66 -40
- package/src/utils/status-color/return-color.ts +12 -4
|
@@ -1,93 +1,122 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { StoryObj, Meta } from "@storybook/react";
|
|
3
|
-
import { FilterDateSelector } from "../../components/filter-date-selector";
|
|
4
|
-
import { getLastSevenDays } from "../../utils/format-data";
|
|
5
|
-
import { ISelectedDay } from "../../components/filter-date-selector/interface";
|
|
6
|
-
|
|
7
|
-
const meta: Meta<typeof FilterDateSelector> = {
|
|
8
|
-
title: "componente/FilterDateSelector",
|
|
9
|
-
component: FilterDateSelector as React.FC,
|
|
10
|
-
args: {
|
|
11
|
-
selectedDay: {
|
|
12
|
-
date: "",
|
|
13
|
-
dayName: "",
|
|
14
|
-
fullDate: new Date(""),
|
|
15
|
-
},
|
|
16
|
-
handleSelectedDay: (date: ISelectedDay) => {
|
|
17
|
-
return date;
|
|
18
|
-
},
|
|
19
|
-
days: [],
|
|
20
|
-
},
|
|
21
|
-
parameters: {
|
|
22
|
-
notes: `
|
|
23
|
-
# FilterDateSelector
|
|
24
|
-
|
|
25
|
-
Este é um componente de filtro do dias .
|
|
26
|
-
Você usa assim:
|
|
27
|
-
\`\`\`tsx
|
|
28
|
-
<FilterDateSelector
|
|
29
|
-
selectedDay={selectedDay as any}
|
|
30
|
-
handleSelectedDay={setSelectedDay as any}
|
|
31
|
-
days={days as []}
|
|
32
|
-
isLoading={false}
|
|
33
|
-
/>
|
|
34
|
-
\`\`\`
|
|
35
|
-
`,
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export default meta;
|
|
40
|
-
|
|
41
|
-
type Story = StoryObj<typeof meta>;
|
|
42
|
-
|
|
43
|
-
export const FilterDateSelectorSimples: Story = {
|
|
44
|
-
name: "filter-journey",
|
|
45
|
-
render: () => {
|
|
46
|
-
const [isLoading, setIsLoading] = React.useState(false);
|
|
47
|
-
const [selectedDay, setSelectedDay] = React.useState<ISelectedDay>({
|
|
48
|
-
date: "",
|
|
49
|
-
dayName: "",
|
|
50
|
-
fullDate: new Date(""),
|
|
51
|
-
});
|
|
52
|
-
const days = getLastSevenDays();
|
|
53
|
-
|
|
54
|
-
React.useEffect(() => {
|
|
55
|
-
const today = new Date();
|
|
56
|
-
|
|
57
|
-
setSelectedDay(
|
|
58
|
-
days.find(
|
|
59
|
-
(day) => day.date === today.getDate() && day.fullDate.getMonth() === today.getMonth()
|
|
60
|
-
) as any
|
|
61
|
-
);
|
|
62
|
-
}, []);
|
|
63
|
-
|
|
64
|
-
const handleSelectedDay = (day: ISelectedDay) => {
|
|
65
|
-
setSelectedDay(day);
|
|
66
|
-
setIsLoading(true);
|
|
67
|
-
|
|
68
|
-
/* global setTimeout */
|
|
69
|
-
setTimeout(() => {
|
|
70
|
-
setIsLoading(false);
|
|
71
|
-
}, 1000);
|
|
72
|
-
};
|
|
73
|
-
return (
|
|
74
|
-
<FilterDateSelector
|
|
75
|
-
selectedDay={selectedDay as any}
|
|
76
|
-
handleSelectedDay={handleSelectedDay as any}
|
|
77
|
-
days={days as []}
|
|
78
|
-
isLoading={isLoading}
|
|
79
|
-
/>
|
|
80
|
-
);
|
|
81
|
-
},
|
|
82
|
-
args: {
|
|
83
|
-
selectedDay: {
|
|
84
|
-
date: "",
|
|
85
|
-
dayName: "",
|
|
86
|
-
fullDate: new Date(""),
|
|
87
|
-
},
|
|
88
|
-
handleSelectedDay: (date: ISelectedDay) => {
|
|
89
|
-
return date;
|
|
90
|
-
},
|
|
91
|
-
days: [],
|
|
92
|
-
},
|
|
93
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { StoryObj, Meta } from "@storybook/react";
|
|
3
|
+
import { FilterDateSelector } from "../../components/filter-date-selector";
|
|
4
|
+
import { getLastSevenDays } from "../../utils/format-data";
|
|
5
|
+
import { ISelectedDay } from "../../components/filter-date-selector/interface";
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof FilterDateSelector> = {
|
|
8
|
+
title: "componente/FilterDateSelector",
|
|
9
|
+
component: FilterDateSelector as React.FC,
|
|
10
|
+
args: {
|
|
11
|
+
selectedDay: {
|
|
12
|
+
date: "",
|
|
13
|
+
dayName: "",
|
|
14
|
+
fullDate: new Date(""),
|
|
15
|
+
},
|
|
16
|
+
handleSelectedDay: (date: ISelectedDay) => {
|
|
17
|
+
return date;
|
|
18
|
+
},
|
|
19
|
+
days: [],
|
|
20
|
+
},
|
|
21
|
+
parameters: {
|
|
22
|
+
notes: `
|
|
23
|
+
# FilterDateSelector
|
|
24
|
+
|
|
25
|
+
Este é um componente de filtro do dias .
|
|
26
|
+
Você usa assim:
|
|
27
|
+
\`\`\`tsx
|
|
28
|
+
<FilterDateSelector
|
|
29
|
+
selectedDay={selectedDay as any}
|
|
30
|
+
handleSelectedDay={setSelectedDay as any}
|
|
31
|
+
days={days as []}
|
|
32
|
+
isLoading={false}
|
|
33
|
+
/>
|
|
34
|
+
\`\`\`
|
|
35
|
+
`,
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default meta;
|
|
40
|
+
|
|
41
|
+
type Story = StoryObj<typeof meta>;
|
|
42
|
+
|
|
43
|
+
export const FilterDateSelectorSimples: Story = {
|
|
44
|
+
name: "filter-journey",
|
|
45
|
+
render: () => {
|
|
46
|
+
const [isLoading, setIsLoading] = React.useState(false);
|
|
47
|
+
const [selectedDay, setSelectedDay] = React.useState<ISelectedDay>({
|
|
48
|
+
date: "",
|
|
49
|
+
dayName: "",
|
|
50
|
+
fullDate: new Date(""),
|
|
51
|
+
});
|
|
52
|
+
const days = getLastSevenDays();
|
|
53
|
+
|
|
54
|
+
React.useEffect(() => {
|
|
55
|
+
const today = new Date();
|
|
56
|
+
|
|
57
|
+
setSelectedDay(
|
|
58
|
+
days.find(
|
|
59
|
+
(day) => day.date === today.getDate() && day.fullDate.getMonth() === today.getMonth()
|
|
60
|
+
) as any
|
|
61
|
+
);
|
|
62
|
+
}, []);
|
|
63
|
+
|
|
64
|
+
const handleSelectedDay = (day: ISelectedDay) => {
|
|
65
|
+
setSelectedDay(day);
|
|
66
|
+
setIsLoading(true);
|
|
67
|
+
|
|
68
|
+
/* global setTimeout */
|
|
69
|
+
setTimeout(() => {
|
|
70
|
+
setIsLoading(false);
|
|
71
|
+
}, 1000);
|
|
72
|
+
};
|
|
73
|
+
return (
|
|
74
|
+
<FilterDateSelector
|
|
75
|
+
selectedDay={selectedDay as any}
|
|
76
|
+
handleSelectedDay={handleSelectedDay as any}
|
|
77
|
+
days={days as []}
|
|
78
|
+
isLoading={isLoading}
|
|
79
|
+
/>
|
|
80
|
+
);
|
|
81
|
+
},
|
|
82
|
+
args: {
|
|
83
|
+
selectedDay: {
|
|
84
|
+
date: "",
|
|
85
|
+
dayName: "",
|
|
86
|
+
fullDate: new Date(""),
|
|
87
|
+
},
|
|
88
|
+
handleSelectedDay: (date: ISelectedDay) => {
|
|
89
|
+
return date;
|
|
90
|
+
},
|
|
91
|
+
days: [],
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export const FilterDateSelectorTodos: Story = {
|
|
96
|
+
name: "filter-journey-todos",
|
|
97
|
+
render: () => {
|
|
98
|
+
const [isLoading, setIsLoading] = React.useState(false);
|
|
99
|
+
|
|
100
|
+
const days = getLastSevenDays() as ISelectedDay[];
|
|
101
|
+
|
|
102
|
+
const [selectedDay, setSelectedDay] = React.useState<any>(days[0]);
|
|
103
|
+
|
|
104
|
+
// Função para lidar com a seleção de um dia
|
|
105
|
+
const handleSelectedDay = (day: ISelectedDay) => {
|
|
106
|
+
setSelectedDay(day);
|
|
107
|
+
setIsLoading(true);
|
|
108
|
+
// Simula um carregamento de 1 segundo
|
|
109
|
+
setTimeout(() => setIsLoading(false), 1000);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
return (
|
|
113
|
+
<FilterDateSelector
|
|
114
|
+
selectedDay={selectedDay}
|
|
115
|
+
handleSelectedDay={handleSelectedDay as any}
|
|
116
|
+
days={days}
|
|
117
|
+
isLoading={isLoading}
|
|
118
|
+
/>
|
|
119
|
+
);
|
|
120
|
+
},
|
|
121
|
+
args: {}, // <- NÃO defina selectedDay/days aqui
|
|
122
|
+
};
|
|
@@ -1,103 +1,103 @@
|
|
|
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
|
-
isBluetooth: false,
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
export const HeaderArrow: Story = {
|
|
49
|
-
name: "header-arrow",
|
|
50
|
-
args: {
|
|
51
|
-
testID: "header",
|
|
52
|
-
arrow: true,
|
|
53
|
-
title: "SINCRONIZAR ATIVIDADES",
|
|
54
|
-
handleNavigation: () => {},
|
|
55
|
-
permission: false,
|
|
56
|
-
bluetoothIsConnected: false,
|
|
57
|
-
isInternetReachable: false,
|
|
58
|
-
isBluetooth: true,
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export const HeaderList: Story = {
|
|
63
|
-
name: "header-list",
|
|
64
|
-
args: {
|
|
65
|
-
testID: "header",
|
|
66
|
-
arrow: true,
|
|
67
|
-
title: "Controle de Jornada",
|
|
68
|
-
handleNavigation: () => {},
|
|
69
|
-
permission: false,
|
|
70
|
-
bluetoothIsConnected: true,
|
|
71
|
-
isInternetReachable: true,
|
|
72
|
-
isBluetooth: true,
|
|
73
|
-
},
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
export const HeaderPermission: Story = {
|
|
77
|
-
name: "header-permission",
|
|
78
|
-
args: {
|
|
79
|
-
testID: "header",
|
|
80
|
-
arrow: true,
|
|
81
|
-
title: "Permission",
|
|
82
|
-
handleNavigation: () => {},
|
|
83
|
-
permission: true,
|
|
84
|
-
bluetoothIsConnected: true,
|
|
85
|
-
isInternetReachable: true,
|
|
86
|
-
isBluetooth: false,
|
|
87
|
-
},
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
export const HeaderBackground: Story = {
|
|
91
|
-
name: "header-background",
|
|
92
|
-
args: {
|
|
93
|
-
testID: "header",
|
|
94
|
-
arrow: true,
|
|
95
|
-
title: "texto grande e background diferente",
|
|
96
|
-
handleNavigation: () => {},
|
|
97
|
-
permission: false,
|
|
98
|
-
bluetoothIsConnected: true,
|
|
99
|
-
isInternetReachable: true,
|
|
100
|
-
isBluetooth: false,
|
|
101
|
-
color: { colorText: "white" },
|
|
102
|
-
},
|
|
103
|
-
};
|
|
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
|
+
isBluetooth: false,
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
export const HeaderArrow: Story = {
|
|
49
|
+
name: "header-arrow",
|
|
50
|
+
args: {
|
|
51
|
+
testID: "header",
|
|
52
|
+
arrow: true,
|
|
53
|
+
title: "SINCRONIZAR ATIVIDADES",
|
|
54
|
+
handleNavigation: () => {},
|
|
55
|
+
permission: false,
|
|
56
|
+
bluetoothIsConnected: false,
|
|
57
|
+
isInternetReachable: false,
|
|
58
|
+
isBluetooth: true,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const HeaderList: Story = {
|
|
63
|
+
name: "header-list",
|
|
64
|
+
args: {
|
|
65
|
+
testID: "header",
|
|
66
|
+
arrow: true,
|
|
67
|
+
title: "Controle de Jornada",
|
|
68
|
+
handleNavigation: () => {},
|
|
69
|
+
permission: false,
|
|
70
|
+
bluetoothIsConnected: true,
|
|
71
|
+
isInternetReachable: true,
|
|
72
|
+
isBluetooth: true,
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export const HeaderPermission: Story = {
|
|
77
|
+
name: "header-permission",
|
|
78
|
+
args: {
|
|
79
|
+
testID: "header",
|
|
80
|
+
arrow: true,
|
|
81
|
+
title: "Permission",
|
|
82
|
+
handleNavigation: () => {},
|
|
83
|
+
permission: true,
|
|
84
|
+
bluetoothIsConnected: true,
|
|
85
|
+
isInternetReachable: true,
|
|
86
|
+
isBluetooth: false,
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export const HeaderBackground: Story = {
|
|
91
|
+
name: "header-background",
|
|
92
|
+
args: {
|
|
93
|
+
testID: "header",
|
|
94
|
+
arrow: true,
|
|
95
|
+
title: "texto grande e background diferente",
|
|
96
|
+
handleNavigation: () => {},
|
|
97
|
+
permission: false,
|
|
98
|
+
bluetoothIsConnected: true,
|
|
99
|
+
isInternetReachable: true,
|
|
100
|
+
isBluetooth: false,
|
|
101
|
+
color: { colorText: "white" },
|
|
102
|
+
},
|
|
103
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { StoryObj, Meta } from "@storybook/react";
|
|
2
|
+
import { HistoryDetails } from "../../components/history-details";
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof HistoryDetails> = {
|
|
5
|
+
title: "componente/HistoryDetails",
|
|
6
|
+
component: HistoryDetails,
|
|
7
|
+
args: {
|
|
8
|
+
numero: "01020304050607",
|
|
9
|
+
local: "Doca 1, Pátio 02 - Usimais (Ipatinga)",
|
|
10
|
+
date: "24/03/2025",
|
|
11
|
+
duracao: "00:30",
|
|
12
|
+
},
|
|
13
|
+
parameters: {
|
|
14
|
+
notes: ` HistoryDetails Este é um componente de detalhe do histórico.Você usa assim:
|
|
15
|
+
<HistoryDetails
|
|
16
|
+
numero="999999"
|
|
17
|
+
local="Doca 3, Pátio 05 - Usiminas (Ipatinga)"
|
|
18
|
+
date="2026-01-01"
|
|
19
|
+
duracao="01:15"
|
|
20
|
+
/>`,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default meta;
|
|
25
|
+
|
|
26
|
+
type Story = StoryObj<typeof meta>;
|
|
27
|
+
|
|
28
|
+
export const Padrao: Story = {
|
|
29
|
+
name: "history-details-padrao",
|
|
30
|
+
args: {
|
|
31
|
+
numero: "01020304050607",
|
|
32
|
+
local: "Doca 1, Pátio 02 - Usimais (Ipatinga)",
|
|
33
|
+
date: "2025-03-24",
|
|
34
|
+
duracao: "00:30",
|
|
35
|
+
},
|
|
36
|
+
};
|
|
@@ -8,6 +8,7 @@ const meta: Meta<typeof ImageCaptureWithRemove> = {
|
|
|
8
8
|
component: ImageCaptureWithRemove as React.FC,
|
|
9
9
|
args: {
|
|
10
10
|
foto: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS6OOy_GKxjzabOOBo22zHfg4TdWhubwnU7GQ&s",
|
|
11
|
+
status: "Cancelado",
|
|
11
12
|
},
|
|
12
13
|
parameters: {
|
|
13
14
|
notes: `
|
|
@@ -45,3 +46,12 @@ export const ImageCaptureWithDelete: Story = {
|
|
|
45
46
|
onRemove: () => {},
|
|
46
47
|
},
|
|
47
48
|
};
|
|
49
|
+
export const ImageCaptureWithStatus: Story = {
|
|
50
|
+
name: "image-capture-with-status",
|
|
51
|
+
args: {
|
|
52
|
+
foto: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS6OOy_GKxjzabOOBo22zHfg4TdWhubwnU7GQ&s",
|
|
53
|
+
handleTakePhoto: () => {},
|
|
54
|
+
onRemove: () => {},
|
|
55
|
+
status: "Pendente",
|
|
56
|
+
},
|
|
57
|
+
};
|
|
@@ -13,6 +13,7 @@ const meta: Meta<typeof NotificationLoading> = {
|
|
|
13
13
|
notification: "Hoje você tem um carregamento agendamento",
|
|
14
14
|
statusNotify: "pending",
|
|
15
15
|
dataStart: "Hoje",
|
|
16
|
+
readonly: false,
|
|
16
17
|
},
|
|
17
18
|
parameters: {
|
|
18
19
|
notes: `
|
|
@@ -28,6 +29,7 @@ Você usa assim:
|
|
|
28
29
|
notification=""
|
|
29
30
|
statusNotify=""
|
|
30
31
|
dataStart: "Hoje",
|
|
32
|
+
readonly: false,
|
|
31
33
|
/>
|
|
32
34
|
\`\`\`
|
|
33
35
|
`,
|
|
@@ -71,3 +73,16 @@ export const NotificationLoadingRecused: Story = {
|
|
|
71
73
|
dataStart: "25 abril 2025",
|
|
72
74
|
},
|
|
73
75
|
};
|
|
76
|
+
|
|
77
|
+
export const NotificationLoadingReadonly: Story = {
|
|
78
|
+
name: "Notification-readonly",
|
|
79
|
+
args: {
|
|
80
|
+
title: "#013200400456",
|
|
81
|
+
date: "12:30 07/05/2025",
|
|
82
|
+
handleNavigation: () => {},
|
|
83
|
+
notification: "Hoje você tem um carregamento agendamento",
|
|
84
|
+
statusNotify: "Reprovado",
|
|
85
|
+
dataStart: "25 abril 2025",
|
|
86
|
+
readonly: true,
|
|
87
|
+
},
|
|
88
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { StoryObj, Meta } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
import { ProfileMenuOption } from "../../components/profile-menu-option";
|
|
4
|
+
import { theme } from "../../styles/theme/theme";
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof ProfileMenuOption> = {
|
|
7
|
+
title: "componente/ProfileMenuOption",
|
|
8
|
+
component: ProfileMenuOption,
|
|
9
|
+
args: {
|
|
10
|
+
text: "Perfil",
|
|
11
|
+
icon: "AGENT",
|
|
12
|
+
backgroundColor: theme.colors.blue[400],
|
|
13
|
+
colorIcon: theme.colors.neutral[25],
|
|
14
|
+
handleNavigation: () => {},
|
|
15
|
+
},
|
|
16
|
+
parameters: {
|
|
17
|
+
notes: `
|
|
18
|
+
# ProfileMenuOption
|
|
19
|
+
|
|
20
|
+
Este é um componente de opção de menu para perfil.
|
|
21
|
+
Você usa assim:
|
|
22
|
+
\`\`\`tsx
|
|
23
|
+
<ProfileMenuOption
|
|
24
|
+
text="Perfil"
|
|
25
|
+
icon="AGENT"
|
|
26
|
+
backgroundColor={theme.colors.blue[400]}
|
|
27
|
+
colorIcon={theme.colors.neutral[25]}
|
|
28
|
+
handleNavigation={() => {}}
|
|
29
|
+
/>
|
|
30
|
+
\`\`\`
|
|
31
|
+
`,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default meta;
|
|
36
|
+
|
|
37
|
+
type Story = StoryObj<typeof meta>;
|
|
38
|
+
|
|
39
|
+
export const Default: Story = {
|
|
40
|
+
name: "profile-menu-option",
|
|
41
|
+
args: {
|
|
42
|
+
text: "Perfil",
|
|
43
|
+
icon: "AGENT",
|
|
44
|
+
backgroundColor: theme.colors.blue[400],
|
|
45
|
+
colorIcon: theme.colors.neutral[25],
|
|
46
|
+
handleNavigation: () => {},
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const CustomColor: Story = {
|
|
51
|
+
name: "profile-menu-option-custom-color",
|
|
52
|
+
args: {
|
|
53
|
+
text: "Configurações",
|
|
54
|
+
icon: "GEAR",
|
|
55
|
+
backgroundColor: theme.colors.blue[500],
|
|
56
|
+
colorIcon: theme.colors.neutral[25],
|
|
57
|
+
handleNavigation: () => {},
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const Support: Story = {
|
|
62
|
+
name: "profile-menu-option-support",
|
|
63
|
+
args: {
|
|
64
|
+
text: "Suporte",
|
|
65
|
+
icon: "LIFEBUOY",
|
|
66
|
+
backgroundColor: theme.colors.blue[400],
|
|
67
|
+
colorIcon: theme.colors.neutral[25],
|
|
68
|
+
handleNavigation: () => {},
|
|
69
|
+
},
|
|
70
|
+
};
|