@kitconcept/volto-light-theme 5.0.0 → 6.0.0-alpha.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 (112) hide show
  1. package/.changelog.draft +26 -10
  2. package/CHANGELOG.md +44 -0
  3. package/README.md +7 -367
  4. package/package.json +23 -10
  5. package/razzle.extend.js +38 -0
  6. package/src/components/Anontools/Anontools.jsx +1 -1
  7. package/src/components/Blocks/Button/schema.js +25 -5
  8. package/src/components/Blocks/EventMetadata/View.jsx +8 -7
  9. package/src/components/Blocks/Image/Edit.jsx +4 -6
  10. package/src/components/Blocks/Image/ImageSidebar.jsx +4 -2
  11. package/src/components/Blocks/Image/View.jsx +3 -6
  12. package/src/components/Blocks/Image/schema.js +37 -6
  13. package/src/components/Blocks/Listing/DefaultTemplate.jsx +3 -2
  14. package/src/components/Blocks/Listing/GridTemplate.jsx +4 -2
  15. package/src/components/Blocks/Listing/ImageGallery.jsx +2 -2
  16. package/src/components/Blocks/Listing/SummaryTemplate.jsx +3 -2
  17. package/src/components/Blocks/Search/components/SearchInput.jsx +1 -1
  18. package/src/components/Blocks/Separator/schema.js +59 -0
  19. package/src/components/Blocks/Slider/DefaultBody.jsx +4 -2
  20. package/src/components/Blocks/Teaser/schema.js +21 -1
  21. package/src/components/Blocks/schema.js +16 -15
  22. package/src/components/Breadcrumbs/Breadcrumbs.jsx +4 -3
  23. package/src/components/Footer/Footer.jsx +77 -27
  24. package/src/components/Header/Header.jsx +37 -30
  25. package/src/components/LanguageSelector/{LanguageSelector.js → LanguageSelector.jsx} +11 -7
  26. package/src/components/Logo/Logo.jsx +28 -22
  27. package/src/components/MobileNavigation/MobileNavigation.jsx +3 -2
  28. package/src/components/MobileNavigation/MobileToolsFooter.jsx +1 -1
  29. package/src/components/Navigation/Navigation.jsx +4 -3
  30. package/src/components/SearchWidget/IntranetSearchWidget.jsx +1 -1
  31. package/src/components/SearchWidget/SearchWidget.jsx +1 -1
  32. package/src/components/Theme/EventView.jsx +3 -2
  33. package/src/components/Theme/FileView.jsx +1 -1
  34. package/src/components/Theme/NewsItemView.jsx +1 -1
  35. package/src/components/Theming/Theming.tsx +52 -0
  36. package/src/components/Widgets/AlignWidget.jsx +2 -2
  37. package/src/components/Widgets/BackgroundColorWidget.tsx +18 -0
  38. package/src/components/Widgets/BlockAlignmentWidget.tsx +81 -0
  39. package/src/components/Widgets/BlockWidthWidget.tsx +94 -0
  40. package/src/components/Widgets/BlocksObjectWidget.tsx +333 -0
  41. package/src/components/Widgets/ButtonsWidget.tsx +68 -0
  42. package/src/components/Widgets/ColorPickerWidget.tsx +60 -0
  43. package/src/components/Widgets/FooterLinksWidget.tsx +106 -0
  44. package/src/components/Widgets/FooterLogosWidget.tsx +120 -0
  45. package/src/components/Widgets/ThemingColorPicker.tsx +33 -0
  46. package/src/config/blocks.tsx +352 -0
  47. package/src/config/classExtenders.ts +101 -0
  48. package/src/config/settings.ts +35 -0
  49. package/src/config/slots.ts +12 -0
  50. package/src/config/widgets.ts +31 -0
  51. package/src/customizations/volto/components/theme/View/RenderBlocks.jsx +97 -80
  52. package/src/customizations/volto/components/theme/View/RenderBlocks.test.jsx +16 -48
  53. package/src/helpers/helpers.test.ts +51 -0
  54. package/src/helpers/helpers.ts +48 -0
  55. package/src/index.ts +54 -0
  56. package/src/theme/_bgcolor-blocks-layout.scss +1127 -20
  57. package/src/theme/_footer.scss +8 -5
  58. package/src/theme/_header.scss +3 -8
  59. package/src/theme/_layout.scss +24 -7
  60. package/src/theme/_typo-custom.scss +1 -1
  61. package/src/theme/_variables.scss +95 -12
  62. package/src/theme/_widgets.scss +102 -0
  63. package/src/theme/blocks/_accordion.scss +2 -4
  64. package/src/theme/blocks/_button.scss +32 -31
  65. package/src/theme/blocks/_eventMetadata.scss +7 -0
  66. package/src/theme/blocks/_grid.scss +11 -36
  67. package/src/theme/blocks/_highlight.scss +1 -0
  68. package/src/theme/blocks/_image.scss +38 -17
  69. package/src/theme/blocks/_introduction.scss +16 -0
  70. package/src/theme/blocks/_listing.scss +1 -6
  71. package/src/theme/blocks/_search.scss +1 -23
  72. package/src/theme/blocks/_separator.scss +17 -20
  73. package/src/theme/blocks/_slider.scss +57 -56
  74. package/src/theme/blocks/_teaser.scss +3 -3
  75. package/src/theme/main.scss +1 -0
  76. package/src/transforms/to6.ts +94 -0
  77. package/tsconfig.json +33 -0
  78. package/.release-it.json +0 -31
  79. package/babel.config.js +0 -17
  80. package/build/messages/src/components/Anontools/Anontools.json +0 -10
  81. package/build/messages/src/components/Blocks/Button/schema.json +0 -6
  82. package/build/messages/src/components/Blocks/EventMetadata/View.json +0 -30
  83. package/build/messages/src/components/Blocks/Image/Edit.json +0 -10
  84. package/build/messages/src/components/Blocks/Image/ImageSidebar.json +0 -18
  85. package/build/messages/src/components/Blocks/Image/schema.json +0 -10
  86. package/build/messages/src/components/Blocks/Listing/ListingBody.json +0 -26
  87. package/build/messages/src/components/Blocks/Search/TopSideFacets.json +0 -10
  88. package/build/messages/src/components/Blocks/Search/components/SearchDetails.json +0 -10
  89. package/build/messages/src/components/Blocks/Search/components/SearchInput.json +0 -6
  90. package/build/messages/src/components/Blocks/Slider/DefaultBody.json +0 -18
  91. package/build/messages/src/components/Blocks/Slider/schema.json +0 -14
  92. package/build/messages/src/components/Blocks/schema.json +0 -6
  93. package/build/messages/src/components/Breadcrumbs/Breadcrumbs.json +0 -10
  94. package/build/messages/src/components/Footer/Footer.json +0 -30
  95. package/build/messages/src/components/Header/Header.json +0 -6
  96. package/build/messages/src/components/LanguageSelector/LanguageSelector.json +0 -6
  97. package/build/messages/src/components/Logo/Logo.json +0 -10
  98. package/build/messages/src/components/MobileNavigation/MobileNavigation.json +0 -26
  99. package/build/messages/src/components/Navigation/Navigation.json +0 -10
  100. package/build/messages/src/components/SearchWidget/IntranetSearchWidget.json +0 -14
  101. package/build/messages/src/components/SearchWidget/SearchWidget.json +0 -10
  102. package/build/messages/src/components/Theme/EventView.json +0 -6
  103. package/build/messages/src/components/Widgets/AlignWidget.json +0 -22
  104. package/build/messages/src/index.json +0 -10
  105. package/news/.gitkeep +0 -0
  106. package/src/components/Atoms/Container/Container.jsx +0 -32
  107. package/src/components/Atoms/README.md +0 -1
  108. package/src/components/Atoms/helpers.jsx +0 -9
  109. package/src/components/CQPolyfill.jsx +0 -9
  110. package/src/index.js +0 -367
  111. package/towncrier.toml +0 -33
  112. /package/src/components/Blocks/Slate/{ExtraAlignWrapper.js → ExtraAlignWrapper.jsx} +0 -0
package/.changelog.draft CHANGED
@@ -1,17 +1,33 @@
1
- ## 5.0.0 (2024-07-02)
1
+ ## 6.0.0-alpha.0 (2024-11-21)
2
2
 
3
3
  ### Breaking
4
4
 
5
- - Upgrade to a39, enable new image widget @sneridagh
5
+ - New colors definitions
6
+ New widths definitions
7
+ Moved the Image block and the button block to use the new block width widget.
8
+ The `full` image width now is really full width and spans from side to side of the viewport.
9
+ Removed Container Query Polyfill configuration profile
10
+ New Background widgets based in `@plone/components`
11
+ @danalvrz @sneridagh [#420](https://github.com/kitconcept/volto-light-theme/pull/420)
12
+ - Remove deprecated Atoms (Container) components. @sneridagh [#433](https://github.com/kitconcept/volto-light-theme/pull/433)
6
13
 
7
- Breaking:
8
- The new Image widget component is used in the VLT shadowed image component.
9
- The minimum Volto version requirements have changed for this reason.
10
- The new image widget is present in core from these versions on:
11
- - Volto 17.18.0
12
- - Volto 18.0.0-alpha.36
14
+ ### Feature
13
15
 
14
- For more information, please take a look at the upgrade guide:
15
- https://github.com/kitconcept/volto-light-theme/blob/main/UPGRADE-GUIDE.md [#405](https://github.com/kitconcept/volto-light-theme/pull/405)
16
+ - Add support for visual regression tests @reebalazs [#383](https://github.com/kitconcept/volto-light-theme/pull/383)
17
+ - Added `aspect-ratio` field to images.
18
+ Added a new block width widget.
19
+ Added optional footer links and footer logos (through custom content type behavior).
20
+ Added `aboveHeader` slot renderer (it holds the new `Theming` slot).
21
+ @danalvrz @sneridagh [#420](https://github.com/kitconcept/volto-light-theme/pull/420)
22
+
23
+ ### Internal
24
+
25
+ - Get rid of all imports from Volto barrel files.
26
+ Added a rule to enforce not to import from `@plone/volto/components`, `@plone/volto/helpers` or `@plone/volto/actions`. @sneridagh [#418](https://github.com/kitconcept/volto-light-theme/pull/418)
27
+ - Update to Volto 18a46 @sneridagh [#419](https://github.com/kitconcept/volto-light-theme/pull/419)
28
+
29
+ ### Documentation
30
+
31
+ - Add standard documentation @sneridagh [#423](https://github.com/kitconcept/volto-light-theme/pull/423)
16
32
 
17
33
 
package/CHANGELOG.md CHANGED
@@ -8,6 +8,50 @@
8
8
 
9
9
  <!-- towncrier release notes start -->
10
10
 
11
+ ## 6.0.0-alpha.0 (2024-11-21)
12
+
13
+ ### Breaking
14
+
15
+ - New colors definitions
16
+ New widths definitions
17
+ Moved the Image block and the button block to use the new block width widget.
18
+ The `full` image width now is really full width and spans from side to side of the viewport.
19
+ Removed Container Query Polyfill configuration profile
20
+ New Background widgets based in `@plone/components`
21
+ @danalvrz @sneridagh [#420](https://github.com/kitconcept/volto-light-theme/pull/420)
22
+ - Remove deprecated Atoms (Container) components. @sneridagh [#433](https://github.com/kitconcept/volto-light-theme/pull/433)
23
+
24
+ ### Feature
25
+
26
+ - Add support for visual regression tests @reebalazs [#383](https://github.com/kitconcept/volto-light-theme/pull/383)
27
+ - Added `aspect-ratio` field to images.
28
+ Added a new block width widget.
29
+ Added optional footer links and footer logos (through custom content type behavior).
30
+ Added `aboveHeader` slot renderer (it holds the new `Theming` slot).
31
+ @danalvrz @sneridagh [#420](https://github.com/kitconcept/volto-light-theme/pull/420)
32
+
33
+ ### Internal
34
+
35
+ - Get rid of all imports from Volto barrel files.
36
+ Added a rule to enforce not to import from `@plone/volto/components`, `@plone/volto/helpers` or `@plone/volto/actions`. @sneridagh [#418](https://github.com/kitconcept/volto-light-theme/pull/418)
37
+ - Update to Volto 18a46 @sneridagh [#419](https://github.com/kitconcept/volto-light-theme/pull/419)
38
+
39
+ ### Documentation
40
+
41
+ - Add standard documentation @sneridagh [#423](https://github.com/kitconcept/volto-light-theme/pull/423)
42
+
43
+ ## 5.0.1 (2024-10-09)
44
+
45
+ ### Bugfix
46
+
47
+ - Fixed missing key in header @sneridagh [#417](https://github.com/kitconcept/volto-light-theme/pull/417)
48
+
49
+ ### Internal
50
+
51
+ - Update versions to latest volto-highlight-block, volto-button-block @sneridagh [#408](https://github.com/kitconcept/volto-light-theme/pull/408)
52
+ - Bump `volto-button-block` version @sneridagh
53
+ Bump to Volto 18.0.0-alpha.45 [#417](https://github.com/kitconcept/volto-light-theme/pull/417)
54
+
11
55
  ## 5.0.0 (2024-07-02)
12
56
 
13
57
  ### Breaking
package/README.md CHANGED
@@ -5,380 +5,20 @@
5
5
  [![Build Status](https://github.com/kitconcept/volto-light-theme/actions/workflows/unit.yml/badge.svg)](https://github.com/kitconcept/volto-light-theme/actions)
6
6
  [![Build Status](https://github.com/kitconcept/volto-light-theme/actions/workflows/acceptance.yml/badge.svg)](https://github.com/kitconcept/volto-light-theme/actions)
7
7
 
8
- ![kitconcept GmbH](https://github.com/kitconcept/volto-blocks/raw/master/kitconcept.png)
8
+ ![kitconcept GmbH](https://raw.githubusercontent.com/kitconcept/volto-blocks/master/kitconcept.png)
9
9
 
10
10
  ## Vision
11
11
 
12
- The main vision of the Volto Light Theme is to serve as a foundation for kitconcept's future projects, following the release of Plone 6.
13
-
14
- It contains the feedback from the company's last years projects and the success stories in the UI/UX side.
15
-
16
- It aims to be future proof, so it has to be aligned with the upcoming Volto vision in terms of theming strategy decided by the Plone community.
12
+ The main vision of the Volto Light Theme (VLT) is to serve as a foundation for kitconcept's future projects, following the release of Plone 6.
13
+ It incorporates feedback from the company's clients and Plone community from the last few years of projects and the success stories in the UI/UX side.
14
+ It aims to be future-proof, keeping it aligned with the upcoming Volto and Plone 7 vision in terms of theming strategy decided by the Plone community.
17
15
 
18
16
  ![Volto-Light-Theme](https://github.com/kitconcept/volto-light-theme/raw/main/volto-light-theme.png)
19
17
 
20
- ## Requirements and specs
21
-
22
- ### It should not use any SemanticUI component or styling
23
-
24
- Volto will abandon SemanticUI as default design component system in the mid term, and we should be prepared for it.
25
-
26
- We will achieve that by not using any SemanticUI component, nor any related styling (`.ui.XXX`) in our upcoming themes.
27
-
28
- The Volto strategy is:
29
-
30
- - Provide a very basic and structural Vanilla components to build upon theming and CMSUI as well (`@plone/components`)
31
- - These components will be based in a headless component system [React Aria Components](https://react-spectrum.adobe.com/react-aria/components.html)
32
- - Volto projects can be themed using `@plone/components` as baseline or use a complete different design or component system of the developer/integrator choice. The presence of Volto's component registry system could help for adapting, if required.
33
-
34
- #### Volto components `customizations` use case
35
-
36
- If possible, we will switch to SemanticUI-less components when `@plone/components` is ready.
37
- Specially if the elements that we are customizing are clearly "theme" (eg. header/footer, etc).
38
- In the case of other Volto customizations that are not clear part of the theme (eg. Search block), it's fine to stick using what the original is using (SemanticUI).
39
- When Volto will make the switch in the future, we should then adapt all the customizations to match the one in the Volto core.
40
- The approach used is to use a proxy to a component of the `components` folder. This way it's easier to keep track of changes, and another add-on can customize again the light theme component, not the original Volto customization.
41
-
42
- ### It should use kitconcept's layout used in FZJ/DLR projects
43
-
44
- Since FZJ/DLR projects we've been trying a new concept in layout for Volto. This new layout uses three widths for the content elements:
45
-
46
- - Narrow (text)
47
- - Default (blocks)
48
- - Layout (main screen elements like Header, Footer)
49
-
50
- The Layout sized elements snap to 1440px. The breakpoints are also different than default Volto.
51
-
52
- This new layout uses mixin's and CSS that can be found in `layout.less` in the theme folder.
53
-
54
- Since the new container queries spec is out, we will be introducing it to the current CSS in order to implement the complexities that the "inner container" (the one between the toolbar and the sidebar) width presents. Until now, we did complex calculations given into account if the size of the inner container depending if the toolbar, the sidebar, or both were presents. With container queries we can do that in a more sensible and easy way.
55
-
56
- ### Organization of the files
57
-
58
- We will start organising the files in the root of `theme` folder, to differentiate from a normal "SemanticUI" theme. Take a look at the current state. We will follow this convention:
59
-
60
- - One file per component/block
61
- - Use the Volto theme facility using the SCSS scape hatch provided so other add-ons can hook to it.
62
- - The styling is centralized in `main.scss`, the rest of the files are loaded from there.
63
-
64
- ## Why a headless component system?
65
-
66
- https://medium.com/@nirbenyair/headless-components-in-react-and-why-i-stopped-using-ui-libraries-a8208197c268
67
-
68
- ## Vertical spacing block model
69
-
70
- This theme has the concept of block "grouping" given two consecutive blocks with the same styling block wrapper property `backgroundColor`. You have to add this property to your blocks in your blocks code. This add-on customizes `RenderBlocks.jsx` component in order to do so.
71
-
72
- The wrappers have the classnames `blocks-group-wrapper` and the name of the background color, eg. `grey`, defaulting to `transparent` if no `backgroundColor` property is set in the styling block wrapper in the block.
73
-
74
- **Disclaimer**: This might change in the near future, since we are developing a new integral Block Model for VLT and Volto.
75
-
76
- ### Vertical spacing rules
77
-
78
- These main rules spec applies to the theme:
79
-
80
- - On each change of color, a vertical padding (both `padding-bottom` and `padding-top`) of `80px` defined with the main variable `$color-block-change-vertical-spacing`.
81
- - The default bottom margin is defined with the main variable `$block-vertical-space` and set by default to `25px`.
82
- - [grid] Vertical spacing for grids should be `80px` for both top and bottom, even if the previous and next blocks are of the same color.
83
- - [grid+grid] When two grids happen side by side and are of the same color. It should be equal to the grid gap, so it's set to `@gutterWidth` and currently `1rem`. It has to be adjusted with a bit of negative margin to cancel the current inner padding in grid cells.
84
- - [grid+grid] Grids columns belonging to the same grid and same color in small mobile viewports. They should be closer to match the other adjacent ones, so they seem to belong to the same grid set.
85
- - [footer] The footer has a top vertical spacing of `80px`.
86
- - [teasers] The last teaser, except if the following is a button, does NOT have a line at the bottom.
87
- - [listing] The last listing, except if the following is a button, does NOT have a line at the bottom.
88
- - [listing] After two consecutive listings, the vertical spacing should be `200px`.
89
- - [text+button] If there's a text and a button, then the vertical spacing betweeen them is `60px`.
90
- - [image+separator-block] If after image comes a separator block, the vertical spacing between them is `40px`.
91
-
92
- ### Media queries vs container queries
93
-
94
- We use media queries when the styling it's generic enough to apply only to the View.
95
-
96
- We use container queries when do care explicitly about how the styling is being applied in edit mode as well and we want the content area to behave 1:1 with the view mode.
97
-
98
- Reason: The container queries allow us to abstract the width from the sidebar and toolbar in edit mode, showing the content area as it will be in that size, in view mode.
99
-
100
- **Remember**: The margins in responsive are being taken care with container queries in `layout.scss`. So everything related to that, goes like it works in there, with container queries. See implementations for details in case you need it.
101
-
102
- ## Specification
103
-
104
- `@kitconcept/volto-light-theme` works with the following Plone Blocks:
105
-
106
- - Grid-Block (https://www.npmjs.com/package/@kitconcept/volto-blocks-grid)
107
- - Teaser-Block (https://www.npmjs.com/package/@kitconcept/volto-blocks-grid)
108
- - Slider-Block (https://www.npmjs.com/package/@kitconcept/volto-slider-block)
109
- - Button-Block (https://www.npmjs.com/package/@kitconcept/volto-button-block)
110
- - Separator-Block (https://www.npmjs.com/package/@kitconcept/volto-separator-block)
111
- - Heading-Block (https://www.npmjs.com/package/@kitconcept/volto-heading-block)
112
- - Introduction-Block (https://www.npmjs.com/package/@kitconcept/volto-introduction-block)
113
- - Accordion-Block (https://www.npmjs.com/package/@eeacms/volto-accordion-block)
114
-
115
- and the following add-ons:
116
-
117
- - DSGVO-Banner (https://www.npmjs.com/package/@kitconcept/volto-dsgvo-banner)
118
-
119
- ## Installation
120
-
121
- It is recommended that your project or policy add-on `package.json` include the aforementioned add-ons.
122
-
123
- ```json
124
- "dependencies": {
125
- "@eeacms/volto-accordion-block": "^10.4.0",
126
- "@kitconcept/volto-button-block": "^2.3.1",
127
- "@kitconcept/volto-dsgvo-banner": "^1.3.0",
128
- "@kitconcept/volto-heading-block": "^2.4.0",
129
- "@kitconcept/volto-highlight-block": "^3.0.0",
130
- "@kitconcept/volto-introduction-block": "^1.0.0",
131
- "@kitconcept/volto-separator-block": "^4.0.0",
132
- "@kitconcept/volto-slider-block": "^6.0.0",
133
- "@kitconcept/volto-light-theme": "^2.0.0",
134
- }
135
- ```
136
-
137
- This theme won't install them for you, as they are declared as `peerDependencies`.
138
- This is because the theme won't have to force you to use any specific add-on version, and avoids package hoisting issues.
139
-
140
- In your project or policy add-on `package.json` you should declare all of them as Volto add-ons
141
-
142
- ```json
143
- "addons": [
144
- "@eeacms/volto-accordion-block",
145
- "@kitconcept/volto-button-block",
146
- "@kitconcept/volto-heading-block",
147
- "@kitconcept/volto-introduction-block",
148
- "@kitconcept/volto-highlight-block",
149
- "@kitconcept/volto-separator-block",
150
- "@kitconcept/volto-light-theme",
151
- "your_policy_addon_here"
152
- ],
153
- ```
154
-
155
- Make sure your policy add-on is the last one, as you would want that its configuration has priority over all the others. Make sure also that `@kitconcept/volto-light-theme` is the one before your policy add-on.
156
-
157
- Then, declare the theme in your project `package.json`:
158
-
159
- ```json
160
- "theme": "@kitconcept/volto-light-theme",
161
- ```
162
-
163
- Alternatively, you can also declare it in your project's `volto.config.js`:
164
-
165
- ```js
166
- const addons = [];
167
- const theme = '@kitconcept/volto-light-theme';
168
-
169
- module.exports = {
170
- addons,
171
- theme,
172
- };
173
- ```
174
-
175
- You can specify your project add-ons in `volto.config.js`, but sometimes is better to have them all in one place (in your policy add-on) for portability.
176
-
177
- ## Feature Flags
178
-
179
- ### Enable Fat Menu
180
-
181
- Since 2.0.0, the light theme has a fat menu (below the main site sections) triggered clickin on one of them.
182
- It's behind a feature flag, as opt-out:
183
-
184
- ```js
185
- config.settings.enableFatMenu = true;
186
- ```
187
-
188
- ### Show Site Label
189
-
190
- If you want to show a label on top of site you can pass label name to `siteLabel` property.
18
+ ## Documentation
191
19
 
192
- ```js
193
- config.settings.siteLabel = 'Plone Intranet';
194
- ```
195
-
196
- If you wanted a translated label then you have to define a translation object in `defineMessages` function provided by react-intl.
197
-
198
- Here is the code snippets you have to add in your addon index.js file.
199
- If you don't have addon, you can also add in your config.js file in root of your frontend folder.
200
-
201
- ```js
202
- import { defineMessages } from 'react-intl';
203
-
204
- defineMessages({
205
- siteLabel: {
206
- id: 'siteLabel',
207
- defaultMessage: ' ',
208
- },
209
- });
210
-
211
- ```
212
- Then add the translation you want in your `locale` file.
213
-
214
- ### Show intranetHeader
215
-
216
- We have totally different header for intranet sites. If you want that, you can enable it by passing `intranetHeader` property.
217
-
218
- ```js
219
- config.settings.intranetHeader = true;
220
- ```
221
- ## Releases
222
-
223
- The releases follow a semantic versioning model.
224
-
225
- ### Definition of breaking change
226
-
227
- In general, the same rules as Volto releases applies.
228
- However, in VLT we add an extra exception: The vertical spacing is carefully curated and considered an important feature of the theme and because of that, changes and improvements in the vertical spacing are **NOT** considered breaking changes.
229
- They will be noted properly in the changelog.
20
+ You can find the documentation of this package at https://volto-light-theme.readthedocs.io.
230
21
 
231
22
  ## Upgrade Guide
232
23
 
233
- See a detailed upgrade guide in: https://github.com/kitconcept/volto-light-theme/blob/main/UPGRADE-GUIDE.md
234
-
235
- ## Compatibility
236
-
237
- | VLT version | Volto version |
238
- |-------------|---------------|
239
- | 3.x.x | >= Volto 17.0.0-alpha.16 |
240
- | 4.x.x | < Volto 17.18.0 |
241
- | 5.x.x | >= Volto 17.18.0 or >=Volto 18.0.0-alpha.36 |
242
-
243
- Compatibility with Volto 16 might be achieved, but it has to be at customization level in the specific project add-on.
244
- This is mainly due to the `RenderBlocks` customization that is based in the one in 17 because of the Grid block in core and the autogrouping feature.
245
- See more information about the other dependencies in `peerDependencies` in `package.json`.
246
-
247
- ## Development
248
-
249
- The development of this add-on is done in isolation using a new approach using pnpm workspaces and latest `mrs-developer` and other Volto core improvements.
250
- For this reason, it only works with pnpm and Volto 18 (currently in alpha) but it does not mean that the add-on will only work in 18.
251
-
252
- ### Development requisites
253
-
254
- - Volto 18 (2024-03-21: currently in alpha)
255
- - pnpm as package manager
256
-
257
- ### Make convenience commands
258
-
259
- Run `make help` to list the available commands.
260
-
261
- ```text
262
- help Show this help
263
- install Installs the add-on in a development environment
264
- start Starts Volto, allowing reloading of the add-on during development
265
- build Build a production bundle for distribution of the project with the add-on
266
- build-deps Build dependencies
267
- i18n Sync i18n
268
- ci-i18n Check if i18n is not synced
269
- format Format codebase
270
- lint Lint, or catch and remove problems, in code base
271
- release Release the add-on on npmjs.org
272
- release-dry-run Dry-run the release of the add-on on npmjs.org
273
- test Run unit tests
274
- ci-test Run unit tests in CI
275
- backend-docker-start Starts a Docker-based backend for development
276
- storybook-start Start Storybook server on port 6006
277
- storybook-build Build Storybook
278
- acceptance-frontend-dev-start Start acceptance frontend in development mode
279
- acceptance-frontend-prod-start Start acceptance frontend in production mode
280
- acceptance-backend-start Start backend acceptance server
281
- ci-acceptance-backend-start Start backend acceptance server in headless mode for CI
282
- acceptance-test Start Cypress in interactive mode
283
- ci-acceptance-test Run cypress tests in headless mode for CI
284
- acceptance-a11y-frontend-prod-start Start a11y acceptance frontend in prod mode
285
- ci-acceptance-a11y-backend-start Start acceptance a11y server in CI mode (no terminal attached)
286
- acceptance-a11y-test Start a11y Cypress in interactive mode
287
- ci-acceptance-a11y-test Run a11y cypress tests in headless mode for CI
288
- ```
289
-
290
- ### Development Environment Setup
291
-
292
- Install package requirements
293
-
294
- ```shell
295
- pnpm i
296
- make install
297
- pnpm i
298
- ```
299
-
300
- ### Start developing
301
-
302
- Run (in separate terminal sessions)
303
-
304
- Start backend server
305
-
306
- ```shell
307
- make start-backend-docker
308
- ```
309
-
310
- Start frontend
311
-
312
- ```shell
313
- pnpm start
314
- ```
315
-
316
- ### Linting
317
-
318
- Run ESlint, Prettier and Stylelint
319
-
320
- ```shell
321
- make lint
322
- ```
323
-
324
- ### Formatting
325
-
326
- Run ESlint, Prettier and Stylelint in fix mode
327
-
328
- ```shell
329
- make format
330
- ```
331
-
332
- ### i18n
333
-
334
- Extract the i18n messages to locales
335
-
336
- ```shell
337
- make i18n
338
- ```
339
-
340
- ### Unit tests
341
-
342
- Run unit tests
343
-
344
- ```shell
345
- make test
346
- ```
347
-
348
- ### Run Cypress tests
349
-
350
- Run (in separate terminal sessions)
351
-
352
- Start the frontend in dev mode
353
-
354
- ```shell
355
- make start-test-acceptance-frontend-dev
356
- ```
357
-
358
- Start the backend acceptance server
359
-
360
- ```shell
361
- make start-test-acceptance-server
362
- ```
363
-
364
- Start the Cypress interactive test runner
365
-
366
- ```shell
367
- make test-acceptance
368
- ```
369
-
370
- ### Release
371
-
372
- Run
373
-
374
- ```shell
375
- make release
376
- ```
377
-
378
- For releasing a RC version
379
-
380
- Run
381
-
382
- ```shell
383
- make release-rc
384
- ```
24
+ See a detailed upgrade guide at https://volto-light-theme.readthedocs.io/latest/upgrade-guide.html.
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@kitconcept/volto-light-theme",
3
- "version": "5.0.0",
3
+ "version": "6.0.0-alpha.0",
4
4
  "description": "Volto Light Theme by kitconcept",
5
- "main": "src/index.js",
5
+ "main": "src/index.ts",
6
6
  "types": "src/types/index.d.ts",
7
7
  "repository": {
8
8
  "type": "git",
@@ -20,27 +20,40 @@
20
20
  "plone",
21
21
  "react",
22
22
  "light-theme",
23
- "theme"
23
+ "theme",
24
+ "vlt"
24
25
  ],
25
26
  "publishConfig": {
26
27
  "access": "public"
27
28
  },
28
29
  "devDependencies": {
29
- "@plone/scripts": "^3.6.1",
30
- "release-it": "^17.1.1"
30
+ "@plone/scripts": "^3.6.2",
31
+ "@types/jest": "^29.5.8",
32
+ "@types/lodash": "^4.14.201",
33
+ "@types/react": "^18.3.12",
34
+ "@types/react-dom": "^18.3.1",
35
+ "release-it": "^17.7.0",
36
+ "@plone/types": "1.0.0"
31
37
  },
32
38
  "dependencies": {
33
- "@plone/components": "2.0.0-alpha.11"
39
+ "uuid": "^11.0.0",
40
+ "@plone/components": "2.1.1"
34
41
  },
35
42
  "peerDependencies": {
36
43
  "@eeacms/volto-accordion-block": "^10.4.6",
37
- "@kitconcept/volto-button-block": "^2.3.1",
44
+ "@kitconcept/volto-button-block": "^2.3.1 || ^3.0.3",
38
45
  "@kitconcept/volto-dsgvo-banner": "^2.3.2",
39
46
  "@kitconcept/volto-heading-block": "^2.4.0",
40
- "@kitconcept/volto-highlight-block": "^3.0.1",
47
+ "@kitconcept/volto-highlight-block": "^4.0.0",
41
48
  "@kitconcept/volto-introduction-block": "^1.0.0",
42
- "@kitconcept/volto-separator-block": "^4.1.1",
43
- "@kitconcept/volto-slider-block": "^6.3.1"
49
+ "@kitconcept/volto-separator-block": "^4.1.2",
50
+ "@kitconcept/volto-slider-block": "^6.3.1",
51
+ "classnames": "^2.2.6",
52
+ "lodash": "4.17.21",
53
+ "react": "18.2.0",
54
+ "react-intl": "^3.12.1",
55
+ "react-redux": "^8.1.2",
56
+ "react-router-dom": "^5.2.0"
44
57
  },
45
58
  "scripts": {
46
59
  "i18n": "rm -rf build/messages && NODE_ENV=production i18n --addon",
@@ -0,0 +1,38 @@
1
+ const plugins = (defaultPlugins) => {
2
+ const newPlugins = defaultPlugins.filter((plugin) => plugin !== 'scss');
3
+ newPlugins.push({
4
+ name: 'scss',
5
+ options: {
6
+ sass: {
7
+ dev: {
8
+ sassOptions: {
9
+ includePaths: ['node_modules'],
10
+ outputStyle: 'expanded',
11
+ sourceMap: true,
12
+ silenceDeprecations: ['legacy-js-api', 'mixed-decls', 'import'],
13
+ quietDeps: true,
14
+ },
15
+ },
16
+ prod: {
17
+ sassOptions: {
18
+ includePaths: ['node_modules'],
19
+ outputStyle: 'expanded',
20
+ sourceMap: true,
21
+ silenceDeprecations: ['legacy-js-api', 'mixed-decls', 'import'],
22
+ quietDeps: true,
23
+ },
24
+ },
25
+ },
26
+ },
27
+ });
28
+ return newPlugins;
29
+ };
30
+
31
+ const modify = (config, { target, dev }, webpack) => {
32
+ return config;
33
+ };
34
+
35
+ module.exports = {
36
+ plugins,
37
+ modify,
38
+ };
@@ -2,7 +2,7 @@
2
2
  import PropTypes from 'prop-types';
3
3
  import { Link } from 'react-router-dom';
4
4
  import { FormattedMessage } from 'react-intl';
5
- import { flattenToAppURL } from '@plone/volto/helpers';
5
+ import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
6
6
  import config from '@plone/volto/registry';
7
7
  import { useSelector, shallowEqual } from 'react-redux';
8
8
 
@@ -6,23 +6,43 @@ const messages = defineMessages({
6
6
  id: 'Block Width',
7
7
  defaultMessage: 'Block Width',
8
8
  },
9
+ Alignment: {
10
+ id: 'Alignment',
11
+ defaultMessage: 'Alignment',
12
+ },
9
13
  });
10
14
 
11
15
  export const ButtonStylingSchema = ({ schema, formData, intl }) => {
12
16
  defaultStylingSchema({ schema, formData, intl });
13
17
 
18
+ schema.fieldsets[0].fields = schema.fieldsets[0].fields.filter(
19
+ (field) => field !== 'inneralign',
20
+ );
21
+
22
+ delete schema.properties?.inneralign;
23
+
24
+ schema.properties.styles.schema.fieldsets[0].fields = [
25
+ 'blockWidth:noprefix',
26
+ ...schema.properties.styles.schema.fieldsets[0].fields,
27
+ ];
28
+
14
29
  schema.properties.styles.schema.fieldsets[0].fields = [
15
- 'buttonAlign',
30
+ 'align:noprefix',
16
31
  ...schema.properties.styles.schema.fieldsets[0].fields,
17
32
  ];
18
33
 
19
- schema.properties.styles.schema.properties.buttonAlign = {
20
- widget: 'align',
34
+ schema.properties.styles.schema.properties['blockWidth:noprefix'] = {
35
+ widget: 'blockWidth',
21
36
  title: intl.formatMessage(messages.BlockWidth),
22
- actions: ['center', 'wide'],
37
+ default: 'default',
38
+ filterActions: ['narrow', 'default'],
23
39
  };
24
40
 
25
- schema.properties.inneralign.actions = ['left', 'center', 'right'];
41
+ schema.properties.styles.schema.properties['align:noprefix'] = {
42
+ widget: 'blockAlignment',
43
+ title: intl.formatMessage(messages.Alignment),
44
+ default: 'left',
45
+ };
26
46
 
27
47
  return schema;
28
48
  };