@kitconcept/volto-light-theme 8.0.0-alpha.27 → 8.0.0-alpha.29

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 (118) hide show
  1. package/.changelog.draft +26 -1
  2. package/CHANGELOG.md +34 -0
  3. package/locales/af/LC_MESSAGES/volto.po +645 -0
  4. package/locales/ar/LC_MESSAGES/volto.po +645 -0
  5. package/locales/bg/LC_MESSAGES/volto.po +645 -0
  6. package/locales/bn/LC_MESSAGES/volto.po +645 -0
  7. package/locales/ca/LC_MESSAGES/volto.po +645 -0
  8. package/locales/cs/LC_MESSAGES/volto.po +645 -0
  9. package/locales/cy/LC_MESSAGES/volto.po +645 -0
  10. package/locales/da/LC_MESSAGES/volto.po +645 -0
  11. package/locales/de/LC_MESSAGES/volto.po +58 -57
  12. package/locales/el/LC_MESSAGES/volto.po +645 -0
  13. package/locales/en_AU/LC_MESSAGES/volto.po +645 -0
  14. package/locales/en_GB/LC_MESSAGES/volto.po +645 -0
  15. package/locales/eo/LC_MESSAGES/volto.po +645 -0
  16. package/locales/es/LC_MESSAGES/volto.po +50 -50
  17. package/locales/et/LC_MESSAGES/volto.po +645 -0
  18. package/locales/eu/LC_MESSAGES/volto.po +7 -7
  19. package/locales/fa/LC_MESSAGES/volto.po +645 -0
  20. package/locales/fi/LC_MESSAGES/volto.po +645 -0
  21. package/locales/fr/LC_MESSAGES/volto.po +645 -0
  22. package/locales/fu/LC_MESSAGES/volto.po +645 -0
  23. package/locales/ga/LC_MESSAGES/volto.po +645 -0
  24. package/locales/gl/LC_MESSAGES/volto.po +645 -0
  25. package/locales/he/LC_MESSAGES/volto.po +645 -0
  26. package/locales/hi/LC_MESSAGES/volto.po +645 -0
  27. package/locales/hr/LC_MESSAGES/volto.po +645 -0
  28. package/locales/hu/LC_MESSAGES/volto.po +645 -0
  29. package/locales/hy/LC_MESSAGES/volto.po +645 -0
  30. package/locales/id/LC_MESSAGES/volto.po +645 -0
  31. package/locales/it/LC_MESSAGES/volto.po +645 -0
  32. package/locales/ja/LC_MESSAGES/volto.po +645 -0
  33. package/locales/ka/LC_MESSAGES/volto.po +645 -0
  34. package/locales/kn/LC_MESSAGES/volto.po +645 -0
  35. package/locales/ko/LC_MESSAGES/volto.po +645 -0
  36. package/locales/lt/LC_MESSAGES/volto.po +645 -0
  37. package/locales/lv/LC_MESSAGES/volto.po +645 -0
  38. package/locales/mi/LC_MESSAGES/volto.po +645 -0
  39. package/locales/mk_MK/LC_MESSAGES/volto.po +645 -0
  40. package/locales/ms/LC_MESSAGES/volto.po +645 -0
  41. package/locales/mt/LC_MESSAGES/volto.po +645 -0
  42. package/locales/my/LC_MESSAGES/volto.po +645 -0
  43. package/locales/nl/LC_MESSAGES/volto.po +645 -0
  44. package/locales/nl_BE/LC_MESSAGES/volto.po +645 -0
  45. package/locales/nn/LC_MESSAGES/volto.po +645 -0
  46. package/locales/no/LC_MESSAGES/volto.po +645 -0
  47. package/locales/pl/LC_MESSAGES/volto.po +645 -0
  48. package/locales/pt/LC_MESSAGES/volto.po +645 -0
  49. package/locales/rm/LC_MESSAGES/volto.po +645 -0
  50. package/locales/ro/LC_MESSAGES/volto.po +645 -0
  51. package/locales/ru/LC_MESSAGES/volto.po +645 -0
  52. package/locales/sk/LC_MESSAGES/volto.po +645 -0
  53. package/locales/sl/LC_MESSAGES/volto.po +645 -0
  54. package/locales/sm/LC_MESSAGES/volto.po +645 -0
  55. package/locales/sq/LC_MESSAGES/volto.po +645 -0
  56. package/locales/sr/LC_MESSAGES/volto.po +645 -0
  57. package/locales/sr_Cyrl/LC_MESSAGES/volto.po +645 -0
  58. package/locales/sr_Latn/LC_MESSAGES/volto.po +645 -0
  59. package/locales/sv/LC_MESSAGES/volto.po +645 -0
  60. package/locales/sw/LC_MESSAGES/volto.po +645 -0
  61. package/locales/ta/LC_MESSAGES/volto.po +645 -0
  62. package/locales/te/LC_MESSAGES/volto.po +645 -0
  63. package/locales/th/LC_MESSAGES/volto.po +645 -0
  64. package/locales/tl/LC_MESSAGES/volto.po +645 -0
  65. package/locales/to/LC_MESSAGES/volto.po +645 -0
  66. package/locales/tr/LC_MESSAGES/volto.po +645 -0
  67. package/locales/uk/LC_MESSAGES/volto.po +645 -0
  68. package/locales/vi/LC_MESSAGES/volto.po +645 -0
  69. package/locales/zh_CN/LC_MESSAGES/volto.po +645 -0
  70. package/locales/zh_HK/LC_MESSAGES/volto.po +645 -0
  71. package/locales/zh_TW/LC_MESSAGES/volto.po +645 -0
  72. package/package.json +5 -5
  73. package/src/components/Blocks/Button/schema.js +12 -0
  74. package/src/components/Blocks/Image/Edit.jsx +8 -32
  75. package/src/components/Blocks/Image/View.jsx +9 -26
  76. package/src/components/Blocks/Image/adapter.js +28 -14
  77. package/src/components/Blocks/Image/adapter.test.js +156 -0
  78. package/src/components/Blocks/Image/schema.js +21 -7
  79. package/src/components/Blocks/Listing/GridTemplate.jsx +1 -0
  80. package/src/components/Blocks/Listing/SummaryTemplate.jsx +1 -0
  81. package/src/components/Blocks/Maps/MapsSidebar.jsx +68 -0
  82. package/src/components/Blocks/Maps/View.jsx +37 -0
  83. package/src/components/Blocks/Maps/adapter.js +27 -0
  84. package/src/components/Blocks/Maps/adapter.test.js +63 -0
  85. package/src/components/Blocks/Maps/schema.js +42 -2
  86. package/src/components/Blocks/Separator/schema.js +12 -0
  87. package/src/components/Blocks/Teaser/DefaultBody.tsx +10 -1
  88. package/src/components/Blocks/Video/VideoSidebar.jsx +68 -0
  89. package/src/components/Blocks/Video/View.jsx +38 -0
  90. package/src/components/Blocks/Video/adapter.js +28 -0
  91. package/src/components/Blocks/Video/adapter.test.js +63 -0
  92. package/src/components/Blocks/Video/schema.js +42 -2
  93. package/src/components/Footer/Footer.tsx +2 -2
  94. package/src/components/Footer/slots/FollowUsLogoAndLinks.tsx +12 -23
  95. package/src/components/Theme/ImageView.jsx +8 -1
  96. package/src/components/Widgets/ObjectList.tsx +37 -27
  97. package/src/config/blocks.tsx +63 -0
  98. package/src/config/classExtenders.ts +11 -10
  99. package/src/config/settings.ts +6 -0
  100. package/src/customizations/volto/components/manage/Blocks/Maps/MapsSidebar.jsx +10 -0
  101. package/src/customizations/volto/components/manage/Blocks/Maps/View.jsx +10 -0
  102. package/src/customizations/volto/components/manage/Blocks/Video/VideoSidebar.jsx +10 -0
  103. package/src/customizations/volto/components/manage/Blocks/Video/View.jsx +10 -0
  104. package/src/index.ts +8 -0
  105. package/src/primitives/Card/Card.tsx +4 -1
  106. package/src/theme/_bgcolor-blocks-layout.scss +1 -1
  107. package/src/theme/_footer.scss +61 -51
  108. package/src/theme/_layout.scss +7 -62
  109. package/src/theme/_typo-custom.scss +1 -1
  110. package/src/theme/_variables.scss +21 -0
  111. package/src/theme/blocks/_grid.scss +1 -0
  112. package/src/theme/blocks/_highlight.scss +10 -7
  113. package/src/theme/blocks/_image.scss +96 -186
  114. package/src/theme/blocks/_listing.scss +5 -1
  115. package/src/theme/blocks/_maps.scss +60 -34
  116. package/src/transforms/to6.ts +5 -49
  117. package/src/transforms/to8.test.js +201 -0
  118. package/src/transforms/to8.ts +109 -0
@@ -4,145 +4,80 @@ figure {
4
4
  margin: 0;
5
5
  }
6
6
 
7
- .block.image.has--block-width--full figcaption {
8
- padding-right: 25px;
9
- padding-left: 25px;
10
- }
11
-
12
- .block.image {
7
+ .block.image,
8
+ .block-editor-image {
9
+ --align-left: left;
10
+ --align-center: none;
11
+ --align-right: right;
13
12
  margin: 0;
13
+ margin-top: $spacing-large;
14
14
 
15
- &.align.left,
16
- &.align.right {
17
- // This is to equal the heading margin in case of the
18
- // floating image + heading use case
19
- // It matches the mocks for standalone images anyways
20
- margin-top: $spacing-large;
21
- margin-bottom: 0 !important;
15
+ &.has--block-width--full {
16
+ figcaption {
17
+ padding-right: 25px;
18
+ padding-left: 25px;
19
+ }
22
20
  }
23
21
 
24
22
  &.has--block-width--default,
23
+ &.has--block-width--layout,
25
24
  &.has--block-width--narrow,
26
25
  &.has--block-width--full {
27
- figure:not(.left, .right) {
26
+ figure {
28
27
  margin-top: $spacing-large;
29
28
  margin-bottom: $spacing-large;
30
29
  }
31
30
  }
32
31
 
33
- figure {
34
- img {
35
- width: 100% !important;
36
- height: auto;
37
- aspect-ratio: var(--image-aspect-ratio, auto);
38
- }
39
-
40
- &.right {
41
- margin-bottom: 20px;
42
- margin-left: 20px;
43
- float: right;
44
-
32
+ &.has--block-alignment--left,
33
+ &.has--block-alignment--right {
34
+ margin-bottom: 0 !important;
35
+ figure {
36
+ margin-top: 0 !important;
37
+ margin-bottom: $spacing-small;
45
38
  @container (max-width: #{$largest-mobile-screen}) {
39
+ max-width: unset !important;
46
40
  margin-bottom: $spacing-large;
47
41
  }
48
42
 
49
43
  img {
50
- margin-right: 0 !important;
51
- margin-bottom: 0px;
52
- margin-left: 0 !important;
44
+ margin: 0 !important;
53
45
  float: none;
54
46
  }
55
47
  }
56
-
57
- &.left {
58
- margin-right: 20px;
59
- margin-bottom: 20px;
60
- float: left;
61
-
62
- @container (max-width: #{$largest-mobile-screen}) {
63
- margin-bottom: $spacing-large;
64
- }
65
-
66
- img {
67
- margin-right: 0 !important;
68
- margin-bottom: 0px;
69
- float: none;
48
+ &.small {
49
+ figure {
50
+ max-width: 220px;
70
51
  }
71
52
  }
72
53
 
73
- &.left,
74
- &.right {
75
- &.large {
76
- width: 50%;
77
- height: auto;
78
-
79
- @media only screen and (max-width: 768px) {
80
- width: 100%;
81
- }
82
- }
83
-
84
- &.medium {
85
- width: 50%;
86
- height: auto;
87
- @media only screen and (max-width: 768px) {
88
- width: 100%;
89
- }
90
- }
91
-
92
- &.small {
93
- width: 25%;
94
- height: auto;
95
- @media only screen and (max-width: 768px) {
96
- width: 100%;
97
- }
54
+ &.medium {
55
+ figure {
56
+ max-width: 300px;
98
57
  }
99
58
  }
59
+ }
100
60
 
101
- &.wide,
102
- &.full {
103
- margin-top: $spacing-large;
104
- margin-bottom: $spacing-large;
61
+ &.has--block-alignment--left {
62
+ figure {
63
+ @include floated-figure('left');
105
64
  }
65
+ }
106
66
 
107
- &.center {
108
- width: 100% !important;
109
- margin-right: auto !important;
110
- margin-bottom: $spacing-large;
111
- margin-left: auto !important;
112
- object-fit: cover;
113
-
114
- img {
115
- height: auto;
116
- margin-right: initial;
117
- margin-left: initial;
118
- }
119
-
120
- &.large,
121
- &.medium,
122
- &.small {
123
- width: 100% !important;
124
- }
125
-
126
- &.large {
127
- figcaption {
128
- text-align: start;
129
- }
130
- }
131
-
132
- &.medium {
133
- figcaption {
134
- width: 100%;
135
- margin-right: auto;
136
- margin-left: auto;
137
- text-align: start;
138
- }
139
- }
67
+ &.has--block-alignment--right {
68
+ figure {
69
+ @include floated-figure('right');
140
70
  }
141
71
  }
142
72
 
143
- img {
144
- max-width: 100% !important;
145
- height: auto;
73
+ figure {
74
+ width: 100%;
75
+ img {
76
+ width: 100% !important;
77
+ max-width: 100% !important;
78
+ height: auto;
79
+ aspect-ratio: var(--image-aspect-ratio, auto);
80
+ }
146
81
  }
147
82
  }
148
83
 
@@ -181,72 +116,36 @@ figcaption {
181
116
 
182
117
  // video block
183
118
 
184
- #page-document .block.video.align.left,
185
- .block.video.align.left,
186
- #page-document .block.video.align.right,
187
- .block.video.align.right {
188
- @include default-container-width;
189
- }
190
-
191
- #page-document .block.video.align.center figure,
192
- .block.video.align.center figure {
193
- @include default-container-width;
194
- }
195
-
196
- .block.video {
197
- .figure {
198
- width: 100%;
199
- }
200
-
201
- &.full figcaption {
202
- padding-right: 25px;
203
- padding-left: 25px;
204
- }
205
-
206
- &.wide,
207
- &.full,
208
- &.center {
209
- margin-top: $spacing-large;
210
- margin-bottom: $spacing-large;
211
- }
212
-
213
- &.align.left.has--backgroundColor--grey figure,
214
- &.align.right.has--backgroundColor--grey figure {
215
- padding-top: 25px;
216
- }
119
+ .block.video,
120
+ .block-editor-video {
121
+ margin-top: $spacing-large;
122
+ .video-inner {
123
+ @include variable-container-width();
217
124
 
218
- &.align.left.has--backgroundColor--grey,
219
- &.align.right.has--backgroundColor--grey {
220
- margin-top: 0px;
221
- margin-bottom: 0px;
125
+ .placeholder {
126
+ width: 100% !important;
127
+ }
222
128
  }
223
-
224
- &.align.left,
225
- &.align.right {
226
- margin-top: $spacing-large;
227
- margin-bottom: 0 !important;
228
-
129
+ &.has--block-alignment--left {
229
130
  .video-inner {
230
- margin-bottom: 20px !important;
231
- @media only screen and (max-width: $tablet-breakpoint) {
232
- width: 100%;
233
- }
234
- @container (max-width: #{$largest-mobile-screen}) {
235
- margin-bottom: $spacing-large !important;
236
- }
131
+ width: 100%;
132
+ @include floated-figure('left');
237
133
  }
134
+ }
238
135
 
239
- img {
240
- margin: 0 !important;
136
+ &.has--block-alignment--right {
137
+ .video-inner {
138
+ width: 100%;
139
+ @include floated-figure('right');
241
140
  }
242
141
  }
243
-
244
- &.align.left .video-inner {
245
- margin-right: 20px !important;
142
+ figure {
143
+ width: 100%;
246
144
  }
247
145
 
248
- &.align.right .video-inner {
249
- margin-left: 20px !important;
146
+ &.has--block-width--full figcaption {
147
+ padding-right: 25px;
148
+ padding-left: 25px;
250
149
  }
251
150
  }
252
151
 
@@ -371,35 +270,46 @@ figcaption {
371
270
  }
372
271
  }
373
272
 
374
- // Image block overrides
375
- #page-edit,
376
- #page-add {
377
- .block-editor-image figure.center {
378
- @include variable-container-width();
379
- }
380
-
381
- .block-editor-image.default figure {
382
- max-width: var(--default-container-width);
383
- }
384
- }
385
-
386
- #page-document .blocks-group-wrapper > .block.image.align.center {
387
- @include variable-container-width();
388
- }
389
- #page-document .blocks-group-wrapper > .block.image.align.center figure {
273
+ #page-document .blocks-group-wrapper > .block.image,
274
+ #page-document .blocks-group-wrapper > .block.video {
390
275
  @include variable-container-width();
391
276
  }
392
277
 
393
278
  #page-document .blocks-group-wrapper {
394
- & > .block.image.align.center.has--block-width--default {
395
- // Unfortunately needed to have more specificity than the top one
396
- // TODO: Remove when using layers and the BMv3
279
+ // Unfortunately needed to have more specificity than the top one
280
+ // TODO: Remove when using layers and the BMv3
281
+ & > .block.image.has--block-width--default,
282
+ & > .block.video.has--block-width--default {
397
283
  @include adjustMarginsToContainer($default-container-width);
398
284
  }
399
- & > .block.image.align.center.has--block-width--layout {
285
+ & > .block.image.has--block-width--layout,
286
+ & > .block.video.has--block-width--layout {
400
287
  @include adjustMarginsToContainer($layout-container-width);
401
288
  }
402
- & > .block.image.align.center.has--block-width--narrow {
289
+ & > .block.image.has--block-width--narrow,
290
+ & > .block.video.has--block-width--narrow {
403
291
  @include adjustMarginsToContainer($narrow-container-width);
404
292
  }
405
293
  }
294
+
295
+ // Edit block overrides
296
+ #page-edit,
297
+ #page-add {
298
+ .block-editor-image,
299
+ .block-editor-video {
300
+ &.has--block-alignment--right,
301
+ &.has--block-alignment--left {
302
+ .block .block:not(.inner)::before {
303
+ z-index: 1;
304
+ }
305
+ }
306
+ .block.inner .block .block {
307
+ z-index: 2;
308
+ @include variable-container-width();
309
+
310
+ &:before {
311
+ display: none;
312
+ }
313
+ }
314
+ }
315
+ }
@@ -43,6 +43,9 @@
43
43
  &.next--is--__button {
44
44
  .items > .listing-item:last-child {
45
45
  border-bottom: 1px solid var(--theme-font-color, black);
46
+ .card-inner {
47
+ padding-bottom: $spacing-medium;
48
+ }
46
49
  }
47
50
  }
48
51
  &.next--is--__button {
@@ -54,7 +57,7 @@
54
57
 
55
58
  .listing-item {
56
59
  border-bottom: 1px solid $black;
57
- margin-bottom: 40px;
60
+ margin-bottom: $spacing-medium;
58
61
  .card-summary {
59
62
  padding: 0;
60
63
 
@@ -165,6 +168,7 @@
165
168
  .card {
166
169
  flex-grow: 1;
167
170
  .card-inner {
171
+ padding-bottom: $spacing-medium !important;
168
172
  .image-wrapper {
169
173
  img {
170
174
  margin: 0;
@@ -1,50 +1,76 @@
1
- .block.maps {
2
- iframe {
3
- height: unset;
4
- aspect-ratio: var(--image-aspect-ratio, $aspect-ratio);
5
- }
6
- &.align.left {
1
+ .block.maps,
2
+ .block-editor-maps {
3
+ margin-top: $spacing-large;
4
+ margin-bottom: $spacing-large;
5
+ .maps-inner {
6
+ @include variable-container-width();
7
+
7
8
  iframe {
8
9
  height: unset;
9
- margin-right: 20px !important;
10
- margin-bottom: 20px !important;
11
10
  aspect-ratio: var(--image-aspect-ratio, $aspect-ratio);
12
- @container (max-width: #{$largest-mobile-screen}) {
13
- margin-bottom: $spacing-large !important;
14
- }
15
11
  }
16
- margin-top: $spacing-large;
17
- margin-bottom: 0 !important;
18
12
  }
19
- &.align.right {
20
- iframe {
21
- height: unset;
22
- margin-bottom: 20px !important;
23
- margin-left: 20px !important;
24
- aspect-ratio: var(--image-aspect-ratio, $aspect-ratio);
25
- @container (max-width: #{$largest-mobile-screen}) {
26
- margin-bottom: $spacing-large !important;
27
- }
13
+ &.has--block-alignment--left {
14
+ .maps-inner {
15
+ width: 100%;
16
+ @include floated-figure('left');
28
17
  }
29
- margin-top: $spacing-large;
30
- margin-bottom: 0 !important;
31
18
  }
32
19
 
33
- &.wide,
34
- &.full,
35
- &.center {
36
- margin-top: $spacing-large;
37
- margin-bottom: $spacing-large;
20
+ &.has--block-alignment--right {
21
+ .maps-inner {
22
+ width: 100%;
23
+ @include floated-figure('right');
24
+ }
25
+ }
26
+ &.has--block-alignment--left,
27
+ &.has--block-alignment--right {
28
+ margin-bottom: 0 !important;
29
+ @container (max-width: #{$largest-mobile-screen}) {
30
+ margin-bottom: $spacing-large !important;
31
+ }
38
32
  }
39
33
 
40
- &.align.full iframe {
34
+ &.has--block-width--full iframe {
41
35
  max-height: 600px;
42
36
  }
37
+ }
43
38
 
44
- &.align.right iframe,
45
- &.align.left iframe {
46
- @container (max-width: #{$largest-mobile-screen}) {
47
- margin-bottom: $spacing-large !important;
39
+ #page-document .blocks-group-wrapper > .block.maps {
40
+ @include variable-container-width();
41
+ }
42
+
43
+ #page-document .blocks-group-wrapper {
44
+ // Unfortunately needed to have more specificity than the top one
45
+ // TODO: Remove when using layers and the BMv3
46
+ & > .block.maps.has--block-width--default {
47
+ @include adjustMarginsToContainer($default-container-width);
48
+ }
49
+ & > .block.maps.has--block-width--layout {
50
+ @include adjustMarginsToContainer($layout-container-width);
51
+ }
52
+ & > .block.maps.has--block-width--narrow {
53
+ @include adjustMarginsToContainer($narrow-container-width);
54
+ }
55
+ }
56
+
57
+ // Edit block overrides
58
+ #page-edit,
59
+ #page-add {
60
+ .block-editor-maps {
61
+ &.has--block-alignment--right,
62
+ &.has--block-alignment--left {
63
+ .block .block:not(.inner)::before {
64
+ z-index: 1;
65
+ }
66
+ }
67
+ .block.inner .block .block {
68
+ z-index: 2;
69
+ @include variable-container-width();
70
+
71
+ &:before {
72
+ display: none;
73
+ }
48
74
  }
49
75
  }
50
76
  }
@@ -1,9 +1,6 @@
1
1
  import type { BlocksFormData } from '@plone/types';
2
- import { findStyleByName } from '@plone/volto/helpers/Blocks/Blocks';
3
2
 
4
- import config from '@plone/volto/registry';
5
-
6
- function* visitBlocks(blocks) {
3
+ function* visitBlocks(blocks: any): Generator<any> {
7
4
  for (const key in blocks) {
8
5
  if (blocks.hasOwnProperty(key)) {
9
6
  const block = blocks[key];
@@ -16,17 +13,6 @@ function* visitBlocks(blocks) {
16
13
  }
17
14
 
18
15
  export function migrateToVLT6ColorAndWidthModel(data: BlocksFormData) {
19
- const NORMALIZED_WIDTHS = [
20
- ...config.blocks.widths,
21
- {
22
- style: {
23
- '--block-width': 'var(--default-container-width)',
24
- },
25
- name: 'wide',
26
- label: 'Default',
27
- },
28
- ];
29
-
30
16
  for (const block of visitBlocks(data.blocks)) {
31
17
  if (block?.styles?.backgroundColor) {
32
18
  if (block.styles.backgroundColor === 'transparent') {
@@ -41,10 +27,7 @@ export function migrateToVLT6ColorAndWidthModel(data: BlocksFormData) {
41
27
  ...block.styles,
42
28
  'blockWidth:noprefix':
43
29
  block.styles?.['blockWidth:noprefix'] ??
44
- findStyleByName(
45
- NORMALIZED_WIDTHS,
46
- `${block.styles?.buttonAlign === 'wide' ? 'default' : 'narrow'}`,
47
- ),
30
+ (block.styles?.buttonAlign === 'wide' ? 'default' : 'narrow'),
48
31
  };
49
32
 
50
33
  delete block.styles.buttonAlign;
@@ -54,41 +37,14 @@ export function migrateToVLT6ColorAndWidthModel(data: BlocksFormData) {
54
37
  block.styles = {
55
38
  ...block.styles,
56
39
  shortLine:
57
- block.styles?.['shortLine'] ?? block?.styles?.align === 'left'
58
- ? true
59
- : false,
60
- 'align:noprefix': block.styles?.['align:noprefix'] ?? {
61
- '--block-alignment': 'var(--align-left)',
62
- },
40
+ block.styles?.['shortLine'] ?? block?.styles?.align === 'left',
41
+ 'align:noprefix': block.styles?.['align:noprefix'] ?? 'left',
63
42
  'blockWidth:noprefix':
64
43
  block.styles?.['blockWidth:noprefix'] ??
65
- findStyleByName(
66
- NORMALIZED_WIDTHS,
67
- `${block.styles?.align === 'full' ? 'default' : 'narrow'}`,
68
- ),
44
+ (block.styles?.align === 'full' ? 'default' : 'narrow'),
69
45
  };
70
46
 
71
47
  delete block.styles.align;
72
48
  }
73
-
74
- if (
75
- block['@type'] === 'image' &&
76
- !['left', 'right'].includes(block?.align)
77
- ) {
78
- block.styles = {
79
- ...block.styles,
80
- 'blockWidth:noprefix':
81
- block.styles?.['blockWidth:noprefix'] ??
82
- findStyleByName(
83
- NORMALIZED_WIDTHS,
84
- block?.align === 'wide'
85
- ? 'default'
86
- : block?.align === 'center'
87
- ? 'narrow'
88
- : block.align,
89
- ),
90
- };
91
- block.align = 'center';
92
- }
93
49
  }
94
50
  }