@eeacms/volto-eea-design-system 0.2.1

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 (263) hide show
  1. package/.coverage.babel.config.js +13 -0
  2. package/.github/ISSUE_TEMPLATE/bug_report.md +50 -0
  3. package/.github/ISSUE_TEMPLATE/feature_request.md +50 -0
  4. package/.github/workflows/node.js.yml +59 -0
  5. package/.prettierignore +4 -0
  6. package/.project.eslintrc.js +45 -0
  7. package/.release-it.json +17 -0
  8. package/.storybook/manager.js +15 -0
  9. package/CHANGELOG.md +1025 -0
  10. package/DEVELOP.md +51 -0
  11. package/LICENSE.md +9 -0
  12. package/README.md +196 -0
  13. package/bootstrap +41 -0
  14. package/cypress.json +17 -0
  15. package/jest-addon.config.js +36 -0
  16. package/locales/volto.pot +0 -0
  17. package/mockups/README.md +1 -0
  18. package/package.json +49 -0
  19. package/razzle.extend.js +23 -0
  20. package/src/helpers/index.js +2 -0
  21. package/src/helpers/useClickOutside.js +30 -0
  22. package/src/helpers/usePrevious.js +9 -0
  23. package/src/i18n.js +180 -0
  24. package/src/index.js +6 -0
  25. package/src/semantic.less +262 -0
  26. package/src/ui/Avatar/Avatar.jsx +32 -0
  27. package/src/ui/Avatar/Avatar.stories.jsx +61 -0
  28. package/src/ui/AvatarGrid/AvatarGrid.jsx +49 -0
  29. package/src/ui/AvatarGrid/AvatarGrid.stories.jsx +66 -0
  30. package/src/ui/Banner/Banner.jsx +59 -0
  31. package/src/ui/Banner/Banner.stories.jsx +121 -0
  32. package/src/ui/Blockquote/Blockquote.jsx +16 -0
  33. package/src/ui/Blockquote/Blockquote.stories.jsx +48 -0
  34. package/src/ui/Breadcrumbs/Breadcrumb.stories.jsx +76 -0
  35. package/src/ui/Breadcrumbs/Breadcrumbs.jsx +67 -0
  36. package/src/ui/Breadcrumbs/Breadcrumbs.stories.jsx +30 -0
  37. package/src/ui/Button/Button.stories.jsx +169 -0
  38. package/src/ui/Divider/Divider.jsx +7 -0
  39. package/src/ui/Footer/Contact.jsx +28 -0
  40. package/src/ui/Footer/Footer.jsx +52 -0
  41. package/src/ui/Footer/FooterActions.jsx +22 -0
  42. package/src/ui/Footer/FooterHeader.jsx +10 -0
  43. package/src/ui/Footer/FooterSites.jsx +33 -0
  44. package/src/ui/Footer/Social.jsx +25 -0
  45. package/src/ui/Footer/SubFooter.jsx +9 -0
  46. package/src/ui/FormFieldWrapper/FormFieldWrapper.jsx +51 -0
  47. package/src/ui/Header/Header.jsx +224 -0
  48. package/src/ui/Header/HeaderMenuPopUp.js +79 -0
  49. package/src/ui/Header/HeaderSearchPopUp.js +33 -0
  50. package/src/ui/InpageNavigation/InpageNavigation.jsx +61 -0
  51. package/src/ui/InpageNavigation/InpageNavigation.stories.jsx +166 -0
  52. package/src/ui/KeyContent/KeyContent.jsx +22 -0
  53. package/src/ui/KeyContent/KeyContent.stories.jsx +62 -0
  54. package/src/ui/Loader/Loader.stories.jsx +45 -0
  55. package/src/ui/Logo/Logo.jsx +31 -0
  56. package/src/ui/Popup/Popup.stories.jsx +97 -0
  57. package/src/ui/PublicationCard/PublicationCard.jsx +27 -0
  58. package/src/ui/PublicationCard/PublicationCard.stories.jsx +69 -0
  59. package/src/ui/Pullquote/Pullquote.jsx +44 -0
  60. package/src/ui/Pullquote/Pullquote.stories.jsx +101 -0
  61. package/src/ui/RelatedContent/RelatedContent.jsx +90 -0
  62. package/src/ui/RelatedContent/RelatedContent.stories.jsx +80 -0
  63. package/src/ui/Segment/Segment.stories.jsx +163 -0
  64. package/src/ui/Tag/Tag.jsx +13 -0
  65. package/src/ui/Tag/Tag.stories.jsx +21 -0
  66. package/src/ui/TagList/TagList.jsx +23 -0
  67. package/src/ui/TagList/TagList.stories.jsx +63 -0
  68. package/src/ui/Testimonial/Testimonial.jsx +53 -0
  69. package/src/ui/Testimonial/Testimonial.stories.jsx +51 -0
  70. package/src/ui/Timeline/Timeline.jsx +44 -0
  71. package/src/ui/Timeline/Timeline.stories.jsx +322 -0
  72. package/src/ui/index.js +31 -0
  73. package/templates/eea.hbs +50 -0
  74. package/theme/theme.config +122 -0
  75. package/theme/theme.less +64 -0
  76. package/theme/themes/eea/assets/images/EEA_Logo_Vertical.png +0 -0
  77. package/theme/themes/eea/assets/images/Footer/EEALogo.png +0 -0
  78. package/theme/themes/eea/assets/images/Footer/EULogo.png +0 -0
  79. package/theme/themes/eea/assets/images/Footer/Extras/Logo1.png +0 -0
  80. package/theme/themes/eea/assets/images/Footer/Extras/Logo10.png +0 -0
  81. package/theme/themes/eea/assets/images/Footer/Extras/Logo2.png +0 -0
  82. package/theme/themes/eea/assets/images/Footer/Extras/Logo3.png +0 -0
  83. package/theme/themes/eea/assets/images/Footer/Extras/Logo4.png +0 -0
  84. package/theme/themes/eea/assets/images/Footer/Extras/Logo5.png +0 -0
  85. package/theme/themes/eea/assets/images/Footer/Extras/Logo6.png +0 -0
  86. package/theme/themes/eea/assets/images/Footer/Extras/Logo7.png +0 -0
  87. package/theme/themes/eea/assets/images/Footer/Extras/Logo8.png +0 -0
  88. package/theme/themes/eea/assets/images/Footer/Extras/Logo9.png +0 -0
  89. package/theme/themes/eea/assets/images/Footer/Extras/abstract-visual.svg +32 -0
  90. package/theme/themes/eea/assets/images/Footer/Extras/footervisual.svg +1755 -0
  91. package/theme/themes/eea/assets/images/Footer/Vector1.png +0 -0
  92. package/theme/themes/eea/assets/images/Footer/Vector2.png +0 -0
  93. package/theme/themes/eea/assets/images/Header/EeaLogo.png +0 -0
  94. package/theme/themes/eea/assets/images/Header/Vector.png +0 -0
  95. package/theme/themes/eea/assets/images/Header/close-line.svg +1 -0
  96. package/theme/themes/eea/assets/images/Header/close.png +0 -0
  97. package/theme/themes/eea/assets/images/Header/down-arrow.png +0 -0
  98. package/theme/themes/eea/assets/images/Header/eea-logo.svg +14 -0
  99. package/theme/themes/eea/assets/images/Header/eea.png +0 -0
  100. package/theme/themes/eea/assets/images/Header/eeaIcon.png +0 -0
  101. package/theme/themes/eea/assets/images/Header/global-line.svg +1 -0
  102. package/theme/themes/eea/assets/images/Header/globeIcon.png +0 -0
  103. package/theme/themes/eea/assets/images/Header/hamburgerMenuIcon.png +0 -0
  104. package/theme/themes/eea/assets/images/Header/menu-left-arrow.svg +3 -0
  105. package/theme/themes/eea/assets/images/Header/menu-line.svg +1 -0
  106. package/theme/themes/eea/assets/images/Header/search-line.svg +1 -0
  107. package/theme/themes/eea/assets/images/Header/search.png +0 -0
  108. package/theme/themes/eea/assets/images/Header/searchIcon.png +0 -0
  109. package/theme/themes/eea/assets/images/arrow-down.svg +10 -0
  110. package/theme/themes/eea/assets/images/avatar.png +0 -0
  111. package/theme/themes/eea/assets/images/banner.png +0 -0
  112. package/theme/themes/eea/assets/images/eea-logo.png +0 -0
  113. package/theme/themes/eea/assets/images/eea_icon.png +0 -0
  114. package/theme/themes/eea/assets/images/europe-flag.svg +4 -0
  115. package/theme/themes/eea/assets/images/home-icon.svg +3 -0
  116. package/theme/themes/eea/assets/images/loaderImage.png +0 -0
  117. package/theme/themes/eea/assets/images/mega-menu-arrow.svg +3 -0
  118. package/theme/themes/eea/assets/logo/EEA-Logo-White-2.svg +9 -0
  119. package/theme/themes/eea/assets/logo/EEA-Logo-white.svg +9 -0
  120. package/theme/themes/eea/assets/logo/EIONETLogo.png +0 -0
  121. package/theme/themes/eea/assets/logo/bise.svg +47 -0
  122. package/theme/themes/eea/assets/logo/cca.svg +20 -0
  123. package/theme/themes/eea/assets/logo/copernicus.svg +62 -0
  124. package/theme/themes/eea/assets/logo/energy.svg +77 -0
  125. package/theme/themes/eea/assets/logo/fise.svg +37 -0
  126. package/theme/themes/eea/assets/logo/freshwater.svg +48 -0
  127. package/theme/themes/eea/assets/logo/industry.svg +40 -0
  128. package/theme/themes/eea/assets/logo/insitu.svg +43 -0
  129. package/theme/themes/eea/assets/logo/ipchem.svg +23 -0
  130. package/theme/themes/eea/assets/logo/marine.svg +63 -0
  131. package/theme/themes/eea/collections/breadcrumb.overrides +44 -0
  132. package/theme/themes/eea/collections/breadcrumb.variables +49 -0
  133. package/theme/themes/eea/collections/form.overrides +56 -0
  134. package/theme/themes/eea/collections/form.variables +211 -0
  135. package/theme/themes/eea/collections/grid.overrides +17 -0
  136. package/theme/themes/eea/collections/grid.variables +103 -0
  137. package/theme/themes/eea/collections/menu.overrides +84 -0
  138. package/theme/themes/eea/collections/menu.variables +471 -0
  139. package/theme/themes/eea/collections/message.overrides +34 -0
  140. package/theme/themes/eea/collections/message.variables +142 -0
  141. package/theme/themes/eea/collections/table.overrides +30 -0
  142. package/theme/themes/eea/collections/table.variables +249 -0
  143. package/theme/themes/eea/definitions/elements/icon.less +499 -0
  144. package/theme/themes/eea/elements/button.overrides +199 -0
  145. package/theme/themes/eea/elements/button.variables +405 -0
  146. package/theme/themes/eea/elements/container.overrides +98 -0
  147. package/theme/themes/eea/elements/container.variables +66 -0
  148. package/theme/themes/eea/elements/divider.overrides +17 -0
  149. package/theme/themes/eea/elements/divider.variables +53 -0
  150. package/theme/themes/eea/elements/flag.overrides +1235 -0
  151. package/theme/themes/eea/elements/flag.variables +13 -0
  152. package/theme/themes/eea/elements/header.overrides +205 -0
  153. package/theme/themes/eea/elements/header.variables +151 -0
  154. package/theme/themes/eea/elements/icon.overrides +5589 -0
  155. package/theme/themes/eea/elements/icon.variables +95 -0
  156. package/theme/themes/eea/elements/image.overrides +3 -0
  157. package/theme/themes/eea/elements/image.variables +44 -0
  158. package/theme/themes/eea/elements/input.overrides +83 -0
  159. package/theme/themes/eea/elements/input.variables +104 -0
  160. package/theme/themes/eea/elements/label.overrides +49 -0
  161. package/theme/themes/eea/elements/label.variables +267 -0
  162. package/theme/themes/eea/elements/list.overrides +28 -0
  163. package/theme/themes/eea/elements/list.variables +233 -0
  164. package/theme/themes/eea/elements/loader.overrides +3 -0
  165. package/theme/themes/eea/elements/loader.variables +73 -0
  166. package/theme/themes/eea/elements/placeholder.overrides +3 -0
  167. package/theme/themes/eea/elements/placeholder.variables +55 -0
  168. package/theme/themes/eea/elements/rail.overrides +3 -0
  169. package/theme/themes/eea/elements/rail.variables +34 -0
  170. package/theme/themes/eea/elements/reveal.overrides +3 -0
  171. package/theme/themes/eea/elements/reveal.variables +18 -0
  172. package/theme/themes/eea/elements/segment.overrides +8 -0
  173. package/theme/themes/eea/elements/segment.variables +154 -0
  174. package/theme/themes/eea/elements/step.overrides +18 -0
  175. package/theme/themes/eea/elements/step.variables +130 -0
  176. package/theme/themes/eea/extras/avatar.less +97 -0
  177. package/theme/themes/eea/extras/avatar.variables +34 -0
  178. package/theme/themes/eea/extras/avatarGrid.less +43 -0
  179. package/theme/themes/eea/extras/avatarGrid.variables +20 -0
  180. package/theme/themes/eea/extras/banner.less +213 -0
  181. package/theme/themes/eea/extras/banner.variables +77 -0
  182. package/theme/themes/eea/extras/blockquote.less +89 -0
  183. package/theme/themes/eea/extras/blockquote.variables +35 -0
  184. package/theme/themes/eea/extras/custom.overrides +0 -0
  185. package/theme/themes/eea/extras/custom.variables +0 -0
  186. package/theme/themes/eea/extras/divider.less +14 -0
  187. package/theme/themes/eea/extras/divider.variables +9 -0
  188. package/theme/themes/eea/extras/footer.less +273 -0
  189. package/theme/themes/eea/extras/footer.variables +109 -0
  190. package/theme/themes/eea/extras/header.less +691 -0
  191. package/theme/themes/eea/extras/header.variables +149 -0
  192. package/theme/themes/eea/extras/inpageNavigation.less +57 -0
  193. package/theme/themes/eea/extras/inpageNavigation.variables +30 -0
  194. package/theme/themes/eea/extras/keyContent.less +36 -0
  195. package/theme/themes/eea/extras/keyContent.variables +18 -0
  196. package/theme/themes/eea/extras/main.overrides +31 -0
  197. package/theme/themes/eea/extras/main.variables +33 -0
  198. package/theme/themes/eea/extras/publicationCard.less +62 -0
  199. package/theme/themes/eea/extras/publicationCard.variables +24 -0
  200. package/theme/themes/eea/extras/pullquote.less +76 -0
  201. package/theme/themes/eea/extras/pullquote.variables +34 -0
  202. package/theme/themes/eea/extras/select.overrides +0 -0
  203. package/theme/themes/eea/extras/select.variables +0 -0
  204. package/theme/themes/eea/extras/tag.less +37 -0
  205. package/theme/themes/eea/extras/tag.variables +22 -0
  206. package/theme/themes/eea/extras/tagList.less +50 -0
  207. package/theme/themes/eea/extras/tagList.variables +13 -0
  208. package/theme/themes/eea/extras/testimonial.less +28 -0
  209. package/theme/themes/eea/extras/testimonial.variables +13 -0
  210. package/theme/themes/eea/extras/timeline.less +114 -0
  211. package/theme/themes/eea/extras/timeline.variables +40 -0
  212. package/theme/themes/eea/globals/reset.overrides +454 -0
  213. package/theme/themes/eea/globals/reset.variables +6 -0
  214. package/theme/themes/eea/globals/site.overrides +27 -0
  215. package/theme/themes/eea/globals/site.variables +1135 -0
  216. package/theme/themes/eea/modules/accordion.overrides +83 -0
  217. package/theme/themes/eea/modules/accordion.variables +114 -0
  218. package/theme/themes/eea/modules/chatroom.overrides +3 -0
  219. package/theme/themes/eea/modules/chatroom.variables +3 -0
  220. package/theme/themes/eea/modules/checkbox.overrides +67 -0
  221. package/theme/themes/eea/modules/checkbox.variables +194 -0
  222. package/theme/themes/eea/modules/dimmer.overrides +3 -0
  223. package/theme/themes/eea/modules/dimmer.variables +58 -0
  224. package/theme/themes/eea/modules/dropdown.overrides +53 -0
  225. package/theme/themes/eea/modules/dropdown.variables +390 -0
  226. package/theme/themes/eea/modules/embed.overrides +3 -0
  227. package/theme/themes/eea/modules/embed.variables +53 -0
  228. package/theme/themes/eea/modules/modal.overrides +3 -0
  229. package/theme/themes/eea/modules/modal.variables +193 -0
  230. package/theme/themes/eea/modules/nag.overrides +3 -0
  231. package/theme/themes/eea/modules/nag.variables +74 -0
  232. package/theme/themes/eea/modules/popup.overrides +83 -0
  233. package/theme/themes/eea/modules/popup.variables +153 -0
  234. package/theme/themes/eea/modules/progress.overrides +3 -0
  235. package/theme/themes/eea/modules/progress.variables +113 -0
  236. package/theme/themes/eea/modules/rating.overrides +74 -0
  237. package/theme/themes/eea/modules/rating.variables +103 -0
  238. package/theme/themes/eea/modules/search.overrides +3 -0
  239. package/theme/themes/eea/modules/search.variables +163 -0
  240. package/theme/themes/eea/modules/shape.overrides +3 -0
  241. package/theme/themes/eea/modules/shape.variables +40 -0
  242. package/theme/themes/eea/modules/sidebar.overrides +3 -0
  243. package/theme/themes/eea/modules/sidebar.variables +45 -0
  244. package/theme/themes/eea/modules/sticky.overrides +3 -0
  245. package/theme/themes/eea/modules/sticky.variables +7 -0
  246. package/theme/themes/eea/modules/tab.overrides +13 -0
  247. package/theme/themes/eea/modules/tab.variables +17 -0
  248. package/theme/themes/eea/modules/transition.overrides +1087 -0
  249. package/theme/themes/eea/modules/transition.variables +10 -0
  250. package/theme/themes/eea/modules/video.overrides +3 -0
  251. package/theme/themes/eea/modules/video.variables +16 -0
  252. package/theme/themes/eea/views/ad.overrides +3 -0
  253. package/theme/themes/eea/views/ad.variables +13 -0
  254. package/theme/themes/eea/views/card.overrides +73 -0
  255. package/theme/themes/eea/views/card.variables +237 -0
  256. package/theme/themes/eea/views/comment.overrides +3 -0
  257. package/theme/themes/eea/views/comment.variables +98 -0
  258. package/theme/themes/eea/views/feed.overrides +3 -0
  259. package/theme/themes/eea/views/feed.variables +141 -0
  260. package/theme/themes/eea/views/item.overrides +8 -0
  261. package/theme/themes/eea/views/item.variables +157 -0
  262. package/theme/themes/eea/views/statistic.overrides +19 -0
  263. package/theme/themes/eea/views/statistic.variables +105 -0
@@ -0,0 +1,13 @@
1
+ const defaultBabel = require('@plone/volto/babel');
2
+
3
+ function applyDefault(api) {
4
+ const voltoBabel = defaultBabel(api);
5
+ voltoBabel.plugins.push(
6
+ '@babel/plugin-transform-modules-commonjs',
7
+ 'transform-class-properties',
8
+ 'istanbul',
9
+ );
10
+ return voltoBabel;
11
+ }
12
+
13
+ module.exports = applyDefault;
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+ ---
8
+
9
+ ## React guidelines
10
+
11
+ ### Basic guidelines
12
+
13
+ - [ ] One React component per file
14
+ - [ ] Use best practice naming conventions, follow the library styles (semantic-ui-less, semantic-ui-react).
15
+ - [ ] Ensure every file uses Unix line endings
16
+
17
+ ### Naming guidelines
18
+
19
+ - [ ] Filename: Use PascalCase for filenames. E.g., ItemCard.jsx
20
+ - [ ] Variable naming: Use PascalCase for React components and camelCase for their instances
21
+ - [ ] Use the filename as the component name, ReservationCard.jsx should have a reference name of ReservationCard
22
+ - [ ] Use camelCase for prop names, or PascalCase if the prop value is a React component
23
+
24
+ ### Component best practice guidelines
25
+
26
+ - [ ] Don't hard-code values, make them props
27
+ - [ ] Avoid using inline styles except for setting background images or visibility of elements
28
+ - [ ] Use imports relative to the package name
29
+ - [ ] Use whitespace to separate and group imports from other code
30
+ - [ ] Large composite components (for example the Footer) should be abstracted and split into multiple subcomponents
31
+
32
+ ### Storybook best practice guidelines
33
+
34
+ - [ ] Aim for realistic demo aspects, For example, a mix of short and long text.
35
+ - [ ] Variations should be provided as separate stories
36
+ - [ ] Aim for a comprehensive but realistic set of control options
37
+ - [ ] Provide guidelines as to what combinations of props and variations are allowed
38
+
39
+ ## Theming guidelines
40
+
41
+ - [ ] Style directly the SUI components without introducing new markup or classes
42
+ - [ ] Use variables everywhere it is possible
43
+ - [ ] Remove or modify overrides to use variables instead of hard-coded values
44
+ - [ ] Don't add HTML tags to the css specificity selector
45
+ - [ ] Add custom classes after the semantic ui classes
46
+ - [ ] Use Semantic UI naming style
47
+ - [ ] Keep important rules to a minimum and make sure they are well documented
48
+ - [ ] Use relative units in general
49
+ - [ ] Check components design when having odd numbers or images
50
+ - [ ] Check components with every responsive design preview sizes both in landscape and portrait
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+ ---
8
+
9
+ ## React guidelines
10
+
11
+ ### Basic guidelines
12
+
13
+ - [ ] One React component per file
14
+ - [ ] Use best practice naming conventions, follow the library styles (semantic-ui-less, semantic-ui-react).
15
+ - [ ] Ensure every file uses Unix line endings
16
+
17
+ ### Naming guidelines
18
+
19
+ - [ ] Filename: Use PascalCase for filenames. E.g., ItemCard.jsx
20
+ - [ ] Variable naming: Use PascalCase for React components and camelCase for their instances
21
+ - [ ] Use the filename as the component name, ReservationCard.jsx should have a reference name of ReservationCard
22
+ - [ ] Use camelCase for prop names, or PascalCase if the prop value is a React component
23
+
24
+ ### Component best practice guidelines
25
+
26
+ - [ ] Don't hard-code values, make them props
27
+ - [ ] Avoid using inline styles except for setting background images or visibility of elements
28
+ - [ ] Use imports relative to the package name
29
+ - [ ] Use whitespace to separate and group imports from other code
30
+ - [ ] Large composite components (for example the Footer) should be abstracted and split into multiple subcomponents
31
+
32
+ ### Storybook best practice guidelines
33
+
34
+ - [ ] Aim for realistic demo aspects, For example, a mix of short and long text.
35
+ - [ ] Variations should be provided as separate stories
36
+ - [ ] Aim for a comprehensive but realistic set of control options
37
+ - [ ] Provide guidelines as to what combinations of props and variations are allowed
38
+
39
+ ## Theming guidelines
40
+
41
+ - [ ] Style directly the SUI components without introducing new markup or classes
42
+ - [ ] Use variables everywhere it is possible
43
+ - [ ] Remove or modify overrides to use variables instead of hard-coded values
44
+ - [ ] Don't add HTML tags to the css specificity selector
45
+ - [ ] Add custom classes after the semantic ui classes
46
+ - [ ] Use Semantic UI naming style
47
+ - [ ] Keep important rules to a minimum and make sure they are well documented
48
+ - [ ] Use relative units in general
49
+ - [ ] Check components design when having odd numbers or images
50
+ - [ ] Check components with every responsive design preview sizes both in landscape and portrait
@@ -0,0 +1,59 @@
1
+ # This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3
+
4
+ name: Storybook & Docusaurus CI deployment
5
+
6
+ on:
7
+ push:
8
+ branches: [ develop ]
9
+ paths:
10
+ - src/**
11
+ - theme/**
12
+ - website/**
13
+ - templates/**
14
+
15
+ jobs:
16
+ build:
17
+
18
+ runs-on: ubuntu-latest
19
+
20
+ strategy:
21
+ matrix:
22
+ node-version: [16.x]
23
+ # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
24
+
25
+ steps:
26
+ - uses: actions/checkout@v2
27
+ with:
28
+ ref: ${{ github.head_ref }}
29
+ fetch-depth: 0
30
+ - name: Use Node.js ${{ matrix.node-version }} to build docusaurus website
31
+ uses: actions/setup-node@v2
32
+ with:
33
+ node-version: ${{ matrix.node-version }}
34
+ - name: Push Docusaurus build changes
35
+ run: |
36
+ git config user.name github-actions
37
+ git config user.email github-actions@github.com
38
+ git pull
39
+ git fetch
40
+ npx auto-changelog --commit-limit false --unreleased --stdout --template templates/eea.hbs > website/docs/2-whatsnew.md
41
+ cd website
42
+ yarn
43
+ yarn build
44
+ cd ..
45
+ git add website docs
46
+ git commit -m "Autobuild of docusaurus docs"
47
+ git push
48
+
49
+ - uses: convictional/trigger-workflow-and-wait@v1.3.0
50
+ with:
51
+ github_token: ${{ secrets.PAT_TOKEN }}
52
+ owner: 'eea'
53
+ repo: 'volto-kitkat-frontend'
54
+ ref: 'develop'
55
+ workflow_file_name: node.js.yml
56
+ - name: Deploy Storybook changes
57
+ run: |
58
+ echo "Deploy Storybook changes"
59
+ sleep 1s
@@ -0,0 +1,4 @@
1
+ docs/
2
+ .github/workflows/node.js.yml
3
+ CHANGELOG.md
4
+ README.md
@@ -0,0 +1,45 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
4
+ const projectRootPath = fs.realpathSync('./project'); // __dirname
5
+ const packageJson = require(path.join(projectRootPath, 'package.json'));
6
+ const jsConfig = require(path.join(projectRootPath, 'jsconfig.json'))
7
+ .compilerOptions;
8
+
9
+ const pathsConfig = jsConfig.paths;
10
+
11
+ let voltoPath = path.join(projectRootPath, 'node_modules/@plone/volto');
12
+
13
+ Object.keys(pathsConfig).forEach((pkg) => {
14
+ if (pkg === '@plone/volto') {
15
+ voltoPath = `./${jsConfig.baseUrl}/${pathsConfig[pkg][0]}`;
16
+ }
17
+ });
18
+ const AddonConfigurationRegistry = require(`${voltoPath}/addon-registry.js`);
19
+ const reg = new AddonConfigurationRegistry(projectRootPath);
20
+
21
+ // Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
22
+ const addonAliases = Object.keys(reg.packages).map((o) => [
23
+ o,
24
+ reg.packages[o].modulePath,
25
+ ]);
26
+
27
+ module.exports = {
28
+ extends: `${projectRootPath}/node_modules/@plone/volto/.eslintrc`,
29
+ settings: {
30
+ 'import/resolver': {
31
+ alias: {
32
+ map: [
33
+ ['@plone/volto', '@plone/volto/src'],
34
+ ...addonAliases,
35
+ ['@package', `${__dirname}/src`],
36
+ ['~', `${__dirname}/src`],
37
+ ],
38
+ extensions: ['.js', '.jsx', '.json'],
39
+ },
40
+ 'babel-plugin-root-import': {
41
+ rootPathSuffix: 'src',
42
+ },
43
+ },
44
+ },
45
+ };
@@ -0,0 +1,17 @@
1
+ {
2
+ "npm": {
3
+ "publish": false
4
+ },
5
+ "git": {
6
+ "changelog": "npx auto-changelog --stdout --commit-limit false -u --template https://raw.githubusercontent.com/release-it/release-it/master/templates/changelog-compact.hbs",
7
+ "tagName": "${version}"
8
+ },
9
+ "github": {
10
+ "release": true,
11
+ "releaseName": "${version}",
12
+ "releaseNotes": "npx auto-changelog --stdout --commit-limit false -u --template https://raw.githubusercontent.com/release-it/release-it/master/templates/changelog-compact.hbs"
13
+ },
14
+ "hooks": {
15
+ "after:bump": "npx auto-changelog --commit-limit false -p"
16
+ }
17
+ }
@@ -0,0 +1,15 @@
1
+ import { addons } from '@storybook/addons';
2
+
3
+ addons.setConfig({
4
+ isFullscreen: false,
5
+ showNav: true,
6
+ showPanel: true,
7
+ panelPosition: 'bottom',
8
+ sidebarAnimations: true,
9
+ enableShortcuts: true,
10
+ isToolshown: true,
11
+ theme: undefined,
12
+ selectedPanel: undefined,
13
+ initialActive: 'sidebar',
14
+ showRoots: true,
15
+ });