jornada-ui 0.4.14 → 0.4.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/activities-progress/index.js +10 -10
- package/lib/commonjs/components/activities-progress/index.js.map +1 -1
- package/lib/commonjs/components/card-work-session/index.js +50 -17
- package/lib/commonjs/components/card-work-session/index.js.map +1 -1
- package/lib/commonjs/stories/card-work-session/card-work-session.stories.js +62 -9
- package/lib/commonjs/stories/card-work-session/card-work-session.stories.js.map +1 -1
- package/lib/module/components/activities-progress/index.js +10 -10
- package/lib/module/components/activities-progress/index.js.map +1 -1
- package/lib/module/components/card-work-session/index.js +50 -17
- package/lib/module/components/card-work-session/index.js.map +1 -1
- package/lib/module/stories/card-work-session/card-work-session.stories.js +62 -9
- package/lib/module/stories/card-work-session/card-work-session.stories.js.map +1 -1
- package/lib/typescript/commonjs/src/components/card-work-session/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/components/card-work-session/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/stories/card-work-session/card-work-session.stories.d.ts.map +1 -1
- package/lib/typescript/module/src/components/card-work-session/index.d.ts +2 -1
- package/lib/typescript/module/src/components/card-work-session/index.d.ts.map +1 -1
- package/lib/typescript/module/src/stories/card-work-session/card-work-session.stories.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/activities-progress/index.tsx +172 -172
- package/src/components/card-work-session/index.tsx +190 -172
- package/src/components/card-work-session/interface.d.ts +151 -150
- package/src/stories/card-work-session/card-work-session.stories.tsx +106 -53
|
@@ -1,150 +1,151 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
import type React from "react";
|
|
5
|
-
import { ViewProps, type DimensionValue } from "react-native";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* INTERFACE
|
|
9
|
-
*/
|
|
10
|
-
type ICardWorkSession = ViewProps & {
|
|
11
|
-
/**
|
|
12
|
-
* props que mostra o nome do usuário
|
|
13
|
-
*/
|
|
14
|
-
name: string;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* props que mostra a data
|
|
18
|
-
*/
|
|
19
|
-
workDate: string;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* props que mostra o
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* props que mostra
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* props que mostra
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
| "flex-
|
|
88
|
-
| "
|
|
89
|
-
| "
|
|
90
|
-
| "space-
|
|
91
|
-
| "space-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
1
|
+
/*
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import type React from "react";
|
|
5
|
+
import { ViewProps, type DimensionValue } from "react-native";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* INTERFACE
|
|
9
|
+
*/
|
|
10
|
+
type ICardWorkSession = ViewProps & {
|
|
11
|
+
/**
|
|
12
|
+
* props que mostra o nome do usuário
|
|
13
|
+
*/
|
|
14
|
+
name: string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* props que mostra a data
|
|
18
|
+
*/
|
|
19
|
+
workDate: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* props que mostra o horário inicial
|
|
23
|
+
*/
|
|
24
|
+
initialTime?: string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* props que mostra a duração
|
|
28
|
+
*/
|
|
29
|
+
duration?: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* props que mostra o avatar do usuário
|
|
33
|
+
*/
|
|
34
|
+
avatar: string;
|
|
35
|
+
|
|
36
|
+
handleNavigation: () => void;
|
|
37
|
+
handleNavigationNotification: () => void;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* props que mostra a quantidade de notificações
|
|
41
|
+
*/
|
|
42
|
+
counterBadge: number;
|
|
43
|
+
|
|
44
|
+
children?: React.ReactNode;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* TestID para testes automático e identificação
|
|
48
|
+
*/
|
|
49
|
+
testID?: string;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* A propriedade CSS abreviada border define a borda de um elemento. Ele define os valores de largura da borda, estilo da borda e cor da borda.
|
|
53
|
+
*/
|
|
54
|
+
borderStyled?: {
|
|
55
|
+
borderStyle?: "solid" | "dotted" | "dashed";
|
|
56
|
+
|
|
57
|
+
borderRadius?: number | DimensionValue;
|
|
58
|
+
borderTopRightRadius?: number | DimensionValue;
|
|
59
|
+
borderTopLeftRadius?: number | DimensionValue;
|
|
60
|
+
borderBottomRightRadius?: number | DimensionValue;
|
|
61
|
+
borderBottomLeftRadius?: number | DimensionValue;
|
|
62
|
+
|
|
63
|
+
borderWidth?: number | DimensionValue;
|
|
64
|
+
borderLeftWidth?: number | DimensionValue;
|
|
65
|
+
borderRightWidth?: number | DimensionValue;
|
|
66
|
+
borderTopWidth?: number | DimensionValue;
|
|
67
|
+
borderBottomWidth?: number | DimensionValue;
|
|
68
|
+
|
|
69
|
+
borderColor?: string;
|
|
70
|
+
borderBottomColor?: string;
|
|
71
|
+
borderLeftColor?: string;
|
|
72
|
+
borderRightColor?: string;
|
|
73
|
+
borderTopColor?: string;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Propriedades que define a orientação do button que é usada para representar uma página. Na maioria das vezes, esse valores corresponde ao posicionamento alvo da página impressa, se aplicável.
|
|
78
|
+
*/
|
|
79
|
+
flexStyle?: {
|
|
80
|
+
alignItems?: "flex-start" | "flex-end" | "center" | "stretch" | "baseline";
|
|
81
|
+
alignSelf?: "auto" | "flex-start" | "flex-end" | "center" | "stretch" | "baseline";
|
|
82
|
+
flex?: string | number;
|
|
83
|
+
flexDirection?: "column" | "column-reverse" | "row" | "row-reverse";
|
|
84
|
+
flexWrap?: "nowrap" | "wrap" | "wrap-reverse";
|
|
85
|
+
textAlign?: "auto" | "center" | "left" | "right" | "justify";
|
|
86
|
+
justifyContent?:
|
|
87
|
+
| "flex-start"
|
|
88
|
+
| "flex-end"
|
|
89
|
+
| "center"
|
|
90
|
+
| "space-between"
|
|
91
|
+
| "space-around"
|
|
92
|
+
| "space-evenly";
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* A propriedade margin do CSS define a área de margem nos quatro lados do elemento. É uma abreviação que define todas as margens individuais de uma só vez: margin-top, margin-right (en-US), margin-bottom, e margin-left (en-US).
|
|
97
|
+
*/
|
|
98
|
+
marginStyle?: {
|
|
99
|
+
margin?: number | DimensionValue;
|
|
100
|
+
marginLeft?: number | DimensionValue;
|
|
101
|
+
marginRight?: number | DimensionValue;
|
|
102
|
+
marginTop?: number | DimensionValue;
|
|
103
|
+
marginBottom?: number | DimensionValue;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* A propriedade padding define uma a distância entre o conteúdo de um elemento e suas bordas. É um atalho que evita definir uma distância para cada lado separadamente (padding-top, padding-right, padding-bottom, padding-left).
|
|
108
|
+
*/
|
|
109
|
+
paddingStyle?: {
|
|
110
|
+
padding?: number | DimensionValue;
|
|
111
|
+
paddingLeft?: number | DimensionValue;
|
|
112
|
+
paddingRight?: number | DimensionValue;
|
|
113
|
+
paddingTop?: number | DimensionValue;
|
|
114
|
+
paddingBottom?: number | DimensionValue;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* A propriedade CSS height define a altura de um elemento. A altura de um elemento é a distância do topo da borda superior do elemento ao fundo da borda inferior.
|
|
119
|
+
*/
|
|
120
|
+
height?: number | DimensionValue;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* A propriedade CSS width define a largura de um elemento. A largura de um elemento é a distância do topo da borda esquerda do elemento ao fundo da borda direita.
|
|
124
|
+
*/
|
|
125
|
+
width?: number | DimensionValue;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* O fundo abreviado CSS Propriedade define todas as propriedades do estilo de fundo de uma só vez, como cor, imagem, origem e tamanho ou método de repetição. As propriedades dos componentes não definidas no fundo da declaração de valor da propriedade abreviada são definidas como seus valores padrão..
|
|
129
|
+
*/
|
|
130
|
+
backgroundColor?: string;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Propriedade texto que sera renderizado pro usuário final
|
|
134
|
+
*/
|
|
135
|
+
text?: string;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* A propriedade CSS color define o valor da cor de primeiro plano do texto e das decorações de texto de um elemento e define o valor currentcolor. currentcolor pode ser usado como um valor indireto em outras propriedades e é o padrão para outras propriedades de cores, como border-color.
|
|
139
|
+
*/
|
|
140
|
+
color?: {
|
|
141
|
+
colorSvg?: string;
|
|
142
|
+
colorText?: string;
|
|
143
|
+
colorTextBold?: string;
|
|
144
|
+
colorTextData?: string;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* EXPORTS
|
|
150
|
+
*/
|
|
151
|
+
export type { ICardWorkSession };
|
|
@@ -1,53 +1,106 @@
|
|
|
1
|
-
import type { StoryObj, Meta } from "@storybook/react";
|
|
2
|
-
|
|
3
|
-
// components
|
|
4
|
-
import CardWorkSession from "../../components/card-work-session";
|
|
5
|
-
import { theme } from "../../styles/theme/theme";
|
|
6
|
-
|
|
7
|
-
const meta: Meta<typeof CardWorkSession> = {
|
|
8
|
-
title: "componente/CardWorkSession",
|
|
9
|
-
component: CardWorkSession,
|
|
10
|
-
args: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
1
|
+
import type { StoryObj, Meta } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
// components
|
|
4
|
+
import CardWorkSession from "../../components/card-work-session";
|
|
5
|
+
import { theme } from "../../styles/theme/theme";
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof CardWorkSession> = {
|
|
8
|
+
title: "componente/CardWorkSession",
|
|
9
|
+
component: CardWorkSession,
|
|
10
|
+
args: {
|
|
11
|
+
width: "100%",
|
|
12
|
+
counterBadge: 1,
|
|
13
|
+
name: "Weverson L.S",
|
|
14
|
+
workDate: "25/01/2025",
|
|
15
|
+
initialTime: "11:40",
|
|
16
|
+
duration: "05:20",
|
|
17
|
+
avatar: "https://avatars.githubusercontent.com/u/100369327?v=4&size=64",
|
|
18
|
+
},
|
|
19
|
+
argTypes: {
|
|
20
|
+
width: {
|
|
21
|
+
control: "number",
|
|
22
|
+
description: "Informa a a largura do componente.",
|
|
23
|
+
},
|
|
24
|
+
name: {
|
|
25
|
+
control: "text",
|
|
26
|
+
description: "Informa o nome do usuário.",
|
|
27
|
+
},
|
|
28
|
+
workDate: {
|
|
29
|
+
control: "text",
|
|
30
|
+
description: "Informa a data que inicio a jornada.",
|
|
31
|
+
},
|
|
32
|
+
initialTime: {
|
|
33
|
+
control: "text",
|
|
34
|
+
description: "Informa o inicio de jornada.",
|
|
35
|
+
},
|
|
36
|
+
duration: {
|
|
37
|
+
control: "text",
|
|
38
|
+
description: "Informa a duração de jornada.",
|
|
39
|
+
},
|
|
40
|
+
avatar: {
|
|
41
|
+
control: "text",
|
|
42
|
+
description: "Informa a foto do usuário.",
|
|
43
|
+
},
|
|
44
|
+
counterBadge: {
|
|
45
|
+
control: "number",
|
|
46
|
+
type: "number",
|
|
47
|
+
description: "Quantidade de mensagem não lidas",
|
|
48
|
+
},
|
|
49
|
+
backgroundColor: {
|
|
50
|
+
control: "text",
|
|
51
|
+
description: "Informa a cor de fundo.",
|
|
52
|
+
},
|
|
53
|
+
handleNavigationNotification: {
|
|
54
|
+
control: () => {},
|
|
55
|
+
type: "function",
|
|
56
|
+
description: "Função que navegar para as notificações.",
|
|
57
|
+
},
|
|
58
|
+
handleNavigation: {
|
|
59
|
+
control: () => {},
|
|
60
|
+
type: "function",
|
|
61
|
+
description: "Função que navegar para o perfil.",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
parameters: {
|
|
65
|
+
notes: `
|
|
66
|
+
# CardWorkSession
|
|
67
|
+
|
|
68
|
+
Este é um componente de CardWorkSession de session de trabalho.
|
|
69
|
+
Você usa assim:
|
|
70
|
+
\`\`\`tsx
|
|
71
|
+
<CardWorkSession
|
|
72
|
+
width: 400,
|
|
73
|
+
counterBadge: 1,
|
|
74
|
+
name: "Weverson L.S",
|
|
75
|
+
workDate: "25/01/2025",
|
|
76
|
+
initialTime: "11:40",
|
|
77
|
+
duration: "05:20",
|
|
78
|
+
avatar: "https://avatars.githubusercontent.com/u/100369327?v=4&size=64",
|
|
79
|
+
backgroundColor: theme.colors.gray[300],
|
|
80
|
+
handleNavigationNotification: () => {},
|
|
81
|
+
handleNavigation: () => {},
|
|
82
|
+
/>
|
|
83
|
+
\`\`\`
|
|
84
|
+
`,
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export default meta;
|
|
89
|
+
|
|
90
|
+
type Story = StoryObj<typeof meta>;
|
|
91
|
+
|
|
92
|
+
export const CardTrabalhoSession: Story = {
|
|
93
|
+
name: "card-work-session",
|
|
94
|
+
args: {
|
|
95
|
+
width: "100%",
|
|
96
|
+
counterBadge: 1,
|
|
97
|
+
name: "Weverson L.S",
|
|
98
|
+
workDate: "25/01/2025",
|
|
99
|
+
initialTime: "11:40",
|
|
100
|
+
duration: "05:20",
|
|
101
|
+
avatar: "https://avatars.githubusercontent.com/u/100369327?v=4&size=64",
|
|
102
|
+
backgroundColor: theme.colors.gray[300],
|
|
103
|
+
handleNavigationNotification: () => {},
|
|
104
|
+
handleNavigation: () => {},
|
|
105
|
+
},
|
|
106
|
+
};
|