jornada-ui 0.4.13 → 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.
Files changed (70) hide show
  1. package/lib/commonjs/components/activities-progress/index.js +10 -10
  2. package/lib/commonjs/components/activities-progress/index.js.map +1 -1
  3. package/lib/commonjs/components/card-work-session/index.js +50 -17
  4. package/lib/commonjs/components/card-work-session/index.js.map +1 -1
  5. package/lib/commonjs/components/list-devices/components/list-device-empty/index.js +68 -0
  6. package/lib/commonjs/components/list-devices/components/list-device-empty/index.js.map +1 -0
  7. package/lib/commonjs/components/list-devices/components/list-device-render-item/index.js +77 -0
  8. package/lib/commonjs/components/list-devices/components/list-device-render-item/index.js.map +1 -0
  9. package/lib/commonjs/components/list-devices/index.js +22 -54
  10. package/lib/commonjs/components/list-devices/index.js.map +1 -1
  11. package/lib/commonjs/components/list-devices/interface.js +2 -0
  12. package/lib/commonjs/components/list-devices/interface.js.map +1 -0
  13. package/lib/commonjs/components/list-devices/styles.js +14 -3
  14. package/lib/commonjs/components/list-devices/styles.js.map +1 -1
  15. package/lib/commonjs/stories/card-work-session/card-work-session.stories.js +62 -9
  16. package/lib/commonjs/stories/card-work-session/card-work-session.stories.js.map +1 -1
  17. package/lib/module/components/activities-progress/index.js +10 -10
  18. package/lib/module/components/activities-progress/index.js.map +1 -1
  19. package/lib/module/components/card-work-session/index.js +50 -17
  20. package/lib/module/components/card-work-session/index.js.map +1 -1
  21. package/lib/module/components/list-devices/components/list-device-empty/index.js +63 -0
  22. package/lib/module/components/list-devices/components/list-device-empty/index.js.map +1 -0
  23. package/lib/module/components/list-devices/components/list-device-render-item/index.js +74 -0
  24. package/lib/module/components/list-devices/components/list-device-render-item/index.js.map +1 -0
  25. package/lib/module/components/list-devices/index.js +25 -57
  26. package/lib/module/components/list-devices/index.js.map +1 -1
  27. package/lib/module/components/list-devices/interface.js +2 -0
  28. package/lib/module/components/list-devices/interface.js.map +1 -0
  29. package/lib/module/components/list-devices/styles.js +14 -3
  30. package/lib/module/components/list-devices/styles.js.map +1 -1
  31. package/lib/module/stories/card-work-session/card-work-session.stories.js +62 -9
  32. package/lib/module/stories/card-work-session/card-work-session.stories.js.map +1 -1
  33. package/lib/typescript/commonjs/src/components/card-work-session/index.d.ts +2 -1
  34. package/lib/typescript/commonjs/src/components/card-work-session/index.d.ts.map +1 -1
  35. package/lib/typescript/commonjs/src/components/list-devices/components/list-device-empty/index.d.ts +10 -0
  36. package/lib/typescript/commonjs/src/components/list-devices/components/list-device-empty/index.d.ts.map +1 -0
  37. package/lib/typescript/commonjs/src/components/list-devices/components/list-device-render-item/index.d.ts +22 -0
  38. package/lib/typescript/commonjs/src/components/list-devices/components/list-device-render-item/index.d.ts.map +1 -0
  39. package/lib/typescript/commonjs/src/components/list-devices/index.d.ts.map +1 -1
  40. package/lib/typescript/commonjs/src/components/list-devices/interface.d.ts +29 -0
  41. package/lib/typescript/commonjs/src/components/list-devices/interface.d.ts.map +1 -0
  42. package/lib/typescript/commonjs/src/components/list-devices/styles.d.ts +5 -5
  43. package/lib/typescript/commonjs/src/components/list-devices/styles.d.ts.map +1 -1
  44. package/lib/typescript/commonjs/src/stories/card-work-session/card-work-session.stories.d.ts.map +1 -1
  45. package/lib/typescript/module/src/components/card-work-session/index.d.ts +2 -1
  46. package/lib/typescript/module/src/components/card-work-session/index.d.ts.map +1 -1
  47. package/lib/typescript/module/src/components/list-devices/components/list-device-empty/index.d.ts +10 -0
  48. package/lib/typescript/module/src/components/list-devices/components/list-device-empty/index.d.ts.map +1 -0
  49. package/lib/typescript/module/src/components/list-devices/components/list-device-render-item/index.d.ts +22 -0
  50. package/lib/typescript/module/src/components/list-devices/components/list-device-render-item/index.d.ts.map +1 -0
  51. package/lib/typescript/module/src/components/list-devices/index.d.ts.map +1 -1
  52. package/lib/typescript/module/src/components/list-devices/interface.d.ts +29 -0
  53. package/lib/typescript/module/src/components/list-devices/interface.d.ts.map +1 -0
  54. package/lib/typescript/module/src/components/list-devices/styles.d.ts +5 -5
  55. package/lib/typescript/module/src/components/list-devices/styles.d.ts.map +1 -1
  56. package/lib/typescript/module/src/stories/card-work-session/card-work-session.stories.d.ts.map +1 -1
  57. package/package.json +1 -1
  58. package/src/components/activities-progress/index.tsx +172 -172
  59. package/src/components/card-work-session/index.tsx +190 -172
  60. package/src/components/card-work-session/interface.d.ts +151 -150
  61. package/src/components/list-devices/components/list-device-empty/index.tsx +60 -0
  62. package/src/components/list-devices/components/list-device-render-item/index.tsx +86 -0
  63. package/src/components/list-devices/index.tsx +26 -58
  64. package/src/components/list-devices/{interface.d.ts → interface.ts} +36 -36
  65. package/src/components/list-devices/styles.ts +73 -68
  66. package/src/stories/card-work-session/card-work-session.stories.tsx +106 -53
  67. package/lib/commonjs/components/list-devices/interface.d.js +0 -2
  68. package/lib/commonjs/components/list-devices/interface.d.js.map +0 -1
  69. package/lib/module/components/list-devices/interface.d.js +0 -2
  70. package/lib/module/components/list-devices/interface.d.js.map +0 -1
@@ -1,68 +1,73 @@
1
- import { StyleSheet } from "react-native";
2
- import { type IListDevices } from "./interface";
3
- import { theme } from "../../styles/theme/theme";
4
-
5
- type Extra = { disabled?: boolean; isSelected?: boolean };
6
-
7
- const styles = (props: Partial<IListDevices & Extra> = {}) =>
8
- StyleSheet.create({
9
- containerIndicator: {
10
- width: "100%",
11
- flexDirection: "row",
12
- justifyContent: "flex-start",
13
- alignItems: "center",
14
- marginTop: 8,
15
- paddingVertical: 8,
16
- paddingHorizontal: 8,
17
- opacity: props.disabled ? 0.6 : 1,
18
- },
19
-
20
- containerIndicatorSelected: {
21
- backgroundColor: theme.colors.green[250],
22
- borderRadius: 30,
23
- },
24
-
25
- separator: {
26
- borderBottomWidth: 1,
27
- borderBottomColor: props.isSelected
28
- ? "transparent"
29
- : theme.colors.gray[700],
30
- },
31
-
32
- title: {
33
- color: props.titleColor ?? theme.colors.black[10],
34
- textAlign: "center",
35
- lineHeight: 20,
36
- fontSize: theme.fontSizes.sm,
37
- fontWeight: "500",
38
- marginLeft: theme.margins.xs,
39
- },
40
-
41
- titleSelected: {
42
- color: theme.colors.neutral[25],
43
- fontWeight: "600",
44
- },
45
-
46
- titleDescription: {
47
- color: props.textColorDescription ?? theme.colors.gray[600],
48
- textAlign: "center",
49
- lineHeight: 16,
50
- fontSize: 18,
51
- fontFamily: theme.fonts.inter_light_300,
52
- marginLeft: theme.margins.xs,
53
- },
54
-
55
- descSelected: {
56
- color: theme.colors.neutral[25],
57
- },
58
-
59
- containerMain: {
60
- width: "100%",
61
- flexDirection: "column",
62
- alignItems: "flex-start",
63
- marginLeft: 2,
64
- justifyContent: "center",
65
- },
66
- });
67
-
68
- export { styles };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import { StyleSheet } from "react-native";
5
+ import { theme } from "../../styles/theme/theme";
6
+
7
+ // typings
8
+ import { type IListDevices, type Extra } from "./interface";
9
+
10
+ const styles = (props: Partial<IListDevices & Extra> = {}) =>
11
+ StyleSheet.create({
12
+ containerIndicator: {
13
+ width: "100%",
14
+ flexDirection: "row",
15
+ justifyContent: "flex-start",
16
+ alignItems: "center",
17
+ marginTop: 8,
18
+ paddingVertical: 8,
19
+ paddingHorizontal: 8,
20
+ opacity: props.disabled ? 0.6 : 1,
21
+ },
22
+
23
+ containerIndicatorSelected: {
24
+ backgroundColor: theme.colors.green[250],
25
+ borderRadius: 30,
26
+ },
27
+
28
+ separator: {
29
+ borderBottomWidth: 1,
30
+ borderBottomColor: props.isSelected ? "transparent" : theme.colors.gray[700],
31
+ },
32
+
33
+ title: {
34
+ color: props.titleColor ?? theme.colors.black[10],
35
+ textAlign: "center",
36
+ lineHeight: 20,
37
+ fontSize: theme.fontSizes.lg,
38
+ fontWeight: "500",
39
+ marginLeft: theme.margins.xs,
40
+ marginBottom: 8,
41
+ },
42
+
43
+ titleSelected: {
44
+ color: theme.colors.neutral[25],
45
+ fontWeight: "600",
46
+ },
47
+
48
+ titleDescription: {
49
+ color: props.textColorDescription ?? theme.colors.gray[600],
50
+ textAlign: "center",
51
+ lineHeight: 16,
52
+ fontSize: theme.fontSizes.md,
53
+ fontFamily: theme.fonts.inter_light_300,
54
+ marginLeft: theme.margins.xs,
55
+ },
56
+
57
+ descSelected: {
58
+ color: theme.colors.neutral[25],
59
+ },
60
+
61
+ containerMain: {
62
+ width: "100%",
63
+ flexDirection: "column",
64
+ alignItems: "flex-start",
65
+ marginLeft: 2,
66
+ justifyContent: "center",
67
+ },
68
+ });
69
+
70
+ /**
71
+ * EXPORTS
72
+ */
73
+ export { styles };
@@ -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
- name: "Weverson L.S",
12
- workDate: "25/01/2025",
13
- timeWork: "",
14
- initialTime: "11:40",
15
- duration: "05:20",
16
- avatar: "https://avatars.githubusercontent.com/u/100369327?v=4&size=64",
17
- },
18
- parameters: {
19
- notes: `
20
- # CardWorkSession
21
-
22
- Este é um componente de CardWorkSession de session de trabalho.
23
- Você usa assim:
24
- \`\`\`tsx
25
- <CardWorkSession
26
- name="Weverson L.S"s
27
- workDate="25/01/2025"
28
- initialTime="11:40"
29
- duration="03:45"
30
- avatar={"https://avatars.githubusercontent.com/u/100369327?v=4&size=64"}
31
- />
32
- \`\`\`
33
- `,
34
- },
35
- };
36
-
37
- export default meta;
38
-
39
- type Story = StoryObj<typeof meta>;
40
-
41
- export const CardTrabalhoSession: Story = {
42
- name: "card-work-session",
43
- args: {
44
- width: 400,
45
- name: "Weverson L.S",
46
- workDate: "25/01/2025",
47
- timeWork: "",
48
- initialTime: "11:40",
49
- duration: "05:20",
50
- avatar: "https://avatars.githubusercontent.com/u/100369327?v=4&size=64",
51
- backgroundColor: theme.colors.gray[300],
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
+ };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=interface.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/list-devices/interface.d.ts"],"mappings":"","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=interface.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/list-devices/interface.d.ts"],"mappings":"","ignoreList":[]}