contentoh-components-library 21.2.4 → 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 +42 -216
  12. package/dist/components/pages/RetailerProductEdition/index.js +1 -1
  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 +41 -254
  24. package/src/components/pages/RetailerProductEdition/index.js +1 -1
  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 -36
  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 -286
  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 -142
  55. package/src/components/pages/Dashboard/styles.js +0 -24
@@ -16,288 +16,75 @@ 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
21
  services: {
22
- datasheets: 1,
23
- descriptions: 1,
22
+ datasheets: 0,
23
+ descriptions: 0,
24
24
  images: 1,
25
25
  },
26
- orderId: 2296,
27
- status: "AP",
28
- datasheet_status: "AP",
26
+ orderId: 1789,
27
+ status: "ACA",
28
+ datasheet_status: "NS",
29
29
  prio: "none",
30
- version: 8,
31
- description_status: "ACA",
32
- images_status: "AP",
30
+ version: 2,
31
+ description_status: "NS",
32
+ images_status: "ACA",
33
33
  article: {
34
- id_article: 14701,
35
- id_category: "684",
36
- name: "Pasta Dental Colgate Total 12 Clean Mint de 100 ml",
37
- upc: "7501035911369",
38
- timestamp: "2021-10-09T16:33:17.000Z",
39
- id_user: 203,
40
- status: "Ex",
41
- active: 1,
42
- company_id: 226,
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
43
  SKU: null,
44
44
  Descripcion: null,
45
45
  Proveedor: null,
46
46
  id_proveedor: 0,
47
- company_name: "Prueba Test S.A de C.V.",
48
- country: "null",
49
- id_order: 2296,
50
- id_datasheet_especialist: 405,
51
- id_datasheet_facilitator: 158,
52
- id_description_especialist: 405,
53
- id_description_facilitator: 158,
54
- id_images_especialist: 366,
55
- id_images_facilitator: 160,
56
- id_auditor: 9,
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
57
  id_recepcionist: null,
58
- category: "Salud y Belleza|Cuidado Bucal|Pastas Dentales y Aseo Bucal",
59
- missingAttributes: -1,
60
- missingDescriptions: 3,
61
- missingImages: -9,
58
+ category: "Resizing|Resizing|Resizing",
59
+ missingAttributes: null,
60
+ missingDescriptions: null,
61
+ missingImages: null,
62
62
  },
63
63
  retailers: [
64
64
  {
65
- id: 4,
66
- name: "Walmart Super y Superama",
65
+ id: 60,
66
+ name: "The Home Depot Resizing",
67
67
  country: "México",
68
68
  id_region: 1,
69
69
  active: 1,
70
- percentage: 97.61904761904763,
71
- image:
72
- "https://content-management-images.s3.amazonaws.com/retailers/4.png",
73
- services: ["NA", "NA", "NA"],
74
- },
75
- {
76
- id: 5,
77
- name: "Chedraui",
78
- country: "México",
79
- id_region: 1,
80
- active: 1,
81
- percentage: 100,
82
- image:
83
- "https://content-management-images.s3.amazonaws.com/retailers/5.png",
84
- services: ["NA", "NA", "NA"],
85
- },
86
- {
87
- id: 6,
88
- name: "HEB",
89
- country: "México",
90
- id_region: 1,
91
- active: 1,
92
- percentage: 100,
93
- image:
94
- "https://content-management-images.s3.amazonaws.com/retailers/6.png",
95
- services: ["AP", "ACA", "AP"],
96
- },
97
- {
98
- id: 7,
99
- name: "Mega",
100
- country: "México",
101
- id_region: 1,
102
- active: 1,
103
- percentage: 100,
104
- image:
105
- "https://content-management-images.s3.amazonaws.com/retailers/7.png",
106
- services: ["NA", "NA", "NA"],
107
- },
108
- {
109
- id: 8,
110
- name: "Fragua",
111
- country: "México",
112
- id_region: 1,
113
- active: 1,
114
- percentage: null,
115
- image:
116
- "https://content-management-images.s3.amazonaws.com/retailers/8.png",
117
- services: ["NA", "NA", "NA"],
118
- },
119
- {
120
- id: 9,
121
- name: "Amazon",
122
- country: "México",
123
- id_region: 1,
124
- active: 1,
125
- percentage: 85.18518518518518,
126
- image:
127
- "https://content-management-images.s3.amazonaws.com/retailers/9.png",
128
- services: ["NA", "NA", "NA"],
129
- },
130
- {
131
- id: 12,
132
- name: "La Comer",
133
- country: "México",
134
- id_region: 1,
135
- active: 1,
136
- percentage: 100,
137
- image:
138
- "https://content-management-images.s3.amazonaws.com/retailers/12.png",
139
- services: ["NA", "NA", "NA"],
140
- },
141
- {
142
- id: 13,
143
- name: "Soriana",
144
- country: "México",
145
- id_region: 1,
146
- active: 1,
147
- percentage: 100,
148
- image:
149
- "https://content-management-images.s3.amazonaws.com/retailers/13.png",
150
- services: ["NA", "NA", "NA"],
151
- },
152
- {
153
- id: 16,
154
- name: "Rappi",
155
- country: "México",
156
- id_region: 1,
157
- active: 1,
158
- percentage: 93.33333333333333,
159
- image:
160
- "https://content-management-images.s3.amazonaws.com/retailers/16.png",
161
- services: ["NA", "NA", "NA"],
162
- },
163
- {
164
- id: 17,
165
- name: "Genérico",
166
- country: "México",
167
- id_region: 1,
168
- active: 1,
169
- percentage: 100,
170
- image:
171
- "https://content-management-images.s3.amazonaws.com/retailers/17.png",
172
- services: ["NA", "NA", "NA"],
173
- },
174
- {
175
- id: 18,
176
- name: "Google",
177
- country: "México",
178
- id_region: 1,
179
- active: 1,
180
- percentage: 96.66666666666667,
181
- image:
182
- "https://content-management-images.s3.amazonaws.com/retailers/18.png",
183
- services: ["NA", "NA", "NA"],
184
- },
185
- {
186
- id: 20,
187
- name: "Cornershop",
188
- country: "México",
189
- id_region: 1,
190
- active: 1,
191
- percentage: 91.66666666666667,
192
- image:
193
- "https://content-management-images.s3.amazonaws.com/retailers/20.png",
194
- services: ["NA", "NA", "NA"],
195
- },
196
- {
197
- id: 24,
198
- name: "Alsuper",
199
- country: "México",
200
- id_region: 1,
201
- active: 1,
202
- percentage: 95.83333333333333,
203
- image:
204
- "https://content-management-images.s3.amazonaws.com/retailers/24.png",
205
- services: ["NA", "NA", "NA"],
206
- },
207
- {
208
- id: 27,
209
- name: "IMPIRA México",
210
- country: "México",
211
- id_region: 1,
212
- active: 1,
213
- percentage: 100,
214
- image:
215
- "https://content-management-images.s3.amazonaws.com/retailers/27.png",
216
- services: ["NA", "NA", "NA"],
217
- },
218
- {
219
- id: 29,
220
- name: "Farmacias del Ahorro",
221
- country: "México",
222
- id_region: 1,
223
- active: 1,
224
- percentage: 81.48148148148148,
225
- image:
226
- "https://content-management-images.s3.amazonaws.com/retailers/29.png",
227
- services: ["NA", "NA", "NA"],
228
- },
229
- {
230
- id: 33,
231
- name: "Merza",
232
- country: "México",
233
- id_region: 1,
234
- active: 1,
235
- percentage: 66.66666666666667,
236
- image:
237
- "https://content-management-images.s3.amazonaws.com/retailers/33.png",
238
- services: ["NA", "NA", "NA"],
239
- },
240
- {
241
- id: 34,
242
- name: "San Pablo",
243
- country: "México",
244
- id_region: 1,
245
- active: 1,
246
- percentage: 95.16666666666667,
247
- image:
248
- "https://content-management-images.s3.amazonaws.com/retailers/34.png",
249
- services: ["NA", "NA", "NA"],
250
- },
251
- {
252
- id: 38,
253
- name: "Del Sol",
254
- country: "México",
255
- id_region: 1,
256
- active: 1,
257
- percentage: 100,
258
- image:
259
- "https://content-management-images.s3.amazonaws.com/retailers/38.png",
260
- services: ["NA", "NA", "NA"],
261
- },
262
- {
263
- id: 39,
264
- name: "Justo",
265
- country: "México",
266
- id_region: 1,
267
- active: 1,
268
- percentage: 94.73684210526316,
269
- image:
270
- "https://content-management-images.s3.amazonaws.com/retailers/39.png",
271
- services: ["NA", "NA", "NA"],
272
- },
273
- {
274
- id: 62,
275
- name: "Sanborns Café",
276
- country: "México",
277
- id_region: 1,
278
- active: 1,
279
- percentage: 100,
280
- image:
281
- "https://content-management-images.s3.amazonaws.com/retailers/62.png",
282
- services: ["NA", "NA", "NA"],
283
70
  },
284
71
  ],
285
- country: "null",
286
- upc: "7501035911369",
72
+ country: "México",
73
+ upc: "169955",
287
74
  },
288
75
  location: {
289
76
  product: { articleId: 109485, versionId: 3 },
290
77
  },
291
78
  user: {
292
- id_user: 423,
293
- name: "Facilitador Textos",
79
+ id_user: 425,
80
+ name: "Auditor QA",
294
81
  last_name: " ",
295
- email: "bayadi1538@mnqlm.com",
82
+ email: "ladiboh785@mi166.com",
296
83
  position: "Tester",
297
84
  telephone: null,
298
85
  country: null,
299
86
  id_company: 254,
300
- id_cognito: "0b66a4a9-7790-4034-a30a-c00808962867",
87
+ id_cognito: "23a3f496-4e38-4e12-9bf5-7f90b77a2f35",
301
88
  birth_Date: null,
302
89
  about_me: null,
303
90
  zip_code: null,
@@ -319,6 +106,6 @@ RetailerProductEditionDefault.args = {
319
106
  products_limit: "1000",
320
107
  type: "Enterprise",
321
108
  },
322
- 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",
323
110
  },
324
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
  }
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,36 +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
- children: label
26
- }), options === null || options === void 0 ? void 0 : options.map(function (option) {
27
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
28
- value: option.id,
29
- children: option.name
30
- }, option.name);
31
- })]
32
- })
33
- });
34
- };
35
-
36
- 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;
@@ -1,28 +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.CalendarDefault = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
11
-
12
- var _ = require(".");
13
-
14
- var _jsxRuntime = require("react/jsx-runtime");
15
-
16
- var _default = {
17
- title: "Components/organisms/Calendar",
18
- component: _.Calendar
19
- };
20
- exports.default = _default;
21
-
22
- var Template = function Template(args) {
23
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Calendar, (0, _objectSpread2.default)({}, args));
24
- };
25
-
26
- var CalendarDefault = Template.bind({});
27
- exports.CalendarDefault = CalendarDefault;
28
- CalendarDefault.args = {};
@@ -1,33 +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.Calendar = void 0;
9
-
10
- var _styles = require("./styles");
11
-
12
- var _reactDatepicker = _interopRequireDefault(require("react-datepicker"));
13
-
14
- var _react = require("react");
15
-
16
- var _jsxRuntime = require("react/jsx-runtime");
17
-
18
- var Calendar = function Calendar(_ref) {
19
- var onChange = _ref.onChange,
20
- startDate = _ref.startDate,
21
- endDate = _ref.endDate;
22
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
23
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactDatepicker.default, {
24
- selected: startDate,
25
- onChange: onChange,
26
- startDate: startDate,
27
- endDate: endDate,
28
- selectsRange: true
29
- })
30
- });
31
- };
32
-
33
- exports.Calendar = Calendar;