@massimo-cassandro/minimo 0.1.2 → 0.1.3
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.
- package/package.json +5 -8
- package/index.js +0 -0
- package/src/components/auto-datatable/auto-datatable.css +0 -355
- package/src/components/auto-datatable/auto-datatable.js +0 -154
- package/src/components/init.js +0 -7
- package/src/components/modal-alert/flash-alerts.js +0 -32
- package/src/components/modal-alert/modal-alert.css +0 -47
- package/src/components/modal-alert/modal-alert.js +0 -85
- package/src/components/modal-alert/svg/check-circle-duotone.svg +0 -1
- package/src/components/modal-alert/svg/info-duotone.svg +0 -1
- package/src/components/modal-alert/svg/question-duotone.svg +0 -1
- package/src/components/modal-alert/svg/warning-duotone.svg +0 -1
- package/src/components/modal-alert/svg/x-circle-duotone.svg +0 -1
- package/src/components/modal-content/modal-content.js +0 -152
- package/src/components/modal-content/modal-content.module.css +0 -142
- package/src/components/recaptcha/recaptcha.css +0 -74
- package/src/components/sf-macro/sf-macro.css +0 -104
- package/src/components/sf-macro/sf-macro.js +0 -44
- package/src/components/vanilla-cookie-consent/cookie-consent.css +0 -20
- package/src/components/vanilla-cookie-consent/cookie-consent.js +0 -76
- package/src/components/vanilla-cookie-consent/render-cookie-list.js +0 -32
- package/src/components/vanilla-cookie-consent/src/cookie-list.js +0 -85
- package/src/components/vanilla-cookie-consent/src/it-translation.js +0 -38
- package/src/components/vanilla-cookie-consent/src/run-analytics.js +0 -54
- package/src/components/vanilla-cookie-consent/src/run-recaptcha.js +0 -71
- package/src/css/alerts.css +0 -95
- package/src/css/anchors.css +0 -40
- package/src/css/buttons/btn-close.css +0 -41
- package/src/css/buttons/buttons.css +0 -187
- package/src/css/buttons/status-buttons.css +0 -107
- package/src/css/container.css +0 -15
- package/src/css/data-formats.css +0 -30
- package/src/css/details.css +0 -19
- package/src/css/dialog-content.css +0 -72
- package/src/css/flex.css +0 -30
- package/src/css/forms/form-edit-info.css +0 -17
- package/src/css/forms/forms.css +0 -315
- package/src/css/forms/select-indicator.svg +0 -3
- package/src/css/grid.css +0 -63
- package/src/css/headings.css +0 -34
- package/src/css/icons.css +0 -114
- package/src/css/inner-nav.css +0 -11
- package/src/css/layout-base.css +0 -11
- package/src/css/overlay.css +0 -11
- package/src/css/reset.css +0 -59
- package/src/css/spinners/TODO spinner-circle.css +0 -54
- package/src/css/spinners/TODO spinner-three-dots.css +0 -14
- package/src/css/spinners/readme.md +0 -1
- package/src/css/spinners/spinner-circle-basic.css +0 -15
- package/src/css/spinners/spinner-trailing-dots.css +0 -51
- package/src/css/spinners/spinner-wrapper.css +0 -20
- package/src/css/svg.css +0 -3
- package/src/css/table.css +0 -66
- package/src/css/text.css +0 -114
- package/src/css/utilities.css +0 -128
- package/src/custom-media-default.css +0 -16
- package/src/custom-properties-default.css +0 -273
- package/src/index-template.css +0 -49
- package/src/js/alert-autoclose.js +0 -9
- package/src/js/create-blurhash-canvas.js +0 -47
- package/src/js/dialog-content.js +0 -82
- package/src/js/dismiss-alerts.js +0 -6
- package/src/js/forms.js +0 -36
- package/src/js/img-viewer-dom-builder.js +0 -196
- package/src/js/inner-nav.js +0 -11
- package/src/js/overlay.js +0 -12
- package/src/js/print-icon.js +0 -51
- package/src/js/spinner.js +0 -30
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
// import './modal-alert.css'; // importato direttamente dal css principale per ottimizzarne l'uso
|
|
2
|
-
|
|
3
|
-
import modalAlert from '@massimo-cassandro/modal-alert';
|
|
4
|
-
|
|
5
|
-
import checkIcon from './svg/check-circle-duotone.svg?inline';
|
|
6
|
-
import infoIcon from './svg/info-duotone.svg?inline';
|
|
7
|
-
import confirmIcon from './svg/question-duotone.svg?inline';
|
|
8
|
-
import warningIcon from './svg/warning-duotone.svg?inline';
|
|
9
|
-
import errorIcon from './svg/x-circle-duotone.svg?inline';
|
|
10
|
-
|
|
11
|
-
const custom_defaults = {
|
|
12
|
-
|
|
13
|
-
globals: {
|
|
14
|
-
onOpen: () => {
|
|
15
|
-
document.body.classList.add('overflow-hidden');
|
|
16
|
-
},
|
|
17
|
-
onClose: () => {
|
|
18
|
-
document.body.classList.remove('overflow-hidden');
|
|
19
|
-
},
|
|
20
|
-
cssFile: null,
|
|
21
|
-
animation: true,
|
|
22
|
-
showMarks: true,
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
success: {
|
|
26
|
-
title: 'Operazione completata',
|
|
27
|
-
mes: null,
|
|
28
|
-
ok_btn_text: 'OK',
|
|
29
|
-
heading_class: null,
|
|
30
|
-
ok_btn_class: 'btn btn-success',
|
|
31
|
-
timer: 4000, // ms
|
|
32
|
-
},
|
|
33
|
-
error: {
|
|
34
|
-
title: 'Si è verificato un errore',
|
|
35
|
-
mes: null,
|
|
36
|
-
ok_btn_text: 'OK',
|
|
37
|
-
heading_class: null,
|
|
38
|
-
text_class: null,
|
|
39
|
-
ok_btn_class: 'btn btn-danger',
|
|
40
|
-
timer: null,
|
|
41
|
-
},
|
|
42
|
-
warning: {
|
|
43
|
-
title: 'Attenzione!',
|
|
44
|
-
mes: null,
|
|
45
|
-
ok_btn_text: 'OK',
|
|
46
|
-
heading_class: null,
|
|
47
|
-
text_class: null,
|
|
48
|
-
ok_btn_class: 'btn btn-warning',
|
|
49
|
-
timer: null,
|
|
50
|
-
},
|
|
51
|
-
info: {
|
|
52
|
-
title: null,
|
|
53
|
-
mes: null,
|
|
54
|
-
ok_btn_text: 'OK',
|
|
55
|
-
heading_class: null,
|
|
56
|
-
text_class: null,
|
|
57
|
-
ok_btn_class: 'btn btn-info',
|
|
58
|
-
timer: null,
|
|
59
|
-
},
|
|
60
|
-
confirm: {
|
|
61
|
-
title: 'Confermi?',
|
|
62
|
-
mes: null,
|
|
63
|
-
ok_btn_text: 'OK',
|
|
64
|
-
cancel_btn_text: 'Cancel',
|
|
65
|
-
cancel_focus: true, // false to give focus to the ok button
|
|
66
|
-
heading_class: null,
|
|
67
|
-
text_class: null,
|
|
68
|
-
ok_btn_class: 'btn btn-warning',
|
|
69
|
-
cancel_btn_class: 'btn btn-outline-secondary',
|
|
70
|
-
callback: null,
|
|
71
|
-
timer: null
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
const marks = {
|
|
76
|
-
success: checkIcon,
|
|
77
|
-
error: errorIcon,
|
|
78
|
-
warning: warningIcon,
|
|
79
|
-
info: infoIcon,
|
|
80
|
-
confirm: confirmIcon
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
export function mAlert(params) {
|
|
84
|
-
modalAlert(params, custom_defaults, marks);
|
|
85
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"></path><path d="M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"></path></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"></path><path d="M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"></path></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"></path><path d="M140,180a12,12,0,1,1-12-12A12,12,0,0,1,140,180ZM128,72c-22.06,0-40,16.15-40,36v4a8,8,0,0,0,16,0v-4c0-11,10.77-20,24-20s24,9,24,20-10.77,20-24,20a8,8,0,0,0-8,8v8a8,8,0,0,0,16,0v-.72c18.24-3.35,32-17.9,32-35.28C168,88.15,150.06,72,128,72Zm104,56A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"></path></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z" opacity="0.2"></path><path d="M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"></path></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"></path><path d="M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"></path></svg>
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { domBuilder, classnames } from '@node_modules/@massimo-cassandro/js-utilities/index.js';
|
|
2
|
-
import { spinner } from '@minimo/spinner.js';
|
|
3
|
-
import * as styles from './modal-content.module.css?inline';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement
|
|
9
|
-
|
|
10
|
-
export function modalContent({
|
|
11
|
-
|
|
12
|
-
/** iframe | content */
|
|
13
|
-
mode = 'iframe',
|
|
14
|
-
|
|
15
|
-
/** dialog extra class */
|
|
16
|
-
dialogClassName = null,
|
|
17
|
-
|
|
18
|
-
/** iframe url */
|
|
19
|
-
iframeUrl = null,
|
|
20
|
-
|
|
21
|
-
/** content string (markup) o array */
|
|
22
|
-
content = null,
|
|
23
|
-
|
|
24
|
-
/** content extra classname */
|
|
25
|
-
contentClassName = null,
|
|
26
|
-
|
|
27
|
-
/** dimensione modal: full, large, medium o small */
|
|
28
|
-
size = 'large',
|
|
29
|
-
|
|
30
|
-
/** padding: std (var(--spacing-md) 0) o none */
|
|
31
|
-
padding = 'std'
|
|
32
|
-
}) {
|
|
33
|
-
|
|
34
|
-
if(!['content', 'iframe'].includes(mode)) {
|
|
35
|
-
throw `modalContent: parametro 'mode' non corretto (${mode})`;
|
|
36
|
-
}
|
|
37
|
-
if(!iframeUrl && mode === 'iframe') {
|
|
38
|
-
throw 'modalContent: parametro `iframeUrl` mancante';
|
|
39
|
-
}
|
|
40
|
-
if(content == null && mode === 'content') {
|
|
41
|
-
throw 'modalContent: parametro `content` mancante';
|
|
42
|
-
}
|
|
43
|
-
if(!['full', 'large', 'medium', 'small'].includes(size)) {
|
|
44
|
-
throw `modalContent: parametro 'size' non corretto (${size})`;
|
|
45
|
-
}
|
|
46
|
-
if(!['std', 'none'].includes(padding)) {
|
|
47
|
-
throw `modalContent: parametro 'padding' non corretto (${padding})`;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
let dialog_element, dialog_inner, iframe_element = null, content_element = null;
|
|
51
|
-
const iframeLoadEventHandler = () => {
|
|
52
|
-
dialog_element.classList.add(styles.on);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
if(!dialog_element) {
|
|
56
|
-
|
|
57
|
-
domBuilder([
|
|
58
|
-
{
|
|
59
|
-
tag: 'dialog',
|
|
60
|
-
className: styles.dialog,
|
|
61
|
-
attrs: {
|
|
62
|
-
'closedby': 'any'
|
|
63
|
-
},
|
|
64
|
-
children: [
|
|
65
|
-
{
|
|
66
|
-
tag: 'button',
|
|
67
|
-
className: styles.closeButton, // TODO standardizzare close btn
|
|
68
|
-
attrs: {
|
|
69
|
-
'aria-label': 'Chiudi'
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
className: styles.dialogInner,
|
|
74
|
-
children: [
|
|
75
|
-
{
|
|
76
|
-
className: styles.modalSpinner,
|
|
77
|
-
content: spinner({container: null, withOverlay: false })
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
]
|
|
81
|
-
}
|
|
82
|
-
]
|
|
83
|
-
}
|
|
84
|
-
], document.body);
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
dialog_element = document.querySelector(`.${styles.dialog}`);
|
|
88
|
-
dialog_inner = dialog_element.querySelector(`.${styles.dialogInner}`);
|
|
89
|
-
|
|
90
|
-
dialog_element.querySelector(`.${styles.closeButton}`).addEventListener('click', () => {
|
|
91
|
-
dialog_element.close();
|
|
92
|
-
}, false);
|
|
93
|
-
|
|
94
|
-
// listener chiusura
|
|
95
|
-
dialog_element.addEventListener('close', () => {
|
|
96
|
-
|
|
97
|
-
iframe_element?.removeEventListener('load', iframeLoadEventHandler, false);
|
|
98
|
-
iframe_element?.remove();
|
|
99
|
-
content_element?.remove();
|
|
100
|
-
|
|
101
|
-
document.body.classList.remove('overflow-hidden');
|
|
102
|
-
dialog_element.classList.remove(styles.on);
|
|
103
|
-
}, false);
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
// aggiunta classi extra
|
|
109
|
-
dialog_element.className = classnames(
|
|
110
|
-
styles.dialog,
|
|
111
|
-
dialogClassName,
|
|
112
|
-
styles[`size-${size}`],
|
|
113
|
-
styles[`padding-${padding}`]
|
|
114
|
-
);
|
|
115
|
-
|
|
116
|
-
domBuilder([
|
|
117
|
-
{
|
|
118
|
-
condition: mode === 'iframe',
|
|
119
|
-
className: styles.iframeEl,
|
|
120
|
-
tag: 'iframe',
|
|
121
|
-
attrs: {
|
|
122
|
-
src: ''
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
condition: mode === 'content',
|
|
127
|
-
className: classnames(styles.contentEl, contentClassName),
|
|
128
|
-
content: (content && !Array.isArray(content))? content : null,
|
|
129
|
-
children: (content && Array.isArray(content))? content : null
|
|
130
|
-
}
|
|
131
|
-
], dialog_inner);
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
document.body.classList.add('overflow-hidden');
|
|
135
|
-
dialog_element.showModal();
|
|
136
|
-
dialog_element.focus();
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
if(mode === 'iframe') {
|
|
140
|
-
iframe_element = dialog_element.querySelector(`.${styles.iframeEl}`);
|
|
141
|
-
iframe_element.src = iframeUrl;
|
|
142
|
-
|
|
143
|
-
// listener load per i frame
|
|
144
|
-
iframe_element?.addEventListener('load', iframeLoadEventHandler, false);
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
} else if (mode === 'content') {
|
|
148
|
-
content_element = dialog_element.querySelector(`.${styles.contentEl}`);
|
|
149
|
-
dialog_element.classList.add(styles.on);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
}
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
/* TODO custom props nel file generale */
|
|
2
|
-
/* TODO prevedere opzione con bordo del pulsante di chiusura (NB: si disallinea) */
|
|
3
|
-
/* TODO cambiare icona chiusura con svg? */
|
|
4
|
-
/* TODO aggiungere wrapper intorno a dialogInner (a filo con il dialog) per la scroll bar */
|
|
5
|
-
|
|
6
|
-
.dialog { /* dialog */
|
|
7
|
-
--modal-border-radius: var(--radius-md, 1.2rem);
|
|
8
|
-
position: fixed;
|
|
9
|
-
max-width: 80dvw;
|
|
10
|
-
max-height: 90dvh;
|
|
11
|
-
padding: 0;
|
|
12
|
-
margin: auto;
|
|
13
|
-
overflow: visible;
|
|
14
|
-
background-color: var(--body-bg-color, #fff);
|
|
15
|
-
border: none;
|
|
16
|
-
border-radius: var(--modal-border-radius);
|
|
17
|
-
box-shadow: 0 0 2rem .5rem rgb(0 0 0 / .5);
|
|
18
|
-
transition: scale .2s ease-out;
|
|
19
|
-
scale: 0;
|
|
20
|
-
|
|
21
|
-
/* stylelint-disable selector-class-pattern */
|
|
22
|
-
&.size-full {
|
|
23
|
-
width: 80dvw;
|
|
24
|
-
height: 90dvh;
|
|
25
|
-
}
|
|
26
|
-
/* dimensioni std -> size == 'large' */
|
|
27
|
-
&.size-large {
|
|
28
|
-
width: 50rem; /* 800px */
|
|
29
|
-
height: auto;
|
|
30
|
-
}
|
|
31
|
-
&.size-medium {
|
|
32
|
-
width: 37.5rem; /* 600px */
|
|
33
|
-
height: 37.5rem;
|
|
34
|
-
}
|
|
35
|
-
&.size-small {
|
|
36
|
-
width: 32rem; /* ~500 x 400 */
|
|
37
|
-
height: 25rem;
|
|
38
|
-
}
|
|
39
|
-
/* stylelint-enable selector-class-pattern */
|
|
40
|
-
|
|
41
|
-
&.on {
|
|
42
|
-
scale: 1;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&::backdrop {
|
|
46
|
-
overscroll-behavior: contain;
|
|
47
|
-
background-color: rgb(0 0 0 / .7);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.dialogInner {
|
|
53
|
-
width: 100%;
|
|
54
|
-
height: 100%;
|
|
55
|
-
padding-inline-end: var(--spacing-md);
|
|
56
|
-
overflow-x: hidden;
|
|
57
|
-
overflow-y: auto;
|
|
58
|
-
/* scrollbar-gutter: stable; */
|
|
59
|
-
border-radius: var(--modal-border-radius);
|
|
60
|
-
|
|
61
|
-
/* stylelint-disable selector-class-pattern */
|
|
62
|
-
.padding-std & {
|
|
63
|
-
padding: var(--spacing-md) 0;
|
|
64
|
-
}
|
|
65
|
-
.padding-none & {
|
|
66
|
-
padding: 0;
|
|
67
|
-
}
|
|
68
|
-
/* stylelint-enable selector-class-pattern */
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.modalSpinner {
|
|
72
|
-
position: relative;
|
|
73
|
-
padding-block-start: var(--spacing-2xl);
|
|
74
|
-
|
|
75
|
-
.dialog.on & {
|
|
76
|
-
display: none;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.iframeEl, .contentEl {
|
|
81
|
-
width: 100%;
|
|
82
|
-
overscroll-behavior: contain;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.iframeEl {
|
|
86
|
-
height: 100%;
|
|
87
|
-
padding: 0;
|
|
88
|
-
margin: 0;
|
|
89
|
-
border: none;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.contentEl {
|
|
93
|
-
min-height: 100%;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.closeButton {
|
|
97
|
-
--btn-color: var(--secondary-fg, #000);
|
|
98
|
-
--btn-bg-color: var(--secondary, #fff);
|
|
99
|
-
--btn-hover-color: var(--secondary, #fff);
|
|
100
|
-
--btn-hover-bg-color: var(--secondary-fg, #000);
|
|
101
|
-
--icon-size: 2.5rem;
|
|
102
|
-
--btn-padding: var(--spacing-xs, .5rem);
|
|
103
|
-
--icon-bars-thickness: 3px;
|
|
104
|
-
|
|
105
|
-
position: absolute;
|
|
106
|
-
top: calc(-1 * var(--icon-size) / 3);
|
|
107
|
-
right: calc(-1 * var(--icon-size) / 3);
|
|
108
|
-
display: block;
|
|
109
|
-
width: var(--icon-size);
|
|
110
|
-
height: var(--icon-size);
|
|
111
|
-
padding: var(--btn-padding);
|
|
112
|
-
color: var(--btn-color);
|
|
113
|
-
cursor: pointer;
|
|
114
|
-
background-color: var(--btn-bg-color);
|
|
115
|
-
/* border: var(--icon-bars-thickness) solid currentColor; */
|
|
116
|
-
border: none;
|
|
117
|
-
border-radius: 50%;
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
&:hover {
|
|
121
|
-
--btn-color: var(--btn-hover-color);
|
|
122
|
-
--btn-bg-color: var(--btn-hover-bg-color);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
&::before, &::after {
|
|
126
|
-
position: absolute;
|
|
127
|
-
top: 50%;
|
|
128
|
-
left: var(--btn-padding);
|
|
129
|
-
display: block;
|
|
130
|
-
width: calc(var(--icon-size) - (var(--btn-padding) * 2));
|
|
131
|
-
height: var(--icon-bars-thickness);
|
|
132
|
-
content: '';
|
|
133
|
-
background: currentColor;
|
|
134
|
-
}
|
|
135
|
-
&::before {
|
|
136
|
-
transform: translateY(-50%) rotate(45deg);
|
|
137
|
-
}
|
|
138
|
-
&::after {
|
|
139
|
-
transform: translateY(-50%) rotate(-45deg);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|
|
3
|
-
{%- set chiave_recaptcha_client = '6Le75-AZAAAAAO1sEV1JChhNg3nYw1HBn9AjaVSN' -%}
|
|
4
|
-
<div class="recaptcha-form-wrapper disabled" data-key="{{ chiave_recaptcha_client }}">
|
|
5
|
-
|
|
6
|
-
<form id="form-xxx" action="" method="post">
|
|
7
|
-
..
|
|
8
|
-
</form>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<div class="recaptcha-alert">Per abilitare questo form è necessario attivare
|
|
12
|
-
i cookie per le funzionalità aggiuntive modificando le tue
|
|
13
|
-
<button class="btn btn-link" type="button" data-cc="show-preferencesModal" aria-haspopup="dialog">preferenze per i cookie</button></div>
|
|
14
|
-
|
|
15
|
-
<p class="text-xs">Questo modulo è protetto da Google reCAPTCHA.
|
|
16
|
-
Per info consulta la <a href="https://policies.google.com/privacy" target="_blank" rel="noopener noreferrer">Privacy Policy</a> di Google
|
|
17
|
-
e i <a href="https://policies.google.com/terms" target="_blank" rel="noopener noreferrer">termini di servizio</a>.</p>
|
|
18
|
-
</div>
|
|
19
|
-
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
.recaptcha-form-wrapper {
|
|
23
|
-
|
|
24
|
-
.recaptcha-alert {
|
|
25
|
-
display: none;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&.disabled {
|
|
29
|
-
position: relative;
|
|
30
|
-
|
|
31
|
-
.recaptcha-form-inner-wrapper {
|
|
32
|
-
filter: blur(2px);
|
|
33
|
-
|
|
34
|
-
&::after {
|
|
35
|
-
position: absolute;
|
|
36
|
-
inset: 0;
|
|
37
|
-
display: block;
|
|
38
|
-
content: '';
|
|
39
|
-
background-color: var(--recaptcha-alert-overlay, color-mix(in srgb, #000 50%, transparent));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
input, select, textarea {
|
|
43
|
-
pointer-events: none;
|
|
44
|
-
user-select: none;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.recaptcha-alert {
|
|
48
|
-
position: absolute;
|
|
49
|
-
top: 50%;
|
|
50
|
-
left: 50%;
|
|
51
|
-
display: block;
|
|
52
|
-
padding: var(--spacing-xs);
|
|
53
|
-
color: var(--recaptcha-alert-fg, #fff);
|
|
54
|
-
background-color: var(--recaptcha-alert-bg, #000);
|
|
55
|
-
border: .5px solid currentColor;
|
|
56
|
-
border-radius: var(--radius-xs);
|
|
57
|
-
box-shadow: var(--box-shadow-base);
|
|
58
|
-
transform-origin: center;
|
|
59
|
-
translate: -50% -50%;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.grecaptcha-badge {
|
|
65
|
-
visibility: hidden;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.grecaptcha-info {
|
|
69
|
-
margin: 1rem 0 0;
|
|
70
|
-
font-size: .6rem;
|
|
71
|
-
font-style: italic;
|
|
72
|
-
font-weight: 300;
|
|
73
|
-
opacity: 75%;
|
|
74
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
.sf-macro-wrapper {
|
|
3
|
-
--sf-macro-rows-padding: .5rem;
|
|
4
|
-
--sf-macro-rows-margin-bottom: 1rem;
|
|
5
|
-
--sf-macro-rows-border-radius: .4rem;
|
|
6
|
-
--sf-macro-rows-hover-bg-color: color-mix(in srgb, var(--body-bg-color) 95%, #000);
|
|
7
|
-
--sf-macro-even-rows-bg-color: var(--body-bg-color); /* rgb(0 0 0 / .05); */
|
|
8
|
-
--sf-macro-rows-border: 1px solid var(--stone-5);
|
|
9
|
-
--sf-macro-close-btn-size: 2rem;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/* etichette campi righe successive alla prima */
|
|
13
|
-
@media (--desktop-up) {
|
|
14
|
-
&:not(.always-show-labels) {
|
|
15
|
-
.sf-macro-riga {
|
|
16
|
-
&:not(:first-child) {
|
|
17
|
-
.form-label, label {
|
|
18
|
-
display: none;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/*
|
|
26
|
-
// forza la visualizzazione delle etichette in tutte le righe
|
|
27
|
-
// a partire dal breakpont successivo a quello indicato
|
|
28
|
-
@each $brk in (xs, sm, md, lg, xl) {
|
|
29
|
-
&.sf-macro-show-label-down-#{$brk} {
|
|
30
|
-
@include media-breakpoint-down($brk) {
|
|
31
|
-
.form-label, label {
|
|
32
|
-
display: inline-block !important;
|
|
33
|
-
}
|
|
34
|
-
} // end @media
|
|
35
|
-
}
|
|
36
|
-
} // end @each
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.sf-macro-riga {
|
|
42
|
-
position: relative;
|
|
43
|
-
padding: var(--sf-macro-rows-padding);
|
|
44
|
-
margin-bottom: var(--sf-macro-rows-margin-bottom);
|
|
45
|
-
border: var(--sf-macro-rows-border);
|
|
46
|
-
border-radius: var(--sf-macro-rows-border-radius);
|
|
47
|
-
|
|
48
|
-
&:nth-child(even) {
|
|
49
|
-
background-color: var(--sf-macro-even-rows-bg-color);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
&:hover {
|
|
54
|
-
background-color: var(--sf-macro-rows-hover-bg-color);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.form-group {
|
|
58
|
-
margin-bottom: 0;
|
|
59
|
-
|
|
60
|
-
&:has([type='checkbox']) {
|
|
61
|
-
align-self: center;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.grid {
|
|
66
|
-
row-gap: .8rem;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
} /* end .sf-macro-riga */
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
.sf-macro-close-btn { /* button */
|
|
73
|
-
position: absolute;
|
|
74
|
-
top: -.5rem;
|
|
75
|
-
right: -.5rem;
|
|
76
|
-
z-index: 1;
|
|
77
|
-
display: block;
|
|
78
|
-
width: var(--sf-macro-close-btn-size);
|
|
79
|
-
height: var(--sf-macro-close-btn-size);
|
|
80
|
-
padding: 1px;
|
|
81
|
-
color: currentColor;
|
|
82
|
-
background-color: var(--body-content-bg);
|
|
83
|
-
border-radius: 50%;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
&[disabled], [disabled] & {
|
|
87
|
-
cursor: not-allowed;
|
|
88
|
-
opacity: .4;
|
|
89
|
-
transform: skew(-15deg);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
svg {
|
|
93
|
-
width: 100%;
|
|
94
|
-
aspect-ratio: 1;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.sf-macro-riga:has(.sf-macro-close-btn:not(:disabled):hover) {
|
|
99
|
-
|
|
100
|
-
outline: 2px dashed var(--status-danger-color);
|
|
101
|
-
.sf-macro-close-btn {
|
|
102
|
-
color: var(--status-danger-color);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import './sf-macro.css';
|
|
2
|
-
|
|
3
|
-
export function sf_macro({
|
|
4
|
-
wrapper_selector = '.sf-macro-wrapper',
|
|
5
|
-
row_selector = '.sf-macro-riga',
|
|
6
|
-
add_callback = null,
|
|
7
|
-
del_callback = null
|
|
8
|
-
}={}) {
|
|
9
|
-
|
|
10
|
-
document.querySelectorAll(wrapper_selector).forEach(fset => {
|
|
11
|
-
const macro_container = fset.querySelector('.sf-macro-container')
|
|
12
|
-
,macro_template = macro_container.dataset.template
|
|
13
|
-
;
|
|
14
|
-
|
|
15
|
-
// listeners
|
|
16
|
-
fset.addEventListener('click', e => {
|
|
17
|
-
|
|
18
|
-
if(e.target.closest('.sf-macro-riga-add')) {
|
|
19
|
-
|
|
20
|
-
const righe_macro = macro_container.querySelectorAll(row_selector).length;
|
|
21
|
-
|
|
22
|
-
macro_container.insertAdjacentHTML('beforeend',
|
|
23
|
-
macro_template.replace(/__indice\d?__/g, righe_macro + 1)
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
if(add_callback && typeof add_callback === 'function') {
|
|
27
|
-
add_callback(
|
|
28
|
-
macro_container.querySelector('.sf-macro-riga:last-child'),
|
|
29
|
-
e.target.closest('.sf-macro-riga-add')
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} else if(e.target.closest('.sf-macro-close-btn')) {
|
|
35
|
-
e.target.closest(row_selector).remove();
|
|
36
|
-
|
|
37
|
-
if(del_callback && typeof del_callback === 'function') {
|
|
38
|
-
del_callback();
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
}, false);
|
|
43
|
-
}); // end foreach wrapper_selector
|
|
44
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/* stylelint-disable selector-max-id */
|
|
2
|
-
@import 'vanilla-cookieconsent/dist/cookieconsent.css';
|
|
3
|
-
|
|
4
|
-
/* stylelint-disable declaration-no-important */
|
|
5
|
-
#cc-main {
|
|
6
|
-
h2 {
|
|
7
|
-
line-height: 1.3 !important;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.btn-link {
|
|
11
|
-
font-weight: var(--font-weight-semibold);
|
|
12
|
-
|
|
13
|
-
@media (hover: hover) {
|
|
14
|
-
&:hover {
|
|
15
|
-
text-decoration: underline;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
/* stylelint-enable declaration-no-important */
|