design-comuni-plone-theme 8.0.0-alpha.39 → 8.0.0-alpha.41

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 (34) hide show
  1. package/CHANGELOG.md +31 -1
  2. package/locales/de/LC_MESSAGES/volto.po +20 -0
  3. package/locales/en/LC_MESSAGES/volto.po +20 -0
  4. package/locales/fr/LC_MESSAGES/volto.po +20 -0
  5. package/locales/it/LC_MESSAGES/volto.po +20 -0
  6. package/locales/volto.pot +21 -1
  7. package/package.json +6 -6
  8. package/src/components/ItaliaTheme/Blocks/BandiSearch/Body.jsx +2 -2
  9. package/src/components/ItaliaTheme/Blocks/EventSearch/Body.jsx +2 -2
  10. package/src/components/ItaliaTheme/Blocks/Listing/Commons/utils.js +18 -0
  11. package/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx +195 -30
  12. package/src/components/ItaliaTheme/Blocks/RssBlock/CardWithImageRssTemplate.jsx +2 -2
  13. package/src/components/ItaliaTheme/Blocks/RssBlock/CardWithoutImageRssTemplate.jsx +2 -2
  14. package/src/components/ItaliaTheme/Blocks/UOSearch/Body.jsx +2 -2
  15. package/src/components/ItaliaTheme/View/BandoView/BandoView.jsx +1 -1
  16. package/src/components/ItaliaTheme/View/Commons/SideMenu.jsx +64 -87
  17. package/src/components/ItaliaTheme/View/DocumentoView/DocumentoView.jsx +1 -1
  18. package/src/components/ItaliaTheme/View/EventoView/EventoView.jsx +1 -1
  19. package/src/components/ItaliaTheme/View/NewsItemView/NewsItemView.jsx +1 -1
  20. package/src/components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoViewNoBlocks.jsx +1 -1
  21. package/src/components/ItaliaTheme/View/PersonaView/PersonaView.jsx +1 -1
  22. package/src/components/ItaliaTheme/View/ServizioView/ServizioView.jsx +1 -1
  23. package/src/components/ItaliaTheme/View/UOView/UOView.jsx +1 -1
  24. package/src/components/ItaliaTheme/View/VenueView/VenueView.jsx +1 -1
  25. package/src/config/volto-gdpr-privacy-defaultPanelConfig.js +1 -0
  26. package/src/customizations/volto/components/manage/Blocks/Listing/ListingBody.jsx +2 -2
  27. package/src/theme/ItaliaTheme/Addons/volto-gdpr-privacy.scss +29 -3
  28. package/src/theme/ItaliaTheme/Blocks/_search.scss +0 -3
  29. package/src/theme/ItaliaTheme/Blocks/_sliderTemplate.scss +9 -5
  30. package/src/theme/ItaliaTheme/Components/_sideMenu.scss +54 -0
  31. package/src/theme/ItaliaTheme/Views/_common.scss +0 -10
  32. package/src/theme/ItaliaTheme/_main.scss +9 -0
  33. package/src/theme/_site-variables.scss +10 -0
  34. package/src/theme/site.scss +1 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,33 @@
1
+
2
+
3
+ ## [8.0.0-alpha.41](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v8.0.0-alpha.40...v8.0.0-alpha.41) (2023-06-29)
4
+
5
+
6
+ ### Features
7
+
8
+ * a11y for Slider listing template ([#226](https://github.com/RedTurtle/design-comuni-plone-theme/issues/226)) ([7198e7b](https://github.com/RedTurtle/design-comuni-plone-theme/commit/7198e7b9fff848220b1a858be616c7d8b71c53b6))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * padding weekday date search left padding ([#223](https://github.com/RedTurtle/design-comuni-plone-theme/issues/223)) ([c9fc157](https://github.com/RedTurtle/design-comuni-plone-theme/commit/c9fc157f34f15c606209397adb2335d805770dd5))
14
+ * styles for a11y in cookiebanner ([#227](https://github.com/RedTurtle/design-comuni-plone-theme/issues/227)) ([43f0923](https://github.com/RedTurtle/design-comuni-plone-theme/commit/43f092340e289d5c54961965743c17aea42eb7da))
15
+
16
+
17
+ ### Maintenance
18
+
19
+ * aria-live on results/no results divs ([#228](https://github.com/RedTurtle/design-comuni-plone-theme/issues/228)) ([18f5a42](https://github.com/RedTurtle/design-comuni-plone-theme/commit/18f5a427522bd83fef671e0daebf2be24d67f8d9))
20
+ * update release deps ([3e2bbc1](https://github.com/RedTurtle/design-comuni-plone-theme/commit/3e2bbc1660a4111a9ce5d6796cecec992b5ae69a))
21
+ * upgrade release-it (+ deps) ([#218](https://github.com/RedTurtle/design-comuni-plone-theme/issues/218)) ([d7b7268](https://github.com/RedTurtle/design-comuni-plone-theme/commit/d7b7268de9547186239f820817ca498d43953634))
22
+
23
+ ## [8.0.0-alpha.40](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v8.0.0-alpha.39...v8.0.0-alpha.40) (2023-06-27)
24
+
25
+
26
+ ### Features
27
+
28
+ * added accordion in SideMenu component ([#121](https://github.com/RedTurtle/design-comuni-plone-theme/issues/121)) ([1b342a0](https://github.com/RedTurtle/design-comuni-plone-theme/commit/1b342a0af2296342a36d13d274792d532b597bb3))
29
+ * updated gdpr add-on and enabled focus trap in cookie banner ([d860cb1](https://github.com/RedTurtle/design-comuni-plone-theme/commit/d860cb13955da2cb1ce0351767888c4b9cb4ebae))
30
+
1
31
  ## [8.0.0-alpha.39](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v8.0.0-alpha.38...v8.0.0-alpha.39) (2023-06-23)
2
32
 
3
33
 
@@ -5483,4 +5513,4 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
5483
5513
  - added onclick to viewAll button [`baa258a`](https://github.com/RedTurtle/design-volto-theme/commit/baa258a983f9619b18f9c8d9fb078fe9b17f338b)
5484
5514
  - todo [`7814f01`](https://github.com/RedTurtle/design-volto-theme/commit/7814f01e5dd883c83bca4ecf53425ada9942d9ab)
5485
5515
  - updated gitignore with .history [`e73a28c`](https://github.com/RedTurtle/design-volto-theme/commit/e73a28c94176a172219c1a740a97047b5e2fa400)
5486
- - Added nvmrc [`fd54a3c`](https://github.com/RedTurtle/design-volto-theme/commit/fd54a3cbcf8df22997f036919dfafda870f85db7)
5516
+ - Added nvmrc [`fd54a3c`](https://github.com/RedTurtle/design-volto-theme/commit/fd54a3cbcf8df22997f036919dfafda870f85db7)
@@ -1704,6 +1704,11 @@ msgstr ""
1704
1704
  msgid "done_edit_social_links"
1705
1705
  msgstr ""
1706
1706
 
1707
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
1708
+ # defaultMessage: Navigazione elementi slider
1709
+ msgid "dots"
1710
+ msgstr ""
1711
+
1707
1712
  #: components/ItaliaTheme/View/VenueView/VenueWhere
1708
1713
  # defaultMessage: Indirizzo
1709
1714
  msgid "dove"
@@ -2656,6 +2661,11 @@ msgstr ""
2656
2661
  msgid "playStoreLink"
2657
2662
  msgstr ""
2658
2663
 
2664
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
2665
+ # defaultMessage: Precedente
2666
+ msgid "precedente"
2667
+ msgstr ""
2668
+
2659
2669
  #: components/ItaliaTheme/manage/Widgets/IconPreviewWidget
2660
2670
  # defaultMessage: Anteprima dell'icona scelta
2661
2671
  msgid "previewIconSelected"
@@ -3490,6 +3500,11 @@ msgstr ""
3490
3500
  msgid "skype"
3491
3501
  msgstr ""
3492
3502
 
3503
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
3504
+ # defaultMessage: Vai alla slide {index}
3505
+ msgid "slideDot"
3506
+ msgstr ""
3507
+
3493
3508
  #: config/Blocks/ListingOptions/sliderTemplate
3494
3509
  # defaultMessage: N° slide da mostrare
3495
3510
  msgid "slidesToShow"
@@ -3630,6 +3645,11 @@ msgstr ""
3630
3645
  msgid "subjects"
3631
3646
  msgstr ""
3632
3647
 
3648
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
3649
+ # defaultMessage: Successivo
3650
+ msgid "successivo"
3651
+ msgstr ""
3652
+
3633
3653
  #: components/ItaliaTheme/View/EventoView/EventoContatti
3634
3654
  # defaultMessage: Con il supporto di
3635
3655
  msgid "supported_by"
@@ -1689,6 +1689,11 @@ msgstr "Responsible office"
1689
1689
  msgid "done_edit_social_links"
1690
1690
  msgstr ""
1691
1691
 
1692
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
1693
+ # defaultMessage: Navigazione elementi slider
1694
+ msgid "dots"
1695
+ msgstr "Slider elements navigation"
1696
+
1692
1697
  #: components/ItaliaTheme/View/VenueView/VenueWhere
1693
1698
  # defaultMessage: Indirizzo
1694
1699
  msgid "dove"
@@ -2641,6 +2646,11 @@ msgstr ""
2641
2646
  msgid "playStoreLink"
2642
2647
  msgstr ""
2643
2648
 
2649
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
2650
+ # defaultMessage: Precedente
2651
+ msgid "precedente"
2652
+ msgstr "Previous"
2653
+
2644
2654
  #: components/ItaliaTheme/manage/Widgets/IconPreviewWidget
2645
2655
  # defaultMessage: Anteprima dell'icona scelta
2646
2656
  msgid "previewIconSelected"
@@ -3475,6 +3485,11 @@ msgstr "Go to navigation"
3475
3485
  msgid "skype"
3476
3486
  msgstr ""
3477
3487
 
3488
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
3489
+ # defaultMessage: Vai alla slide {index}
3490
+ msgid "slideDot"
3491
+ msgstr "Go to slide {index}"
3492
+
3478
3493
  #: config/Blocks/ListingOptions/sliderTemplate
3479
3494
  # defaultMessage: N° slide da mostrare
3480
3495
  msgid "slidesToShow"
@@ -3615,6 +3630,11 @@ msgstr ""
3615
3630
  msgid "subjects"
3616
3631
  msgstr "Tags"
3617
3632
 
3633
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
3634
+ # defaultMessage: Successivo
3635
+ msgid "successivo"
3636
+ msgstr "Next"
3637
+
3618
3638
  #: components/ItaliaTheme/View/EventoView/EventoContatti
3619
3639
  # defaultMessage: Con il supporto di
3620
3640
  msgid "supported_by"
@@ -1706,6 +1706,11 @@ msgstr "Bureau responsable"
1706
1706
  msgid "done_edit_social_links"
1707
1707
  msgstr ""
1708
1708
 
1709
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
1710
+ # defaultMessage: Navigazione elementi slider
1711
+ msgid "dots"
1712
+ msgstr ""
1713
+
1709
1714
  #: components/ItaliaTheme/View/VenueView/VenueWhere
1710
1715
  # defaultMessage: Indirizzo
1711
1716
  msgid "dove"
@@ -2658,6 +2663,11 @@ msgstr ""
2658
2663
  msgid "playStoreLink"
2659
2664
  msgstr ""
2660
2665
 
2666
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
2667
+ # defaultMessage: Precedente
2668
+ msgid "precedente"
2669
+ msgstr ""
2670
+
2661
2671
  #: components/ItaliaTheme/manage/Widgets/IconPreviewWidget
2662
2672
  # defaultMessage: Anteprima dell'icona scelta
2663
2673
  msgid "previewIconSelected"
@@ -3492,6 +3502,11 @@ msgstr "Aller à la navigation"
3492
3502
  msgid "skype"
3493
3503
  msgstr ""
3494
3504
 
3505
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
3506
+ # defaultMessage: Vai alla slide {index}
3507
+ msgid "slideDot"
3508
+ msgstr ""
3509
+
3495
3510
  #: config/Blocks/ListingOptions/sliderTemplate
3496
3511
  # defaultMessage: N° slide da mostrare
3497
3512
  msgid "slidesToShow"
@@ -3632,6 +3647,11 @@ msgstr ""
3632
3647
  msgid "subjects"
3633
3648
  msgstr "Sujettes"
3634
3649
 
3650
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
3651
+ # defaultMessage: Successivo
3652
+ msgid "successivo"
3653
+ msgstr ""
3654
+
3635
3655
  #: components/ItaliaTheme/View/EventoView/EventoContatti
3636
3656
  # defaultMessage: Con il supporto di
3637
3657
  msgid "supported_by"
@@ -1689,6 +1689,11 @@ msgstr "Ufficio responsabile"
1689
1689
  msgid "done_edit_social_links"
1690
1690
  msgstr "Fatto"
1691
1691
 
1692
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
1693
+ # defaultMessage: Navigazione elementi slider
1694
+ msgid "dots"
1695
+ msgstr ""
1696
+
1692
1697
  #: components/ItaliaTheme/View/VenueView/VenueWhere
1693
1698
  # defaultMessage: Indirizzo
1694
1699
  msgid "dove"
@@ -2641,6 +2646,11 @@ msgstr "Testo di aiuto"
2641
2646
  msgid "playStoreLink"
2642
2647
  msgstr "PlayStore Link"
2643
2648
 
2649
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
2650
+ # defaultMessage: Precedente
2651
+ msgid "precedente"
2652
+ msgstr ""
2653
+
2644
2654
  #: components/ItaliaTheme/manage/Widgets/IconPreviewWidget
2645
2655
  # defaultMessage: Anteprima dell'icona scelta
2646
2656
  msgid "previewIconSelected"
@@ -3475,6 +3485,11 @@ msgstr "Vai alla navigazione"
3475
3485
  msgid "skype"
3476
3486
  msgstr "Skype"
3477
3487
 
3488
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
3489
+ # defaultMessage: Vai alla slide {index}
3490
+ msgid "slideDot"
3491
+ msgstr ""
3492
+
3478
3493
  #: config/Blocks/ListingOptions/sliderTemplate
3479
3494
  # defaultMessage: N° slide da mostrare
3480
3495
  msgid "slidesToShow"
@@ -3615,6 +3630,11 @@ msgstr "Visibile"
3615
3630
  msgid "subjects"
3616
3631
  msgstr "Tags"
3617
3632
 
3633
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
3634
+ # defaultMessage: Successivo
3635
+ msgid "successivo"
3636
+ msgstr ""
3637
+
3618
3638
  #: components/ItaliaTheme/View/EventoView/EventoContatti
3619
3639
  # defaultMessage: Con il supporto di
3620
3640
  msgid "supported_by"
package/locales/volto.pot CHANGED
@@ -1,7 +1,7 @@
1
1
  msgid ""
2
2
  msgstr ""
3
3
  "Project-Id-Version: Plone\n"
4
- "POT-Creation-Date: 2023-06-19T15:33:01.943Z\n"
4
+ "POT-Creation-Date: 2023-06-28T14:35:51.566Z\n"
5
5
  "Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
6
6
  "Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
7
7
  "MIME-Version: 1.0\n"
@@ -1691,6 +1691,11 @@ msgstr ""
1691
1691
  msgid "done_edit_social_links"
1692
1692
  msgstr ""
1693
1693
 
1694
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
1695
+ # defaultMessage: Navigazione elementi slider
1696
+ msgid "dots"
1697
+ msgstr ""
1698
+
1694
1699
  #: components/ItaliaTheme/View/VenueView/VenueWhere
1695
1700
  # defaultMessage: Indirizzo
1696
1701
  msgid "dove"
@@ -2643,6 +2648,11 @@ msgstr ""
2643
2648
  msgid "playStoreLink"
2644
2649
  msgstr ""
2645
2650
 
2651
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
2652
+ # defaultMessage: Precedente
2653
+ msgid "precedente"
2654
+ msgstr ""
2655
+
2646
2656
  #: components/ItaliaTheme/manage/Widgets/IconPreviewWidget
2647
2657
  # defaultMessage: Anteprima dell'icona scelta
2648
2658
  msgid "previewIconSelected"
@@ -3477,6 +3487,11 @@ msgstr ""
3477
3487
  msgid "skype"
3478
3488
  msgstr ""
3479
3489
 
3490
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
3491
+ # defaultMessage: Vai alla slide {index}
3492
+ msgid "slideDot"
3493
+ msgstr ""
3494
+
3480
3495
  #: config/Blocks/ListingOptions/sliderTemplate
3481
3496
  # defaultMessage: N° slide da mostrare
3482
3497
  msgid "slidesToShow"
@@ -3617,6 +3632,11 @@ msgstr ""
3617
3632
  msgid "subjects"
3618
3633
  msgstr ""
3619
3634
 
3635
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
3636
+ # defaultMessage: Successivo
3637
+ msgid "successivo"
3638
+ msgstr ""
3639
+
3620
3640
  #: components/ItaliaTheme/View/EventoView/EventoContatti
3621
3641
  # defaultMessage: Con il supporto di
3622
3642
  msgid "supported_by"
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "design-comuni-plone-theme",
3
3
  "description": "Volto Theme for Italia design guidelines",
4
4
  "license": "GPL-v3",
5
- "version": "8.0.0-alpha.39",
5
+ "version": "8.0.0-alpha.41",
6
6
  "main": "src/index.js",
7
7
  "keywords": [
8
8
  "volto-addon",
@@ -133,7 +133,7 @@
133
133
  "volto-editablefooter": "5.0.1",
134
134
  "volto-feedback": "0.1.5",
135
135
  "volto-form-block": "3.1.0",
136
- "volto-gdpr-privacy": "2.0.0",
136
+ "volto-gdpr-privacy": "2.1.0",
137
137
  "volto-google-analytics": "2.0.0",
138
138
  "volto-multilingual-widget": "3.0.0",
139
139
  "volto-rss-block": "3.0.0",
@@ -147,16 +147,16 @@
147
147
  },
148
148
  "devDependencies": {
149
149
  "@babel/core": "7.19.6",
150
- "@commitlint/cli": "^12.0.0",
151
- "@commitlint/config-conventional": "^12.0.0",
150
+ "@commitlint/cli": "17.6.6",
151
+ "@commitlint/config-conventional": "17.6.6",
152
152
  "@plone/scripts": "*",
153
- "@release-it/conventional-changelog": "^2.0.1",
153
+ "@release-it/conventional-changelog": "5.1.1",
154
154
  "eslint": "8.42.0",
155
155
  "eslint-plugin-prettier": "^3.4.1",
156
156
  "husky": "8.0.2",
157
157
  "lint-staged": "13.0.3",
158
158
  "prettier": "^2.7.1",
159
- "release-it": "^14.6.1",
159
+ "release-it": "15.11.0",
160
160
  "stylelint": "15.7.0",
161
161
  "stylelint-config-idiomatic-order": "^9.0.0",
162
162
  "stylelint-config-prettier": "^9.0.3",
@@ -201,7 +201,7 @@ const Body = ({ data, inEditMode, path, onChangeBlock }) => {
201
201
 
202
202
  {!loading ? (
203
203
  items?.length > 0 ? (
204
- <div className="mt-4" ref={resultsRef}>
204
+ <div className="mt-4" ref={resultsRef} aria-live="polite">
205
205
  <div className="block listing">
206
206
  <BandiInEvidenceTemplate items={items} full_width={false} />
207
207
  </div>
@@ -215,7 +215,7 @@ const Body = ({ data, inEditMode, path, onChangeBlock }) => {
215
215
  </div>
216
216
  ) : querystringResults ? (
217
217
  <>
218
- <div className="mt-4">
218
+ <div className="mt-4" aria-live="polite">
219
219
  <p className="text-center">
220
220
  {intl.formatMessage(messages.noResult)}
221
221
  </p>
@@ -211,7 +211,7 @@ const Body = ({ data, inEditMode, path, onChangeBlock }) => {
211
211
 
212
212
  {!loading ? (
213
213
  items?.length > 0 ? (
214
- <div className="mt-4" ref={resultsRef}>
214
+ <div className="mt-4" ref={resultsRef} aria-live="polite">
215
215
  <div className="block listing">
216
216
  <CardWithImageTemplate items={items} full_width={false} />
217
217
  </div>
@@ -225,7 +225,7 @@ const Body = ({ data, inEditMode, path, onChangeBlock }) => {
225
225
  </div>
226
226
  ) : querystringResults ? (
227
227
  <>
228
- <div className="mt-4">
228
+ <div className="mt-4" aria-live="polite">
229
229
  <p className="text-center">
230
230
  {intl.formatMessage(messages.noResult)}
231
231
  </p>
@@ -15,3 +15,21 @@ export const getCategory = (item, show_type, show_section, props) => {
15
15
  }
16
16
  return null;
17
17
  };
18
+
19
+ export const visibleSlideTitle = (selector) => {
20
+ // Needed to deal with react-slick duplicating a lot of slides
21
+ // when used in infinite mode. It's an useless and counterproductive
22
+ // thing to do on their part, there are multiple issues opened.
23
+ // The lib is not actually mantained so...
24
+ return Array.from(document.querySelectorAll(selector)).find((e) => {
25
+ const rect = e.getBoundingClientRect();
26
+ return rect.left >= 0 && rect.right <= window.innerWidth;
27
+ });
28
+ };
29
+ export const focusNext = (currentSlide) => {
30
+ // Custom handling of focus as per Arter a11y audit and request
31
+ const link = visibleSlideTitle(`a.slide-link[data-slide="${currentSlide}"]`);
32
+ if (!link || document.activeElement === link) return;
33
+ // eslint-disable-next-line no-unused-expressions
34
+ link.focus();
35
+ };
@@ -1,20 +1,17 @@
1
1
  import 'slick-carousel/slick/slick.css';
2
2
  import 'design-comuni-plone-theme/components/slick-carousel/slick/slick-theme.css';
3
-
4
3
  import { Col, Container, Row } from 'design-react-kit';
5
4
  import {
6
5
  Icon,
7
6
  ListingImage,
8
7
  ListingLinkMore,
9
- NextArrow,
10
- PrevArrow,
11
8
  } from 'design-comuni-plone-theme/components/ItaliaTheme';
12
- /* eslint-disable jsx-a11y/no-static-element-interactions */
13
- /* eslint-disable jsx-a11y/click-events-have-key-events */
14
- /* eslint-disable jsx-a11y/interactive-supports-focus */
9
+ import {
10
+ focusNext,
11
+ visibleSlideTitle,
12
+ } from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/Listing/Commons/utils';
15
13
  import React, { useRef, useState } from 'react';
16
14
  import { defineMessages, useIntl } from 'react-intl';
17
-
18
15
  import PropTypes from 'prop-types';
19
16
  import { UniversalLink } from '@plone/volto/components';
20
17
  import cx from 'classnames';
@@ -33,14 +30,98 @@ const messages = defineMessages({
33
30
  id: 'Pause slider',
34
31
  defaultMessage: 'Metti in pausa',
35
32
  },
33
+ precedente: {
34
+ id: 'precedente',
35
+ defaultMessage: 'Precedente',
36
+ },
37
+ successivo: {
38
+ id: 'successivo',
39
+ defaultMessage: 'Successivo',
40
+ },
41
+ dots: {
42
+ id: 'dots',
43
+ defaultMessage: 'Navigazione elementi slider',
44
+ },
45
+ slideDot: {
46
+ id: 'slideDot',
47
+ defaultMessage: 'Vai alla slide {index}',
48
+ },
36
49
  });
37
50
 
51
+ function NextArrow(props) {
52
+ // Custom handling of focus as per Arter a11y audit and request
53
+ const { className, style, onClick, currentSlide, intl } = props;
54
+ const handleClick = (options) => {
55
+ onClick(options, false);
56
+ };
57
+
58
+ const handleKeyDown = async (event) => {
59
+ // Tab n/p
60
+ if (event.key === 'Tab' && event.shiftKey) {
61
+ event.preventDefault();
62
+ event.stopPropagation();
63
+ focusNext(currentSlide);
64
+ }
65
+ if (event.key === 'Enter' || event.key === ' ') {
66
+ event.preventDefault();
67
+ event.stopPropagation();
68
+ await onClick(event);
69
+ }
70
+ };
71
+ return (
72
+ <button
73
+ className={className}
74
+ style={{ ...style }}
75
+ onClick={handleClick}
76
+ onKeyDown={handleKeyDown}
77
+ tabIndex={0}
78
+ title={intl.formatMessage(messages.successivo)}
79
+ aria-label={intl.formatMessage(messages.successivo)}
80
+ >
81
+ <Icon icon="chevron-right" key="chevron-right" />
82
+ <span class="sr-only">{intl.formatMessage(messages.successivo)}</span>
83
+ </button>
84
+ );
85
+ }
86
+
87
+ function PrevArrow(props) {
88
+ // Custom handling of focus as per Arter a11y audit and request
89
+ const { className, style, onClick, currentSlide, intl } = props;
90
+
91
+ const handleKeyDown = async (event) => {
92
+ // Tab n/p
93
+ if (event.key === 'Tab' && !event.shiftKey) {
94
+ event.preventDefault();
95
+ event.stopPropagation();
96
+ focusNext(currentSlide);
97
+ }
98
+ if (event.key === 'Enter' || event.key === ' ') {
99
+ event.preventDefault();
100
+ event.stopPropagation();
101
+ await onClick(event);
102
+ }
103
+ };
104
+ return (
105
+ <button
106
+ className={className}
107
+ style={{ ...style }}
108
+ onClick={onClick}
109
+ tabIndex={0}
110
+ title={intl.formatMessage(messages.precedente)}
111
+ aria-label={intl.formatMessage(messages.precedente)}
112
+ onKeyDown={handleKeyDown}
113
+ >
114
+ <Icon icon="chevron-left" key="chevron-left-prev" />
115
+ <span class="sr-only">{intl.formatMessage(messages.precedente)}</span>
116
+ </button>
117
+ );
118
+ }
119
+
38
120
  const SliderTemplate = ({
39
121
  items,
40
122
  title,
41
123
  isEditMode,
42
124
  show_block_bg,
43
- linkAlign,
44
125
  linkTitle,
45
126
  linkHref,
46
127
  slidesToShow = '1',
@@ -50,14 +131,12 @@ const SliderTemplate = ({
50
131
  autoplay = false,
51
132
  autoplay_speed = 2, //seconds
52
133
  reactSlick,
53
- titleLine,
54
- linkmore_id_lighthouse,
55
134
  }) => {
56
135
  const intl = useIntl();
57
- const slider = useRef(null);
58
136
  const [userAutoplay, setUserAutoplay] = useState(autoplay);
59
137
  const nSlidesToShow = parseInt(slidesToShow);
60
138
  const Slider = reactSlick.default;
139
+ const slider = useRef(null);
61
140
 
62
141
  const toggleAutoplay = () => {
63
142
  if (!slider?.current) return;
@@ -70,6 +149,91 @@ const SliderTemplate = ({
70
149
  }
71
150
  };
72
151
 
152
+ const handleKeyDown = (event) => {
153
+ // Tab n/p
154
+ // Custom handling of focus as per Arter a11y audit and request
155
+ if (event.key === 'Tab') {
156
+ event.preventDefault();
157
+ event.stopPropagation();
158
+ const currentSlide = parseInt(event.target.dataset.slide);
159
+ if (event.shiftKey) {
160
+ if (
161
+ nSlidesToShow > 1 &&
162
+ visibleSlideTitle(`a.slide-link[data-slide="${currentSlide - 1}"]`)
163
+ ) {
164
+ focusNext(currentSlide - 1);
165
+ } else {
166
+ const prevArrow = document.querySelector('.slick-arrow.slick-prev');
167
+ prevArrow.focus();
168
+ }
169
+ } else {
170
+ if (
171
+ nSlidesToShow > 1 &&
172
+ visibleSlideTitle(`a.slide-link[data-slide="${currentSlide + 1}"]`)
173
+ ) {
174
+ focusNext(currentSlide + 1);
175
+ } else {
176
+ const nextArrow = document.querySelector('.slick-arrow.slick-next');
177
+ nextArrow.focus();
178
+ }
179
+ }
180
+ }
181
+ };
182
+ const handleDotKeyDown = (event, index, originalOnClick) => {
183
+ // Custom handling of focus as per Arter a11y audit and request
184
+ if (event.key === 'Enter' || event.key === ' ') {
185
+ event.preventDefault();
186
+ event.stopPropagation();
187
+ originalOnClick(event);
188
+ }
189
+ };
190
+
191
+ const renderCustomDots = (props) => {
192
+ // Custom handling of focus as per Arter a11y audit and request
193
+ return (
194
+ <ul
195
+ className="slick-dots"
196
+ aria-label={intl.formatMessage(messages.dots)}
197
+ title={intl.formatMessage(messages.dots)}
198
+ >
199
+ {props.map((item, index) => {
200
+ const El = item.type;
201
+ const children = item.props.children;
202
+ // Justified assumption: children is an Object and not an Array here
203
+ const Child =
204
+ children.type ||
205
+ function () {
206
+ return null;
207
+ };
208
+ return (
209
+ <El
210
+ className={`${item.props.className} slick-dot`}
211
+ tabIndex={0}
212
+ title={intl.formatMessage(messages.slideDot, {
213
+ index: index + 1,
214
+ })}
215
+ onKeyDown={(event) =>
216
+ handleDotKeyDown(event, index, children.props.onClick)
217
+ }
218
+ >
219
+ <Child
220
+ {...children.props}
221
+ tabIndex={-1}
222
+ style={{ padding: 0 }}
223
+ title={intl.formatMessage(messages.slideDot, {
224
+ index: index + 1,
225
+ })}
226
+ aria-label={intl.formatMessage(messages.slideDot, {
227
+ index: index + 1,
228
+ })}
229
+ />
230
+ </El>
231
+ );
232
+ })}
233
+ </ul>
234
+ );
235
+ };
236
+
73
237
  const settings = {
74
238
  dots: show_dots,
75
239
  infinite: true,
@@ -86,8 +250,12 @@ const SliderTemplate = ({
86
250
  focusOnSelect: true,
87
251
  draggable: true,
88
252
  accessibility: true,
89
- nextArrow: <NextArrow />,
90
- prevArrow: <PrevArrow />,
253
+ // Custom handling of focus as per Arter a11y audit and request
254
+ nextArrow: <NextArrow intl={intl} />,
255
+ prevArrow: <PrevArrow intl={intl} />,
256
+ appendDots: renderCustomDots,
257
+ //
258
+ afterChange: focusNext,
91
259
  responsive: [
92
260
  {
93
261
  breakpoint: 980,
@@ -109,9 +277,7 @@ const SliderTemplate = ({
109
277
  {title && (
110
278
  <Row>
111
279
  <Col>
112
- <h2 className={cx('mb-4', { 'title-bottom-line': titleLine })}>
113
- {title}
114
- </h2>
280
+ <h2 className="mb-4">{title}</h2>
115
281
  </Col>
116
282
  </Row>
117
283
  )}
@@ -154,6 +320,7 @@ const SliderTemplate = ({
154
320
  <div
155
321
  className="it-single-slide-wrapper"
156
322
  key={item['@id'] + index}
323
+ data-slide={index}
157
324
  >
158
325
  <div className="slide-wrapper">
159
326
  {image ? (
@@ -162,11 +329,15 @@ const SliderTemplate = ({
162
329
  <div className="img-placeholder"></div>
163
330
  )}
164
331
  {show_image_title && (
165
- <UniversalLink
166
- item={item}
167
- title={intl.formatMessage(messages.viewImage)}
168
- >
169
- <div className="slide-title">
332
+ <div className="slide-title">
333
+ <UniversalLink
334
+ item={item}
335
+ title={intl.formatMessage(messages.viewImage)}
336
+ tabIndex={0}
337
+ onKeyDown={handleKeyDown}
338
+ className="slide-link"
339
+ data-slide={index}
340
+ >
170
341
  {full_width ? (
171
342
  <Container>
172
343
  {item.title}{' '}
@@ -178,8 +349,8 @@ const SliderTemplate = ({
178
349
  <Icon icon="arrow-right" key="arrow-right" />
179
350
  </>
180
351
  )}
181
- </div>
182
- </UniversalLink>
352
+ </UniversalLink>
353
+ </div>
183
354
  )}
184
355
  </div>
185
356
  </div>
@@ -188,13 +359,7 @@ const SliderTemplate = ({
188
359
  </Slider>
189
360
  </div>
190
361
  </div>
191
- <ListingLinkMore
192
- title={linkTitle}
193
- href={linkHref}
194
- linkAlign={linkAlign}
195
- className="my-4"
196
- linkmoreIdLighthouse={linkmore_id_lighthouse}
197
- />
362
+ <ListingLinkMore title={linkTitle} href={linkHref} className="my-4" />
198
363
  </Container>
199
364
  </div>
200
365
  );
@@ -38,7 +38,7 @@ const CardWithImageRssTemplate = ({
38
38
  const intl = useIntl();
39
39
 
40
40
  return (
41
- <div className={cx('', { 'public-ui': isEditMode })}>
41
+ <div className={cx('', { 'public-ui': isEditMode })} aria-live="polite">
42
42
  {items?.length > 0 ? (
43
43
  <>
44
44
  {data.title && (
@@ -105,7 +105,7 @@ const CardWithImageRssTemplate = ({
105
105
  )}
106
106
  </>
107
107
  ) : data.feed ? (
108
- <div className="no-rss-feed-results">
108
+ <div className="no-rss-feed-results" aria-live="polite">
109
109
  {intl.formatMessage(messages.noResults)}
110
110
  </div>
111
111
  ) : null}
@@ -37,7 +37,7 @@ const CardWithoutImageRssTemplate = ({
37
37
  const intl = useIntl();
38
38
 
39
39
  return (
40
- <div className={cx('', { 'public-ui': isEditMode })}>
40
+ <div className={cx('', { 'public-ui': isEditMode })} aria-live="polite">
41
41
  {items?.length > 0 ? (
42
42
  <>
43
43
  {data.title && (
@@ -97,7 +97,7 @@ const CardWithoutImageRssTemplate = ({
97
97
  )}
98
98
  </>
99
99
  ) : data.feed ? (
100
- <div className="no-rss-feed-results">
100
+ <div className="no-rss-feed-results" aria-live="polite">
101
101
  {intl.formatMessage(messages.noResults)}
102
102
  </div>
103
103
  ) : null}
@@ -195,7 +195,7 @@ const Body = ({ data, inEditMode, path, onChangeBlock }) => {
195
195
 
196
196
  {!loading ? (
197
197
  items?.length > 0 ? (
198
- <div className="mt-4" ref={resultsRef}>
198
+ <div className="mt-4" ref={resultsRef} aria-live="polite">
199
199
  <div className="block listing">
200
200
  <CardWithImageTemplate items={items} full_width={false} />
201
201
  </div>
@@ -209,7 +209,7 @@ const Body = ({ data, inEditMode, path, onChangeBlock }) => {
209
209
  </div>
210
210
  ) : querystringResults ? (
211
211
  <>
212
- <div className="mt-4">
212
+ <div className="mt-4" aria-live="polite">
213
213
  <p className="text-center">
214
214
  {intl.formatMessage(messages.noResult)}
215
215
  </p>
@@ -65,7 +65,7 @@ const BandoView = ({ content, location }) => {
65
65
  showtassonomiaargomenti={true}
66
66
  showbandostate={true}
67
67
  />
68
- <div className="row border-top row-column-border row-column-menu-left">
68
+ <div className="row row-column-border row-column-menu-left">
69
69
  <aside className="col-lg-4">
70
70
  {__CLIENT__ && (
71
71
  <SideMenu data={sideMenuElements} content_uid={content?.UID} />
@@ -4,8 +4,12 @@
4
4
  import { defineMessages, useIntl } from 'react-intl';
5
5
  import React, { useEffect, useState, useCallback, useMemo } from 'react';
6
6
  import { throttle } from 'lodash';
7
- import { Progress } from 'design-react-kit';
8
- import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme';
7
+ import {
8
+ Progress,
9
+ Accordion,
10
+ AccordionBody,
11
+ AccordionHeader,
12
+ } from 'design-react-kit';
9
13
  import cx from 'classnames';
10
14
 
11
15
  const messages = defineMessages({
@@ -69,7 +73,9 @@ const SideMenu = ({ data, content_uid }) => {
69
73
  const [scrollY, setScrollY] = useState(0);
70
74
  const [isClient, setIsClient] = useState(false);
71
75
 
72
- const [isNavOpen, setIsNavOpen] = useState(false);
76
+ const [isNavOpen, setIsNavOpen] = useState(
77
+ __CLIENT__ ? window.innerWidth >= 992 : false,
78
+ );
73
79
 
74
80
  useEffect(() => {
75
81
  setIsClient(true);
@@ -121,14 +127,18 @@ const SideMenu = ({ data, content_uid }) => {
121
127
 
122
128
  const handleClickAnchor = (id) => (e) => {
123
129
  e.preventDefault();
124
- document.getElementById(id)?.scrollIntoView?.({
125
- behavior: 'smooth',
126
- block: 'start',
127
- });
128
- setIsNavOpen(false);
130
+ if (window.innerWidth < 992) {
131
+ setIsNavOpen(false);
132
+ }
133
+ // setTimeout hack should wait for rerender after setIsNavOpen
134
+ setTimeout(() => {
135
+ document.getElementById(id)?.scrollIntoView?.({
136
+ behavior: 'smooth',
137
+ block: 'start',
138
+ });
139
+ }, 0);
129
140
  };
130
141
 
131
- // const yCountEnd = document.querySelector('#main-content-section');
132
142
  const yCountEnd = isClient
133
143
  ? document.querySelector('#main-content-section')
134
144
  : null;
@@ -141,84 +151,51 @@ const SideMenu = ({ data, content_uid }) => {
141
151
  return headers?.length > 0 ? (
142
152
  <div className="sticky-wrapper navbar-wrapper page-side-menu">
143
153
  <nav className="navbar it-navscroll-wrapper navbar-expand-lg">
144
- <button
145
- className={
146
- isNavOpen
147
- ? 'custom-navbar-toggler focus--mouse'
148
- : 'custom-navbar-toggler'
149
- }
150
- type="button"
151
- aria-controls="navbarNavB"
152
- aria-expanded={isNavOpen ? 'true' : 'false'}
153
- aria-label="Toggle navigation"
154
- data-target="#navbarNavB"
155
- onClick={() => {
156
- setIsNavOpen(!isNavOpen);
157
- }}
158
- >
159
- <span className="it-list"></span>
160
- {intl.formatMessage(messages.index)}
161
- </button>
162
-
163
- <div
164
- className={
165
- isNavOpen ? 'navbar-collapsable expanded' : 'navbar-collapsable'
166
- }
167
- id="navbarNavB"
168
- style={isNavOpen ? { display: 'block' } : { display: 'none' }}
169
- >
170
- <div
171
- className="overlay"
172
- style={isNavOpen ? { display: 'block' } : { display: 'none' }}
173
- ></div>
174
- <div className="close-div visually-hidden">
175
- <button className="btn close-menu" type="button">
176
- <span className="it-close"></span>
177
- {intl.formatMessage(messages.close)}
178
- </button>
179
- </div>
180
- <a
181
- className="it-back-button"
182
- href="#"
183
- style={isNavOpen ? { display: 'block' } : { display: 'none' }}
184
- onClick={(e) => {
185
- e.preventDefault();
186
- setIsNavOpen(!isNavOpen);
187
- }}
188
- >
189
- <Icon
190
- className="align-top"
191
- color="primary"
192
- icon="it-chevron-left"
193
- style={{ ariaHidden: true }}
194
- size="sm"
195
- />
196
- <span>{intl.formatMessage(messages.back)}</span>
197
- </a>
198
- <div className="menu-wrapper">
199
- <div className="link-list-wrapper menu-link-list">
200
- <h3>{intl.formatMessage(messages.index)}</h3>
201
- <div className="mb-3">
202
- <Progress
203
- value={progressValue > 0 ? 100 * progressValue : 0}
204
- role="progressbar"
205
- />
206
- </div>
207
- <ul className="link-list" data-element="page-index">
208
- {headers.map((item, i) => (
209
- <li className="nav-item" key={item.id}>
210
- <a
211
- className={cx('nav-link', {
212
- active: item.id === activeSection,
213
- })}
214
- href={`#${item.id}`}
215
- onClick={handleClickAnchor(item.id)}
216
- >
217
- <span>{item.title}</span>
218
- </a>
219
- </li>
220
- ))}
221
- </ul>
154
+ <div className="menu-wrapper">
155
+ <div className="link-list-wrapper menu-link-list">
156
+ <div className="accordion-wrapper">
157
+ <Accordion>
158
+ <AccordionHeader
159
+ active={isNavOpen}
160
+ onToggle={() => {
161
+ setIsNavOpen(!isNavOpen);
162
+ }}
163
+ >
164
+ <h3>{intl.formatMessage(messages.index)}</h3>
165
+ </AccordionHeader>
166
+ <div className="mb-3">
167
+ <Progress
168
+ value={progressValue > 0 ? 100 * progressValue : 0}
169
+ role="progressbar"
170
+ />
171
+ </div>
172
+ <AccordionBody
173
+ active={isNavOpen}
174
+ className={
175
+ isNavOpen
176
+ ? 'accordion-collapse show'
177
+ : 'accordion-collapse collapse'
178
+ }
179
+ >
180
+ <ul className="link-list" data-element="page-index">
181
+ {headers.map((item, i) => {
182
+ return (
183
+ <li className="nav-item" key={item.id}>
184
+ <a
185
+ className={cx('nav-link', {
186
+ active: item.id === activeSection,
187
+ })}
188
+ href={`#${item.id}`}
189
+ onClick={handleClickAnchor(item.id)}
190
+ >
191
+ <span>{item.title}</span>
192
+ </a>
193
+ </li>
194
+ );
195
+ })}
196
+ </ul>
197
+ </AccordionBody>
198
+ </Accordion>
222
199
  </div>
223
200
  </div>
224
201
  </div>
@@ -72,7 +72,7 @@ const DocumentoView = ({ content, location }) => {
72
72
  {/* HEADER IMAGE */}
73
73
  <ContentImage content={content} position="afterHeader" />
74
74
 
75
- <div className="row border-top row-column-border row-column-menu-left">
75
+ <div className="row row-column-border row-column-menu-left">
76
76
  <aside className="col-lg-4">
77
77
  {__CLIENT__ && (
78
78
  <SideMenu data={sideMenuElements} content_uid={content?.UID} />
@@ -78,7 +78,7 @@ const EventoView = ({ content, location }) => {
78
78
  {/* HEADER IMAGE */}
79
79
  <ContentImage content={content} position="afterHeader" />
80
80
 
81
- <div className="row border-top row-column-border row-column-menu-left">
81
+ <div className="row row-column-border row-column-menu-left">
82
82
  <aside className="col-lg-4">
83
83
  {__CLIENT__ && (
84
84
  <SideMenu data={sideMenuElements} content_uid={content?.UID} />
@@ -84,7 +84,7 @@ const NewsItemView = ({ content, location }) => {
84
84
 
85
85
  {/* HEADER IMAGE */}
86
86
  <ContentImage content={content} position="afterHeader" />
87
- <div className="row border-top row-column-border row-column-menu-left">
87
+ <div className="row row-column-border row-column-menu-left">
88
88
  <aside className="col-lg-4">
89
89
  <SideMenu data={sideMenuElements} content_uid={content?.UID} />
90
90
  </aside>
@@ -92,7 +92,7 @@ const PaginaArgomentoViewNoBlocks = ({ content }) => {
92
92
  {/* HEADER IMAGE */}
93
93
  <ContentImage content={content} position="afterHeader" />
94
94
 
95
- <div className="row border-top row-column-border row-column-menu-left">
95
+ <div className="row row-column-border row-column-menu-left">
96
96
  <aside className="col-lg-4">
97
97
  <SideMenu data={sideMenuElements} content_uid={content?.UID} />
98
98
  </aside>
@@ -58,7 +58,7 @@ const PersonaView = ({ content }) => {
58
58
  showdates={false}
59
59
  showtassonomiaargomenti={true}
60
60
  />
61
- <div className="row border-top row-column-border row-column-menu-left">
61
+ <div className="row row-column-border row-column-menu-left">
62
62
  <aside className="col-lg-4">
63
63
  <SideMenu data={sideMenuElements} content_uid={content?.UID} />
64
64
  </aside>
@@ -132,7 +132,7 @@ const ServizioView = ({ content, moment }) => {
132
132
  {/* HEADER IMAGE */}
133
133
  <ContentImage content={content} position="afterHeader" />
134
134
 
135
- <div className="row border-top row-column-border row-column-menu-left">
135
+ <div className="row row-column-border row-column-menu-left">
136
136
  <aside className="col-lg-4 ">
137
137
  <SideMenu data={sideMenuElements} content_uid={content?.UID} />
138
138
  </aside>
@@ -78,7 +78,7 @@ const UOView = ({ content }) => {
78
78
  {/* HEADER IMAGE */}
79
79
  <ContentImage content={content} position="afterHeader" />
80
80
 
81
- <div className="row border-top row-column-border row-column-menu-left">
81
+ <div className="row row-column-border row-column-menu-left">
82
82
  <aside className="col-lg-4">
83
83
  {__CLIENT__ && (
84
84
  <SideMenu data={sideMenuElements} content_uid={content?.UID} />
@@ -89,7 +89,7 @@ const VenueView = ({ content }) => {
89
89
  {/* HEADER IMAGE */}
90
90
  <ContentImage content={content} position="afterHeader" />
91
91
 
92
- <div className="row border-top row-column-border row-column-menu-left">
92
+ <div className="row row-column-border row-column-menu-left">
93
93
  <aside className="col-lg-4">
94
94
  {__CLIENT__ && (
95
95
  <SideMenu data={sideMenuElements} content_uid={content?.UID} />
@@ -1,5 +1,6 @@
1
1
  const defaultPanelConfig = {
2
2
  last_updated: '2022-03-03T11:25:00+00:00', //it is used to know whether to resubmit the banner to the user if the choices have changed.
3
+ focusTrapEnabled: true,
3
4
 
4
5
  text: {
5
6
  //Text that is shown when the banner appears
@@ -105,7 +105,7 @@ const ListingBody = React.memo(
105
105
  )}
106
106
  {!loadingQuery &&
107
107
  (listingItems.length > 0 || additionalFilters?.length > 0) ? (
108
- <div className={`${getBlockClasses()}`} ref={listingRef}>
108
+ <div className={`${getBlockClasses()}`} ref={listingRef} aria-live="polite">
109
109
  <ListingBodyTemplate
110
110
  items={listingItems}
111
111
  isEditMode={isEditMode}
@@ -127,7 +127,7 @@ const ListingBody = React.memo(
127
127
  )}
128
128
  </div>
129
129
  ) : isEditMode ? (
130
- <div className="listing message">
130
+ <div className="listing message" aria-live="polite">
131
131
  {isFolderContentsListing && (
132
132
  <FormattedMessage
133
133
  id="No items found in this container."
@@ -39,6 +39,10 @@
39
39
  line-height: 17px;
40
40
  outline: none;
41
41
  vertical-align: baseline;
42
+ input:focus ~ label::before {
43
+ box-shadow: $gdpr-focus-shadow !important;
44
+ outline: none !important;
45
+ }
42
46
 
43
47
  label {
44
48
  position: relative;
@@ -48,6 +52,8 @@
48
52
 
49
53
  &:before {
50
54
  left: 0;
55
+ border: 1px solid $gdpr-toggle-border;
56
+ background-color: $gdpr-toggle;
51
57
  transition: border 0.1s ease, opacity 0.1s ease,
52
58
  transform 0.1s ease, box-shadow 0.1s ease;
53
59
  }
@@ -99,7 +105,7 @@
99
105
  &:checked {
100
106
  ~ label {
101
107
  &:before {
102
- background-color: $primary;
108
+ background-color: $gdpr-toggle-checked;
103
109
  }
104
110
 
105
111
  &:after {
@@ -123,7 +129,7 @@
123
129
  display: block;
124
130
  width: 3.5rem;
125
131
  height: 1.5rem;
126
- border: none;
132
+ border: 1px solid $gdpr-toggle-border;
127
133
  border-radius: 500rem;
128
134
  content: '';
129
135
  transform: none;
@@ -135,7 +141,7 @@
135
141
  top: 0rem;
136
142
  width: 1.5rem;
137
143
  height: 1.5rem;
138
- border: none;
144
+ border: 1.5px solid $gdpr-toggle-border;
139
145
  background: #ffffff
140
146
  linear-gradient(transparent, rgba(0, 0, 0, 0.05));
141
147
  border-radius: 500rem;
@@ -217,3 +223,23 @@ body.has-toolbar-collapsed {
217
223
  }
218
224
  }
219
225
  }
226
+ .gdpr-privacy-banner
227
+ .gdpr-privacy-content-wrapper
228
+ .gdpr-privacy-content
229
+ .buttons
230
+ button.gdpr-privacy-banner-button:focus,
231
+ .gdpr-privacy-banner
232
+ .gdpr-privacy-content-wrapper
233
+ .gdpr-privacy-content
234
+ a:focus {
235
+ box-shadow: $gdpr-focus-shadow;
236
+ outline: none !important;
237
+ }
238
+
239
+ .gdpr-privacy-banner
240
+ .gdpr-privacy-content-wrapper
241
+ .gdpr-privacy-content
242
+ .buttons
243
+ button.gdpr-privacy-banner-button.btn-primary {
244
+ background-color: $gdpr-accept-all;
245
+ }
@@ -83,9 +83,6 @@
83
83
  border-bottom: none;
84
84
  }
85
85
  }
86
- .DayPicker_weekHeader_ul {
87
- padding-left: 0 !important;
88
- }
89
86
  }
90
87
  .select-facet {
91
88
  // Same div, but for some reason when built, valuecontainer
@@ -132,14 +132,18 @@
132
132
 
133
133
  background-color: #3f4142e0;
134
134
 
135
- color: $white;
135
+ a {
136
+ color: $white;
136
137
 
137
- font-size: 1.8rem;
138
- font-weight: bold;
139
- text-decoration: none;
138
+ font-size: 1.8rem;
139
+ font-weight: bold;
140
+ text-decoration: none;
141
+ }
140
142
 
141
143
  &:hover,
142
- &:active {
144
+ &:active,
145
+ a:hover,
146
+ a:active {
143
147
  text-decoration-line: underline;
144
148
  }
145
149
 
@@ -0,0 +1,54 @@
1
+ .page-side-menu {
2
+ .menu-wrapper {
3
+ width: 100%;
4
+ .accordion-wrapper {
5
+ .accordion {
6
+ border-bottom: none;
7
+ .accordion-header {
8
+ width: 100%;
9
+ display: block;
10
+ button.accordion-button {
11
+ border: none;
12
+ background: transparent;
13
+ width: 100%;
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: space-between;
17
+
18
+ h3 {
19
+ padding: 0px;
20
+ }
21
+ }
22
+ }
23
+ }
24
+ }
25
+ }
26
+ }
27
+
28
+ @media (max-width: #{map-get($grid-breakpoints, lg)}) {
29
+ .page-side-menu {
30
+ .menu-wrapper {
31
+ .accordion-wrapper {
32
+ .accordion {
33
+ .accordion-header {
34
+ button.accordion-button {
35
+ .accordion-title {
36
+ padding-bottom: 1.3em;
37
+ padding-top: 1.3em;
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }
44
+ .navbar.it-navscroll-wrapper {
45
+ .menu-wrapper {
46
+ padding: 0;
47
+ }
48
+ }
49
+ }
50
+
51
+ .it-page-sections-container {
52
+ border-top: none !important;
53
+ }
54
+ }
@@ -78,16 +78,6 @@ picture.volto-image.responsive img.full-width {
78
78
  }
79
79
  }
80
80
 
81
- @media (max-width: #{map-get($grid-breakpoints, lg)}) {
82
- .page-side-menu {
83
- display: none;
84
- }
85
-
86
- .it-page-sections-container {
87
- border-top: none !important;
88
- }
89
- }
90
-
91
81
  .public-ui {
92
82
  .card.bigborder {
93
83
  border: 1px solid #d9dadb;
@@ -349,3 +349,12 @@ iframe {
349
349
  @include rem-size(font-size, 24);
350
350
  }
351
351
  }
352
+
353
+ //search weekday fix
354
+ .DayPicker {
355
+ .DayPicker_weekHeader {
356
+ .DayPicker_weekHeader_ul {
357
+ padding-left: 0;
358
+ }
359
+ }
360
+ }
@@ -19,6 +19,16 @@ $tertiary-text: #fff !default;
19
19
  $highlight-search: #ff0 !default;
20
20
  $font-family-monospace-light: Roboto Mono Light !default;
21
21
 
22
+ // GDPR-BANNER RELATED
23
+ $gdpr-accept-all: #005700 !default;
24
+ $gdpr-toggle-checked: #005700 !default;
25
+ $gdpr-toggle: #b22515 !default;
26
+ $gdpr-toggle-border: #000 !default;
27
+ $gdpr-focus-color: #ff9800 !default;
28
+ $gdpr-link-color: #004285 !default;
29
+ $gdpr-focus-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15),
30
+ 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 0.2rem $gdpr-focus-color !default;
31
+
22
32
  $caption-text: #455b71 !default;
23
33
 
24
34
  $primary-a0: hsl($primary-h, 62%, 97%) !default;
@@ -37,6 +37,7 @@
37
37
  @import 'ItaliaTheme/Components/locationsMap';
38
38
  @import 'ItaliaTheme/Components/diffField';
39
39
  @import 'ItaliaTheme/Components/cmp-timeline';
40
+ @import 'ItaliaTheme/Components/sideMenu';
40
41
  @import 'ItaliaTheme/Components/loginAgid';
41
42
  @import 'ItaliaTheme/Components/pager';
42
43
  @import 'ItaliaTheme/Blocks/subblocks-edit';