contentoh-components-library 21.2.6 → 21.2.7

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 (55) hide show
  1. package/.env.development +1 -3
  2. package/.env.production +1 -3
  3. package/dist/components/atoms/FeatureTag/styles.js +1 -1
  4. package/dist/components/atoms/Graphic/Graphic.stories.js +1 -9
  5. package/dist/components/atoms/Graphic/index.js +9 -4
  6. package/dist/components/atoms/Graphic/styles.js +1 -1
  7. package/dist/components/molecules/VersionItem/index.js +11 -1
  8. package/dist/components/organisms/FullProductNameHeader/index.js +1 -1
  9. package/dist/components/organisms/VersionSelector/index.js +2 -1
  10. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +121 -73
  11. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +55 -55
  12. package/dist/components/pages/RetailerProductEdition/index.js +3 -3
  13. package/dist/index.js +0 -13
  14. package/package.json +1 -2
  15. package/src/components/atoms/FeatureTag/styles.js +0 -6
  16. package/src/components/atoms/Graphic/Graphic.stories.js +0 -8
  17. package/src/components/atoms/Graphic/index.js +9 -3
  18. package/src/components/atoms/Graphic/styles.js +2 -1
  19. package/src/components/molecules/VersionItem/index.js +8 -0
  20. package/src/components/organisms/FullProductNameHeader/index.js +1 -1
  21. package/src/components/organisms/VersionSelector/index.js +2 -0
  22. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +146 -80
  23. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +58 -58
  24. package/src/components/pages/RetailerProductEdition/index.js +2 -3
  25. package/src/index.js +0 -1
  26. package/dist/components/atoms/MetricCard/MetricCard.stories.js +0 -31
  27. package/dist/components/atoms/MetricCard/index.js +0 -24
  28. package/dist/components/atoms/MetricCard/styles.js +0 -20
  29. package/dist/components/atoms/MetricSelect/MetricSelect.stories.js +0 -46
  30. package/dist/components/atoms/MetricSelect/index.js +0 -37
  31. package/dist/components/atoms/MetricSelect/styles.js +0 -20
  32. package/dist/components/organisms/Calendar/Calendar.stories.js +0 -28
  33. package/dist/components/organisms/Calendar/index.js +0 -33
  34. package/dist/components/organisms/Calendar/styles.js +0 -20
  35. package/dist/components/organisms/DashboardMetric/DashboardMetric.stories.js +0 -45
  36. package/dist/components/organisms/DashboardMetric/index.js +0 -168
  37. package/dist/components/organisms/DashboardMetric/styles.js +0 -20
  38. package/dist/components/pages/Dashboard/Dashboard.stories.js +0 -28
  39. package/dist/components/pages/Dashboard/index.js +0 -292
  40. package/dist/components/pages/Dashboard/styles.js +0 -18
  41. package/src/components/atoms/MetricCard/MetricCard.stories.js +0 -14
  42. package/src/components/atoms/MetricCard/index.js +0 -10
  43. package/src/components/atoms/MetricCard/styles.js +0 -30
  44. package/src/components/atoms/MetricSelect/MetricSelect.stories.js +0 -37
  45. package/src/components/atoms/MetricSelect/index.js +0 -22
  46. package/src/components/atoms/MetricSelect/styles.js +0 -20
  47. package/src/components/organisms/Calendar/Calendar.stories.js +0 -10
  48. package/src/components/organisms/Calendar/index.js +0 -17
  49. package/src/components/organisms/Calendar/styles.js +0 -851
  50. package/src/components/organisms/DashboardMetric/DashboardMetric.stories.js +0 -28
  51. package/src/components/organisms/DashboardMetric/index.js +0 -128
  52. package/src/components/organisms/DashboardMetric/styles.js +0 -60
  53. package/src/components/pages/Dashboard/Dashboard.stories.js +0 -10
  54. package/src/components/pages/Dashboard/index.js +0 -146
  55. package/src/components/pages/Dashboard/styles.js +0 -24
@@ -60,7 +60,7 @@ export const FullProductNameHeader = ({
60
60
  value: headerData?.article?.company_name,
61
61
  },
62
62
  {
63
- feature: "SKU",
63
+ feature: "UPC",
64
64
  value: headerData?.article?.upc || headerData?.upc,
65
65
  },
66
66
  ]}
@@ -8,6 +8,7 @@ import closeIcon from "../../../assets/images/versionSelector/closeVersionSelect
8
8
  import { GlobalColors } from "contentoh-components-library/dist/global-files/variables";
9
9
  import { FontFamily } from "../../../global-files/variables";
10
10
  import { VersionItem } from "../../molecules/VersionItem";
11
+ import { version } from "react";
11
12
 
12
13
  export const VersionSelector = ({
13
14
  modalId,
@@ -75,6 +76,7 @@ export const VersionSelector = ({
75
76
  currentVersion={item.version === currentVersion}
76
77
  productOwner={companyName}
77
78
  setVersion={setVersion}
79
+ timestamp={item.timestamp}
78
80
  />
79
81
  ))}
80
82
  </div>
@@ -21,106 +21,172 @@ ProviderProductEditionDefault.args = {
21
21
  category: 846,
22
22
  version: 2,
23
23
  productSelected: {
24
- orderId: 2446,
25
- article_status: "AP",
26
- datasheet_status: "AP",
27
- description_status: "AP",
28
- images_status: "ACA",
29
- prio: "none",
30
- version: 2,
31
- brand: null,
24
+ articleStatus: "ACA",
25
+ version: 5,
26
+ missing: {},
32
27
  article: {
33
28
  category:
34
- "Organizadores y Closets|Accesorios de Lavandería|Organizadores de Lavandería",
35
- company_name: "WOMEX SA DE CV",
36
- id_company: 424,
37
- country: null,
38
- id_category: "2522",
39
- id_article: 78773,
40
- name: "RACK PARA ROPA DOBLE NEGRO",
41
- upc: "168462",
29
+ "Materiales de Construcción|Impermeabilizantes y Recubrimientos|Selladores",
30
+ company_name: "SIKA MEXICANA S.A. DE C.V.",
31
+ company_id: 383,
32
+ id_category: "2249",
33
+ id_article: 29457,
34
+ name: "SIKA TECHO FRESCO SUPER 15",
35
+ upc: "111187",
42
36
  },
37
+ asignations: [],
43
38
  retailers: [
44
39
  {
45
40
  id: 58,
46
41
  name: "The Home Depot Golden",
42
+ country: "México",
43
+ id_region: 1,
44
+ active: 1,
47
45
  },
48
- ],
49
- services: {
50
- datasheets: 1,
51
- descriptions: 1,
52
- images: 1,
53
- },
54
- statusByRetailer: {
55
- 58: {
56
- datasheet: "AP",
57
- description: "AP",
58
- images: "ACA",
46
+ {
47
+ id: 59,
48
+ name: "The Home Depot Platinum",
49
+ country: "México",
50
+ id_region: 1,
51
+ active: 1,
59
52
  },
60
- },
61
- retailersWithService: ["58"],
62
- id_article: 78773,
53
+ {
54
+ id: 61,
55
+ name: "Home Depot TAB",
56
+ country: "México",
57
+ id_region: 1,
58
+ active: 1,
59
+ },
60
+ ],
61
+ percentage: 33.35,
63
62
  retailersAvailable: [
64
63
  {
65
64
  id: 58,
66
65
  name: "The Home Depot Golden",
66
+ country: "México",
67
+ id_region: 1,
68
+ active: 1,
69
+ },
70
+ {
71
+ id: 59,
72
+ name: "The Home Depot Platinum",
73
+ country: "México",
74
+ id_region: 1,
75
+ active: 1,
76
+ },
77
+ {
78
+ id: 61,
79
+ name: "Home Depot TAB",
80
+ country: "México",
81
+ id_region: 1,
82
+ active: 1,
83
+ },
84
+ ],
85
+ upc: "111187",
86
+ name: "SIKA TECHO FRESCO SUPER 15",
87
+ categoryName:
88
+ "Materiales de Construcción|Impermeabilizantes y Recubrimientos|Selladores",
89
+ id_category: "2249",
90
+ id_article: 29457,
91
+ services: [
92
+ {
93
+ id_article: 29457,
94
+ service: "datasheet",
95
+ quantity: 1,
96
+ price: 0,
97
+ id_user: 1237,
98
+ datasheet_common: null,
99
+ discount: null,
67
100
  },
68
101
  ],
69
102
  },
70
103
  productToEdit: {
71
- ArticleId: 78773,
72
- idCategory: "2522",
73
- product: {
74
- orderId: 2446,
75
- article_status: "AP",
76
- datasheet_status: "AP",
77
- description_status: "AP",
78
- images_status: "ACA",
79
- prio: "none",
80
- version: 2,
81
- brand: null,
82
- article: {
83
- category:
84
- "Organizadores y Closets|Accesorios de Lavandería|Organizadores de Lavandería",
85
- company_name: "WOMEX SA DE CV",
86
- id_company: 424,
87
- country: null,
88
- id_category: "2522",
89
- id_article: 78773,
90
- name: "RACK PARA ROPA DOBLE NEGRO",
91
- upc: "168462",
92
- },
93
- retailers: [
94
- {
95
- id: 58,
96
- name: "The Home Depot Golden",
97
- },
98
- ],
99
- services: {
100
- datasheets: 1,
101
- descriptions: 1,
102
- images: 1,
103
- },
104
- statusByRetailer: {
105
- 58: {
106
- datasheet: "AP",
107
- description: "AP",
108
- images: "ACA",
104
+ idCategory: "2249",
105
+ ArticleId: 29457,
106
+ product: [
107
+ {
108
+ articleStatus: "ACA",
109
+ version: 5,
110
+ missing: {},
111
+ article: {
112
+ category:
113
+ "Materiales de Construcción|Impermeabilizantes y Recubrimientos|Selladores",
114
+ company_name: "SIKA MEXICANA S.A. DE C.V.",
115
+ company_id: 383,
116
+ id_category: "2249",
117
+ id_article: 29457,
118
+ name: "SIKA TECHO FRESCO SUPER 15",
119
+ upc: "111187",
109
120
  },
121
+ asignations: [],
122
+ retailers: [
123
+ {
124
+ id: 58,
125
+ name: "The Home Depot Golden",
126
+ country: "México",
127
+ id_region: 1,
128
+ active: 1,
129
+ },
130
+ {
131
+ id: 59,
132
+ name: "The Home Depot Platinum",
133
+ country: "México",
134
+ id_region: 1,
135
+ active: 1,
136
+ },
137
+ {
138
+ id: 61,
139
+ name: "Home Depot TAB",
140
+ country: "México",
141
+ id_region: 1,
142
+ active: 1,
143
+ },
144
+ ],
145
+ percentage: 33.35,
146
+ retailersAvailable: [
147
+ {
148
+ id: 58,
149
+ name: "The Home Depot Golden",
150
+ country: "México",
151
+ id_region: 1,
152
+ active: 1,
153
+ },
154
+ {
155
+ id: 59,
156
+ name: "The Home Depot Platinum",
157
+ country: "México",
158
+ id_region: 1,
159
+ active: 1,
160
+ },
161
+ {
162
+ id: 61,
163
+ name: "Home Depot TAB",
164
+ country: "México",
165
+ id_region: 1,
166
+ active: 1,
167
+ },
168
+ ],
169
+ upc: "111187",
170
+ name: "SIKA TECHO FRESCO SUPER 15",
171
+ categoryName:
172
+ "Materiales de Construcción|Impermeabilizantes y Recubrimientos|Selladores",
173
+ id_category: "2249",
174
+ id_article: 29457,
175
+ services: [
176
+ {
177
+ id_article: 29457,
178
+ service: "datasheet",
179
+ quantity: 1,
180
+ price: 0,
181
+ id_user: 1237,
182
+ datasheet_common: null,
183
+ discount: null,
184
+ },
185
+ ],
110
186
  },
111
- retailersWithService: ["58"],
112
- id_article: 78773,
113
- retailersAvailable: [
114
- {
115
- id: 58,
116
- name: "The Home Depot Golden",
117
- },
118
- ],
119
- },
120
- },
121
- location: {
122
- state: { origin: "Contentoh" },
187
+ ],
123
188
  },
189
+ location: {},
124
190
  user: {
125
191
  id_user: 1237,
126
192
  name: "The Home",
@@ -16,82 +16,82 @@ RetailerProductEditionDefault.args = {
16
16
  Imágenes: false,
17
17
  },
18
18
  token:
19
- "eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIwYjY2YTRhOS03NzkwLTQwMzQtYTMwYS1jMDA4MDg5NjI4NjciLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwiY29nbml0bzp1c2VybmFtZSI6IjBiNjZhNGE5LTc3OTAtNDAzNC1hMzBhLWMwMDgwODk2Mjg2NyIsImF1ZCI6IjUyZDlza2tkY2c4cWpwODhvb2sxdXNlNm1rIiwiZXZlbnRfaWQiOiIzNmIxMmUwMy0xOWJhLTRiMDktYWJiYS1kZjk3ZTFkNThjZTQiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2MDE4MjgzNywibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY2MDE4NjQzNywiaWF0IjoxNjYwMTgyODM3LCJlbWFpbCI6ImJheWFkaTE1MzhAbW5xbG0uY29tIn0.MM9nIHkrRIS2o8_s4BR6VTLgyw3ryvPrr-mf6RtnQ4smng2Q3fmtK07zInNcvcrv8EXO5J9z47_NZ5MOJDo1Pz1CV2cOYM7PT5tEn3F-W4SitqDbBw3KxfkqSMxdZUIHLWECGL-u2ATCYU2J4KRVQi8XSP1qbfv1hu9dh-vID8Fq641ccQwEqUDC13pshDPlR08legg7AAPJqoilV7wuvxqTYAK6fGqMS5jcdW2iDmU0ti9gkydXkYRIC-jg446VOmRCpwzKsk4UAPwlrGeodQ0LV1bfWn_-KVspWCRQd6U5WbFxHn0umYe3CvvPpyVmHzD3F_EMxaVyqV5aW5IoIQ",
19
+ "eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIwYjY2YTRhOS03NzkwLTQwMzQtYTMwYS1jMDA4MDg5NjI4NjciLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwiY29nbml0bzp1c2VybmFtZSI6IjBiNjZhNGE5LTc3OTAtNDAzNC1hMzBhLWMwMDgwODk2Mjg2NyIsImF1ZCI6IjUyZDlza2tkY2c4cWpwODhvb2sxdXNlNm1rIiwiZXZlbnRfaWQiOiI4ZjA2YmU0NC04ZWEzLTQ5OWMtOGFjZC0xMDlmMDZiZWI1MjAiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY2MDA3NjQ5MywibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTY2MDA4MDA5MywiaWF0IjoxNjYwMDc2NDkzLCJlbWFpbCI6ImJheWFkaTE1MzhAbW5xbG0uY29tIn0.aw_x1A8WR2MCp_Kz-T2Jcg0ZtuKwyzQ23yT_OoKr-aGJmEjSPihmksWgLZr9hJXyfvU0JndaVMM_3DRly1TdtJ264zwH4dZ7Cp9gF4TSXG16HQxIIPUA4NnwdpOnlBdE9E27mCXs4XYnCZ7dRMXnkjpRL4PVbrGji9qbEEJR6TxCJafR-zes1o4HC1KfQ5QF4s5I_LYQYbD-Ot0A1zDiJg34HR9tTILu5f4uc_2Nj8bqqYJsEdKg982WWO9ac2uKRPXQqNL6CsdltnSeQQcnS6Wj5DJTRRoc-lRdE6ekpAvDGPo0Dyj1Q8GYH3uxvM-pVu8J1Z_JOtO5j5mPN9krpA",
20
20
  productSelected: {
21
- "services": {
22
- "datasheets": 1,
23
- "descriptions": 1,
24
- "images": 1
21
+ services: {
22
+ datasheets: 0,
23
+ descriptions: 0,
24
+ images: 1,
25
25
  },
26
- "orderId": 1810,
27
- "status": "RP",
28
- "datasheet_status": "RP",
29
- "prio": "none",
30
- "version": 2,
31
- "description_status": "RP",
32
- "images_status": "RP",
33
- "article": {
34
- "id_article": 68934,
35
- "id_category": "2290",
36
- "name": "SCOTCHBLUE  3PACK MASKING TAPE 24MMX55M",
37
- "upc": "167907",
38
- "timestamp": "2022-06-22T15:44:57.000Z",
39
- "id_user": 704,
40
- "status": "NULL",
41
- "active": 1,
42
- "company_id": 437,
43
- "SKU": null,
44
- "Descripcion": null,
45
- "Proveedor": null,
46
- "id_proveedor": 0,
47
- "company_name": "",
48
- "country": null,
49
- "id_order": 1810,
50
- "id_datasheet_especialist": 1248,
51
- "id_datasheet_facilitator": 1252,
52
- "id_description_especialist": 1248,
53
- "id_description_facilitator": 1252,
54
- "id_images_especialist": 1251,
55
- "id_images_facilitator": 1286,
56
- "id_auditor": 514,
57
- "id_recepcionist": null,
58
- "category": "Pinturas|Herramientas y accesorios para pintar|Cintas",
59
- "missingAttributes": null,
60
- "missingDescriptions": null,
61
- "missingImages": null
26
+ orderId: 1789,
27
+ status: "ACA",
28
+ datasheet_status: "NS",
29
+ prio: "none",
30
+ version: 2,
31
+ description_status: "NS",
32
+ images_status: "ACA",
33
+ article: {
34
+ id_article: 68865,
35
+ id_category: "2999",
36
+ name: "RESIZE",
37
+ upc: "169955",
38
+ timestamp: "2022-06-21T16:03:10.000Z",
39
+ id_user: 1238,
40
+ status: "NULL",
41
+ active: 0,
42
+ company_id: 819,
43
+ SKU: null,
44
+ Descripcion: null,
45
+ Proveedor: null,
46
+ id_proveedor: 0,
47
+ company_name: "The Home Depot Resize",
48
+ country: "México",
49
+ id_order: 1789,
50
+ id_datasheet_especialist: null,
51
+ id_datasheet_facilitator: null,
52
+ id_description_especialist: null,
53
+ id_description_facilitator: null,
54
+ id_images_especialist: 1250,
55
+ id_images_facilitator: 424,
56
+ id_auditor: null,
57
+ id_recepcionist: null,
58
+ category: "Resizing|Resizing|Resizing",
59
+ missingAttributes: null,
60
+ missingDescriptions: null,
61
+ missingImages: null,
62
62
  },
63
- "retailers": [
64
- {
65
- "id": 58,
66
- "name": "The Home Depot Golden",
67
- "country": "México",
68
- "id_region": 1,
69
- "active": 1
70
- }
63
+ retailers: [
64
+ {
65
+ id: 60,
66
+ name: "The Home Depot Resizing",
67
+ country: "México",
68
+ id_region: 1,
69
+ active: 1,
70
+ },
71
71
  ],
72
- "country": null,
73
- "upc": "167907"
74
- },
72
+ country: "México",
73
+ upc: "169955",
74
+ },
75
75
  location: {
76
76
  product: { articleId: 109485, versionId: 3 },
77
77
  },
78
78
  user: {
79
- id_user: 1248,
80
- name: "Facilitador Textos",
79
+ id_user: 425,
80
+ name: "Auditor QA",
81
81
  last_name: " ",
82
- email: "bayadi1538@mnqlm.com",
82
+ email: "ladiboh785@mi166.com",
83
83
  position: "Tester",
84
84
  telephone: null,
85
85
  country: null,
86
86
  id_company: 254,
87
- id_cognito: "0b66a4a9-7790-4034-a30a-c00808962867",
87
+ id_cognito: "23a3f496-4e38-4e12-9bf5-7f90b77a2f35",
88
88
  birth_Date: null,
89
89
  about_me: null,
90
90
  zip_code: null,
91
91
  address: null,
92
92
  job: null,
93
93
  id_stripe: null,
94
- id_role: 7,
94
+ id_role: 1,
95
95
  active: 1,
96
96
  is_retailer: 0,
97
97
  email_notify: null,
@@ -106,6 +106,6 @@ RetailerProductEditionDefault.args = {
106
106
  products_limit: "1000",
107
107
  type: "Enterprise",
108
108
  },
109
- src: "https://content-management-profile-prod.s3.amazonaws.com/id-423/423.png?1660182839373",
109
+ src: "https://content-management-profile-prod.s3.amazonaws.com/id-425/425.png?1659649029658",
110
110
  },
111
111
  };
@@ -60,7 +60,7 @@ const reducerImages = (state, action) => {
60
60
  values[action.index][action.attribute] = action.value;
61
61
  return { ...state, values };
62
62
  case "changeAttrValue":
63
- const index = attrForImgs.general.findIndex((f) => f.id === action.id);
63
+ const index = attrForImgs.general.findIndex((f) => (f.id = action.id));
64
64
  if (index !== -1) {
65
65
  attrForImgs.general[index].value = action.value;
66
66
  }
@@ -648,7 +648,7 @@ export const RetailerProductEdition = ({
648
648
  statusArray.includes(srvActive) &&
649
649
  (["RA", "RC"].includes(product?.status) ||
650
650
  srv.filter((serv) =>
651
- ["CA"].includes(serv.status?.replace(/.*\//, ""))
651
+ statusArray.includes(serv.status?.replace(/.*\//, ""))
652
652
  ).length === srv.length)
653
653
  );
654
654
  case 4:
@@ -1387,7 +1387,6 @@ export const RetailerProductEdition = ({
1387
1387
  </>
1388
1388
  )}
1389
1389
  </div>
1390
- {console.log(userAssigned(activeTab), auditorAssigned())}
1391
1390
  {(userAssigned(activeTab) || auditorAssigned()) &&
1392
1391
  product[`${getConcept(activeTab)}_status`] !== "NS" && (
1393
1392
  <div className="commentary-box">
package/src/index.js CHANGED
@@ -63,7 +63,6 @@ export * from "./components/organisms/ProductImageModal/index";
63
63
  export * from "./components/pages/ChangePasswordLogin";
64
64
  export * from "./components/pages/CustomerLogin";
65
65
  export * from "./components/pages/CustomerType";
66
- export * from "./components/pages/Dashboard";
67
66
  export * from "./components/pages/EmailResetPassword";
68
67
  export * from "./components/pages/OnboardPlan";
69
68
  export * from "./components/pages/RegistrationLoginSecondStep";
@@ -1,31 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = exports.MetricCardDefault = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
11
-
12
- var _index = require("./index");
13
-
14
- var _jsxRuntime = require("react/jsx-runtime");
15
-
16
- var _default = {
17
- title: "Components/atoms/MetricCard",
18
- component: _index.MetricCard
19
- };
20
- exports.default = _default;
21
-
22
- var Template = function Template(args) {
23
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.MetricCard, (0, _objectSpread2.default)({}, args));
24
- };
25
-
26
- var MetricCardDefault = Template.bind({});
27
- exports.MetricCardDefault = MetricCardDefault;
28
- MetricCardDefault.args = {
29
- label: "Productos Totales",
30
- number: 2367
31
- };
@@ -1,24 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.MetricCard = void 0;
7
-
8
- var _styles = require("./styles");
9
-
10
- var _jsxRuntime = require("react/jsx-runtime");
11
-
12
- var MetricCard = function MetricCard(_ref) {
13
- var label = _ref.label,
14
- number = _ref.number;
15
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
16
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
17
- children: label
18
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
19
- children: number
20
- })]
21
- });
22
- };
23
-
24
- exports.MetricCard = MetricCard;
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.Container = void 0;
9
-
10
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
11
-
12
- var _styledComponents = _interopRequireDefault(require("styled-components"));
13
-
14
- var _variables = require("../../../global-files/variables");
15
-
16
- var _templateObject;
17
-
18
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n padding: 10px 20px;\n border: 1px solid ", ";\n width: fit-content;\n text-align: center;\n border-radius: 10px;\n\n p {\n color: #000;\n font-size: 25px;\n font-family: ", ";\n font-size: 25px;\n font-feature-settings: \"pnum\", \"lnum\";\n\n &:first-of-type {\n color: ", ";\n font-family: ", ";\n font-weight: 500;\n font-size: 13px;\n line-height: 13px;\n }\n\n & + * {\n margin-top: 3px;\n }\n }\n"])), _variables.GlobalColors.s3, _variables.FontFamily.Raleway_600, _variables.GlobalColors.s3, _variables.FontFamily.Raleway);
19
-
20
- exports.Container = Container;
@@ -1,46 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = exports.MetricSelectDefault = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
11
-
12
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
13
-
14
- var _react = require("react");
15
-
16
- var _ = require(".");
17
-
18
- var _jsxRuntime = require("react/jsx-runtime");
19
-
20
- var _default = {
21
- title: "Components/atoms/MetricSelect",
22
- component: _.MetricSelect
23
- };
24
- exports.default = _default;
25
-
26
- var Template = function Template(args) {
27
- var _useState = (0, _react.useState)("Semana actual"),
28
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
29
- optionSelected = _useState2[0],
30
- setSelectedOption = _useState2[1];
31
-
32
- var onChange = function onChange(e) {
33
- setSelectedOption(e.target.value);
34
- };
35
-
36
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_.MetricSelect, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, args), {}, {
37
- optionSelected: optionSelected,
38
- onChange: onChange
39
- }));
40
- };
41
-
42
- var MetricSelectDefault = Template.bind({});
43
- exports.MetricSelectDefault = MetricSelectDefault;
44
- MetricSelectDefault.args = {
45
- options: ["12/12/12", "12/12/13", "12/12/14", "12/12/15", "12/12/16", "12/12/17", "12/12/18", "12/12/19", "12/12/20", "12/12/21", "12/12/22"]
46
- };
@@ -1,37 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.MetricSelect = void 0;
7
-
8
- var _styles = require("./styles");
9
-
10
- var _jsxRuntime = require("react/jsx-runtime");
11
-
12
- var MetricSelect = function MetricSelect(_ref) {
13
- var options = _ref.options,
14
- optionSelected = _ref.optionSelected,
15
- onChange = _ref.onChange,
16
- label = _ref.label,
17
- className = _ref.className;
18
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
19
- className: className,
20
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("select", {
21
- value: optionSelected,
22
- onChange: onChange,
23
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
24
- value: "",
25
- disabled: true,
26
- children: label
27
- }), options === null || options === void 0 ? void 0 : options.map(function (option) {
28
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
29
- value: option.id,
30
- children: option.name
31
- }, option.name);
32
- })]
33
- })
34
- });
35
- };
36
-
37
- exports.MetricSelect = MetricSelect;
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.Container = void 0;
9
-
10
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
11
-
12
- var _styledComponents = _interopRequireDefault(require("styled-components"));
13
-
14
- var _variables = require("../../../global-files/variables");
15
-
16
- var _templateObject;
17
-
18
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n width: fit-content;\n display: block;\n padding-right: 10px;\n border-radius: 5px;\n\n select {\n color: ", ";\n outline: none;\n padding: 10px;\n background-color: transparent;\n border: none;\n option:first-of-type {\n }\n }\n"])), _variables.GlobalColors.s2, _variables.GlobalColors.s4);
19
-
20
- exports.Container = Container;