wca-designsystem 1.0.97 → 1.0.99

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.97",
2
+ "version": "1.0.99",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect } from 'react'
2
- import { ActionIcon, Stepper, StepperProps, Tooltip } from '@mantine/core'
2
+ import { ActionIcon, CheckIcon, Stepper, StepperProps, Tooltip } from '@mantine/core'
3
3
  import * as S from './styles'
4
4
  import Icone from '../../atomos/Icone'
5
5
  import proximo from '../../../assets/imagens/icons/NavDireita.svg'
@@ -16,6 +16,13 @@ export type PassoProps = {
16
16
  subTitulo: string
17
17
  id: number
18
18
  desabilitado?: boolean
19
+ configurado?: boolean
20
+ }
21
+
22
+ export interface HoverPopUpProps {
23
+ texto: string;
24
+ children: React.ReactNode;
25
+ disabled?: boolean;
19
26
  }
20
27
 
21
28
  export interface PassosProps extends Omit<StepperProps, 'children' | 'active'> {
@@ -48,7 +55,7 @@ function Passos({
48
55
  onClickSteep,
49
56
  passoDisabled,
50
57
  moreButtons,
51
- color = theme.colors.blue,
58
+ color = theme.colors.purpleSec,
52
59
  ...props
53
60
  }: PassosProps) {
54
61
  const carrouselRef = useRef<HTMLDivElement>(null)
@@ -60,20 +67,18 @@ function Passos({
60
67
  }, []); */
61
68
 
62
69
  const steepClasseChanger = useCallback(
63
- (passoId: number, passoDesabilitado: boolean) => {
70
+ (passoId: number, passoDesabilitado: boolean, configurado: boolean) => {
64
71
  const classes = {
65
72
  desabilitado: 'desabilitado',
66
73
  ativo: 'ativo',
74
+ configurado: 'configurado',
67
75
  completo: 'completo',
68
76
  }
69
77
 
70
- if (passoId === passo) {
71
- return classes.ativo
72
- }
78
+ if (passoId === passo) return classes.ativo
79
+ if (passoDesabilitado) return classes.desabilitado
80
+ if (configurado) return classes.configurado
73
81
 
74
- if (passoDesabilitado) {
75
- return classes.desabilitado
76
- }
77
82
  return classes.completo
78
83
  },
79
84
  [passo]
@@ -122,13 +127,14 @@ function Passos({
122
127
  disabled={passoMap.desabilitado}
123
128
  className={steepClasseChanger(
124
129
  passoMap.id,
125
- passoMap?.desabilitado!
130
+ passoMap.desabilitado!,
131
+ passoMap.configurado!
126
132
  )}
127
133
  label={
128
- <HoverPopUp
129
- texto={passoMap.titulo}
134
+ <HoverPopUp
135
+ texto={passoMap.titulo}
130
136
  key={passoMap.id}
131
- disabled={passo === passoMap.id}
137
+ // disabled={passo === passoMap.id}
132
138
  >
133
139
  <h2
134
140
  className={passo === passoMap.id ? 'label-fixo' : ''}
@@ -108,7 +108,10 @@ export const BotaoEsquerda = styled.div`
108
108
  `}
109
109
  `
110
110
 
111
- export const PassoSteep = styled(Stepper)<PassosWrapperProps>`
111
+ const COLOR_CONFIGURADO = "#B18BFF";
112
+ const COLOR_PULADO = "#FFD666";
113
+
114
+ export const PassoSteep = styled(Stepper) <PassosWrapperProps>`
112
115
  ${({ theme, color }) => css`
113
116
  padding: 0;
114
117
  margin-left: -55px;
@@ -178,26 +181,35 @@ export const PassoSteep = styled(Stepper)<PassosWrapperProps>`
178
181
  font-size: ${theme.sizes.xSmall};
179
182
  }
180
183
 
181
- .ativo {
182
- .mantine-Stepper-stepIcon {
183
- background-color: ${color};
184
- color: ${theme.colors.white};
185
- }
186
- }
184
+ .configurado {
185
+ .mantine-Stepper-stepIcon {
186
+ background-color: #b499ff;
187
+ color: white;
188
+ }
189
+ }
187
190
 
188
- .desabilitado {
189
- cursor: not-allowed;
190
- .mantine-Stepper-stepIcon {
191
- background-color: ${theme.colors.gray['500']};
192
- }
193
- }
191
+ .completo {
192
+ .mantine-Stepper-stepIcon {
193
+ background-color: ${theme.colors.yellowWca};
194
+ color: white;
195
+ }
196
+ }
197
+
198
+ .desabilitado {
199
+ cursor: not-allowed;
200
+ .mantine-Stepper-stepIcon {
201
+ background-color: ${theme.colors.gray['500']};
202
+ color: white;
203
+ }
204
+ }
205
+
206
+ .ativo {
207
+ .mantine-Stepper-stepIcon {
208
+ background-color: ${color};
209
+ color: white;
210
+ }
211
+ }
194
212
 
195
- .completo {
196
- .mantine-Stepper-stepIcon {
197
- background-color: ${theme.colors.yellowWca};
198
- color: ${theme.colors.white};
199
- }
200
- }
201
213
  `}
202
214
  `
203
215