react-native-exp-fig 0.1.41 → 0.1.43
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/@types/as-base-component.js.map +1 -1
- package/lib/commonjs/common/icons-svg/arrow-down/index.js +51 -0
- package/lib/commonjs/common/icons-svg/arrow-down/index.js.map +1 -0
- package/lib/commonjs/common/icons-svg/constants/index.js +3 -1
- package/lib/commonjs/common/icons-svg/constants/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/user-circle/index.js +37 -0
- package/lib/commonjs/common/icons-svg/user-circle/index.js.map +1 -0
- package/lib/commonjs/components/active-loadings-summary/index.js +88 -0
- package/lib/commonjs/components/active-loadings-summary/index.js.map +1 -0
- package/lib/commonjs/components/active-loadings-summary/interface.d.js +6 -0
- package/lib/commonjs/components/active-loadings-summary/interface.d.js.map +1 -0
- package/lib/commonjs/components/alert-critical-load/index.js +64 -0
- package/lib/commonjs/components/alert-critical-load/index.js.map +1 -0
- package/lib/commonjs/components/alert-critical-load/interface.js +6 -0
- package/lib/commonjs/components/alert-critical-load/interface.js.map +1 -0
- package/lib/commonjs/components/alert-critical-load/styles.js +40 -0
- package/lib/commonjs/components/alert-critical-load/styles.js.map +1 -0
- package/lib/commonjs/components/card-available-load/index.js +131 -0
- package/lib/commonjs/components/card-available-load/index.js.map +1 -0
- package/lib/commonjs/components/card-available-load/interface.js +6 -0
- package/lib/commonjs/components/card-available-load/interface.js.map +1 -0
- package/lib/commonjs/components/card-available-load/style.js +54 -0
- package/lib/commonjs/components/card-available-load/style.js.map +1 -0
- package/lib/commonjs/components/card-driver-data/index.js +105 -0
- package/lib/commonjs/components/card-driver-data/index.js.map +1 -0
- package/lib/commonjs/components/card-driver-data/interface.js +6 -0
- package/lib/commonjs/components/card-driver-data/interface.js.map +1 -0
- package/lib/commonjs/components/card-driver-data/style.js +55 -0
- package/lib/commonjs/components/card-driver-data/style.js.map +1 -0
- package/lib/commonjs/components/card-loading/index.js +9 -9
- package/lib/commonjs/components/card-loading/index.js.map +1 -1
- package/lib/commonjs/components/card-loading/interface.d.js.map +1 -1
- package/lib/commonjs/components/document-carga-info/index.js +98 -0
- package/lib/commonjs/components/document-carga-info/index.js.map +1 -0
- package/lib/commonjs/components/document-carga-info/interface.js +2 -0
- package/lib/commonjs/components/document-carga-info/interface.js.map +1 -0
- package/lib/commonjs/components/document-carga-info/styles.js +64 -0
- package/lib/commonjs/components/document-carga-info/styles.js.map +1 -0
- package/lib/commonjs/components/driver-journey-info/index.js +141 -0
- package/lib/commonjs/components/driver-journey-info/index.js.map +1 -0
- package/lib/commonjs/components/driver-journey-info/interface.js +6 -0
- package/lib/commonjs/components/driver-journey-info/interface.js.map +1 -0
- package/lib/commonjs/components/driver-journey-info/style.js +55 -0
- package/lib/commonjs/components/driver-journey-info/style.js.map +1 -0
- package/lib/commonjs/index.js +42 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/stories/active-loadings-summary/active-loadings-summary.stories.js +63 -0
- package/lib/commonjs/stories/active-loadings-summary/active-loadings-summary.stories.js.map +1 -0
- package/lib/commonjs/stories/alert-critical-load/alert-critical-load.stories.js +58 -0
- package/lib/commonjs/stories/alert-critical-load/alert-critical-load.stories.js.map +1 -0
- package/lib/commonjs/stories/card-available-load/card-available-load.stories.js +94 -0
- package/lib/commonjs/stories/card-available-load/card-available-load.stories.js.map +1 -0
- package/lib/commonjs/stories/card-driver-data/card-driver-data.stories.js +81 -0
- package/lib/commonjs/stories/card-driver-data/card-driver-data.stories.js.map +1 -0
- package/lib/commonjs/stories/document-carga-info/document-carga-info.stories.js +76 -0
- package/lib/commonjs/stories/document-carga-info/document-carga-info.stories.js.map +1 -0
- package/lib/commonjs/stories/driver-journey-info/driver-journey-info.stories.js +87 -0
- package/lib/commonjs/stories/driver-journey-info/driver-journey-info.stories.js.map +1 -0
- package/lib/commonjs/styles/theme/theme.js +5 -4
- package/lib/commonjs/styles/theme/theme.js.map +1 -1
- package/lib/commonjs/utils/status-color/return-color.js +4 -2
- package/lib/commonjs/utils/status-color/return-color.js.map +1 -1
- package/lib/module/@types/as-base-component.js.map +1 -1
- package/lib/module/common/icons-svg/arrow-down/index.js +45 -0
- package/lib/module/common/icons-svg/arrow-down/index.js.map +1 -0
- package/lib/module/common/icons-svg/constants/index.js +3 -1
- package/lib/module/common/icons-svg/constants/index.js.map +1 -1
- package/lib/module/common/icons-svg/user-circle/index.js +29 -0
- package/lib/module/common/icons-svg/user-circle/index.js.map +1 -0
- package/lib/module/components/active-loadings-summary/index.js +81 -0
- package/lib/module/components/active-loadings-summary/index.js.map +1 -0
- package/lib/module/components/active-loadings-summary/interface.d.js +2 -0
- package/lib/module/components/active-loadings-summary/interface.d.js.map +1 -0
- package/lib/module/components/alert-critical-load/index.js +63 -0
- package/lib/module/components/alert-critical-load/index.js.map +1 -0
- package/lib/module/components/alert-critical-load/interface.js +2 -0
- package/lib/module/components/alert-critical-load/interface.js.map +1 -0
- package/lib/module/components/alert-critical-load/styles.js +34 -0
- package/lib/module/components/alert-critical-load/styles.js.map +1 -0
- package/lib/module/components/card-available-load/index.js +130 -0
- package/lib/module/components/card-available-load/index.js.map +1 -0
- package/lib/module/components/card-available-load/interface.js +2 -0
- package/lib/module/components/card-available-load/interface.js.map +1 -0
- package/lib/module/components/card-available-load/style.js +49 -0
- package/lib/module/components/card-available-load/style.js.map +1 -0
- package/lib/module/components/card-driver-data/index.js +104 -0
- package/lib/module/components/card-driver-data/index.js.map +1 -0
- package/lib/module/components/card-driver-data/interface.js +2 -0
- package/lib/module/components/card-driver-data/interface.js.map +1 -0
- package/lib/module/components/card-driver-data/style.js +50 -0
- package/lib/module/components/card-driver-data/style.js.map +1 -0
- package/lib/module/components/card-loading/index.js +9 -9
- package/lib/module/components/card-loading/index.js.map +1 -1
- package/lib/module/components/card-loading/interface.d.js.map +1 -1
- package/lib/module/components/document-carga-info/index.js +97 -0
- package/lib/module/components/document-carga-info/index.js.map +1 -0
- package/lib/module/components/document-carga-info/interface.js +2 -0
- package/lib/module/components/document-carga-info/interface.js.map +1 -0
- package/lib/module/components/document-carga-info/styles.js +60 -0
- package/lib/module/components/document-carga-info/styles.js.map +1 -0
- package/lib/module/components/driver-journey-info/index.js +140 -0
- package/lib/module/components/driver-journey-info/index.js.map +1 -0
- package/lib/module/components/driver-journey-info/interface.js +2 -0
- package/lib/module/components/driver-journey-info/interface.js.map +1 -0
- package/lib/module/components/driver-journey-info/style.js +50 -0
- package/lib/module/components/driver-journey-info/style.js.map +1 -0
- package/lib/module/index.js +8 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/stories/active-loadings-summary/active-loadings-summary.stories.js +57 -0
- package/lib/module/stories/active-loadings-summary/active-loadings-summary.stories.js.map +1 -0
- package/lib/module/stories/alert-critical-load/alert-critical-load.stories.js +50 -0
- package/lib/module/stories/alert-critical-load/alert-critical-load.stories.js.map +1 -0
- package/lib/module/stories/card-available-load/card-available-load.stories.js +86 -0
- package/lib/module/stories/card-available-load/card-available-load.stories.js.map +1 -0
- package/lib/module/stories/card-driver-data/card-driver-data.stories.js +73 -0
- package/lib/module/stories/card-driver-data/card-driver-data.stories.js.map +1 -0
- package/lib/module/stories/document-carga-info/document-carga-info.stories.js +68 -0
- package/lib/module/stories/document-carga-info/document-carga-info.stories.js.map +1 -0
- package/lib/module/stories/driver-journey-info/driver-journey-info.stories.js +79 -0
- package/lib/module/stories/driver-journey-info/driver-journey-info.stories.js.map +1 -0
- package/lib/module/styles/theme/theme.js +5 -4
- package/lib/module/styles/theme/theme.js.map +1 -1
- package/lib/module/utils/status-color/return-color.js +4 -2
- package/lib/module/utils/status-color/return-color.js.map +1 -1
- package/lib/typescript/src/common/icons-svg/arrow-down/index.d.ts +10 -0
- package/lib/typescript/src/common/icons-svg/constants/index.d.ts +2 -0
- package/lib/typescript/src/common/icons-svg/user-circle/index.d.ts +10 -0
- package/lib/typescript/src/components/active-loadings-summary/index.d.ts +10 -0
- package/lib/typescript/src/components/alert-critical-load/index.d.ts +11 -0
- package/lib/typescript/src/components/alert-critical-load/interface.d.ts +9 -0
- package/lib/typescript/src/components/alert-critical-load/styles.d.ts +28 -0
- package/lib/typescript/src/components/card-available-load/index.d.ts +11 -0
- package/lib/typescript/src/components/card-available-load/interface.d.ts +30 -0
- package/lib/typescript/src/components/card-available-load/style.d.ts +8 -0
- package/lib/typescript/src/components/card-driver-data/index.d.ts +11 -0
- package/lib/typescript/src/components/card-driver-data/interface.d.ts +27 -0
- package/lib/typescript/src/components/card-driver-data/style.d.ts +8 -0
- package/lib/typescript/src/components/document-carga-info/index.d.ts +11 -0
- package/lib/typescript/src/components/document-carga-info/interface.d.ts +15 -0
- package/lib/typescript/src/components/document-carga-info/styles.d.ts +50 -0
- package/lib/typescript/src/components/driver-journey-info/index.d.ts +11 -0
- package/lib/typescript/src/components/driver-journey-info/interface.d.ts +28 -0
- package/lib/typescript/src/components/driver-journey-info/style.d.ts +8 -0
- package/lib/typescript/src/components/selects/select-date-and-hours/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts +6 -0
- package/lib/typescript/src/stories/active-loadings-summary/active-loadings-summary.stories.d.ts +8 -0
- package/lib/typescript/src/stories/alert-critical-load/alert-critical-load.stories.d.ts +9 -0
- package/lib/typescript/src/stories/card-available-load/card-available-load.stories.d.ts +10 -0
- package/lib/typescript/src/stories/card-driver-data/card-driver-data.stories.d.ts +10 -0
- package/lib/typescript/src/stories/document-carga-info/document-carga-info.stories.d.ts +10 -0
- package/lib/typescript/src/stories/driver-journey-info/driver-journey-info.stories.d.ts +10 -0
- package/lib/typescript/src/styles/global/theme-provider.d.ts +1 -0
- package/lib/typescript/src/styles/theme/theme.d.ts +1 -0
- package/lib/typescript/src/utils/status-color/return-color.d.ts +1 -1
- package/package.json +1 -1
- package/src/@types/as-base-component.ts +9 -9
- package/src/common/icons-svg/arrow-down/index.tsx +44 -0
- package/src/common/icons-svg/constants/index.ts +2 -0
- package/src/common/icons-svg/user-circle/index.tsx +29 -0
- package/src/components/active-loadings-summary/index.tsx +69 -0
- package/src/components/active-loadings-summary/interface.d.ts +16 -0
- package/src/components/alert-critical-load/index.tsx +83 -0
- package/src/components/alert-critical-load/interface.ts +13 -0
- package/src/components/alert-critical-load/styles.ts +35 -0
- package/src/components/card-available-load/index.tsx +163 -0
- package/src/components/card-available-load/interface.ts +36 -0
- package/src/components/card-available-load/style.ts +51 -0
- package/src/components/card-driver-data/index.tsx +139 -0
- package/src/components/card-driver-data/interface.ts +33 -0
- package/src/components/card-driver-data/style.ts +55 -0
- package/src/components/card-loading/index.tsx +276 -294
- package/src/components/card-loading/interface.d.ts +37 -37
- package/src/components/document-carga-info/index.tsx +137 -0
- package/src/components/document-carga-info/interface.ts +19 -0
- package/src/components/document-carga-info/styles.ts +65 -0
- package/src/components/driver-journey-info/index.tsx +185 -0
- package/src/components/driver-journey-info/interface.ts +36 -0
- package/src/components/driver-journey-info/style.ts +55 -0
- package/src/index.ts +56 -50
- package/src/stories/active-loadings-summary/active-loadings-summary.stories.tsx +59 -0
- package/src/stories/alert-critical-load/alert-critical-load.stories.tsx +51 -0
- package/src/stories/card-available-load/card-available-load.stories.tsx +85 -0
- package/src/stories/card-driver-data/card-driver-data.stories.tsx +73 -0
- package/src/stories/document-carga-info/document-carga-info.stories.tsx +72 -0
- package/src/stories/driver-journey-info/driver-journey-info.stories.tsx +79 -0
- package/src/styles/theme/theme.ts +192 -191
- package/src/utils/status-color/return-color.ts +3 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
5
|
+
|
|
6
|
+
// component
|
|
7
|
+
import AlertCriticalLoad from "../../components/alert-critical-load";
|
|
8
|
+
|
|
9
|
+
const meta: Meta<typeof AlertCriticalLoad> = {
|
|
10
|
+
title: "componente/AlertCriticalLoad",
|
|
11
|
+
component: AlertCriticalLoad,
|
|
12
|
+
args: {
|
|
13
|
+
message: "Carregamento crítico para esse carregamento, faça o mais rápido possível.",
|
|
14
|
+
handleToggle: () => { },
|
|
15
|
+
},
|
|
16
|
+
parameters: {
|
|
17
|
+
docs: { disable: true },
|
|
18
|
+
previewTabs: {
|
|
19
|
+
"storybook/docs/panel": { hidden: true },
|
|
20
|
+
canvas: { hidden: true },
|
|
21
|
+
},
|
|
22
|
+
notes: `
|
|
23
|
+
# AlertCriticalLoad
|
|
24
|
+
|
|
25
|
+
Componente responsável por exibir informações urgentes sobre uma carga.
|
|
26
|
+
|
|
27
|
+
Exemplo de uso:
|
|
28
|
+
|
|
29
|
+
\`\`\`tsx
|
|
30
|
+
<AlertCriticalLoad
|
|
31
|
+
message="Carregamento crítico para esse carregamento, faça o mais rápido possível."
|
|
32
|
+
handleToggle: () => { },
|
|
33
|
+
/>
|
|
34
|
+
\`\`\`
|
|
35
|
+
`,
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default meta;
|
|
40
|
+
|
|
41
|
+
type Story = StoryObj<typeof meta>;
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
export const Default: Story = {
|
|
45
|
+
name: "alert-critical-load-default",
|
|
46
|
+
args: {
|
|
47
|
+
message: "Carregamento crítico para esse carregamento, faça o mais rápido possível.",
|
|
48
|
+
handleToggle: () => { },
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import type { StoryObj, Meta } from "@storybook/react";
|
|
5
|
+
|
|
6
|
+
// components
|
|
7
|
+
import CardAvailableLoad from "../../components/card-available-load";
|
|
8
|
+
|
|
9
|
+
const meta: Meta<typeof CardAvailableLoad> = {
|
|
10
|
+
title: "componente/CardAvailableLoad",
|
|
11
|
+
component: CardAvailableLoad,
|
|
12
|
+
args: {
|
|
13
|
+
backgroundColor: "#2D3748",
|
|
14
|
+
onPress: () => {},
|
|
15
|
+
carregamento: {
|
|
16
|
+
numero_carregamento: "01020304050607",
|
|
17
|
+
local: "Doca 1, Patío 03 - Usiminas Ipatinga",
|
|
18
|
+
previsao_carregamento: "10/03/2025 12:37",
|
|
19
|
+
qtd_bobinas: 15,
|
|
20
|
+
peso_total_kg: 20
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
parameters: {
|
|
24
|
+
docs: { disable: true },
|
|
25
|
+
previewTabs: {
|
|
26
|
+
"storybook/docs/panel": { hidden: true },
|
|
27
|
+
canvas: { hidden: true },
|
|
28
|
+
},
|
|
29
|
+
notes: `
|
|
30
|
+
# CardAvailableLoad
|
|
31
|
+
|
|
32
|
+
Componente que mostra os dados detalhado de um carregamento.
|
|
33
|
+
Você usa assim:
|
|
34
|
+
\`\`\`tsx
|
|
35
|
+
<CardAvailableLoad
|
|
36
|
+
backgroundColor={"#2D3748"}
|
|
37
|
+
onPress={() => { }}
|
|
38
|
+
carregamento={
|
|
39
|
+
{
|
|
40
|
+
numero_carregamento: "01020304050607",
|
|
41
|
+
local: "Doca 1, Patío 03 - Usiminas Ipatinga",
|
|
42
|
+
previsao_carregamento: "10/03/2025 12:37",
|
|
43
|
+
qtd_bobinas: 15,
|
|
44
|
+
peso_total_kg: 20
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/>
|
|
48
|
+
\`\`\`
|
|
49
|
+
`,
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export default meta;
|
|
54
|
+
|
|
55
|
+
type Story = StoryObj<typeof meta>;
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
export const CardAvailableLoadOpen: Story = {
|
|
59
|
+
name: "card-available-load-open",
|
|
60
|
+
args: {
|
|
61
|
+
backgroundColor: "#2D3748",
|
|
62
|
+
onPress: () => {},
|
|
63
|
+
carregamento: {
|
|
64
|
+
numero_carregamento: "01020304050607",
|
|
65
|
+
local: "Doca 1, Patío 03 - Usiminas Ipatinga",
|
|
66
|
+
previsao_carregamento: "10/03/2025 12:37",
|
|
67
|
+
qtd_bobinas: 15, peso_total_kg: 20
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const CardAvailableLoadClosed: Story = {
|
|
73
|
+
name: "card-available-load-closed",
|
|
74
|
+
args: {
|
|
75
|
+
isOpen: false,
|
|
76
|
+
backgroundColor: "#2D3748",
|
|
77
|
+
onPress: () => {},
|
|
78
|
+
carregamento: {
|
|
79
|
+
numero_carregamento: "01020304050607",
|
|
80
|
+
local: "Doca 1, Patío 03 - Usiminas Ipatinga",
|
|
81
|
+
previsao_carregamento: "10/03/2025 12:37",
|
|
82
|
+
qtd_bobinas: 15, peso_total_kg: 20
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import type { StoryObj, Meta } from "@storybook/react";
|
|
5
|
+
|
|
6
|
+
// component
|
|
7
|
+
import CardDriverData from "../../components/card-driver-data";
|
|
8
|
+
|
|
9
|
+
const meta: Meta<typeof CardDriverData> = {
|
|
10
|
+
title: "componente/CardDriverData",
|
|
11
|
+
component: CardDriverData,
|
|
12
|
+
args: {
|
|
13
|
+
isOpen: true,
|
|
14
|
+
backgroundColor: "#F2F2F2",
|
|
15
|
+
veiculo: {
|
|
16
|
+
placa: "MG-0934-8333",
|
|
17
|
+
tipo: "04 EIXOS",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
parameters: {
|
|
21
|
+
docs: { disable: true },
|
|
22
|
+
previewTabs: {
|
|
23
|
+
"storybook/docs/panel": { hidden: true },
|
|
24
|
+
canvas: { hidden: true },
|
|
25
|
+
},
|
|
26
|
+
notes: `
|
|
27
|
+
# CardDriverData
|
|
28
|
+
|
|
29
|
+
Componente responsável por exibir os dados do veículo a ser carregado,
|
|
30
|
+
com comportamento expansível (aberto / fechado).
|
|
31
|
+
|
|
32
|
+
### Exemplo de uso:
|
|
33
|
+
\`\`\`tsx
|
|
34
|
+
<CardDriverData
|
|
35
|
+
isOpen={true}
|
|
36
|
+
backgroundColor={"#F2F2F2"}
|
|
37
|
+
veiculo={{
|
|
38
|
+
placa: "MG-0934-8333",
|
|
39
|
+
tipo: "04 EIXOS",
|
|
40
|
+
}}
|
|
41
|
+
/>
|
|
42
|
+
\`\`\`
|
|
43
|
+
`,
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export default meta;
|
|
48
|
+
|
|
49
|
+
type Story = StoryObj<typeof meta>;
|
|
50
|
+
|
|
51
|
+
export const CardDriverDataOpen: Story = {
|
|
52
|
+
name: "card-driver-data-open",
|
|
53
|
+
args: {
|
|
54
|
+
isOpen: true,
|
|
55
|
+
backgroundColor: "#F2F2F2",
|
|
56
|
+
veiculo: {
|
|
57
|
+
placa: "MG-0934-8333",
|
|
58
|
+
tipo: "04 EIXOS",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export const CardDriverDataClosed: Story = {
|
|
64
|
+
name: "card-driver-data-closed",
|
|
65
|
+
args: {
|
|
66
|
+
isOpen: false,
|
|
67
|
+
backgroundColor: "#F2F2F2",
|
|
68
|
+
veiculo: {
|
|
69
|
+
placa: "MG-0934-8333",
|
|
70
|
+
tipo: "04 EIXOS",
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
5
|
+
|
|
6
|
+
// component
|
|
7
|
+
import DocumentCargaInfo from "../../components/document-carga-info";
|
|
8
|
+
|
|
9
|
+
const meta: Meta<typeof DocumentCargaInfo> = {
|
|
10
|
+
title: "componente/DocumentCargaInfo",
|
|
11
|
+
component: DocumentCargaInfo,
|
|
12
|
+
args: {
|
|
13
|
+
title: "Documento de carga",
|
|
14
|
+
numberDocument: "123456789",
|
|
15
|
+
linkDocument: "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
|
|
16
|
+
isAlert: false,
|
|
17
|
+
errorMessage: "",
|
|
18
|
+
},
|
|
19
|
+
parameters: {
|
|
20
|
+
docs: { disable: true },
|
|
21
|
+
previewTabs: {
|
|
22
|
+
"storybook/docs/panel": { hidden: true },
|
|
23
|
+
canvas: { hidden: true },
|
|
24
|
+
},
|
|
25
|
+
notes: `
|
|
26
|
+
# DocumentCargaInfo
|
|
27
|
+
|
|
28
|
+
Componente responsável por exibir informações de um documento de carga
|
|
29
|
+
e permitir a abertura do PDF associado.
|
|
30
|
+
|
|
31
|
+
Exemplo de uso:
|
|
32
|
+
|
|
33
|
+
\`\`\`tsx
|
|
34
|
+
<DocumentCargaInfo
|
|
35
|
+
title="Documento de carga"
|
|
36
|
+
numberDocument="123456789"
|
|
37
|
+
linkDocument="https://exemplo.com/documento.pdf"
|
|
38
|
+
isAlert={false}
|
|
39
|
+
/>
|
|
40
|
+
\`\`\`
|
|
41
|
+
`,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default meta;
|
|
46
|
+
|
|
47
|
+
type Story = StoryObj<typeof meta>;
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
export const Default: Story = {
|
|
51
|
+
name: "document-carga-info-default",
|
|
52
|
+
args: {
|
|
53
|
+
title: "Documento de carga",
|
|
54
|
+
numberDocument: "123456789",
|
|
55
|
+
linkDocument:
|
|
56
|
+
"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
|
|
57
|
+
isAlert: false,
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const WithAlert: Story = {
|
|
62
|
+
name: "document-carga-info-alert",
|
|
63
|
+
args: {
|
|
64
|
+
title: "Documento de carga",
|
|
65
|
+
numberDocument: "123456789",
|
|
66
|
+
linkDocument:
|
|
67
|
+
"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
|
|
68
|
+
isAlert: true,
|
|
69
|
+
errorMessage:
|
|
70
|
+
"Documento indisponível no momento. Verifique com o setor responsável.",
|
|
71
|
+
},
|
|
72
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import type { StoryObj, Meta } from "@storybook/react";
|
|
5
|
+
|
|
6
|
+
// component
|
|
7
|
+
import DriverJourneyInfo from "../../components/driver-journey-info";
|
|
8
|
+
|
|
9
|
+
const meta: Meta<typeof DriverJourneyInfo> = {
|
|
10
|
+
title: "componente/DriverJourneyInfo",
|
|
11
|
+
component: DriverJourneyInfo,
|
|
12
|
+
args: {
|
|
13
|
+
backgroundColor: "#F2F2F2",
|
|
14
|
+
motorista: {
|
|
15
|
+
nome: "João da Silva",
|
|
16
|
+
contato: "(31) 9 8213-2422",
|
|
17
|
+
posicao: "Usiminas Ipatinga - MG",
|
|
18
|
+
previsao_chegada: "10/03/2025 14:30",
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
parameters: {
|
|
22
|
+
docs: { disable: true },
|
|
23
|
+
previewTabs: {
|
|
24
|
+
"storybook/docs/panel": { hidden: true },
|
|
25
|
+
canvas: { hidden: true },
|
|
26
|
+
},
|
|
27
|
+
notes: `
|
|
28
|
+
# DriverJourneyInfo
|
|
29
|
+
|
|
30
|
+
Componente responsável por exibir as informações da jornada do motorista,
|
|
31
|
+
com comportamento expansível (abrir / fechar).
|
|
32
|
+
|
|
33
|
+
### Exemplo de uso:
|
|
34
|
+
\`\`\`tsx
|
|
35
|
+
<DriverJourneyInfo
|
|
36
|
+
backgroundColor={"#F2F2F2"}
|
|
37
|
+
motorista={{
|
|
38
|
+
nome: "João da Silva",
|
|
39
|
+
contato: "(31) 9 8213-2422",
|
|
40
|
+
posicao: "Usiminas Ipatinga - MG",
|
|
41
|
+
previsao_chegada: "10/03/2025 14:30",
|
|
42
|
+
}}
|
|
43
|
+
/>
|
|
44
|
+
\`\`\`
|
|
45
|
+
`,
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export default meta;
|
|
50
|
+
|
|
51
|
+
type Story = StoryObj<typeof meta>;
|
|
52
|
+
|
|
53
|
+
export const DriverJourneyInfoOpen: Story = {
|
|
54
|
+
name: "driver-journey-info-open",
|
|
55
|
+
args: {
|
|
56
|
+
backgroundColor: "#F2F2F2",
|
|
57
|
+
motorista: {
|
|
58
|
+
nome: "João da Silva",
|
|
59
|
+
contato: "(31) 9 8213-2422",
|
|
60
|
+
posicao: "Usiminas Ipatinga - MG",
|
|
61
|
+
previsao_chegada: "10/03/2025 14:30",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const DriverJourneyInfoClosed: Story = {
|
|
67
|
+
name: "driver-journey-info-closed",
|
|
68
|
+
args: {
|
|
69
|
+
// estado inicial fechado pode ser implementado futuramente
|
|
70
|
+
// caso você queira adicionar isOpen como prop
|
|
71
|
+
backgroundColor: "#F2F2F2",
|
|
72
|
+
motorista: {
|
|
73
|
+
nome: "João da Silva",
|
|
74
|
+
contato: "(31) 9 8213-2422",
|
|
75
|
+
posicao: "Usiminas Ipatinga - MG",
|
|
76
|
+
previsao_chegada: "10/03/2025 14:30",
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
};
|