@configuratorware/configurator-frontendgui 1.49.9 → 1.50.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 (107) hide show
  1. package/App/Error/ProductionErrorPage/index.js +5 -1
  2. package/App/Modules/Creator/Components/Incompatibility/OptionExclusionRule/index.js +2 -1
  3. package/App/Modules/Creator/Components/Incompatibility/OptionRule/index.js +2 -1
  4. package/App/Modules/Creator/Components/Incompatibility/index.js +1 -2
  5. package/App/Modules/Creator/Components/InvalidConfigurationNotice/index.js +8 -31
  6. package/App/Modules/Creator/Components/Option/index.js +18 -14
  7. package/App/Modules/Creator/Components/OptionAmount/index.js +11 -7
  8. package/App/Modules/Creator/Components/ProductPart/index.js +20 -25
  9. package/App/Modules/Creator/Components/ProductPartsList/index.js +0 -2
  10. package/App/Modules/Creator/Layouts/DefaultLayout.js +8 -9
  11. package/App/Modules/Designer/Components/AddGalleryImage/index.js +5 -2
  12. package/App/Modules/Designer/Components/DesignerSelectionToolbox/CustomFontOverlay.js +0 -2
  13. package/App/Modules/Designer/Components/Dialog/index.js +1 -3
  14. package/App/Modules/Designer/Components/ImageControlbox/index.js +1 -3
  15. package/App/Reducers/Reducer.js +8 -2
  16. package/App/Screens/Configurator/Components/Confirm/index.js +1 -5
  17. package/App/Screens/Configurator/Components/Error/index.js +0 -3
  18. package/App/Screens/Configurator/Components/FullScreenView/index.js +2 -5
  19. package/App/Screens/Configurator/Components/FullScreenView/index.test.js +1 -1
  20. package/App/Screens/Configurator/Components/PreviewPortal/index.js +23 -28
  21. package/App/Screens/Configurator/Components/Thumbnail/index.js +9 -6
  22. package/App/Screens/Configurator/ThemeProvider.js +7 -4
  23. package/App/Shared/Components/AccessibleButton/AccessibleButton.js +40 -0
  24. package/App/Shared/Components/AlertDialog/index.js +0 -3
  25. package/App/Shared/Components/AmountPrice/index.js +29 -20
  26. package/App/Shared/Components/Analytics/AnalyticsWrapper.js +7 -1
  27. package/App/Shared/Components/AutoFocusDialogContentContainer/AutoFocusDialogContentContainer.js +71 -0
  28. package/App/Shared/Components/BulkNames/index.js +9 -6
  29. package/App/Shared/Components/LoadConfiguration/index.js +0 -2
  30. package/App/Shared/Components/PdfDownload/index.js +0 -2
  31. package/App/Shared/Components/SaveConfiguration/index.js +3 -4
  32. package/App/Shared/Components/SendEmail/index.js +0 -2
  33. package/App/Shared/Components/ToolbarList/index.js +18 -16
  34. package/App/Shared/Hooks/useDialogId.js +19 -0
  35. package/Shared/Components/CustomDialog.js +77 -56
  36. package/package.json +4 -4
  37. package/public/invoke.js +1 -1
  38. package/public/translations/de_DE.json +2 -1
  39. package/public/translations/en_GB.json +2 -1
  40. package/scripts/utils/fileSystem.js +6 -1
  41. package/src/App/Error/ProductionErrorPage/index.js +27 -24
  42. package/src/App/Modules/Creator/Components/Incompatibility/OptionExclusionRule/index.js +1 -1
  43. package/src/App/Modules/Creator/Components/Incompatibility/OptionRule/index.js +1 -1
  44. package/src/App/Modules/Creator/Components/Incompatibility/index.js +1 -2
  45. package/src/App/Modules/Creator/Components/InvalidConfigurationNotice/index.js +10 -27
  46. package/src/App/Modules/Creator/Components/Option/__snapshots__/index.test.js.snap +142 -90
  47. package/src/App/Modules/Creator/Components/Option/index.js +30 -14
  48. package/src/App/Modules/Creator/Components/OptionAmount/__snapshots__/index.test.js.snap +31 -18
  49. package/src/App/Modules/Creator/Components/OptionAmount/index.js +7 -2
  50. package/src/App/Modules/Creator/Components/ProductPart/__snapshots__/index.test.js.snap +32 -24
  51. package/src/App/Modules/Creator/Components/ProductPart/index.js +20 -27
  52. package/src/App/Modules/Creator/Components/ProductPartsList/index.js +0 -2
  53. package/src/App/Modules/Creator/Layouts/DefaultLayout.js +12 -13
  54. package/src/App/Modules/Designer/Components/AddGalleryImage/__snapshots__/index.test.jsx.snap +1 -0
  55. package/src/App/Modules/Designer/Components/AddGalleryImage/index.js +4 -1
  56. package/src/App/Modules/Designer/Components/DesignerSelectionToolbox/CustomFontOverlay.js +0 -2
  57. package/src/App/Modules/Designer/Components/Dialog/index.js +1 -1
  58. package/src/App/Modules/Designer/Components/ImageControlbox/index.js +0 -2
  59. package/src/App/Reducers/Reducer.js +7 -0
  60. package/src/App/Screens/Configurator/Components/Confirm/index.js +1 -3
  61. package/src/App/Screens/Configurator/Components/Error/index.js +2 -11
  62. package/src/App/Screens/Configurator/Components/FullScreenView/__snapshots__/index.test.jsx.snap +3 -4
  63. package/src/App/Screens/Configurator/Components/FullScreenView/index.js +17 -17
  64. package/src/App/Screens/Configurator/Components/FullScreenView/index.test.jsx +1 -1
  65. package/src/App/Screens/Configurator/Components/PreviewPortal/index.js +23 -32
  66. package/src/App/Screens/Configurator/Components/Thumbnail/__snapshots__/index.test.jsx.snap +32 -8
  67. package/src/App/Screens/Configurator/Components/Thumbnail/index.js +8 -5
  68. package/src/App/Screens/Configurator/ThemeProvider.js +6 -3
  69. package/src/App/Shared/Components/AccessibleButton/AccessibleButton.js +29 -0
  70. package/src/App/Shared/Components/AlertDialog/index.js +1 -6
  71. package/src/App/Shared/Components/AmountPrice/__snapshots__/index.test.jsx.snap +15 -15
  72. package/src/App/Shared/Components/AmountPrice/index.js +31 -21
  73. package/src/App/Shared/Components/Analytics/AnalyticsWrapper.js +6 -0
  74. package/src/App/Shared/Components/AutoFocusDialogContentContainer/AutoFocusDialogContentContainer.jsx +52 -0
  75. package/src/App/Shared/Components/BulkNames/index.js +11 -6
  76. package/src/App/Shared/Components/LoadConfiguration/index.js +0 -2
  77. package/src/App/Shared/Components/PdfDownload/index.js +0 -2
  78. package/src/App/Shared/Components/SaveConfiguration/index.js +6 -4
  79. package/src/App/Shared/Components/SendEmail/index.js +0 -2
  80. package/src/App/Shared/Components/ToolbarList/__snapshots__/ToolbarList.test.js.snap +44 -20
  81. package/src/App/Shared/Components/ToolbarList/index.js +30 -27
  82. package/src/App/Shared/Hooks/useDialogId.js +11 -0
  83. package/src/Shared/Components/CustomDialog.js +60 -43
  84. package/App/Modules/Creator/Components/LoginForm/Styles.scss +0 -9
  85. package/App/Modules/Creator/Components/LoginForm/index.js +0 -91
  86. package/App/Modules/Creator/Components/SavedConfiguration/Styles.scss +0 -19
  87. package/App/Modules/Creator/Components/SavedConfiguration/index.js +0 -50
  88. package/App/Modules/Creator/Components/ShareConfiguration/Styles.scss +0 -23
  89. package/App/Modules/Creator/Components/ShareConfiguration/index.js +0 -165
  90. package/App/Modules/Creator/Components/StockInformation/index.js +0 -62
  91. package/App/Modules/Creator/Components/StoreConfigurationForm/Styles.scss +0 -5
  92. package/App/Modules/Creator/Components/StoreConfigurationForm/index.js +0 -86
  93. package/App/Modules/Creator/Components/ValidationResult/Styles.scss +0 -45
  94. package/App/Modules/Creator/Components/ValidationResult/index.js +0 -119
  95. package/App/Modules/Creator/Components/index.js +0 -57
  96. package/src/App/Modules/Creator/Components/LoginForm/Styles.scss +0 -9
  97. package/src/App/Modules/Creator/Components/LoginForm/index.js +0 -69
  98. package/src/App/Modules/Creator/Components/SavedConfiguration/Styles.scss +0 -19
  99. package/src/App/Modules/Creator/Components/SavedConfiguration/index.js +0 -37
  100. package/src/App/Modules/Creator/Components/ShareConfiguration/Styles.scss +0 -23
  101. package/src/App/Modules/Creator/Components/ShareConfiguration/index.js +0 -161
  102. package/src/App/Modules/Creator/Components/StockInformation/index.js +0 -39
  103. package/src/App/Modules/Creator/Components/StoreConfigurationForm/Styles.scss +0 -5
  104. package/src/App/Modules/Creator/Components/StoreConfigurationForm/index.js +0 -73
  105. package/src/App/Modules/Creator/Components/ValidationResult/Styles.scss +0 -45
  106. package/src/App/Modules/Creator/Components/ValidationResult/index.js +0 -89
  107. package/src/App/Modules/Creator/Components/index.js +0 -51
@@ -2,8 +2,11 @@
2
2
 
3
3
  exports[`Option calls the children prop if provided 1`] = `
4
4
  <div
5
- class="Option-root-133 custom-css-option"
5
+ aria-disabled="false"
6
+ class="MuiButtonBase-root AccessibleButton-root-146 Option-root-142 custom-css-option"
6
7
  data-option="010002011000"
8
+ role="button"
9
+ tabindex="0"
7
10
  >
8
11
  <div
9
12
  class="content 010002011000"
@@ -23,44 +26,50 @@ exports[`Option calls the render prop if provided 1`] = `
23
26
 
24
27
  exports[`Option renders with Delay link 1`] = `
25
28
  <div
26
- class="Option-root-85 custom-css-option"
29
+ aria-disabled="false"
30
+ class="MuiButtonBase-root AccessibleButton-root-95 Option-root-91 custom-css-option"
27
31
  data-option="010002011000"
32
+ role="button"
33
+ tabindex="0"
28
34
  >
29
35
  <div
30
36
  class="content 010002011000"
31
37
  >
32
38
  <div
33
- class="Option-image-84"
39
+ class="Option-image-90"
34
40
  />
35
41
  <div
36
- class="Option-text-86"
42
+ class="Option-text-92"
37
43
  >
38
44
  <div
39
45
  class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12"
40
46
  >
41
47
  <div
42
- class="MuiTypography-root Option-optionList-82 MuiTypography-body2"
48
+ class="MuiTypography-root Option-optionList-88 MuiTypography-body2"
43
49
  >
44
50
  <div
45
- class="Option-title-83"
51
+ class="Option-title-89"
46
52
  >
47
53
  Argentina 1000
48
54
  </div>
49
55
  <div
50
- class="Option-price-79"
56
+ class="Option-price-85"
51
57
  >
52
58
  € 123.00
53
59
  </div>
54
60
  <div
55
- class="Option-details-80"
61
+ class="Option-details-86"
56
62
  >
57
63
  <div>
58
64
  <a
59
- class="Option-iconWithText-81"
65
+ aria-disabled="false"
66
+ class="MuiButtonBase-root AccessibleButton-root-95 Option-iconWithText-87"
67
+ role="button"
68
+ tabindex="0"
60
69
  >
61
70
  <svg
62
71
  aria-hidden="true"
63
- class="MuiSvgIcon-root Option-materialIcon-78"
72
+ class="MuiSvgIcon-root Option-materialIcon-84"
64
73
  focusable="false"
65
74
  viewBox="0 0 24 24"
66
75
  >
@@ -84,44 +93,50 @@ exports[`Option renders with Delay link 1`] = `
84
93
 
85
94
  exports[`Option renders with Incompatibility link 1`] = `
86
95
  <div
87
- class="Option-root-61 custom-css-option"
96
+ aria-disabled="false"
97
+ class="MuiButtonBase-root AccessibleButton-root-69 Option-root-65 custom-css-option"
88
98
  data-option="010002011000"
99
+ role="button"
100
+ tabindex="0"
89
101
  >
90
102
  <div
91
103
  class="content 010002011000"
92
104
  >
93
105
  <div
94
- class="Option-image-60"
106
+ class="Option-image-64"
95
107
  />
96
108
  <div
97
- class="Option-text-62"
109
+ class="Option-text-66"
98
110
  >
99
111
  <div
100
112
  class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12"
101
113
  >
102
114
  <div
103
- class="MuiTypography-root Option-optionList-58 MuiTypography-body2"
115
+ class="MuiTypography-root Option-optionList-62 MuiTypography-body2"
104
116
  >
105
117
  <div
106
- class="Option-title-59"
118
+ class="Option-title-63"
107
119
  >
108
120
  Argentina 1000
109
121
  </div>
110
122
  <div
111
- class="Option-price-55"
123
+ class="Option-price-59"
112
124
  >
113
125
  € 123.00
114
126
  </div>
115
127
  <div
116
- class="Option-details-56"
128
+ class="Option-details-60"
117
129
  >
118
130
  <div>
119
131
  <a
120
- class="Option-iconWithText-57"
132
+ aria-disabled="false"
133
+ class="MuiButtonBase-root AccessibleButton-root-69 Option-iconWithText-61"
134
+ role="button"
135
+ tabindex="0"
121
136
  >
122
137
  <svg
123
138
  aria-hidden="true"
124
- class="MuiSvgIcon-root Option-materialIcon-54 custom-css-rule-info-icon-option"
139
+ class="MuiSvgIcon-root Option-materialIcon-58 custom-css-rule-info-icon-option"
125
140
  focusable="false"
126
141
  viewBox="0 0 24 24"
127
142
  >
@@ -130,7 +145,7 @@ exports[`Option renders with Incompatibility link 1`] = `
130
145
  />
131
146
  </svg>
132
147
  <p
133
- class="MuiTypography-root Option-iconWithText-57 MuiTypography-body2"
148
+ class="MuiTypography-root Option-iconWithText-61 MuiTypography-body2"
134
149
  />
135
150
  </a>
136
151
  </div>
@@ -144,43 +159,46 @@ exports[`Option renders with Incompatibility link 1`] = `
144
159
 
145
160
  exports[`Option renders with Not Available link 1`] = `
146
161
  <div
147
- class="Option-root-73 custom-css-option"
162
+ aria-disabled="false"
163
+ class="MuiButtonBase-root AccessibleButton-root-82 Option-root-78 custom-css-option"
148
164
  data-option="010002011000"
165
+ role="button"
166
+ tabindex="0"
149
167
  >
150
168
  <div
151
169
  class="content 010002011000 disabled"
152
170
  >
153
171
  <div
154
- class="Option-image-72"
172
+ class="Option-image-77"
155
173
  />
156
174
  <div
157
- class="Option-text-74"
175
+ class="Option-text-79"
158
176
  >
159
177
  <div
160
178
  class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12"
161
179
  >
162
180
  <div
163
- class="MuiTypography-root Option-optionList-70 MuiTypography-body2"
181
+ class="MuiTypography-root Option-optionList-75 MuiTypography-body2"
164
182
  >
165
183
  <div
166
- class="Option-title-71"
184
+ class="Option-title-76"
167
185
  >
168
186
  Argentina 1000
169
187
  </div>
170
188
  <div
171
- class="Option-price-67"
189
+ class="Option-price-72"
172
190
  >
173
191
  € 123.00
174
192
  </div>
175
193
  <div
176
- class="Option-details-68"
194
+ class="Option-details-73"
177
195
  >
178
196
  <div
179
- class="Option-iconWithText-69"
197
+ class="Option-iconWithText-74"
180
198
  >
181
199
  <svg
182
200
  aria-hidden="true"
183
- class="MuiSvgIcon-root Option-materialIcon-66"
201
+ class="MuiSvgIcon-root Option-materialIcon-71"
184
202
  focusable="false"
185
203
  viewBox="0 0 24 24"
186
204
  >
@@ -203,36 +221,39 @@ exports[`Option renders with Not Available link 1`] = `
203
221
 
204
222
  exports[`Option renders with Option Group button 1`] = `
205
223
  <div
206
- class="Option-root-97 custom-css-option"
224
+ aria-disabled="false"
225
+ class="MuiButtonBase-root AccessibleButton-root-108 Option-root-104 custom-css-option"
207
226
  data-option="010002011000"
227
+ role="button"
228
+ tabindex="0"
208
229
  >
209
230
  <div
210
231
  class="content 010002011000"
211
232
  >
212
233
  <div
213
- class="Option-image-96"
234
+ class="Option-image-103"
214
235
  />
215
236
  <div
216
- class="Option-text-98"
237
+ class="Option-text-105"
217
238
  >
218
239
  <div
219
240
  class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12"
220
241
  >
221
242
  <div
222
- class="MuiTypography-root Option-optionList-94 MuiTypography-body2"
243
+ class="MuiTypography-root Option-optionList-101 MuiTypography-body2"
223
244
  >
224
245
  <div
225
- class="Option-title-95"
246
+ class="Option-title-102"
226
247
  >
227
248
  Argentina 1000
228
249
  </div>
229
250
  <div
230
- class="Option-price-91"
251
+ class="Option-price-98"
231
252
  >
232
253
  € 123.00
233
254
  </div>
234
255
  <div
235
- class="Option-details-92"
256
+ class="Option-details-99"
236
257
  >
237
258
  <div>
238
259
  <div
@@ -289,35 +310,38 @@ exports[`Option renders with Option Group button 1`] = `
289
310
 
290
311
  exports[`Option renders with TextInput 1`] = `
291
312
  <div
292
- class="Option-root-145 custom-css-option"
313
+ aria-disabled="false"
314
+ class="MuiButtonBase-root AccessibleButton-root-159 Option-root-155 custom-css-option"
293
315
  data-option="010002011000"
316
+ role="button"
317
+ tabindex="0"
294
318
  >
295
319
  <div
296
320
  class="content 010002011000"
297
321
  >
298
322
  <div
299
- class="Option-image-144"
323
+ class="Option-image-154"
300
324
  >
301
325
  <img
302
326
  src="/images/options/010002011000.png"
303
327
  />
304
328
  </div>
305
329
  <div
306
- class="Option-text-146"
330
+ class="Option-text-156"
307
331
  >
308
332
  <div
309
333
  class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12"
310
334
  >
311
335
  <div
312
- class="MuiTypography-root Option-optionList-142 MuiTypography-body2"
336
+ class="MuiTypography-root Option-optionList-152 MuiTypography-body2"
313
337
  >
314
338
  <div
315
- class="Option-title-143"
339
+ class="Option-title-153"
316
340
  >
317
341
  Argentina 1000
318
342
  </div>
319
343
  <div
320
- class="MuiFormControl-root MuiTextField-root Option-optionTextInput-148"
344
+ class="MuiFormControl-root MuiTextField-root Option-optionTextInput-158"
321
345
  translate="no"
322
346
  >
323
347
  <div
@@ -333,12 +357,12 @@ exports[`Option renders with TextInput 1`] = `
333
357
  </div>
334
358
  </div>
335
359
  <div
336
- class="Option-price-139"
360
+ class="Option-price-149"
337
361
  >
338
362
  € 123.00
339
363
  </div>
340
364
  <div
341
- class="Option-details-140"
365
+ class="Option-details-150"
342
366
  />
343
367
  </div>
344
368
  </div>
@@ -349,8 +373,11 @@ exports[`Option renders with TextInput 1`] = `
349
373
 
350
374
  exports[`Option renders with an available image 1`] = `
351
375
  <div
352
- class="Option-root-9 custom-css-option"
376
+ aria-disabled="false"
377
+ class="MuiButtonBase-root AccessibleButton-root-13 Option-root-9 custom-css-option"
353
378
  data-option="010002011000"
379
+ role="button"
380
+ tabindex="0"
354
381
  >
355
382
  <div
356
383
  class="content 010002011000"
@@ -393,44 +420,50 @@ exports[`Option renders with an available image 1`] = `
393
420
 
394
421
  exports[`Option renders with details 1`] = `
395
422
  <div
396
- class="Option-root-49 custom-css-option"
423
+ aria-disabled="false"
424
+ class="MuiButtonBase-root AccessibleButton-root-56 Option-root-52 custom-css-option"
397
425
  data-option="010002011000"
426
+ role="button"
427
+ tabindex="0"
398
428
  >
399
429
  <div
400
430
  class="content 010002011000"
401
431
  >
402
432
  <div
403
- class="Option-image-48"
433
+ class="Option-image-51"
404
434
  />
405
435
  <div
406
- class="Option-text-50"
436
+ class="Option-text-53"
407
437
  >
408
438
  <div
409
439
  class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12"
410
440
  >
411
441
  <div
412
- class="MuiTypography-root Option-optionList-46 MuiTypography-body2"
442
+ class="MuiTypography-root Option-optionList-49 MuiTypography-body2"
413
443
  >
414
444
  <div
415
- class="Option-title-47"
445
+ class="Option-title-50"
416
446
  >
417
447
  Argentina 1000
418
448
  </div>
419
449
  <div
420
- class="Option-price-43"
450
+ class="Option-price-46"
421
451
  >
422
452
  € 123.00
423
453
  </div>
424
454
  <div
425
- class="Option-details-44"
455
+ class="Option-details-47"
426
456
  >
427
457
  <div>
428
458
  <a
429
- class="Option-iconWithText-45"
459
+ aria-disabled="false"
460
+ class="MuiButtonBase-root AccessibleButton-root-56 Option-iconWithText-48"
461
+ role="button"
462
+ tabindex="0"
430
463
  >
431
464
  <svg
432
465
  aria-hidden="true"
433
- class="MuiSvgIcon-root Option-materialIcon-42 custom-css-rule-info-icon-option"
466
+ class="MuiSvgIcon-root Option-materialIcon-45 custom-css-rule-info-icon-option"
434
467
  focusable="false"
435
468
  viewBox="0 0 24 24"
436
469
  >
@@ -439,7 +472,7 @@ exports[`Option renders with details 1`] = `
439
472
  />
440
473
  </svg>
441
474
  <p
442
- class="MuiTypography-root Option-iconWithText-45 MuiTypography-body2"
475
+ class="MuiTypography-root Option-iconWithText-48 MuiTypography-body2"
443
476
  />
444
477
  </a>
445
478
  </div>
@@ -453,55 +486,64 @@ exports[`Option renders with details 1`] = `
453
486
 
454
487
  exports[`Option renders with selectable amount 1`] = `
455
488
  <div
456
- class="Option-root-33 custom-css-option"
489
+ aria-disabled="false"
490
+ class="MuiButtonBase-root AccessibleButton-root-39 Option-root-35 custom-css-option"
457
491
  data-option="010002011000"
492
+ role="button"
493
+ tabindex="0"
458
494
  >
459
495
  <div
460
- class="content 010002011000 Option-withAmount-35"
496
+ class="content 010002011000 Option-withAmount-37"
461
497
  >
462
498
  <div
463
- class="Option-image-32"
499
+ class="Option-image-34"
464
500
  />
465
501
  <div
466
- class="Option-text-34"
502
+ class="Option-text-36"
467
503
  >
468
504
  <div
469
505
  class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12"
470
506
  >
471
507
  <div
472
- class="MuiTypography-root Option-optionList-30 MuiTypography-body2"
508
+ class="MuiTypography-root Option-optionList-32 MuiTypography-body2"
473
509
  >
474
510
  <div
475
- class="Option-title-31"
511
+ class="Option-title-33"
476
512
  >
477
513
  Argentina 1000
478
514
  </div>
479
515
  <div
480
- class="Option-price-27"
516
+ class="Option-price-29"
481
517
  >
482
518
  € 123.00
483
519
  </div>
484
520
  <div
485
- class="Option-details-28"
521
+ class="Option-details-30"
486
522
  />
487
523
  </div>
488
524
  </div>
489
525
  </div>
490
526
  <div
491
- class="OptionAmount-root-40"
527
+ class="OptionAmount-root-43"
492
528
  >
493
- <svg
494
- aria-hidden="true"
495
- class="MuiSvgIcon-root OptionAmount-plus-38"
496
- focusable="false"
497
- viewBox="0 0 24 24"
529
+ <button
530
+ class="MuiButtonBase-root AccessibleButton-root-39"
531
+ tabindex="0"
532
+ type="button"
498
533
  >
499
- <path
500
- d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
501
- />
502
- </svg>
534
+ <svg
535
+ aria-hidden="true"
536
+ class="MuiSvgIcon-root OptionAmount-plus-41"
537
+ focusable="false"
538
+ viewBox="0 0 24 24"
539
+ >
540
+ <path
541
+ d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
542
+ />
543
+ </svg>
544
+ </button>
503
545
  <div
504
- class="MuiFormControl-root MuiTextField-root OptionAmount-value-39"
546
+ class="MuiFormControl-root MuiTextField-root OptionAmount-value-42"
505
547
  >
506
548
  <div
507
549
  class="MuiInputBase-root MuiInput-root MuiInput-underline MuiInputBase-formControl MuiInput-formControl"
@@ -514,16 +556,23 @@ exports[`Option renders with selectable amount 1`] = `
514
556
  />
515
557
  </div>
516
558
  </div>
517
- <svg
518
- aria-hidden="true"
519
- class="MuiSvgIcon-root OptionAmount-minus-37 disable"
520
- focusable="false"
521
- viewBox="0 0 24 24"
559
+ <button
560
+ class="MuiButtonBase-root AccessibleButton-root-39 Mui-disabled"
561
+ disabled=""
562
+ tabindex="-1"
563
+ type="button"
522
564
  >
523
- <path
524
- d="M19 13H5v-2h14v2z"
525
- />
526
- </svg>
565
+ <svg
566
+ aria-hidden="true"
567
+ class="MuiSvgIcon-root OptionAmount-minus-40 disable"
568
+ focusable="false"
569
+ viewBox="0 0 24 24"
570
+ >
571
+ <path
572
+ d="M19 13H5v-2h14v2z"
573
+ />
574
+ </svg>
575
+ </button>
527
576
  </div>
528
577
  </div>
529
578
  </div>
@@ -531,36 +580,39 @@ exports[`Option renders with selectable amount 1`] = `
531
580
 
532
581
  exports[`Option renders without an available image 1`] = `
533
582
  <div
534
- class="Option-root-21 custom-css-option"
583
+ aria-disabled="false"
584
+ class="MuiButtonBase-root AccessibleButton-root-26 Option-root-22 custom-css-option"
535
585
  data-option="010002011000"
586
+ role="button"
587
+ tabindex="0"
536
588
  >
537
589
  <div
538
590
  class="content 010002011000"
539
591
  >
540
592
  <div
541
- class="Option-image-20"
593
+ class="Option-image-21"
542
594
  />
543
595
  <div
544
- class="Option-text-22"
596
+ class="Option-text-23"
545
597
  >
546
598
  <div
547
599
  class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12"
548
600
  >
549
601
  <div
550
- class="MuiTypography-root Option-optionList-18 MuiTypography-body2"
602
+ class="MuiTypography-root Option-optionList-19 MuiTypography-body2"
551
603
  >
552
604
  <div
553
- class="Option-title-19"
605
+ class="Option-title-20"
554
606
  >
555
607
  Argentina 1000
556
608
  </div>
557
609
  <div
558
- class="Option-price-15"
610
+ class="Option-price-16"
559
611
  >
560
612
  € 123.00
561
613
  </div>
562
614
  <div
563
- class="Option-details-16"
615
+ class="Option-details-17"
564
616
  />
565
617
  </div>
566
618
  </div>
@@ -20,6 +20,7 @@ import customClassName from 'App/Utils/customClassName';
20
20
  import OptionAmount from '../OptionAmount';
21
21
  import OptionGroup from '../OptionGroup';
22
22
  import getImageUrl from '../../../../Utils/getImageUrl';
23
+ import AccessibleButton from '../../../../Shared/Components/AccessibleButton/AccessibleButton';
23
24
 
24
25
  const styles = theme => {
25
26
  const textWidthWithAmount =
@@ -48,12 +49,10 @@ const styles = theme => {
48
49
  description: {},
49
50
  materialIcon: {},
50
51
  price: {},
51
- details: {
52
- display: 'inline-block',
53
- },
52
+ details: {},
54
53
  iconWithText: {
55
54
  lineHeight: customValues.icon.lineHeight,
56
- display: 'flex',
55
+ display: 'inline-flex',
57
56
  verticalAlign: 'middle',
58
57
  '& $materialIcon': {
59
58
  float: 'left',
@@ -99,13 +98,14 @@ const styles = theme => {
99
98
  padding: 10,
100
99
  cursor: 'pointer',
101
100
  fontSize: customValues.textArea.fontSize,
102
- display: 'table',
103
- width: '94%',
101
+ display: 'flex',
102
+
104
103
  '& .content': {
105
104
  position: 'relative',
106
- display: 'table-cell',
105
+ display: 'flex',
107
106
  verticalAlign: 'middle',
108
107
  margin: 0,
108
+ flex: 1,
109
109
  },
110
110
  '& .disabled': {
111
111
  cursor: 'not-allowed',
@@ -319,10 +319,14 @@ const Option = ({ children, render, ...props }) => {
319
319
  case 'yellow':
320
320
  return (
321
321
  <div>
322
- <a className={classes.iconWithText} onClick={onLateDeliveryClicked}>
322
+ <AccessibleButton
323
+ component="a"
324
+ className={classes.iconWithText}
325
+ onClick={onLateDeliveryClicked}
326
+ >
323
327
  <RestoreRoundedIcon className={classes.materialIcon} />{' '}
324
328
  <Typography variant={'body2'}>{translations.lateDelivery}</Typography>
325
- </a>
329
+ </AccessibleButton>
326
330
  </div>
327
331
  );
328
332
  case 'green':
@@ -367,7 +371,11 @@ const Option = ({ children, render, ...props }) => {
367
371
  <div className={classes.details}>
368
372
  {displayDetails && (
369
373
  <div>
370
- <a className={classes.iconWithText} onClick={onDetailsClicked}>
374
+ <AccessibleButton
375
+ component="a"
376
+ className={classes.iconWithText}
377
+ onClick={onDetailsClicked}
378
+ >
371
379
  <InfoRoundedIcon
372
380
  className={clsx(
373
381
  classes.materialIcon,
@@ -377,7 +385,7 @@ const Option = ({ children, render, ...props }) => {
377
385
  <Typography variant={'body2'} className={classes.iconWithText}>
378
386
  {translations.details}
379
387
  </Typography>
380
- </a>
388
+ </AccessibleButton>
381
389
  </div>
382
390
  )}
383
391
 
@@ -423,7 +431,7 @@ const Option = ({ children, render, ...props }) => {
423
431
  };
424
432
 
425
433
  const renderControls = view => {
426
- if (isEnabled() && amountIsSelectable) {
434
+ if (isEnabled() && amountIsSelectable && OptionAmountComponent) {
427
435
  return (
428
436
  <OptionAmountComponent
429
437
  view={view}
@@ -498,7 +506,13 @@ const Option = ({ children, render, ...props }) => {
498
506
 
499
507
  const renderItem = () => {
500
508
  return (
501
- <div className={getRootClassName()} data-option={option.identifier} onClick={onOptionClicked}>
509
+ <AccessibleButton
510
+ component="div"
511
+ className={getRootClassName()}
512
+ data-option={option.identifier}
513
+ onClick={onOptionClicked}
514
+ notAccessible={props.notAccessible}
515
+ >
502
516
  <div className={getContentClassName()}>
503
517
  {typeof children === 'function' ? (
504
518
  children(getRenderProps())
@@ -514,7 +528,7 @@ const Option = ({ children, render, ...props }) => {
514
528
  </>
515
529
  )}
516
530
  </div>
517
- </div>
531
+ </AccessibleButton>
518
532
  );
519
533
  };
520
534
 
@@ -535,6 +549,7 @@ Option.defaultProps = {
535
549
  viewStockInformation: () => {},
536
550
  OptionAmountComponent: OptionAmount,
537
551
  OptionGroupComponent: OptionGroup,
552
+ notAccessible: false,
538
553
  };
539
554
 
540
555
  Option.propTypes = {
@@ -554,6 +569,7 @@ Option.propTypes = {
554
569
  isAdminMode: PropTypes.bool,
555
570
  children: PropTypes.func,
556
571
  render: PropTypes.func,
572
+ notAccessible: PropTypes.bool,
557
573
  };
558
574
 
559
575
  export default withStyles(styles, { name: 'Option' })(Option);