contentoh-components-library 21.5.98 → 21.5.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.
Files changed (63) hide show
  1. package/dist/components/atoms/GeneralButton/styles.js +1 -1
  2. package/dist/components/atoms/GeneralInput/index.js +54 -249
  3. package/dist/components/atoms/GeneralInput/styles.js +3 -7
  4. package/dist/components/atoms/InputFormatter/index.js +68 -223
  5. package/dist/components/atoms/InputFormatter/styles.js +4 -20
  6. package/dist/components/molecules/StatusAsignationInfo/index.js +1 -11
  7. package/dist/components/molecules/TabsMenu/index.js +1 -13
  8. package/dist/components/molecules/TagAndInput/index.js +24 -364
  9. package/dist/components/molecules/TagAndInput/styles.js +2 -2
  10. package/dist/components/organisms/FullProductNameHeader/index.js +22 -6
  11. package/dist/components/organisms/InputGroup/index.js +18 -22
  12. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +337 -150
  13. package/dist/components/pages/ProviderProductEdition/context/provider-product-edition.context.js +15 -15
  14. package/dist/components/pages/ProviderProductEdition/index.js +377 -413
  15. package/dist/components/pages/ProviderProductEdition/utils.js +0 -1
  16. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +211 -125
  17. package/dist/components/pages/RetailerProductEdition/index.js +2236 -1738
  18. package/dist/components/pages/RetailerProductEdition/styles.js +2 -4
  19. package/dist/components/pages/RetailerProductEdition/utils.js +2 -251
  20. package/package.json +2 -4
  21. package/src/components/atoms/GeneralButton/styles.js +0 -4
  22. package/src/components/atoms/GeneralInput/index.js +60 -241
  23. package/src/components/atoms/GeneralInput/styles.js +0 -81
  24. package/src/components/atoms/InputFormatter/index.js +51 -200
  25. package/src/components/atoms/InputFormatter/styles.js +0 -284
  26. package/src/components/molecules/StatusAsignationInfo/index.js +1 -9
  27. package/src/components/molecules/TabsMenu/index.js +0 -12
  28. package/src/components/molecules/TagAndInput/index.js +21 -294
  29. package/src/components/molecules/TagAndInput/styles.js +17 -59
  30. package/src/components/organisms/FullProductNameHeader/index.js +28 -4
  31. package/src/components/organisms/FullTabsMenu/index.js +1 -1
  32. package/src/components/organisms/InputGroup/index.js +4 -12
  33. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +202 -174
  34. package/src/components/pages/ProviderProductEdition/context/provider-product-edition.context.jsx +14 -14
  35. package/src/components/pages/ProviderProductEdition/index.js +418 -486
  36. package/src/components/pages/ProviderProductEdition/utils.js +2 -2
  37. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +243 -136
  38. package/src/components/pages/RetailerProductEdition/index.js +1717 -1563
  39. package/src/components/pages/RetailerProductEdition/styles.js +2 -67
  40. package/src/components/pages/RetailerProductEdition/utils.js +0 -240
  41. package/src/ai/utils/compare-strings.js +0 -45
  42. package/src/assets/images/Icons/arrow.png +0 -0
  43. package/src/assets/images/Icons/cancel.png +0 -0
  44. package/src/assets/images/Icons/ia-icon.png +0 -0
  45. package/src/assets/images/Icons/loading.svg +0 -5
  46. package/src/assets/images/Icons/reload.png +0 -0
  47. package/src/components/atoms/RetailerSelector/RetailerSelector.stories.js +0 -10
  48. package/src/components/atoms/RetailerSelector/index.js +0 -3
  49. package/src/components/atoms/RetailerSelector/styles.js +0 -0
  50. package/src/components/organisms/ChangeStatusModal/index.jsx +0 -488
  51. package/src/components/organisms/ChangeStatusModal/styles.js +0 -333
  52. package/src/components/pages/RetailerProductEdition/context/provider-product-edition.context.jsx +0 -575
  53. package/src/components/pages/RetailerProductEdition/context/provider-product-edition.reducer.js +0 -62
  54. package/src/components/pages/RetailerProductEdition/context/reducers/active-state.js +0 -344
  55. package/src/components/pages/RetailerProductEdition/context/reducers/inputs.js +0 -155
  56. package/src/components/pages/RetailerProductEdition/context/reducers/product.js +0 -114
  57. package/src/components/pages/RetailerProductEdition/context/reducers/system.js +0 -60
  58. package/src/components/pages/RetailerProductEdition/index_old.js +0 -1979
  59. package/src/components/pages/RetailerProductEdition/stories/Auditor.stories.js +0 -101
  60. package/src/components/pages/RetailerProductEdition/stories/ImageEditor.stories.js +0 -115
  61. package/src/components/pages/RetailerProductEdition/stories/TextEditor.stories.js +0 -174
  62. package/src/contexts/AiProductEdition.jsx +0 -347
  63. package/src/global-files/statusDictionary.js +0 -103
@@ -1,333 +0,0 @@
1
- import styled from 'styled-components';
2
- import { Dialog, Box, Button, TextField, Select, Chip, FormControl } from '@mui/material';
3
-
4
- export const colors = {
5
- background: 'rgba(0, 0, 0, 0.4)',
6
- paper: '#FFFFFF',
7
- primary: '#E039A7',
8
- primaryHover: '#C82A91',
9
- textMain: '#121212',
10
- textMuted: '#666666',
11
- border: '#E0E0E0',
12
- inputBg: '#FFFFFF',
13
- summaryBg: '#F9F9F9',
14
- };
15
-
16
- export const StyledDialog = styled(Dialog)`
17
- display: flex;
18
- align-items: center;
19
- justify-content: center;
20
-
21
- .MuiDialog-container {
22
- width: 100%;
23
- display: flex;
24
- justify-content: center;
25
- align-items: center;
26
- }
27
-
28
- .MuiDialog-paper {
29
- background-color: ${colors.paper};
30
- color: ${colors.textMain};
31
- border-radius: 5px;
32
- padding: 0;
33
- max-width: 38.5rem;
34
- max-height: 90vh;
35
- display: flex;
36
- flex-direction: column;
37
- overflow: hidden;
38
- width: 100%;
39
- box-shadow: 0 8px 32px rgba(0,0,0,0.15);
40
- font-family: "Raleway", sans-serif;
41
- }
42
- `;
43
-
44
- export const ModalHeader = styled(Box)`
45
- flex-shrink: 0;
46
- position: relative;
47
- display: flex;
48
- align-items: center;
49
- padding: 20px 24px 16px;
50
- gap: 1rem;
51
- border-bottom: 1px solid rgba(0, 0, 0, 0.1);
52
- margin-bottom: 0.5rem;
53
-
54
- .close-icon {
55
- position: absolute;
56
- top: 12px;
57
- right: 12px;
58
- color: ${colors.primary};
59
- }
60
-
61
- h2 {
62
- font-size: 1.35rem;
63
- font-weight: 600;
64
- }
65
-
66
- p {
67
- margin: 0;
68
- color: ${colors.textMuted};
69
- font-size: 0.8rem;
70
- }
71
- `;
72
-
73
- export const BadgeCircle = styled(Box)`
74
- width: 40px;
75
- height: 40px;
76
- border-radius: 50%;
77
- border: 2px solid ${colors.primary};
78
- display: flex;
79
- align-items: center;
80
- justify-content: center;
81
- background-color: ${colors.paper};
82
- color: ${colors.primary};
83
-
84
- svg {
85
- font-size: 1.5rem;
86
- }
87
- `;
88
-
89
- export const MainSection = styled(Box)`
90
- flex: 1;
91
- overflow-y: auto;
92
- padding-bottom: 20px;
93
-
94
- &::-webkit-scrollbar {
95
- width: 8px;
96
- }
97
- &::-webkit-scrollbar-track {
98
- background: transparent;
99
- }
100
- &::-webkit-scrollbar-thumb {
101
- background: #CCCCCC;
102
- border-radius: 4px;
103
- }
104
- &::-webkit-scrollbar-thumb:hover {
105
- background: #999999;
106
- }
107
- `;
108
-
109
- export const Section = styled(Box)`
110
- padding: 10px 32px;
111
- `;
112
-
113
- export const SectionTitle = styled.h3`
114
- font-size: 0.9rem;
115
- font-family: "Raleway-500", "Raleway", sans-serif;
116
- color: ${colors.textMuted};
117
- margin-bottom: 12px;
118
- `;
119
-
120
- export const ScopeButtonGroup = styled(Box)`
121
- display: grid;
122
- grid-template-columns: repeat(3, 1fr);
123
- gap: 12px;
124
- margin-bottom: 8px;
125
- `;
126
-
127
- export const ScopeButton = styled(Button)`
128
- && {
129
- border-radius: 5px;
130
- text-transform: none;
131
- text-wrap: nowrap;
132
- font-weight: 600;
133
- font-size: 12px;
134
- padding: 0.4rem 1rem;
135
- background-color: ${(props) => (props.active ? colors.primary : 'transparent')};
136
- color: ${(props) => (props.active ? '#FFFFFF' : colors.textMuted)};
137
- border: 1px solid ${(props) => (props.active ? colors.primary : colors.border)};
138
- font-family: "Raleway-500", "Raleway", sans-serif;
139
-
140
- &:hover {
141
- background-color: ${(props) => (props.active ? colors.primaryHover : colors.summaryBg)};
142
- }
143
-
144
- svg {
145
- margin-right: 8px;
146
- font-size: 18px;
147
- }
148
- }
149
- `;
150
-
151
- export const HelperText = styled.p`
152
- font-size: 0.8rem;
153
- color: ${colors.textMuted};
154
- margin: 8px 0 0;
155
- font-family: "Raleway", sans-serif;
156
- `;
157
-
158
- export const StatusPill = styled(Chip)`
159
- && {
160
- background-color: ${(props) => (props.selected ? colors.primary : props.disabled ? '#603888' : 'transparent')};
161
- color: ${(props) => (props.selected ? '#FFFFFF' : props.disabled ? 'white' : 'rgba(0, 0, 0, 0.45)')};
162
- border: 1px solid ${(props) => props.selected ? colors.primary : 'rgba(0, 0, 0, 0.25)'};
163
- font-weight: 600;
164
- border-radius: 5px;
165
- opacity: 1 !important;
166
- cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};
167
- font-family: "Raleway", sans-serif;
168
-
169
- &:hover {
170
- background-color: ${(props) =>
171
- props.disabled
172
- ? 'transparent'
173
- : (props.selected ? colors.primaryHover : 'rgba(0, 0, 0, 0.05)')};
174
- }
175
- }
176
- `;
177
-
178
- export const StatusGrid = styled(Box)`
179
- display: flex;
180
- flex-wrap: wrap;
181
- gap: 12px;
182
- `;
183
-
184
- export const StyledTextArea = styled(TextField)`
185
- && {
186
- width: 100%;
187
- background-color: ${colors.inputBg};
188
- border-radius: 8px;
189
-
190
- .MuiOutlinedInput-root {
191
- font-size: 14px;
192
- font-family: "Raleway", sans-serif;
193
- color: ${colors.textMain};
194
- fieldset {
195
- border-color: ${colors.border};
196
- }
197
- &:hover fieldset {
198
- border-color: #BDBDBD;
199
- }
200
- &.Mui-focused fieldset {
201
- border-color: ${colors.primary};
202
- }
203
- }
204
- }
205
- `;
206
-
207
- export const StyledSelect = styled(Select)`
208
- && {
209
- width: 100%;
210
- background-color: ${colors.inputBg};
211
- border-radius: 5px;
212
- font-family: "Raleway", sans-serif;
213
- font-size: 0.85rem;
214
- margin-bottom: 12px;
215
-
216
- .MuiSelect-select {
217
- padding: 8px 12px;
218
- display: flex;
219
- align-items: center;
220
- min-height: auto !important;
221
- }
222
-
223
- .MuiOutlinedInput-notchedOutline {
224
- border-color: ${colors.border};
225
- }
226
- &:hover .MuiOutlinedInput-notchedOutline {
227
- border-color: #BDBDBD;
228
- }
229
- &.Mui-focused .MuiOutlinedInput-notchedOutline {
230
- border-color: ${colors.primary};
231
- }
232
-
233
- .MuiSvgIcon-root {
234
- color: ${colors.textMuted};
235
- font-size: 1.2rem;
236
- }
237
- }
238
- `;
239
-
240
- export const StyledFormControl = styled(FormControl)`
241
- && {
242
- .MuiInputLabel-root {
243
- font-family: "Raleway", sans-serif;
244
- font-size: 0.85rem;
245
- color: ${colors.textMuted};
246
- transform: translate(14px, 10px) scale(1);
247
-
248
- &.MuiInputLabel-shrink {
249
- transform: translate(14px, -8px) scale(0.75);
250
- color: ${colors.primary};
251
- background-color: #fff;
252
- padding: 0 6px;
253
- }
254
- }
255
- }
256
- `;
257
-
258
- export const FooterActions = styled(Box)`
259
- flex-shrink: 0;
260
- display: flex;
261
- justify-content: flex-end;
262
- gap: 16px;
263
- padding: 16px 32px;
264
- background-color: ${colors.paper};
265
- border-top: 1px solid ${colors.border};
266
- `;
267
-
268
- export const ActionButton = styled(Button)`
269
- && {
270
- text-transform: none;
271
- font-family: "Raleway-500", "Raleway", sans-serif;
272
- padding: 4px 16px;
273
- border-radius: 5px;
274
-
275
- &.cancel {
276
- color: ${colors.textMain};
277
- border: 1px solid ${colors.border};
278
- &:hover {
279
- background-color: ${colors.summaryBg};
280
- }
281
- }
282
-
283
- &.submit {
284
- background-color: ${colors.primary};
285
- color: #FFFFFF;
286
- &:hover {
287
- background-color: ${colors.primaryHover};
288
- }
289
- &:disabled {
290
- opacity: 0.5;
291
- background-color: #CCCCCC;
292
- color: #888888;
293
- }
294
- }
295
- }
296
- `;
297
-
298
- export const ImpactSummary = styled(Box)`
299
- margin: 0 32px 32px;
300
- padding: 20px;
301
- background-color: ${colors.summaryBg};
302
- border: 1px solid ${colors.border};
303
- border-radius: 12px;
304
-
305
- .summary-title {
306
- font-family: "Raleway-500", "Raleway", sans-serif;
307
- font-size: 0.9rem;
308
- color: ${colors.textMuted};
309
- margin-bottom: 16px;
310
- display: block;
311
- }
312
-
313
- .status-flow {
314
- display: flex;
315
- align-items: center;
316
- gap: 12px;
317
- margin-bottom: 16px;
318
- color: ${colors.textMain};
319
- }
320
-
321
- .impact-counts {
322
- display: flex;
323
- gap: 24px;
324
- color: ${colors.textMuted};
325
- font-size: 0.85rem;
326
-
327
- div {
328
- display: flex;
329
- align-items: center;
330
- gap: 8px;
331
- }
332
- }
333
- `;