design-comuni-plone-theme 11.29.2 → 12.0.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 (227) hide show
  1. package/.github/workflows/main.yml +16 -16
  2. package/.github/workflows/npm.yml +1 -1
  3. package/.github/workflows/withnewsletter.yml +47 -0
  4. package/.release-it.json +1 -0
  5. package/.yarn/cache/@babel-helper-module-imports-npm-7.24.3-edb733448b-c23492189b.zip +0 -0
  6. package/.yarn/cache/@babel-types-npm-7.24.0-a0508cb308-4b574a37d4.zip +0 -0
  7. package/.yarn/cache/babel-plugin-lodash-npm-3.3.4-c7161075b6-044a4261e6.zip +0 -0
  8. package/.yarn/cache/braces-npm-3.0.3-582c14023c-b95aa0b3bd.zip +0 -0
  9. package/.yarn/cache/fill-range-npm-7.1.1-bf491486db-b4abfbca38.zip +0 -0
  10. package/.yarn/cache/micromatch-npm-4.0.8-c9570e4aca-79920eb634.zip +0 -0
  11. package/.yarn/cache/require-package-name-npm-2.0.1-ac9a206b63-00f4e9e467.zip +0 -0
  12. package/.yarn/install-state.gz +0 -0
  13. package/CHANGELOG.md +1728 -1659
  14. package/RELEASE.md +6 -0
  15. package/locales/de/LC_MESSAGES/volto.po +86 -19
  16. package/locales/en/LC_MESSAGES/volto.po +86 -19
  17. package/locales/es/LC_MESSAGES/volto.po +86 -19
  18. package/locales/fr/LC_MESSAGES/volto.po +86 -19
  19. package/locales/it/LC_MESSAGES/volto.po +87 -20
  20. package/locales/volto.pot +87 -20
  21. package/package.json +3 -1
  22. package/publiccode.yml +2 -2
  23. package/src/components/Collapse.jsx +1 -0
  24. package/src/components/ItaliaTheme/AppExtras/SiteSettingsExtras.jsx +0 -6
  25. package/src/components/ItaliaTheme/Blocks/Accordion/Block/EditBlock.jsx +29 -24
  26. package/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx +4 -12
  27. package/src/components/ItaliaTheme/Blocks/Accordion/Edit.jsx +118 -42
  28. package/src/components/ItaliaTheme/Blocks/Accordion/View.jsx +4 -18
  29. package/src/components/ItaliaTheme/Blocks/Alert/Edit.jsx +60 -113
  30. package/src/components/ItaliaTheme/Blocks/Alert/Sidebar.jsx +1 -0
  31. package/src/components/ItaliaTheme/Blocks/Alert/View.jsx +5 -14
  32. package/src/components/ItaliaTheme/Blocks/ArgumentsInEvidence/Block.jsx +16 -11
  33. package/src/components/ItaliaTheme/Blocks/ArgumentsInEvidence/Body.jsx +2 -1
  34. package/src/components/ItaliaTheme/Blocks/ArgumentsInEvidence/Edit.jsx +39 -1
  35. package/src/components/ItaliaTheme/Blocks/CTABlock/Block.jsx +35 -95
  36. package/src/components/ItaliaTheme/Blocks/Callout/Edit.jsx +108 -0
  37. package/src/components/ItaliaTheme/Blocks/Callout/Sidebar.jsx +173 -0
  38. package/src/components/ItaliaTheme/Blocks/Callout/View.jsx +45 -0
  39. package/src/components/ItaliaTheme/Blocks/ContactsBlock/Block/EditBlock.jsx +86 -63
  40. package/src/components/ItaliaTheme/Blocks/ContactsBlock/Block/ViewBlock.jsx +19 -39
  41. package/src/components/ItaliaTheme/Blocks/ContactsBlock/Edit.jsx +101 -22
  42. package/src/components/ItaliaTheme/Blocks/ContactsBlock/View.jsx +13 -21
  43. package/src/components/ItaliaTheme/Blocks/CountDown/Edit.jsx +21 -25
  44. package/src/components/ItaliaTheme/Blocks/CountDown/View.jsx +6 -15
  45. package/src/components/ItaliaTheme/Blocks/IconBlocks/Block/EditBlock.jsx +52 -22
  46. package/src/components/ItaliaTheme/Blocks/IconBlocks/Block/ViewBlock.jsx +9 -29
  47. package/src/components/ItaliaTheme/Blocks/IconBlocks/Edit.jsx +108 -21
  48. package/src/components/ItaliaTheme/Blocks/IconBlocks/Sidebar.jsx +1 -9
  49. package/src/components/ItaliaTheme/Blocks/IconBlocks/View.jsx +6 -14
  50. package/src/components/ItaliaTheme/Blocks/Listing/CardWithSlideUpTextTemplate.jsx +0 -1
  51. package/src/components/ItaliaTheme/Blocks/NumbersBlock/Block/EditBlock.jsx +45 -15
  52. package/src/components/ItaliaTheme/Blocks/NumbersBlock/Block/ViewBlock.jsx +2 -18
  53. package/src/components/ItaliaTheme/Blocks/NumbersBlock/Edit.jsx +98 -11
  54. package/src/components/ItaliaTheme/Blocks/NumbersBlock/View.jsx +2 -7
  55. package/src/components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block.jsx +35 -67
  56. package/src/components/ItaliaTheme/Blocks/TextCard/CardWithImage/Edit.jsx +2 -8
  57. package/src/components/ItaliaTheme/Blocks/TextCard/SimpleCard/BodyWrapper.jsx +2 -1
  58. package/src/components/ItaliaTheme/Blocks/TextCard/SimpleCard/Edit.jsx +98 -84
  59. package/src/components/ItaliaTheme/Blocks/TextCard/SimpleCard/View.jsx +20 -3
  60. package/src/components/ItaliaTheme/Blocks/UOSearch/Sidebar.jsx +11 -11
  61. package/src/components/ItaliaTheme/Blocks/__tests__/Accordion.test.jsx +11 -28
  62. package/src/components/ItaliaTheme/Blocks/__tests__/Alert.test.jsx +10 -14
  63. package/src/components/ItaliaTheme/Blocks/__tests__/ArgumentsInEvidence.test.jsx +20 -28
  64. package/src/components/ItaliaTheme/Blocks/__tests__/CTABlock.test.jsx +14 -29
  65. package/src/components/ItaliaTheme/Blocks/__tests__/CardWithImage.test.jsx +11 -28
  66. package/src/components/ItaliaTheme/Blocks/__tests__/ContactsBlock.test.jsx +75 -140
  67. package/src/components/ItaliaTheme/Blocks/__tests__/Countdown.test.jsx +20 -28
  68. package/src/components/ItaliaTheme/Blocks/__tests__/IconBlocks.test.jsx +22 -56
  69. package/src/components/ItaliaTheme/Blocks/__tests__/NumbersBlock.test.jsx +14 -43
  70. package/src/components/ItaliaTheme/Blocks/__tests__/SimpleCard.test.jsx +14 -30
  71. package/src/components/ItaliaTheme/BrandText/BrandText.jsx +8 -14
  72. package/src/components/ItaliaTheme/BrandTextFooter/BrandTextFooter.jsx +31 -2
  73. package/src/components/ItaliaTheme/Footer/FooterInfos.jsx +21 -8
  74. package/src/components/ItaliaTheme/Footer/FooterNavigation.jsx +3 -3
  75. package/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx +0 -7
  76. package/src/components/ItaliaTheme/Icons/Icon.jsx +0 -1
  77. package/src/components/ItaliaTheme/MegaMenu/MegaMenu.jsx +5 -1
  78. package/src/components/ItaliaTheme/View/BandoView/BandoApprofondimenti.jsx +1 -2
  79. package/src/components/ItaliaTheme/View/CartellaModulisticaView/DocRow.jsx +14 -5
  80. package/src/components/ItaliaTheme/View/Commons/Attachment.jsx +19 -3
  81. package/src/components/ItaliaTheme/View/Commons/Attachments.jsx +0 -1
  82. package/src/components/ItaliaTheme/View/Commons/DownloadFileFormat.jsx +11 -7
  83. package/src/components/ItaliaTheme/View/Commons/Gallery.jsx +1 -0
  84. package/src/components/ItaliaTheme/View/Commons/PageHeader/PageHeaderEventDates.jsx +0 -1
  85. package/src/components/ItaliaTheme/View/Commons/PageHeader/PageHeaderLinkServizio.jsx +6 -2
  86. package/src/components/ItaliaTheme/View/Commons/RichTextRender.jsx +8 -6
  87. package/src/components/ItaliaTheme/View/Commons/__tests__/RichText.test.jsx +14 -17
  88. package/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx +1 -1
  89. package/src/components/ItaliaTheme/View/EventoView/EventoUlterioriInformazioni.jsx +0 -4
  90. package/src/components/ItaliaTheme/View/ServizioView/ServizioAccedi.jsx +10 -7
  91. package/src/components/ItaliaTheme/View/ServizioView/ServizioMetatag.jsx +4 -3
  92. package/src/components/ItaliaTheme/View/__disabled_tests__/IncaricoView.test__disabled.jsx +24 -30
  93. package/src/components/ItaliaTheme/View/__tests__/CartellaModulisticaView.test.jsx +12 -1
  94. package/src/components/ItaliaTheme/View/__tests__/PageView.test.jsx +24 -2
  95. package/src/components/ItaliaTheme/View/__tests__/PersonaView.test.jsx +96 -92
  96. package/src/components/ItaliaTheme/View/__tests__/ServizioAChiSiRivolge.test.jsx +240 -286
  97. package/src/components/ItaliaTheme/View/__tests__/ServizioAccedi.test.jsx +240 -286
  98. package/src/components/ItaliaTheme/View/__tests__/ServizioCasiParticolari.test.jsx +240 -286
  99. package/src/components/ItaliaTheme/View/__tests__/ServizioComeFare.test.jsx +240 -286
  100. package/src/components/ItaliaTheme/View/__tests__/ServizioCondizioni.test.jsx +240 -286
  101. package/src/components/ItaliaTheme/View/__tests__/ServizioContatti.test.jsx +240 -286
  102. package/src/components/ItaliaTheme/View/__tests__/ServizioCosE.test.jsx +240 -286
  103. package/src/components/ItaliaTheme/View/__tests__/ServizioCosaServe.test.jsx +240 -286
  104. package/src/components/ItaliaTheme/View/__tests__/ServizioCosaSiOttiene.test.jsx +240 -286
  105. package/src/components/ItaliaTheme/View/__tests__/ServizioCostiVincoli.test.jsx +240 -286
  106. package/src/components/ItaliaTheme/View/__tests__/ServizioMetadati.test.jsx +240 -286
  107. package/src/components/ItaliaTheme/View/__tests__/ServizioModulistica.test.jsx +240 -286
  108. package/src/components/ItaliaTheme/View/__tests__/ServizioProcedure.test.jsx +240 -286
  109. package/src/components/ItaliaTheme/View/__tests__/ServizioSitiEsterni.test.jsx +240 -286
  110. package/src/components/ItaliaTheme/View/__tests__/ServizioTempiScadenze.test.jsx +240 -286
  111. package/src/components/ItaliaTheme/View/__tests__/ServizioUlterioriInformazioni.test.jsx +240 -286
  112. package/src/components/ItaliaTheme/View/__tests__/ServizioView.test.jsx +470 -560
  113. package/src/components/ItaliaTheme/View/__tests__/TrasparenzaView.test.jsx +12 -1
  114. package/src/components/ItaliaTheme/index.js +0 -1
  115. package/src/components/ItaliaTheme/manage/Widgets/ColorListWidget.jsx +11 -2
  116. package/src/components/ItaliaTheme/manage/Widgets/HtmlSlateWidget.jsx +156 -0
  117. package/src/components/ItaliaTheme/manage/Widgets/RichTextWidget.jsx +88 -0
  118. package/src/components/ItaliaTheme/manage/Widgets/SimpleTextEditorWidget.jsx +158 -0
  119. package/src/components/ItaliaTheme/manage/Widgets/TextEditorWidget.jsx +167 -270
  120. package/src/config/Blocks/ListingOptions/index.js +0 -1
  121. package/src/config/Blocks/ListingOptions/utils.js +0 -7
  122. package/src/config/Blocks/blocks.js +29 -8
  123. package/src/config/Blocks/listingVariations.js +1 -1
  124. package/src/config/Slate/Alignment/AlignMenu.jsx +169 -0
  125. package/src/config/Slate/Alignment/index.js +42 -0
  126. package/src/config/Slate/Blockquote/BlockquoteMenu.jsx +151 -0
  127. package/src/config/Slate/Blockquote/index.js +19 -0
  128. package/src/config/Slate/Headings/HeadingsMenu.jsx +139 -0
  129. package/src/config/Slate/Headings/headingsMenu.scss +44 -0
  130. package/src/config/Slate/Headings/index.js +62 -0
  131. package/src/config/Slate/Link/deserializer.js +25 -0
  132. package/src/config/Slate/Link/index.js +126 -0
  133. package/src/config/Slate/Link/renderer.jsx +99 -0
  134. package/src/config/Slate/LinkButton/index.js +47 -0
  135. package/src/config/Slate/TextLarger/index.js +51 -0
  136. package/src/config/Slate/Underline/index.js +10 -0
  137. package/src/config/Slate/config.js +43 -0
  138. package/src/config/Slate/deserializers.js +66 -0
  139. package/src/config/Slate/dropdownStyle.scss +14 -0
  140. package/src/config/Slate/dropdownUtils.js +422 -0
  141. package/src/config/Slate/extensions/breakList.js +91 -0
  142. package/src/config/Slate/handlers.js +243 -0
  143. package/src/config/Slate/utils.js +73 -0
  144. package/src/config/Widgets/widgets.js +1 -2
  145. package/src/config/italiaConfig.js +5 -53
  146. package/src/customizations/volto/components/manage/AnchorPlugin/components/LinkButton/AddLinkForm.jsx +361 -0
  147. package/src/customizations/volto/components/manage/Blocks/HeroImageLeft/Edit.jsx +75 -200
  148. package/src/customizations/volto/components/manage/Blocks/Video/Body.jsx +0 -1
  149. package/src/customizations/volto/components/manage/Blocks/Video/Edit.jsx +1 -1
  150. package/src/customizations/volto/components/manage/Form/BlocksToolbar.jsx +1 -1
  151. package/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx +76 -18
  152. package/src/customizations/volto/components/manage/Widgets/RecurrenceWidget/RecurrenceWidget.jsx +4 -0
  153. package/src/customizations/volto-form-block/components/Field.jsx +45 -22
  154. package/src/helpers/EnhanceLink.js +44 -0
  155. package/src/helpers/FormValidation/FormValidationHelpers.js +3 -0
  156. package/src/helpers/blocks.js +80 -0
  157. package/src/helpers/files.js +13 -13
  158. package/src/helpers/index.js +4 -3
  159. package/src/helpers/richTextHelper.js +10 -0
  160. package/src/icons/Group.svg +1 -0
  161. package/src/icons/blocco-icone.svg +0 -3
  162. package/src/icons/blockquote-card-dark.svg +1 -0
  163. package/src/icons/blockquote-card.svg +1 -0
  164. package/src/icons/blockquote-simple.svg +1 -0
  165. package/src/icons/text-larger.svg +1 -0
  166. package/src/theme/ItaliaTheme/Blocks/_accordion.scss +2 -22
  167. package/src/theme/ItaliaTheme/Blocks/_alert.scss +51 -4
  168. package/src/theme/ItaliaTheme/Blocks/_bandiInEvidenceTemplate.scss +1 -0
  169. package/src/theme/ItaliaTheme/Blocks/_callout.scss +32 -0
  170. package/src/theme/ItaliaTheme/Blocks/_contacts.scss +17 -51
  171. package/src/theme/ItaliaTheme/Blocks/_countdown.scss +10 -1
  172. package/src/theme/ItaliaTheme/Blocks/_ctaBlock.scss +7 -23
  173. package/src/theme/ItaliaTheme/Blocks/_gridBlock.scss +1 -1
  174. package/src/theme/ItaliaTheme/Blocks/_hero.scss +1 -8
  175. package/src/theme/ItaliaTheme/Blocks/_iconBlocks.scss +6 -77
  176. package/src/theme/ItaliaTheme/Blocks/_imageCardTextBlock.scss +3 -2
  177. package/src/theme/ItaliaTheme/Blocks/_numbers.scss +6 -20
  178. package/src/theme/ItaliaTheme/Blocks/_simpleCardTextBlock.scss +8 -2
  179. package/src/theme/ItaliaTheme/Blocks/_subblocks-edit.scss +3 -1
  180. package/src/theme/ItaliaTheme/Blocks/_tableOfContents.scss +1 -0
  181. package/src/theme/ItaliaTheme/Components/_megamenu.scss +0 -4
  182. package/src/theme/ItaliaTheme/Components/_mobileMenu.scss +12 -16
  183. package/src/theme/ItaliaTheme/Print/_page.scss +1 -1
  184. package/src/theme/ItaliaTheme/Subsites/ItaliaTheme/Blocks/_contacts.scss +3 -0
  185. package/src/theme/ItaliaTheme/Subsites/ItaliaTheme/Blocks/_cta.scss +1 -0
  186. package/src/theme/ItaliaTheme/Subsites/ItaliaTheme/Blocks/_searchSections.scss +1 -0
  187. package/src/theme/ItaliaTheme/Subsites/bootstrap-italia/custom/_headercenter.scss +1 -0
  188. package/src/theme/ItaliaTheme/Views/_cartellaModulistica.scss +11 -2
  189. package/src/theme/ItaliaTheme/Views/_servizio.scss +2 -2
  190. package/src/theme/ItaliaTheme/Views/_slider.scss +3 -0
  191. package/src/theme/ItaliaTheme/Widgets/_iconWidget.scss +4 -0
  192. package/src/theme/ItaliaTheme/_common.scss +1 -0
  193. package/src/theme/ItaliaTheme/_home.scss +0 -4
  194. package/src/theme/ItaliaTheme/_main.scss +78 -84
  195. package/src/theme/_cms-ui.scss +63 -160
  196. package/src/theme/_mixins.scss +13 -0
  197. package/src/theme/bootstrap-override/_bootstrap-italia-site.scss +1 -0
  198. package/src/theme/bootstrap-override/bootstrap-italia/_footer.scss +1 -1
  199. package/src/theme/bootstrap-override/bootstrap-italia/_forms.scss +7 -0
  200. package/src/theme/bootstrap-override/bootstrap-italia/_headercenter.scss +8 -3
  201. package/src/theme/extras/_forms.scss +2 -14
  202. package/src/theme/site.scss +1 -1
  203. package/test-setup-config.js +58 -0
  204. package/.yarn/cache/braces-npm-3.0.2-782240b28a-e2a8e769a8.zip +0 -0
  205. package/.yarn/cache/fill-range-npm-7.0.1-b8b1817caa-cc283f4e65.zip +0 -0
  206. package/.yarn/cache/micromatch-npm-4.0.5-cfab5d7669-02a17b671c.zip +0 -0
  207. package/src/components/ItaliaTheme/Blocks/TextCard/SimpleCard/Block.jsx +0 -151
  208. package/src/components/ItaliaTheme/RemoveBodyClass/RemoveBodyClass.jsx +0 -84
  209. package/src/config/RichTextEditor/LinkEntity.jsx +0 -27
  210. package/src/config/RichTextEditor/Plugins/AnchorPlugin/components/Link/index.jsx +0 -44
  211. package/src/config/RichTextEditor/Plugins/AnchorPlugin/components/LinkButton/AddLinkForm.jsx +0 -349
  212. package/src/config/RichTextEditor/Plugins/AnchorPlugin/components/LinkButton/index.js +0 -150
  213. package/src/config/RichTextEditor/Plugins/AnchorPlugin/index.js +0 -88
  214. package/src/config/RichTextEditor/ToolbarButtons/AlignButton.jsx +0 -61
  215. package/src/config/RichTextEditor/ToolbarButtons/ButtonsButton.jsx +0 -14
  216. package/src/config/RichTextEditor/ToolbarButtons/CalloutsButton.jsx +0 -38
  217. package/src/config/RichTextEditor/ToolbarButtons/DraftJsDropdownButton.jsx +0 -106
  218. package/src/config/RichTextEditor/ToolbarButtons/HeadingsButton.jsx +0 -57
  219. package/src/config/RichTextEditor/ToolbarButtons/TextSizeButton.jsx +0 -65
  220. package/src/config/RichTextEditor/ToolbarButtons/UnderlineButton.jsx +0 -14
  221. package/src/config/RichTextEditor/config.js +0 -253
  222. package/src/config/volto-gdpr-privacy-defaultPanelConfig.js +0 -292
  223. package/src/customizations/volto/components/manage/Blocks/ToC/View.jsx +0 -134
  224. package/src/customizations/volto/components/manage/Blocks/ToC/variations/DefaultTocRenderer.jsx +0 -99
  225. package/src/customizations/volto/config/RichTextEditor/Plugins.jsx +0 -63
  226. package/src/helpers/redraftHelper.js +0 -9
  227. package/src/theme/ItaliaTheme/Components/_logo.scss +0 -10
@@ -6,10 +6,6 @@ body.public-ui.contenttype-lrf {
6
6
  }
7
7
  }
8
8
 
9
- .sidebar-container-enter-done {
10
- z-index: 150000 !important;
11
- }
12
-
13
9
  body.subsite.subsite-root {
14
10
  &,
15
11
  .public-ui {
@@ -80,20 +80,27 @@ iframe {
80
80
 
81
81
  .public-ui,
82
82
  .cms-ui {
83
- blockquote {
84
- position: relative;
85
- margin: 1.5rem 2rem;
86
- font-family: $font-family-serif;
83
+ blockquote,
84
+ .blockquote {
85
+ display: flow-root; //serve per quando i blockquote sono affiancati alle immagini allineate a dx o sx
86
+ border-color: $primary !important;
87
+
88
+ ul:first-child,
89
+ ol:first-child {
90
+ margin-top: 0;
91
+ }
87
92
 
88
- &:before {
89
- position: absolute;
90
- top: -1.8rem;
91
- left: -2rem;
92
- display: block;
93
- height: 0;
94
- color: $neutral-2-b2;
95
- content: '“';
96
- font-size: 400%;
93
+ ul:last-child,
94
+ ol:last-child,
95
+ p:last-child,
96
+ p:last-of-type {
97
+ margin-bottom: 0;
98
+ }
99
+
100
+ &.dark {
101
+ a {
102
+ color: $primary-text;
103
+ }
97
104
  }
98
105
  }
99
106
 
@@ -109,96 +116,83 @@ iframe {
109
116
  }
110
117
  }
111
118
 
112
- .callout-bg {
113
- padding: 1.25rem;
114
- margin: 1.25rem 0;
115
- background-color: $primary-c1;
116
-
117
- p,
118
- .public-DraftStyleDefault-block {
119
- &:last-of-type {
120
- margin-bottom: 0;
121
- }
122
- }
119
+ .text-larger {
120
+ //.text-larger: stile applicabile da editor Slate
121
+ font-size: 1.75em;
123
122
  }
123
+ }
124
124
 
125
- .draftjs-text-smaller {
126
- font-size: 0.75em;
125
+ //slate LINK
126
+ /*
127
+ Safari rendering issue workaround - B#60364
128
+ Safari rendering fix, icons and fonts coming late means shenanigans for Safari rendering, as
129
+ Safari is lazy and slow in loading fonts and icons dynamically.
130
+ Problem: Safari (tested on Safari 17.6) sometimes fails to calculate the layout correctly
131
+ when dealing with dynamic content such as lazy-loaded icons or fonts, combined with
132
+ `display: inline-block`. This can result in improperly positioned elements
133
+ until the page is re-rendered or refocused.
134
+
135
+ Solution: To fix this issue:
136
+ 1. Replace `display: inline-block` with `display: inline-flex`. This ensures Safari
137
+ handles the box model and inline context properly, especially when the element's
138
+ size or alignment depends on dynamic content.
139
+ 2. Add `position: relative;` to force a recalculation of layout, resolving rendering quirks.
140
+
141
+ Background: Safari's WebKit engine has known issues with `inline-block` combined
142
+ with delayed content rendering, such as lazy-loaded icons. Switching to `inline-flex`
143
+ better aligns with modern CSS rendering engines, while `position: relative;`
144
+ ensures the layout is recalculated.
145
+
146
+ References:
147
+ - CSS-Tricks: What Forces Layout or Reflow: https://css-tricks.com/what-forces-layout-reflow/
148
+ - WebKit Bug Reports on `inline-block` rendering issues with dynamic content.
149
+ - Testing and observations on Safari 17.6 behavior with lazy-loaded assets.
150
+ */
151
+ @supports (-webkit-appearance: none) {
152
+ a.with-external-link-icon {
153
+ display: inline-flex; /* Evita problemi con inline-block */
154
+ position: relative; /* Forza Safari a calcolare il layout reflow correttamente */
127
155
  }
156
+ }
157
+ // .inline-link {
158
+ // margin-left: 0.5rem;
159
+ // margin-right: 0.5rem;
160
+ // }
128
161
 
129
- .draftjs-text-larger {
130
- font-size: 1.75em;
131
- }
162
+ svg.external-link {
163
+ fill: currentColor;
164
+ }
165
+
166
+ .slate-editor-link {
167
+ clear: both;
132
168
 
133
- .draftjs-buttons {
169
+ &.btn {
170
+ display: inline-block;
171
+ padding: 12px 24px;
172
+ border-radius: $btn-border-radius;
134
173
  margin: 0;
135
- clear: both;
174
+ font-weight: 600;
175
+ text-align: center;
176
+ text-decoration: none;
177
+
178
+ &:hover,
179
+ &:active {
180
+ font-weight: 600;
181
+ }
136
182
 
137
- a {
138
- display: inline-block;
139
- padding: 1em 2em;
140
- border-radius: $btn-border-radius;
141
- margin: 0.5em 1em 0.5em 0;
183
+ &.btn-primary {
142
184
  background-color: $primary;
143
185
  color: $primary-text;
144
- font-weight: 700;
145
- text-align: center;
146
- text-decoration: none;
147
186
 
148
187
  &:hover,
149
188
  &:active {
150
189
  background-color: darken($primary, 8);
151
190
  color: $primary-text;
152
- font-weight: 700;
153
191
  }
154
192
  &.link-anchorlink-theme {
155
193
  color: $primary-text !important;
156
194
  }
157
195
  }
158
- /*
159
- Safari rendering issue workaround - B#60364
160
- Safari rendering fix, icons and fonts coming late means shenanigans for Safari rendering, as
161
- Safari is lazy and slow in loading fonts and icons dynamically.
162
- Problem: Safari (tested on Safari 17.6) sometimes fails to calculate the layout correctly
163
- when dealing with dynamic content such as lazy-loaded icons or fonts, combined with
164
- `display: inline-block`. This can result in improperly positioned elements
165
- until the page is re-rendered or refocused.
166
-
167
- Solution: To fix this issue:
168
- 1. Replace `display: inline-block` with `display: inline-flex`. This ensures Safari
169
- handles the box model and inline context properly, especially when the element's
170
- size or alignment depends on dynamic content.
171
- 2. Add `position: relative;` to force a recalculation of layout, resolving rendering quirks.
172
-
173
- Background: Safari's WebKit engine has known issues with `inline-block` combined
174
- with delayed content rendering, such as lazy-loaded icons. Switching to `inline-flex`
175
- better aligns with modern CSS rendering engines, while `position: relative;`
176
- ensures the layout is recalculated.
177
-
178
- References:
179
- - CSS-Tricks: What Forces Layout or Reflow: https://css-tricks.com/what-forces-layout-reflow/
180
- - WebKit Bug Reports on `inline-block` rendering issues with dynamic content.
181
- - Testing and observations on Safari 17.6 behavior with lazy-loaded assets.
182
- */
183
- @supports (-webkit-appearance: none) {
184
- a {
185
- display: inline-flex; /* Evita problemi con inline-block */
186
- position: relative; /* Forza Safari a calcolare il layout reflow correttamente */
187
- }
188
- }
189
- }
190
-
191
- div[class^='draftJsToolbar__toolbar__'] {
192
- line-height: 1rem;
193
-
194
- .icon {
195
- font-size: 1rem;
196
- }
197
-
198
- .ui.input > input {
199
- height: auto;
200
- font-size: 0.8rem;
201
- }
202
196
  }
203
197
  }
204
198
 
@@ -18,7 +18,9 @@ body.cms-ui {
18
18
  }
19
19
 
20
20
  .block {
21
- font-family: $font-family-serif;
21
+ font-family: $font-family-sans-serif;
22
+ font-weight: $font-weight-base;
23
+ line-height: $line-height-base;
22
24
 
23
25
  %heading {
24
26
  margin-top: 0; /* 1*/
@@ -64,21 +66,6 @@ body.cms-ui {
64
66
 
65
67
  @import 'bootstrap-italia/src/scss/custom/type'; //to apply styles for headers on different screen sizes
66
68
 
67
- // Placeholder block title
68
- .title {
69
- .public-DraftEditorPlaceholder-inner {
70
- font-family: $font-family-sans-serif;
71
- }
72
- }
73
-
74
- &.title {
75
- .public-DraftEditorPlaceholder-inner {
76
- font-size: 2.66rem;
77
- font-weight: bold;
78
- line-height: 1.25;
79
- }
80
- }
81
-
82
69
  //align
83
70
  .text-center {
84
71
  text-align: center;
@@ -143,15 +130,34 @@ body.cms-ui {
143
130
  &.contenttype-argomento,
144
131
  &.contenttype-pagina-argomento,
145
132
  &.contenttype-cartellamodulistica {
146
- &:not(.section-add) {
147
- .block {
148
- font-family: $font-family-sans-serif;
149
- font-weight: 300;
150
- line-height: 1.555;
133
+ .block {
134
+ font-family: $font-family-sans-serif;
135
+ font-weight: 300;
136
+ line-height: 1.555;
137
+ }
138
+ }
139
+
140
+ .simple-text-editor-widget {
141
+ .simple-text-input {
142
+ display: inline-block;
143
+ min-width: 1px;
144
+
145
+ &:empty:before {
146
+ display: block; /* For Firefox */
147
+ content: attr(placeholder);
148
+ font-weight: inherit;
149
+ opacity: 0.333;
150
+ pointer-events: none;
151
151
  }
152
152
  }
153
153
  }
154
154
 
155
+ .detached-slate-editor {
156
+ p:not(:last-child) {
157
+ margin-bottom: 1rem !important;
158
+ }
159
+ }
160
+
155
161
  .blocks-widget-container {
156
162
  .block.table .toolbar {
157
163
  top: -3.34rem;
@@ -209,8 +215,10 @@ body.cms-ui {
209
215
  }
210
216
 
211
217
  input#field-link {
218
+ height: auto;
212
219
  height: auto;
213
220
  color: #444;
221
+ font-size: 0.7rem;
214
222
  font-weight: normal;
215
223
  }
216
224
 
@@ -290,14 +298,6 @@ body.cms-ui {
290
298
  }
291
299
  }
292
300
 
293
- .menu-configuration-widget {
294
- .menu-blocks-container {
295
- .DraftEditor-editorContainer .public-DraftEditor-content {
296
- min-height: 19px;
297
- }
298
- }
299
- }
300
-
301
301
  //cookie banner icons
302
302
  // replaced icon code with left and right as they actually render correctly
303
303
  // and rotated the icon
@@ -319,6 +319,10 @@ body.cms-ui {
319
319
  }
320
320
  }
321
321
 
322
+ .sidebar-container-enter-done {
323
+ z-index: 150000 !important;
324
+ }
325
+
322
326
  .sidebar-container .object-listing,
323
327
  .icon-align-name {
324
328
  svg.icon {
@@ -408,6 +412,11 @@ body.cms-ui {
408
412
  }
409
413
  }
410
414
  }
415
+
416
+ .slate-editor ul li {
417
+ display: list-item;
418
+ padding: 0;
419
+ }
411
420
  }
412
421
 
413
422
  .icon-align-name {
@@ -446,20 +455,34 @@ body.cms-ui {
446
455
  background-color: $tertiary;
447
456
  }
448
457
 
449
- // Alert block
450
- .button.info,
451
- .button.info.active {
452
- background-color: $alert-info;
458
+ .button.success,
459
+ .button.success.active {
460
+ background-color: $success;
453
461
  }
454
462
 
455
463
  .button.warning,
456
- .button.warning.active {
457
- background-color: $alert-warning;
464
+ .button.success.warning {
465
+ background-color: $warning;
458
466
  }
459
467
 
460
468
  .button.danger,
461
469
  .button.danger.active {
462
- background-color: $alert-danger;
470
+ background-color: $danger;
471
+ }
472
+
473
+ .button.callout_default,
474
+ .button.callout_default.active {
475
+ background-color: $secondary;
476
+ }
477
+
478
+ .button.callout_note,
479
+ .button.callout_note.active {
480
+ background-color: $primary;
481
+ }
482
+
483
+ .button.info,
484
+ .button.info.active {
485
+ background-color: $info;
463
486
  }
464
487
  }
465
488
 
@@ -475,48 +498,16 @@ body.cms-ui {
475
498
  }
476
499
  }
477
500
 
478
- /*.DraftEditor-root {
479
- font-family: $font-family-serif;
480
- h1,
481
- h2,
482
- h3,
483
- h4,
484
- h5,
485
- h6 {
486
- font-family: $font-family-sans-serif;
487
- }
488
- }*/
489
-
490
- //stili per l'editor di testo dei ct con i campi
491
- .DraftEditor-root {
492
- .public-DraftStyleDefault-block {
493
- margin-bottom: 1rem;
494
- }
495
-
496
- li {
497
- .public-DraftStyleDefault-block {
498
- margin-bottom: unset;
499
- }
500
- }
501
- }
502
-
503
- .block.text {
504
- .DraftEditor-root {
505
- .public-DraftStyleDefault-block {
506
- margin-bottom: unset;
501
+ .field-wrapper-icon {
502
+ .icon-container.italia-icon {
503
+ svg.icon {
504
+ height: 1.5em;
507
505
  }
508
506
  }
509
507
  }
510
508
 
511
509
  // z-index necessario su Volto 17 finché non passiamo ad usare slate
512
510
  .block {
513
- .DraftEditor-root {
514
- .DraftEditor-editorContainer,
515
- .public-DraftEditorPlaceholder-root {
516
- z-index: 0;
517
- }
518
- }
519
-
520
511
  &.image {
521
512
  .block.align {
522
513
  &.left,
@@ -537,18 +528,6 @@ body.cms-ui {
537
528
  }
538
529
  }
539
530
 
540
- .footer-configuration-widget {
541
- .DraftEditor-editorContainer {
542
- a.link-anchorlink-theme {
543
- color: #06c;
544
-
545
- &:hover {
546
- color: darken(#06c, 20);
547
- }
548
- }
549
- }
550
- }
551
-
552
531
  &.section-controlpanel {
553
532
  .grid > .row {
554
533
  // HIDE TAXONOMIES CONTROLPANEL UNTIL #62343 IS DONE
@@ -603,10 +582,6 @@ body.cms-ui {
603
582
 
604
583
  .block-editor-title,
605
584
  .block-editor-description {
606
- .DraftEditor-root {
607
- padding: 0 1.333em;
608
- }
609
-
610
585
  & + [class^='block-editor'] {
611
586
  margin-top: 2.8rem;
612
587
  }
@@ -628,78 +603,6 @@ body.cms-ui {
628
603
 
629
604
  /////
630
605
 
631
- .draftJsToolbarDropdown {
632
- position: relative;
633
-
634
- .draftJsToolbarDropdown-toggle {
635
- display: flex;
636
- width: 42px;
637
- align-items: center;
638
- justify-content: space-between;
639
-
640
- .caret {
641
- display: inline-block;
642
- width: 0;
643
- height: 0;
644
-
645
- border: 5px solid transparent;
646
-
647
- &.down {
648
- border-top-color: #888;
649
- margin-top: 5px;
650
- }
651
-
652
- &.up {
653
- border-bottom-color: #888;
654
- margin-bottom: 5px;
655
- }
656
- }
657
- }
658
-
659
- ul.draftJsToolbarDropdown-optionswrapper {
660
- position: absolute;
661
- top: 35px;
662
- left: 50%;
663
- padding: 0;
664
- margin: 0;
665
- background-color: #fff;
666
- border-bottom-left-radius: 3px;
667
- border-bottom-right-radius: 3px;
668
- box-shadow:
669
- 0 0 8px rgba(0, 0, 0, 0.1),
670
- 0 2px 4px rgba(0, 0, 0, 0.05);
671
- list-style-type: none;
672
- transform: translateX(-50%);
673
-
674
- &.hide {
675
- display: none;
676
- }
677
-
678
- .draftJsToolbarDropdown-option {
679
- padding: 0.5rem;
680
- color: $neutral-2-b5;
681
-
682
- svg {
683
- fill: $neutral-2-b5 !important;
684
- }
685
-
686
- > * {
687
- display: block;
688
- }
689
-
690
- button {
691
- width: 100%;
692
- height: auto;
693
-
694
- > * {
695
- margin: 0;
696
- color: $neutral-2-b5;
697
- }
698
- }
699
- }
700
- }
701
- }
702
-
703
606
  .column.color-chooser {
704
607
  padding-top: 0.5em;
705
608
  padding-bottom: 0.5em;
@@ -5,3 +5,16 @@
5
5
  @mixin margin-size($key, $value) {
6
6
  #{$key}: calc($value / 18) + em;
7
7
  }
8
+
9
+ @mixin blocks-with-bg-edit-buttons {
10
+ > .ui.basic.button.delete-button {
11
+ padding: 0.35rem;
12
+ text-align: center;
13
+ border-radius: 100%;
14
+ top: -0.25rem;
15
+
16
+ &:not(:hover):not(:focus):not(:focus-within) {
17
+ color: #fff !important;
18
+ }
19
+ }
20
+ }
@@ -111,6 +111,7 @@
111
111
  @import 'bootstrap-italia/src/scss/custom/form-select';
112
112
  @import './bootstrap-italia/form-select';
113
113
  @import 'bootstrap-italia/src/scss/custom/form-transfer';
114
+ @import './bootstrap-italia/forms';
114
115
  @import 'bootstrap-italia/src/scss/custom/dropdown';
115
116
  @import 'bootstrap-italia/src/scss/custom/pager';
116
117
  @import 'bootstrap-italia/src/scss/custom/tab';
@@ -25,7 +25,7 @@
25
25
  }
26
26
 
27
27
  .icon {
28
- width: 75px;
28
+ width: auto;
29
29
  height: 75px;
30
30
  margin-right: 27px;
31
31
  }
@@ -0,0 +1,7 @@
1
+ @media print {
2
+ .public-ui {
3
+ .form-group {
4
+ margin-bottom: 1rem;
5
+ }
6
+ }
7
+ }
@@ -1,8 +1,13 @@
1
- //mobile
2
1
  .it-header-center-wrapper {
3
- // height: $dvt-header-center-max-height;
4
-
5
2
  .it-header-center-content-wrapper {
3
+ .it-brand-wrapper {
4
+ a {
5
+ .icon {
6
+ width: auto;
7
+ }
8
+ }
9
+ }
10
+
6
11
  //right zone
7
12
  .it-right-zone {
8
13
  .it-socials {
@@ -12,7 +12,7 @@ $sidebarFormBg: #fafafa;
12
12
  .ui.input input[type='text'],
13
13
  .ui.input input[type='url'],
14
14
  textarea,
15
- .DraftEditor-root {
15
+ .slate-editor {
16
16
  padding-right: 10px;
17
17
  padding-left: 10px;
18
18
  margin-top: 0.5rem;
@@ -40,20 +40,8 @@ $sidebarFormBg: #fafafa;
40
40
  padding: 10px;
41
41
  }
42
42
 
43
- .DraftEditor-editorContainer {
44
- .public-DraftEditor-content {
45
- min-height: 60px;
46
- }
47
- }
48
-
49
43
  .blocks-widget-container {
50
- .DraftEditor-editorContainer {
51
- .public-DraftEditor-content {
52
- min-height: unset;
53
- }
54
- }
55
-
56
- .DraftEditor-root {
44
+ .slate-editor {
57
45
  border-bottom: none;
58
46
  background-color: transparent;
59
47
  }
@@ -90,6 +90,7 @@
90
90
  @import 'ItaliaTheme/Blocks/simpleCardTemplate';
91
91
  @import 'ItaliaTheme/Blocks/search';
92
92
  @import 'ItaliaTheme/Blocks/gridBlock';
93
+ @import 'ItaliaTheme/Blocks/callout';
93
94
 
94
95
  @import 'ItaliaTheme/Views/uo';
95
96
  @import 'ItaliaTheme/Views/evento';
@@ -122,7 +123,6 @@
122
123
  @import 'ItaliaTheme/Widgets/luoghiCorrelatiEventoWidget';
123
124
  @import 'ItaliaTheme/Components/megamenu';
124
125
  @import 'ItaliaTheme/Components/sharing';
125
- @import 'ItaliaTheme/Components/logo';
126
126
  @import 'ItaliaTheme/Components/mobileMenu';
127
127
  @import 'ItaliaTheme/Components/relatedItemInEvidence';
128
128
  @import 'ItaliaTheme/Components/pageLoader';
@@ -10,6 +10,30 @@
10
10
  import '@plone/volto/config';
11
11
  import config from '@plone/volto/registry';
12
12
  import applyItaliaConfig from './src';
13
+ import TextBlockView from '@plone/volto-slate/blocks/Text/TextBlockView';
14
+ import TextBlockEdit from '@plone/volto-slate/blocks/Text/TextBlockEdit';
15
+ import TextBlockSchema from '@plone/volto-slate/blocks/Text/TextBlockSchema';
16
+
17
+ //slate config need to exists for italiaConfig
18
+ config.set('settings', {
19
+ ...config.settings,
20
+ slate: {
21
+ elements: {
22
+ default: ({ attributes, children }) => <p {...attributes}>{children}</p>,
23
+ },
24
+ leafs: {},
25
+ persistentHelpers: [],
26
+ contextToolbarButtons: [],
27
+ textblockExtensions: [],
28
+ extensions: [],
29
+ elementToolbarButtons: {},
30
+ buttons: {},
31
+ toolbarButtons: [],
32
+ expandedToolbarButtons: [],
33
+ htmlTagsToSlate: {},
34
+ topLevelTargetElements: [],
35
+ },
36
+ });
13
37
 
14
38
  applyItaliaConfig(config);
15
39
 
@@ -83,3 +107,37 @@ config.set('experimental', {
83
107
  enabled: false,
84
108
  },
85
109
  });
110
+
111
+ const slateBlockConfig = {
112
+ id: 'slate',
113
+ view: TextBlockView,
114
+ edit: TextBlockEdit,
115
+ schema: TextBlockSchema,
116
+ blockHasValue: (data) => {
117
+ // TODO: this should be handled better
118
+ return data && !!data.plaintext?.trim();
119
+ },
120
+ tocEntry: (block = {}) => {
121
+ const { value, override_toc, entry_text, level, plaintext } = block;
122
+ const type = value?.[0]?.type;
123
+ return override_toc && level
124
+ ? [parseInt(level.slice(1)), entry_text]
125
+ : config.settings.slate.topLevelTargetElements.includes(type)
126
+ ? [parseInt(type.slice(1)), plaintext]
127
+ : null;
128
+ },
129
+ };
130
+ config.set('blocks', {
131
+ ...config.blocks,
132
+ blocksConfig: {
133
+ ...(config.blocks.blocksConfig ?? {}),
134
+ slate: slateBlockConfig,
135
+ gridBlock: {
136
+ ...(config.blocks.blocksConfig?.gridBlock ?? {}),
137
+ blocksConfig: {
138
+ ...(config.blocks.blocksConfig?.gridBlock?.blocksConfig ?? {}),
139
+ slate: slateBlockConfig,
140
+ },
141
+ },
142
+ },
143
+ });