design-comuni-plone-theme 11.26.4 → 11.26.5

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 (50) hide show
  1. package/.yarn/cache/{volto-venue-npm-4.1.0-481d5ba425-64ca36bc93.zip → volto-venue-npm-4.1.1-d5be247928-f796d519ad.zip} +0 -0
  2. package/.yarn/install-state.gz +0 -0
  3. package/CHANGELOG.md +24 -0
  4. package/RELEASE.md +22 -0
  5. package/locales/de/LC_MESSAGES/volto.po +8 -7
  6. package/locales/en/LC_MESSAGES/volto.po +9 -8
  7. package/locales/es/LC_MESSAGES/volto.po +8 -7
  8. package/locales/fr/LC_MESSAGES/volto.po +8 -7
  9. package/locales/it/LC_MESSAGES/volto.po +9 -8
  10. package/locales/volto.pot +9 -8
  11. package/package.json +2 -2
  12. package/publiccode.yml +2 -2
  13. package/src/components/ImageWithErrors/ImageWithErrors.jsx +0 -1
  14. package/src/components/ItaliaTheme/Blocks/Listing/AttachmentCardTemplate.jsx +13 -10
  15. package/src/components/ItaliaTheme/Blocks/Listing/CardWithImage/CardWithImageDefault.jsx +7 -7
  16. package/src/components/ItaliaTheme/Blocks/Listing/Commons/ListingImage.jsx +35 -13
  17. package/src/components/ItaliaTheme/Blocks/Listing/CompleteBlockLinksTemplate.jsx +16 -10
  18. package/src/components/ItaliaTheme/Blocks/Listing/ContentInEvidenceTemplate.jsx +12 -9
  19. package/src/components/ItaliaTheme/Blocks/Listing/GridGalleryTemplate.jsx +7 -7
  20. package/src/components/ItaliaTheme/Blocks/Listing/InEvidenceTemplate.jsx +9 -8
  21. package/src/components/ItaliaTheme/Blocks/Listing/PhotogalleryTemplate.jsx +7 -6
  22. package/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx +9 -6
  23. package/src/components/ItaliaTheme/Blocks/Listing/SmallBlockLinksTemplate.jsx +19 -23
  24. package/src/components/ItaliaTheme/Cards/CardPersona.jsx +5 -8
  25. package/src/components/ItaliaTheme/View/Commons/GenericCard.jsx +14 -13
  26. package/src/components/ItaliaTheme/View/Commons/LocationItem.jsx +15 -9
  27. package/src/components/ItaliaTheme/View/Commons/OfficeCard.jsx +7 -3
  28. package/src/components/ItaliaTheme/View/Commons/Sponsors.jsx +14 -10
  29. package/src/components/ItaliaTheme/View/Commons/VenuesSmall.jsx +13 -6
  30. package/src/components/ItaliaTheme/View/EventoView/EventoContatti.jsx +8 -7
  31. package/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx +1 -12
  32. package/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreInterno.jsx +1 -12
  33. package/src/components/ItaliaTheme/View/EventoView/EventoOrganizzatoDa.jsx +38 -0
  34. package/src/components/ItaliaTheme/View/EventoView/EventoPatrocinatoDa.jsx +38 -0
  35. package/src/components/ItaliaTheme/View/EventoView/EventoUlterioriInformazioni.jsx +0 -18
  36. package/src/components/ItaliaTheme/View/NewsItemView/NewsItemText.jsx +1 -0
  37. package/src/components/SelectInput/SelectInput.jsx +9 -4
  38. package/src/config/Blocks/ListingOptions/attachmentCardTemplate.js +1 -1
  39. package/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx +15 -11
  40. package/src/customizations/volto/components/theme/View/ListingView.jsx +3 -3
  41. package/src/helpers/images.js +25 -1
  42. package/src/helpers/index.js +4 -1
  43. package/src/theme/ItaliaTheme/Blocks/_cardWithImage.scss +4 -0
  44. package/src/theme/ItaliaTheme/Blocks/_gridBlock.scss +9 -0
  45. package/src/theme/ItaliaTheme/Components/_cardLocationItem.scss +12 -0
  46. package/src/theme/ItaliaTheme/Components/_cardPersona.scss +19 -1
  47. package/src/theme/ItaliaTheme/Widgets/_blocksWidget.scss +36 -0
  48. package/src/theme/_cms-ui.scss +21 -0
  49. package/src/theme/bootstrap-override/_bootstrap-italia-site.scss +1 -0
  50. package/src/theme/bootstrap-override/bootstrap-italia/_avatar.scss +28 -0
@@ -6,7 +6,6 @@ import { defineMessages, useIntl } from 'react-intl';
6
6
  import { UniversalLink } from '@plone/volto/components';
7
7
  import {
8
8
  richTextHasContent,
9
- RichText,
10
9
  Metadata,
11
10
  HelpBox,
12
11
  GenericCard,
@@ -51,18 +50,6 @@ const EventoUlterioriInformazioni = ({ content }) => {
51
50
  </UniversalLink>
52
51
  </div>
53
52
  )}
54
- {richTextHasContent(content?.patrocinato_da) && (
55
- <div className="mt-4">
56
- {richTextHasContent(content?.patrocinato_da) && (
57
- <div className="mb-5">
58
- <RichText
59
- title={intl.formatMessage(messages.patrocinato_da)}
60
- data={content?.patrocinato_da}
61
- />
62
- </div>
63
- )}
64
- </div>
65
- )}
66
53
  {content?.strutture_politiche?.length > 0 && (
67
54
  <div className="mt-4">
68
55
  <h3 className="h5">
@@ -91,11 +78,6 @@ EventoUlterioriInformazioni.propTypes = {
91
78
  ulteriori_informazioni: PropTypes.shape({
92
79
  data: PropTypes.string,
93
80
  }),
94
- patrocinato_da: PropTypes.shape({
95
- 'content-type': PropTypes.string,
96
- data: PropTypes.string,
97
- encoding: PropTypes.string,
98
- }),
99
81
  strutture_politiche: PropTypes.array,
100
82
  items: PropTypes.array,
101
83
  }).isRequired,
@@ -16,6 +16,7 @@ const messages = defineMessages({
16
16
 
17
17
  const NewsItemText = ({ content }) => {
18
18
  const intl = useIntl();
19
+ if (typeof content !== 'object') return null;
19
20
 
20
21
  // NewsItem ha la descrizione_estesa (testo con blocchi)
21
22
  // altri CT (come i Comunicati Stampa) potrebbero avere `text`
@@ -92,6 +92,10 @@ const messages = defineMessages({
92
92
  id: 'dropdown_indicator',
93
93
  defaultMessage: 'Apri il menu',
94
94
  },
95
+ SelectInput_default_label: {
96
+ id: 'SelectInput_default_label',
97
+ defaultMessage: "Seleziona un'opzione",
98
+ },
95
99
  });
96
100
 
97
101
  const SelectContainer = injectLazyLibs('reactSelect')(({
@@ -313,14 +317,15 @@ const SelectInput = ({
313
317
  options,
314
318
  components = {},
315
319
  reactSelect,
320
+ labelledby,
316
321
  defaultValue,
317
322
  }) => {
318
323
  const intl = useIntl();
324
+ const labelDefined =
325
+ label || intl.formatMessage(messages.SelectInput_default_label);
319
326
  const Select = reactSelect.default;
320
327
  return (
321
328
  <div className="bootstrap-select-wrapper">
322
- {label && <label htmlFor={id}>{label}</label>}
323
-
324
329
  <Select
325
330
  components={{
326
331
  MenuList,
@@ -341,9 +346,9 @@ const SelectInput = ({
341
346
  isSearchable={isSearchable}
342
347
  isMulti={isMulti}
343
348
  isClearable={isClearable}
344
- aria-label={label}
349
+ aria-label={labelDefined}
350
+ aria-labelledby={labelledby}
345
351
  aria-live="polite"
346
- aria-labelledby={id}
347
352
  ariaLiveMessages={getSelectAriaLiveMessages(intl)}
348
353
  noOptionsMessage={() =>
349
354
  intl.formatMessage(messages.select_noOptionsMessage)
@@ -10,7 +10,7 @@ const messages = defineMessages({
10
10
  show_pdf_desc: {
11
11
  id: 'show_pdf_desc',
12
12
  defaultMessage:
13
- "Permette di aprire l'anteprima di tutti i PDF di questo elenco in una tab separata altrimenti vengono scaricati.",
13
+ "Permette di aprire l'anteprima di tutti i PDF di questo elenco in una tab separata. Se non impostato, i PDF vengono scaricati.",
14
14
  },
15
15
  });
16
16
 
@@ -5,6 +5,7 @@
5
5
  * CUSTOMIZATIONS:
6
6
  * - aggiunto icona per link esterni
7
7
  * - aggiunto title informativo per link esterni
8
+ * - aggiunta la condizione su @@display-file e @download-file per gestire i casi in cui questi parametri vengono imposti a monte
8
9
  */
9
10
 
10
11
  import React from 'react';
@@ -59,18 +60,21 @@ const UniversalLink = ({
59
60
  }
60
61
 
61
62
  //case: item of type 'File'
62
- if (
63
- !token &&
64
- config.settings.downloadableObjects.includes(item['@type'])
65
- ) {
66
- url = `${url}/@@download/file`;
67
- }
63
+ if (!url.includes('@@download') && !url.includes('@@display-file')) {
64
+ //se non è gia stato aggiunto il suffisso per il download nell'@id dell'item
65
+ if (
66
+ !token &&
67
+ config.settings.downloadableObjects.includes(item['@type'])
68
+ ) {
69
+ url = `${url}/@@download/file`;
70
+ }
68
71
 
69
- if (
70
- !token &&
71
- config.settings.viewableInBrowserObjects.includes(item['@type'])
72
- ) {
73
- url = `${url}/@@display-file/file`;
72
+ if (
73
+ !token &&
74
+ config.settings.viewableInBrowserObjects.includes(item['@type'])
75
+ ) {
76
+ url = `${url}/@@display-file/file`;
77
+ }
74
78
  }
75
79
  }
76
80
  }
@@ -10,6 +10,7 @@ import PropTypes from 'prop-types';
10
10
  import { Link } from 'react-router-dom';
11
11
  import { PageHeader } from 'design-comuni-plone-theme/components/ItaliaTheme/View';
12
12
  import { ListingImage } from 'design-comuni-plone-theme/components/ItaliaTheme';
13
+ import { contentHasImage } from 'design-comuni-plone-theme/helpers';
13
14
 
14
15
  /**
15
16
  * List view component class.
@@ -23,8 +24,7 @@ const ListingView = ({ content }) => (
23
24
  <PageHeader content={content} />
24
25
  <section id="content-core">
25
26
  {content.items.map((item) => {
26
- const image = ListingImage({ item });
27
-
27
+ const hasImage = contentHasImage(item);
28
28
  return (
29
29
  <div key={item.url} className="listing-item my-4">
30
30
  <div>
@@ -35,7 +35,7 @@ const ListingView = ({ content }) => (
35
35
  </h2>
36
36
  {item.description && <p>{item.description}</p>}
37
37
  </div>
38
- {image && <>{image}</>}
38
+ {hasImage && <ListingImage item={item} />}
39
39
  </div>
40
40
  );
41
41
  })}
@@ -50,4 +50,28 @@ const useFallbackImageSrc = ({
50
50
  return { currentSrc, handleError, getFallbackImageStyle };
51
51
  };
52
52
 
53
- export { FALLBACK_IMAGE_SRC, FALLBACK_IMAGE_SRC_MAX_W, useFallbackImageSrc };
53
+ /*
54
+ Check if a Content item has a related image
55
+ This check is done on image_field and image_scales fields, which are
56
+ the default fields in a JSON response for a content in plone.restapi
57
+
58
+ @param {Object} item - The Plone item/brain/content
59
+ */
60
+ const contentHasImage = (item) => {
61
+ if (!item) return false;
62
+ const isFromRealObject = !item.image_scales;
63
+ const imageFieldWithDefault = item.image_field || 'image';
64
+
65
+ const image = isFromRealObject
66
+ ? item[imageFieldWithDefault]
67
+ : item.image_scales[imageFieldWithDefault]?.[0];
68
+
69
+ return Boolean(image);
70
+ };
71
+
72
+ export {
73
+ FALLBACK_IMAGE_SRC,
74
+ FALLBACK_IMAGE_SRC_MAX_W,
75
+ useFallbackImageSrc,
76
+ contentHasImage,
77
+ };
@@ -59,4 +59,7 @@ export {
59
59
  isResolveUID,
60
60
  } from 'design-comuni-plone-theme/helpers/url';
61
61
  export { usePaginatedItemsSection } from 'design-comuni-plone-theme/helpers/usePaginatedItemsSection.hook.ts';
62
- export { useFallbackImageSrc } from 'design-comuni-plone-theme/helpers/images';
62
+ export {
63
+ useFallbackImageSrc,
64
+ contentHasImage,
65
+ } from 'design-comuni-plone-theme/helpers/images';
@@ -13,6 +13,10 @@
13
13
  display: inline-block;
14
14
  }
15
15
 
16
+ .card-with-image-additional-links a {
17
+ width: auto;
18
+ }
19
+
16
20
  .img-responsive-wrapper {
17
21
  width: inherit;
18
22
 
@@ -89,6 +89,15 @@
89
89
  }
90
90
  }
91
91
  }
92
+
93
+ @media (max-width: #{map-get($grid-breakpoints, md)}) {
94
+ > .row {
95
+ gap: 1em;
96
+ > .col {
97
+ flex: 1 0 100%;
98
+ }
99
+ }
100
+ }
92
101
  }
93
102
 
94
103
  body.cms-ui.has-toolbar.has-sidebar {
@@ -3,3 +3,15 @@
3
3
  flex: 0 0 100%;
4
4
  }
5
5
  }
6
+
7
+ .card-wrapper.card-teaser-wrapper .card-teaser.location-item .pin-icon {
8
+ margin-left: -0.5rem;
9
+ margin-right: 0.25rem;
10
+ margin-bottom: 0.5rem;
11
+ }
12
+
13
+ // Full width for last odd card in locations
14
+ .card-wrapper.card-teaser-wrapper
15
+ .card-teaser.location-item:nth-child(odd):last-child {
16
+ flex: 0 0 100%;
17
+ }
@@ -11,6 +11,10 @@
11
11
  // nel momento in cui riusciremo a togliere il padding 0 important
12
12
  // dalla classe .card-big-io-comune .card-body globalmente
13
13
  padding: 24px !important;
14
+
15
+ .card-text {
16
+ color: $gray-secondary;
17
+ }
14
18
  }
15
19
 
16
20
  .card-image {
@@ -28,6 +32,15 @@
28
32
  .card-title {
29
33
  font-size: $card-big-head-size;
30
34
  line-height: $card-big-head-l-h;
35
+
36
+ a {
37
+ font-weight: 700;
38
+ }
39
+ }
40
+
41
+ span.text {
42
+ font-weight: 600;
43
+ letter-spacing: 1px;
31
44
  }
32
45
 
33
46
  &.listing-item {
@@ -47,10 +60,15 @@
47
60
 
48
61
  h3.card-title {
49
62
  a {
50
- font-size: 1.3rem;
63
+ font-size: 1.777rem;
51
64
  line-height: 1.5rem;
52
65
  }
53
66
  }
67
+
68
+ .card-text {
69
+ font-family: 'Lora' !important;
70
+ color: $card-p-color;
71
+ }
54
72
  }
55
73
  }
56
74
  }
@@ -14,3 +14,39 @@
14
14
  font-family: $font-family-sans-serif;
15
15
  }
16
16
  }
17
+
18
+ // <h> styles for text editor content in CTs
19
+
20
+ #main-content-section.it-page-sections-container .richtext-blocks {
21
+ h2 {
22
+ font-size: 1.555rem;
23
+ line-height: 1.428;
24
+ font-weight: 600;
25
+ }
26
+
27
+ h3 {
28
+ font-size: 1.35rem;
29
+ line-height: 1.25;
30
+ font-weight: 600;
31
+ }
32
+
33
+ h4 {
34
+ font-size: 1.35rem;
35
+ line-height: 1.25;
36
+ font-weight: 600;
37
+ color: $gray-600;
38
+ }
39
+
40
+ h5 {
41
+ font-size: 1.35rem;
42
+ line-height: 1.25;
43
+ font-weight: 600;
44
+ color: $gray-500;
45
+ }
46
+
47
+ h6 {
48
+ font-size: 1.2rem;
49
+ line-height: 1.15;
50
+ font-weight: 400;
51
+ }
52
+ }
@@ -298,6 +298,27 @@ body.cms-ui {
298
298
  }
299
299
  }
300
300
 
301
+ //cookie banner icons
302
+ // replaced icon code with left and right as they actually render correctly
303
+ // and rotated the icon
304
+ &.section-gdpr-cookie-settings {
305
+ .cookies-widget .move-buttons {
306
+ i.icon.arrow.up {
307
+ transform: rotate(90deg);
308
+ &::before {
309
+ content: '\e911';
310
+ }
311
+ }
312
+
313
+ i.icon.arrow.down {
314
+ transform: rotate(90deg);
315
+ &::before {
316
+ content: '\e905';
317
+ }
318
+ }
319
+ }
320
+ }
321
+
301
322
  .sidebar-container .object-listing,
302
323
  .icon-align-name {
303
324
  svg.icon {
@@ -140,6 +140,7 @@
140
140
  @import 'bootstrap-italia/src/scss/custom/dialog';
141
141
  @import 'bootstrap-italia/src/scss/custom/notifications';
142
142
  @import 'bootstrap-italia/src/scss/custom/avatar';
143
+ @import './bootstrap-italia/avatar';
143
144
  @import 'bootstrap-italia/src/scss/custom/thumbnav';
144
145
  @import 'bootstrap-italia/src/scss/custom/steppers';
145
146
  @import './bootstrap-italia/steppers';
@@ -0,0 +1,28 @@
1
+ // @import 'bootstrap-italia/src/scss/variables';
2
+ @use 'sass:math';
3
+ // $avatar-base-size: 8px;
4
+
5
+ .avatar {
6
+ &.size-lg {
7
+ // Dal figma, sti tondi sono 64x64
8
+ width: $avatar-base-size * 8;
9
+ height: $avatar-base-size * 8;
10
+ p {
11
+ font-size: 24px;
12
+ }
13
+ .icon {
14
+ height: 28px;
15
+ width: 28px;
16
+ }
17
+ .avatar-presence,
18
+ .avatar-status {
19
+ right: 2px;
20
+ width: 14px;
21
+ height: 14px;
22
+ }
23
+
24
+ .avatar-status {
25
+ top: math.div($avatar-base-size, 28);
26
+ }
27
+ }
28
+ }