jornada-ui 2.0.9 → 3.0.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.
Files changed (75) hide show
  1. package/lib/commonjs/common/icons-svg/chevron-right/index.js +36 -0
  2. package/lib/commonjs/common/icons-svg/chevron-right/index.js.map +1 -0
  3. package/lib/commonjs/common/icons-svg/constants/index.js +3 -1
  4. package/lib/commonjs/common/icons-svg/constants/index.js.map +1 -1
  5. package/lib/commonjs/common/icons-svg/index.js +14 -0
  6. package/lib/commonjs/common/icons-svg/index.js.map +1 -1
  7. package/lib/commonjs/common/icons-svg/video/index.js +36 -0
  8. package/lib/commonjs/common/icons-svg/video/index.js.map +1 -0
  9. package/lib/commonjs/components/notification-steps-card/index.js +190 -0
  10. package/lib/commonjs/components/notification-steps-card/index.js.map +1 -0
  11. package/lib/commonjs/components/notification-steps-card/interface.js +6 -0
  12. package/lib/commonjs/components/notification-steps-card/interface.js.map +1 -0
  13. package/lib/commonjs/index.js +13 -6
  14. package/lib/commonjs/index.js.map +1 -1
  15. package/lib/commonjs/stories/notification-steps-card/notification-steps-card.stories.js +135 -0
  16. package/lib/commonjs/stories/notification-steps-card/notification-steps-card.stories.js.map +1 -0
  17. package/lib/module/common/icons-svg/chevron-right/index.js +30 -0
  18. package/lib/module/common/icons-svg/chevron-right/index.js.map +1 -0
  19. package/lib/module/common/icons-svg/constants/index.js +3 -1
  20. package/lib/module/common/icons-svg/constants/index.js.map +1 -1
  21. package/lib/module/common/icons-svg/index.js +14 -0
  22. package/lib/module/common/icons-svg/index.js.map +1 -1
  23. package/lib/module/common/icons-svg/video/index.js +30 -0
  24. package/lib/module/common/icons-svg/video/index.js.map +1 -0
  25. package/lib/module/components/notification-steps-card/index.js +183 -0
  26. package/lib/module/components/notification-steps-card/index.js.map +1 -0
  27. package/lib/module/components/notification-steps-card/interface.js +4 -0
  28. package/lib/module/components/notification-steps-card/interface.js.map +1 -0
  29. package/lib/module/index.js +1 -0
  30. package/lib/module/index.js.map +1 -1
  31. package/lib/module/stories/notification-steps-card/notification-steps-card.stories.js +130 -0
  32. package/lib/module/stories/notification-steps-card/notification-steps-card.stories.js.map +1 -0
  33. package/lib/typescript/commonjs/src/common/icons-svg/chevron-right/index.d.ts +8 -0
  34. package/lib/typescript/commonjs/src/common/icons-svg/chevron-right/index.d.ts.map +1 -0
  35. package/lib/typescript/commonjs/src/common/icons-svg/constants/index.d.ts +2 -0
  36. package/lib/typescript/commonjs/src/common/icons-svg/constants/index.d.ts.map +1 -1
  37. package/lib/typescript/commonjs/src/common/icons-svg/index.d.ts.map +1 -1
  38. package/lib/typescript/commonjs/src/common/icons-svg/video/index.d.ts +8 -0
  39. package/lib/typescript/commonjs/src/common/icons-svg/video/index.d.ts.map +1 -0
  40. package/lib/typescript/commonjs/src/components/card-scheduled-journey/index.d.ts +1 -1
  41. package/lib/typescript/commonjs/src/components/notification-steps-card/index.d.ts +11 -0
  42. package/lib/typescript/commonjs/src/components/notification-steps-card/index.d.ts.map +1 -0
  43. package/lib/typescript/commonjs/src/components/notification-steps-card/interface.d.ts +30 -0
  44. package/lib/typescript/commonjs/src/components/notification-steps-card/interface.d.ts.map +1 -0
  45. package/lib/typescript/commonjs/src/components/selects/select-date-and-hours/index.d.ts +1 -1
  46. package/lib/typescript/commonjs/src/index.d.ts +1 -0
  47. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  48. package/lib/typescript/commonjs/src/stories/notification-steps-card/notification-steps-card.stories.d.ts +14 -0
  49. package/lib/typescript/commonjs/src/stories/notification-steps-card/notification-steps-card.stories.d.ts.map +1 -0
  50. package/lib/typescript/module/src/common/icons-svg/chevron-right/index.d.ts +8 -0
  51. package/lib/typescript/module/src/common/icons-svg/chevron-right/index.d.ts.map +1 -0
  52. package/lib/typescript/module/src/common/icons-svg/constants/index.d.ts +2 -0
  53. package/lib/typescript/module/src/common/icons-svg/constants/index.d.ts.map +1 -1
  54. package/lib/typescript/module/src/common/icons-svg/index.d.ts.map +1 -1
  55. package/lib/typescript/module/src/common/icons-svg/video/index.d.ts +8 -0
  56. package/lib/typescript/module/src/common/icons-svg/video/index.d.ts.map +1 -0
  57. package/lib/typescript/module/src/components/card-scheduled-journey/index.d.ts +1 -1
  58. package/lib/typescript/module/src/components/notification-steps-card/index.d.ts +11 -0
  59. package/lib/typescript/module/src/components/notification-steps-card/index.d.ts.map +1 -0
  60. package/lib/typescript/module/src/components/notification-steps-card/interface.d.ts +30 -0
  61. package/lib/typescript/module/src/components/notification-steps-card/interface.d.ts.map +1 -0
  62. package/lib/typescript/module/src/components/selects/select-date-and-hours/index.d.ts +1 -1
  63. package/lib/typescript/module/src/index.d.ts +1 -0
  64. package/lib/typescript/module/src/index.d.ts.map +1 -1
  65. package/lib/typescript/module/src/stories/notification-steps-card/notification-steps-card.stories.d.ts +14 -0
  66. package/lib/typescript/module/src/stories/notification-steps-card/notification-steps-card.stories.d.ts.map +1 -0
  67. package/package.json +1 -1
  68. package/src/common/icons-svg/chevron-right/index.tsx +27 -0
  69. package/src/common/icons-svg/constants/index.ts +2 -0
  70. package/src/common/icons-svg/index.tsx +15 -0
  71. package/src/common/icons-svg/video/index.tsx +27 -0
  72. package/src/components/notification-steps-card/index.tsx +190 -0
  73. package/src/components/notification-steps-card/interface.ts +38 -0
  74. package/src/index.tsx +1 -0
  75. package/src/stories/notification-steps-card/notification-steps-card.stories.tsx +144 -0
@@ -0,0 +1,144 @@
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import React from "react";
5
+ import type { Meta, StoryObj } from "@storybook/react";
6
+
7
+ // components
8
+ import NotificationStepsCard from "../../components/notification-steps-card";
9
+
10
+ // typings
11
+ import type { INotificationStepsCardProps } from "../../components/notification-steps-card/interface";
12
+
13
+ /**
14
+ * META
15
+ */
16
+ const meta: Meta<typeof NotificationStepsCard> = {
17
+ title: "Componente/NotificationStepsCard",
18
+ component: NotificationStepsCard as React.FC<INotificationStepsCardProps>,
19
+ args: {
20
+ title: "Campanha Zero Acidente",
21
+ description:
22
+ "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and",
23
+ steps: [
24
+ {
25
+ type: "pdf",
26
+ title: "1. Instrução de segurança",
27
+ subtitle: "PDF . toque para ler",
28
+ },
29
+ {
30
+ type: "video",
31
+ title: "2. Vídeo de treinamento",
32
+ subtitle: "Abre em tela cheia . 02:00",
33
+ disabled: true,
34
+ },
35
+ {
36
+ type: "pdf",
37
+ title: "3. Termo de responsabilidade",
38
+ subtitle: "PDF . toque para ler",
39
+ disabled: true,
40
+ },
41
+ ],
42
+ warningMessage:
43
+ "As etapas devem ser concluídas em ordem. O vídeo não pode ser pulado.",
44
+ },
45
+ argTypes: {
46
+ title: {
47
+ control: { type: "text" },
48
+ description: "Título da notificação.",
49
+ },
50
+ description: {
51
+ control: { type: "text" },
52
+ description: "Descrição da notificação.",
53
+ },
54
+ steps: {
55
+ control: { type: "object" },
56
+ description: "Lista de etapas/conteúdos (text, pdf, video).",
57
+ },
58
+ warningMessage: {
59
+ control: { type: "text" },
60
+ description: "Mensagem de aviso opcional exibida no rodapé.",
61
+ },
62
+ },
63
+ parameters: {
64
+ docs: {
65
+ description: {
66
+ component: `
67
+ ### NotificationStepsCard
68
+
69
+ Componente de **notificação com múltiplas etapas** para exibir conteúdos sequenciais (texto, PDF, vídeo).
70
+
71
+ - \`title\`: título da notificação
72
+ - \`description\`: descrição (aceita \`string\` ou \`ReactNode\`)
73
+ - \`steps\`: lista de etapas, cada uma com \`type\` (\`pdf\` | \`video\` | \`text\`), \`title\`, \`subtitle\`, \`disabled\` e \`onPress\`
74
+ - \`warningMessage\`: mensagem de aviso opcional no rodapé
75
+
76
+ > Etapas com \`disabled: true\` ficam em cinza e não disparam \`onPress\`. A ordem de conclusão é controlada por quem consome o componente.
77
+ `,
78
+ },
79
+ },
80
+ },
81
+ };
82
+
83
+ export default meta;
84
+
85
+ type Story = StoryObj<typeof NotificationStepsCard>;
86
+
87
+ /**
88
+ * STORIES
89
+ */
90
+ export const NotificationStepsCardDefault: Story = {
91
+ name: "notification-steps-card-default",
92
+ args: {
93
+ title: "Campanha Zero Acidente",
94
+ description:
95
+ "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and",
96
+ steps: [
97
+ {
98
+ type: "pdf",
99
+ title: "1. Instrução de segurança",
100
+ subtitle: "PDF . toque para ler",
101
+ },
102
+ {
103
+ type: "video",
104
+ title: "2. Vídeo de treinamento",
105
+ subtitle: "Abre em tela cheia . 02:00",
106
+ disabled: true,
107
+ },
108
+ {
109
+ type: "pdf",
110
+ title: "3. Termo de responsabilidade",
111
+ subtitle: "PDF . toque para ler",
112
+ disabled: true,
113
+ },
114
+ ],
115
+ warningMessage:
116
+ "As etapas devem ser concluídas em ordem. O vídeo não pode ser pulado.",
117
+ },
118
+ };
119
+
120
+ export const NotificationStepsCardAllUnlocked: Story = {
121
+ name: "notification-steps-card-all-unlocked",
122
+ args: {
123
+ title: "Campanha Zero Acidente",
124
+ description:
125
+ "Todas as etapas liberadas para conclusão em qualquer ordem.",
126
+ steps: [
127
+ {
128
+ type: "pdf",
129
+ title: "1. Instrução de segurança",
130
+ subtitle: "PDF . toque para ler",
131
+ },
132
+ {
133
+ type: "video",
134
+ title: "2. Vídeo de treinamento",
135
+ subtitle: "Abre em tela cheia . 02:00",
136
+ },
137
+ {
138
+ type: "pdf",
139
+ title: "3. Termo de responsabilidade",
140
+ subtitle: "PDF . toque para ler",
141
+ },
142
+ ],
143
+ },
144
+ };