@graffico/legal 0.1.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.
package/LICENSE ADDED
@@ -0,0 +1,18 @@
1
+ GRAFFICO STUDIO LEGAL LICENSE
2
+ Version 1.0
3
+
4
+ Copyright (c) 2026 Graffico Studio
5
+
6
+ CONDIZIONI DI UTILIZZO:
7
+
8
+ 1. CONCESSIONE DI LICENZA: Graffico Studio concede il permesso gratuito a qualsiasi persona che ottenga una copia di questo software di utilizzarlo, copiarlo e integrarlo gratuitamente all'interno delle proprie applicazioni web e siti web (sia personali che commerciali).
9
+
10
+ 2. RESTRIZIONI SULLA VENDITA: È severamente vietato vendere, sublicenziare o distribuire questo software (o parti di esso) come prodotto a sé stante, come libreria software indipendente o come parte di un framework/kit di sviluppo commerciale a pagamento. La libreria è concepita per essere uno strumento gratuito a supporto degli sviluppatori e non deve essere oggetto di speculazione commerciale diretta.
11
+
12
+ 3. ATTRIBUZIONE: Tutti i riferimenti a "Graffico Studio" all'interno del codice sorgente e delle informative generate devono essere mantenuti. Non è consentito rimuovere o oscurare i loghi o i crediti presenti nei componenti della libreria senza esplicito consenso scritto.
13
+
14
+ 4. NESSUNA GARANZIA: Il software viene fornito "così com'è", senza garanzie di alcun tipo, esplicite o implicite, incluse ma non limitate alle garanzie di commerciabilità, idoneità per uno scopo particolare e non violazione. In nessun caso gli autori o i titolari del copyright saranno responsabili per eventuali reclami, danni o altre responsabilità.
15
+
16
+ ---
17
+
18
+ Per utilizzi che esulano da queste condizioni, contattare: info@graffico.it
package/README.md ADDED
@@ -0,0 +1,138 @@
1
+ # @graffico/legal
2
+
3
+ Una soluzione premium, completa e GDPR compliant per la gestione dei consensi e delle informative legali in applicazioni React/Next.js.
4
+
5
+ ## Caratteristiche principali
6
+
7
+ - 🛡️ **GDPR Ready**: Gestione granulare dei consensi, documentazione delle finalità e prove legali del consenso (Consent ID).
8
+ - 🎨 **Premium UI**: Design moderno, pulito e altamente personalizzabile.
9
+ - 🌓 **Temi Dinamici**: Supporto per modalità Dark/Light e personalizzazione del colore primario.
10
+ - 🌍 **Service Presets**: Oltre 15 servizi comuni già pre-configurati.
11
+
12
+ ## Servizi Supportati (Presets)
13
+
14
+ Puoi aggiungere questi servizi semplicemente inserendo il loro ID nell'array `services`:
15
+
16
+ - **Analytics**: `google-analytics`, `facebook-pixel`, `linkedin-insight`, `tiktok-pixel`, `microsoft-clarity`, `hotjar`, `google-tag-manager`.
17
+ - **Pagamenti**: `stripe`, `paypal`.
18
+ - **Contenuti**: `youtube`, `google-maps`, `google-fonts`.
19
+ - **Marketing/CRM**: `mailchimp`, `newsletter`, `contact-form`.
20
+
21
+ _Puoi anche definire servizi personalizzati passando un oggetto `LegalService` completo._
22
+
23
+ - 📱 **Mobile First**: Layout ottimizzato per ogni dispositivo con paginazione intelligente per elenchi servizi lunghi.
24
+
25
+ ## Installazione
26
+
27
+ ```bash
28
+ npm install @graffico/legal
29
+ # oppure
30
+ pnpm add @graffico/legal
31
+ ```
32
+
33
+ ## Guida all'uso
34
+
35
+ ### 1. Configurazione
36
+
37
+ Definisci i dati della tua azienda:
38
+
39
+ ```tsx
40
+ import { CompanyConfig } from "@graffico/legal";
41
+
42
+ const legalConfig: CompanyConfig = {
43
+ name: "Mia Azienda",
44
+ domain: "azienda.it",
45
+ owners: "Nome Proprietario",
46
+ addresses: "Via Roma 1, Milano",
47
+ vatNumbers: "01234567890",
48
+ email: "privacy@azienda.it",
49
+ services: [
50
+ "google-analytics", // Preset ID
51
+ "facebook-pixel", // Preset ID
52
+ {
53
+ id: "servizio-custom",
54
+ name: "Il Mio CRM",
55
+ category: "provided", // 'automatic' | 'provided' | 'marketing'
56
+ purposes: ["Gestione Utenti", "Invio Newsletter"],
57
+ dataCollected: ["Email", "Nome", "Dati di Navigazione"],
58
+ }, // Servizio definito manualmente
59
+ ],
60
+ theme: "dark",
61
+ primaryColor: "#2c5282",
62
+ };
63
+ ```
64
+
65
+ ### Servizi Personalizzati
66
+
67
+ La libreria è estensibile. Se un servizio non è tra i preset, puoi passare un oggetto che segue l'interfaccia `LegalService`:
68
+
69
+ ```tsx
70
+ const customService = {
71
+ id: "crm-aziendale",
72
+ name: "CRM Interno",
73
+ category: "provided", // 'automatic' (tracking/pixel), 'provided' (moduli/form), 'marketing' (ADV)
74
+ purposes: ["Gestione Clienti"],
75
+ dataCollected: ["Email", "Nome"],
76
+ };
77
+ ```
78
+
79
+ ### 2. Provider e Banner (Layout)
80
+
81
+ Avvolgi la tua applicazione con il `LegalProvider` e aggiungi il `ConsentBanner` nel tuo layout principale.
82
+
83
+ ```tsx
84
+ // app/layout.tsx (Next.js App Router)
85
+ import { LegalProvider, ConsentBanner } from "@graffico/legal";
86
+
87
+ export default function RootLayout({ children }) {
88
+ return (
89
+ <html>
90
+ <body>
91
+ <LegalProvider config={legalConfig}>
92
+ {children}
93
+ <ConsentBanner />
94
+ </LegalProvider>
95
+ </body>
96
+ </html>
97
+ );
98
+ }
99
+ ```
100
+
101
+ ### 3. Pagine Privacy e Cookie
102
+
103
+ Crea le rotte per le tue informative in modo semplicissimo:
104
+
105
+ ```tsx
106
+ // app/privacy-policy/page.tsx
107
+ import { PrivacyPolicy } from "@graffico/legal";
108
+
109
+ export default function Page() {
110
+ return <PrivacyPolicy />;
111
+ }
112
+
113
+ // app/cookie-policy/page.tsx
114
+ import { CookiePolicy } from "@graffico/legal";
115
+
116
+ export default function Page() {
117
+ return <CookiePolicy />;
118
+ }
119
+ ```
120
+
121
+ ## Componenti Inclusi
122
+
123
+ - `LegalProvider`: Gestore dello stato dei consensi.
124
+ - `ConsentBanner`: Banner iniziale per l'accettazione dei cookie.
125
+ - `PreferenceModal`: Modal per la personalizzazione granulare (aperto automaticamente dal banner).
126
+ - `PrivacyPolicy`: Pagina completa di Privacy Policy.
127
+ - `CookiePolicy`: Pagina completa di Cookie Policy con Centro Preferenze integrato.
128
+ - `ServiceGrid`: Griglia interattiva dei servizi utilizzati.
129
+ - `FloatingConsentToggle`: Pulsante flottante per riaprire le preferenze (appare solo dopo il consenso).
130
+
131
+ ## Requisiti
132
+
133
+ - React 18+
134
+ - TailwindCSS (opzionale per l'applicazione ospitante, la libreria gestisce i propri stili).
135
+
136
+ ---
137
+
138
+ Generato con ❤️ da **Graffico Studio**
package/dist/index.cjs ADDED
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ "use strict";var S=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var W=Object.getOwnPropertyNames;var G=Object.prototype.hasOwnProperty;var $=(a,r)=>{for(var c in r)S(a,c,{get:r[c],enumerable:!0})},q=(a,r,c,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let p of W(r))!G.call(a,p)&&p!==c&&S(a,p,{get:()=>r[p],enumerable:!(s=V(r,p))||s.enumerable});return a};var O=a=>q(S({},"__esModule",{value:!0}),a);var Q={};$(Q,{ConsentBanner:()=>M,CookiePolicy:()=>E,FloatingConsentToggle:()=>P,LegalProvider:()=>U,PreferenceModal:()=>L,PrivacyPolicy:()=>H,SERVICE_PRESETS:()=>A,ServiceGrid:()=>N,resolveService:()=>D,useLegal:()=>u});module.exports=O(Q);var v=require("react"),j=require("react/jsx-runtime"),I=(0,v.createContext)(void 0),U=({children:a,config:r})=>{let[c,s]=(0,v.useState)({necessary:!0,statistical:!1,marketing:!1}),[p,d]=(0,v.useState)(!1),[f,g]=(0,v.useState)(!1),[b,m]=(0,v.useState)(!1);(0,v.useEffect)(()=>{let n=localStorage.getItem("graffico-legal-consent");n?s(JSON.parse(n)):d(!0),m(!0)},[]);let x=n=>{let w=c.consentId||Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),B={...n,necessary:!0,consentId:w,timestamp:new Date().toISOString()};s(B),localStorage.setItem("graffico-legal-consent",JSON.stringify(B)),d(!1),g(!1)},h=()=>{localStorage.removeItem("graffico-legal-consent"),s({necessary:!0,statistical:!1,marketing:!1}),d(!0),g(!1)},y=()=>{x({necessary:!0,statistical:!0,marketing:!0})},z=()=>{x({necessary:!0,statistical:!1,marketing:!1})};return b?(0,j.jsx)(I.Provider,{value:{config:r,consent:c,showBanner:p,isModalOpen:f,setModalOpen:g,acceptAll:y,declineAll:z,savePreferences:x,resetConsent:h},children:a}):null},u=()=>{let a=(0,v.useContext)(I);if(!a)throw new Error("useLegal deve essere usato dentro LegalProvider");return a};var C=require("react");var o=require("react/jsx-runtime"),L=()=>{let{config:a,consent:r,savePreferences:c,acceptAll:s,declineAll:p,isModalOpen:d,setModalOpen:f}=u(),[g,b]=(0,C.useState)(r),m=a.primaryColor||"#2c5282";if((0,C.useEffect)(()=>{b(r)},[r,d]),!d)return null;let x=h=>{h!=="necessary"&&b(y=>({...y,[h]:!y[h]}))};return(0,o.jsx)("div",{className:"fixed inset-0 z-10000 flex items-center justify-center p-4 bg-black/60 backdrop-blur-sm animate-in fade-in duration-300",children:(0,o.jsxs)("div",{className:"w-full max-w-2xl max-h-[90vh] bg-white/95 text-gray-900 border-gray-100 rounded-3xl shadow-2xl overflow-hidden flex flex-col animate-in zoom-in-95 duration-300",children:[(0,o.jsxs)("div",{className:"p-6 md:p-8 border-b border-gray-100 flex items-center justify-between",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h2",{className:"text-2xl font-black tracking-tight text-gray-900",children:"Preferenze Privacy"}),(0,o.jsx)("p",{className:"text-sm text-gray-500 font-medium",children:"Personalizza come trattiamo i tuoi dati"})]}),(0,o.jsx)("button",{onClick:()=>f(!1),className:"p-2 text-gray-400 hover:text-gray-900 transition-colors",children:(0,o.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,o.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,o.jsxs)("div",{className:"flex-1 overflow-y-auto p-6 md:p-8",children:[(0,o.jsx)("p",{className:"text-sm text-gray-600 leading-relaxed",children:'Questo pannello ti permette di esprimere alcune preferenze relative al trattamento delle tue informazioni personali. Puoi rivedere e modificare le tue scelte in qualsiasi momento. Per rifiutare il tuo consenso alle attivit\xE0 di trattamento descritte di seguito, disattiva i singoli comandi o utilizza il pulsante "Rifiuta tutto".'}),(0,o.jsx)("div",{className:"space-y-4",children:(0,o.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,o.jsxs)("div",{className:"p-4 bg-gray-50 rounded-2xl border border-gray-100 flex items-center justify-between",children:[(0,o.jsxs)("div",{className:"max-w-[80%]",children:[(0,o.jsx)("h3",{className:"font-bold text-gray-900",children:"Strettamente necessari"}),(0,o.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:"Questi strumenti sono richiesti per le funzionalit\xE0 base del sito e non possono essere disattivati."})]}),(0,o.jsxs)("div",{className:"relative inline-flex items-center cursor-not-allowed opacity-50",children:[(0,o.jsx)("div",{className:"w-11 h-6 rounded-full",style:{backgroundColor:m}}),(0,o.jsx)("div",{className:"absolute left-6 w-4 h-4 bg-white rounded-full"})]})]}),(0,o.jsxs)("div",{className:"p-4 bg-white rounded-2xl border border-gray-100 flex items-center justify-between hover:border-[#2c5282]/30 transition-colors cursor-pointer",onClick:()=>x("statistical"),children:[(0,o.jsxs)("div",{className:"max-w-[80%]",children:[(0,o.jsx)("h3",{className:"font-bold text-gray-900",children:"Misurazione"}),(0,o.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:"Ci permettono di misurare il traffico e analizzare il tuo comportamento per migliorare il servizio."})]}),(0,o.jsx)("div",{className:`relative inline-flex items-center h-6 rounded-full w-11 transition-colors duration-200 focus:outline-none ${g.statistical?"":"bg-gray-200"}`,style:{backgroundColor:g.statistical?m:void 0},children:(0,o.jsx)("span",{className:`inline-block w-4 h-4 transform bg-white rounded-full transition-transform duration-200 ${g.statistical?"translate-x-6":"translate-x-1"}`})})]}),(0,o.jsxs)("div",{className:"p-4 bg-white rounded-2xl border border-gray-100 flex items-center justify-between hover:border-[#2c5282]/30 transition-colors cursor-pointer",onClick:()=>x("marketing"),children:[(0,o.jsxs)("div",{className:"max-w-[80%]",children:[(0,o.jsx)("h3",{className:"font-bold text-gray-900",children:"Marketing e Profilazione"}),(0,o.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:"Utilizzati per inviarti comunicazioni commerciali personalizzate in base ai tuoi interessi."})]}),(0,o.jsx)("div",{className:`relative inline-flex items-center h-6 rounded-full w-11 transition-colors duration-200 focus:outline-none ${g.marketing?"":"bg-gray-200"}`,style:{backgroundColor:g.marketing?m:void 0},children:(0,o.jsx)("span",{className:`inline-block w-4 h-4 transform bg-white rounded-full transition-transform duration-200 ${g.marketing?"translate-x-6":"translate-x-1"}`})})]})]})}),r.consentId&&(0,o.jsxs)("div",{className:"pt-8 mt-4 border-t border-gray-100",children:[(0,o.jsx)("div",{className:"bg-gray-50/50 p-4 rounded-2xl border border-dashed border-gray-200",children:(0,o.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,o.jsx)("span",{className:"text-[10px] font-black text-gray-400 uppercase tracking-widest",children:"IDC (Consent ID)"}),(0,o.jsx)("span",{className:"text-[10px] font-mono text-gray-500 bg-white px-2 py-0.5 rounded border border-gray-100",children:r.consentId})]}),(0,o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,o.jsx)("span",{className:"text-[10px] font-black text-gray-400 uppercase tracking-widest",children:"Data Consenso"}),(0,o.jsx)("span",{className:"text-[10px] font-bold text-gray-500",children:r.timestamp?new Date(r.timestamp).toLocaleString("it-IT"):"-"})]})]})}),(0,o.jsx)("p",{className:"text-[9px] text-gray-400 mt-3 leading-relaxed",children:"Questi identificativi fungono da prova legale del tuo consenso secondo le linee guida GDPR. Puoi richiederne la cancellazione in qualsiasi momento."})]})]}),(0,o.jsxs)("div",{className:"p-6 bg-gray-50 border-t border-gray-100 flex flex-col sm:flex-row gap-3",children:[(0,o.jsx)("button",{onClick:p,className:"flex-1 px-6 py-3 border border-gray-300 text-gray-700 font-bold rounded-xl hover:bg-white transition-all text-sm uppercase tracking-wider",children:"Rifiuta tutto"}),(0,o.jsx)("button",{onClick:()=>c(g),className:"flex-1 px-6 py-3 bg-gray-900 text-white font-bold rounded-xl hover:bg-black transition-all text-sm uppercase tracking-wider",children:"Salva e continua"}),(0,o.jsx)("button",{onClick:s,className:"flex-1 px-6 py-3 text-white font-bold rounded-xl hover:opacity-90 transition-all text-sm uppercase tracking-wider",style:{backgroundColor:m},children:"Accetta tutto"})]})]})})};var k=require("react/jsx-runtime"),P=()=>{let{showBanner:a,setModalOpen:r,config:c}=u();if(a)return null;let s={"bottom-right":"bottom-6 right-6","bottom-left":"bottom-6 left-6","top-right":"top-6 right-6","top-left":"top-6 left-6"},p=c.togglePosition||"bottom-right";return(0,k.jsxs)("button",{onClick:()=>r(!0),className:`fixed ${s[p]} z-8000 w-12 h-12 bg-white rounded-xl shadow-xl border border-gray-100 flex items-center justify-center hover:scale-110 active:scale-95 transition-all group`,style:{color:c.primaryColor||"#2c5282"},"aria-label":"Privacy Preferences",children:[(0,k.jsx)("svg",{className:"w-6 h-6 group-hover:rotate-12 transition-transform",fill:"currentColor",viewBox:"0 0 24 24",children:(0,k.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z"})}),(0,k.jsx)("span",{className:"absolute right-full mr-3 px-2 py-1 bg-black text-white text-[10px] rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap pointer-events-none",children:"Preferenze Privacy"})]})};var l=require("react/jsx-runtime"),M=()=>{let{config:a,showBanner:r,acceptAll:c,declineAll:s,setModalOpen:p}=u();if(!r)return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(P,{}),(0,l.jsx)(L,{})]});let d=a.theme!=="light",f=a.primaryColor||"#2c5282";return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"fixed bottom-0 left-0 right-0 p-4 md:p-8 z-9000 flex justify-center animate-in slide-in-from-bottom-full duration-500",children:(0,l.jsxs)("div",{className:`w-full max-w-5xl rounded-4xl shadow-[0_20px_50px_rgba(0,0,0,0.3)] backdrop-blur-xl border p-6 md:p-8 flex flex-col md:flex-row items-center gap-6 relative overflow-hidden ${d?"bg-black/95 text-white border-white/10":"bg-white/95 text-gray-900 border-gray-100"}`,children:[(0,l.jsx)("div",{className:"absolute -bottom-24 -right-24 w-64 h-64 blur-[100px] opacity-20 transition-colors pointer-events-none",style:{backgroundColor:f}}),(0,l.jsxs)("div",{className:"grow space-y-3 text-center md:text-left relative z-10",children:[(0,l.jsx)("h3",{className:"text-xl font-black tracking-tight",children:"Informativa sui Cookie"}),(0,l.jsxs)("p",{className:`text-sm leading-relaxed max-w-3xl font-medium ${d?"text-gray-400":"text-gray-500"}`,children:["Noi e terze parti selezionate utilizziamo cookie o tecnologie simili per finalit\xE0 tecniche e, con il tuo consenso, anche per le finalit\xE0 di"," ",(0,l.jsx)("span",{className:d?"text-white":"text-gray-900",children:"misurazione"})," ","come specificato nella"," ",(0,l.jsx)("a",{href:"/cookie-policy",className:"underline hover:opacity-80 transition-opacity font-bold",style:{color:d?"inherit":f},children:"cookie policy"}),". Puoi liberamente prestare, rifiutare o revocare il tuo consenso in qualsiasi momento aprendo il pannello delle preferenze."]})]}),(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row items-center gap-3 w-full md:w-auto relative z-10",children:[(0,l.jsx)("button",{onClick:s,className:`w-full sm:w-auto px-6 py-3 font-black rounded-2xl transition-all text-[11px] uppercase tracking-widest whitespace-nowrap border ${d?"bg-white/5 hover:bg-white/10 text-white border-white/10":"bg-gray-100/50 hover:bg-gray-100 text-gray-700 border-gray-200"}`,children:"Rifiuta"}),(0,l.jsx)("button",{onClick:()=>p(!0),className:`w-full sm:w-auto px-6 py-3 font-black rounded-2xl transition-all text-[11px] uppercase tracking-widest whitespace-nowrap border ${d?"bg-white/10 hover:bg-white/20 text-white border-white/10":"bg-white hover:bg-gray-50 text-gray-900 border-gray-200"}`,children:"Personalizza"}),(0,l.jsx)("button",{onClick:c,className:"w-full sm:w-auto px-8 py-3 text-white font-black rounded-2xl transition-all text-[11px] uppercase tracking-widest shadow-lg whitespace-nowrap",style:{backgroundColor:f},children:"Accetta"})]}),(0,l.jsx)("button",{onClick:()=>p(!0),className:`absolute top-6 right-6 p-2 transition-colors ${d?"text-gray-600 hover:text-white":"text-gray-300 hover:text-gray-600"}`,children:(0,l.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),(0,l.jsx)(L,{})]})};var T=require("react");var A={"google-analytics":{id:"google-analytics",name:"Google Analytics 4",category:"automatic",purposes:["Statistica","Ottimizzazione"],dataCollected:["Dati di utilizzo","Strumenti di Tracciamento"]},"facebook-pixel":{id:"facebook-pixel",name:"Meta Pixel",category:"automatic",purposes:["Marketing","Targeting","Statistica"],dataCollected:["Dati di utilizzo","Strumenti di Tracciamento"]},"linkedin-insight":{id:"linkedin-insight",name:"LinkedIn Insight Tag",category:"automatic",purposes:["Marketing","Targeting","Statistica"],dataCollected:["Dati di utilizzo","Strumenti di Tracciamento"]},"tiktok-pixel":{id:"tiktok-pixel",name:"TikTok Pixel",category:"automatic",purposes:["Marketing","Targeting","Statistica"],dataCollected:["Dati di utilizzo","Strumenti di Tracciamento"]},"microsoft-clarity":{id:"microsoft-clarity",name:"Microsoft Clarity",category:"automatic",purposes:["Statistica","Analisi del comportamento"],dataCollected:["Dati di utilizzo","Strumenti di Tracciamento","Screencast sessione"]},hotjar:{id:"hotjar",name:"Hotjar",category:"automatic",purposes:["Statistica","Analisi del comportamento"],dataCollected:["Dati di utilizzo","Strumenti di Tracciamento"]},"google-tag-manager":{id:"google-tag-manager",name:"Google Tag Manager",category:"automatic",purposes:["Gestione dei tag"],dataCollected:["Dati di utilizzo"]},mailchimp:{id:"mailchimp",name:"Mailchimp",category:"provided",purposes:["Gestione database Utenti","Invio messaggi"],dataCollected:["Email","Nome","Cognome","Dati di utilizzo"]},newsletter:{id:"newsletter",name:"Newsletter",category:"provided",purposes:["Gestione database Utenti","Invio messaggi"],dataCollected:["Email","Nome","Cognome"]},stripe:{id:"stripe",name:"Stripe",category:"automatic",purposes:["Gestione dei pagamenti"],dataCollected:["Varie tipologie di Dati secondo quanto specificato dalla privacy policy del servizio"]},paypal:{id:"paypal",name:"PayPal",category:"automatic",purposes:["Gestione dei pagamenti"],dataCollected:["Varie tipologie di Dati secondo quanto specificato dalla privacy policy del servizio"]},youtube:{id:"youtube",name:"YouTube Video Widget",category:"automatic",purposes:["Visualizzazione di contenuti da piattaforme esterne"],dataCollected:["Dati di utilizzo","Strumenti di Tracciamento"]},"google-maps":{id:"google-maps",name:"Google Maps Widget",category:"automatic",purposes:["Visualizzazione di contenuti da piattaforme esterne"],dataCollected:["Dati di utilizzo","Posizione geografica","Strumenti di Tracciamento"]},"contact-form":{id:"contact-form",name:"Modulo di Contatto",category:"provided",purposes:["Contattare l'utente","Gestione richieste"],dataCollected:["Email","Nome","Cognome","Dati vari"]},"google-fonts":{id:"google-fonts",name:"Google Fonts",category:"automatic",purposes:["Visualizzazione dei contenuti"],dataCollected:["Dati di utilizzo","Varie tipologie di Dati"]}},D=a=>typeof a=="string"?A[a]||{id:a,name:a,category:"automatic",purposes:[],dataCollected:[]}:a;var e=require("react/jsx-runtime"),R=({id:a})=>{switch(a){case"google-analytics":return(0,e.jsxs)("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,e.jsx)("path",{d:"M12 2L4.5 20.29L5.21 21L12 18L18.79 21L19.5 20.29L12 2Z",fill:"currentColor",fillOpacity:"0.2"}),(0,e.jsx)("path",{d:"M12 18V2M12 18L5.21 21L4.5 20.29L12 2M12 18L18.79 21L19.5 20.29L12 2",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});case"facebook-pixel":return(0,e.jsx)("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsx)("path",{d:"M18 2H15C12.7909 2 11 3.79086 11 6V9H8V13H11V22H15V13H18L19 9H15V6C15 5.44772 15.4477 5 16 5H18V2Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});case"google-fonts":return(0,e.jsx)("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsx)("path",{d:"M4 7V4H20V7M5 20H19M12 4V20",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});case"linkedin-insight":return(0,e.jsxs)("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"}),(0,e.jsx)("rect",{x:"2",y:"9",width:"4",height:"12"}),(0,e.jsx)("circle",{cx:"4",cy:"4",r:"2"})]});case"tiktok-pixel":return(0,e.jsx)("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,e.jsx)("path",{d:"M9 12a4 4 0 1 0 4 4V4a5 5 0 0 0 5 5"})});case"microsoft-clarity":case"hotjar":return(0,e.jsxs)("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"}),(0,e.jsx)("circle",{cx:"12",cy:"12",r:"3"})]});case"google-tag-manager":return(0,e.jsx)("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,e.jsx)("path",{d:"M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"})});case"mailchimp":case"newsletter":return(0,e.jsxs)("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("path",{d:"m22 2-7 20-4-9-9-4Z"}),(0,e.jsx)("path",{d:"M22 2 11 13"})]});case"stripe":case"paypal":return(0,e.jsxs)("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("rect",{x:"1",y:"4",width:"22",height:"16",rx:"2",ry:"2"}),(0,e.jsx)("line",{x1:"1",y1:"10",x2:"23",y2:"10"})]});case"youtube":return(0,e.jsxs)("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("path",{d:"M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z"}),(0,e.jsx)("polygon",{points:"9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"})]});case"google-maps":return(0,e.jsxs)("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"}),(0,e.jsx)("circle",{cx:"12",cy:"10",r:"3"})]});case"contact-form":return(0,e.jsx)("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsx)("path",{d:"M3 8L10.89 13.26C11.56 13.71 12.44 13.71 13.11 13.26L21 8M5 19H19C20.1 19 21 18.1 21 17V7C21 5.9 20.1 5 19 5H5C3.9 5 3 5.9 3 7V17C3 18.1 3.9 19 5 19Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});default:return(0,e.jsxs)("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,e.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2"}),(0,e.jsx)("path",{d:"M12 8V16M8 12H16",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}},N=()=>{let{config:a}=u(),[r,c]=(0,T.useState)(0),[s,p]=(0,T.useState)(0),d=4,f=(a.services||[]).map(D),g=f.filter(n=>n.category==="automatic"),b=f.filter(n=>n.category==="provided"),m=a.primaryColor||"#2c5282",x=Math.ceil(g.length/d),h=Math.ceil(b.length/d),y=g.slice(r*d,(r+1)*d),z=b.slice(s*d,(s+1)*d);return(0,e.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 p-1",children:[(0,e.jsxs)("div",{className:"bg-white p-8 rounded-[2.5rem] border border-gray-100 shadow-sm flex flex-col transition-all hover:shadow-xl group/card min-h-[750px]",style:{hoverBorderColor:`${m}1a`},children:[(0,e.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 mb-8",children:[(0,e.jsxs)("div",{className:"flex items-center gap-4",children:[(0,e.jsx)("div",{className:"p-3 rounded-2xl shrink-0",style:{backgroundColor:`${m}1a`,color:m},children:(0,e.jsxs)("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04"}),(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})]})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("h3",{className:"text-xl sm:text-2xl font-black text-gray-900 tracking-tight leading-tight",children:"Dati automatici"}),(0,e.jsx)("p",{className:"text-[10px] text-gray-400 font-black uppercase tracking-widest mt-0.5",children:"Monitoraggio e Stats"})]})]}),x>1&&(0,e.jsxs)("div",{className:"flex items-center gap-2 bg-gray-50/50 p-1.5 rounded-2xl border border-gray-100 self-end sm:self-center",children:[(0,e.jsx)("button",{disabled:r===0,onClick:()=>c(n=>n-1),className:`p-2 rounded-xl transition-all ${r===0?"opacity-20 cursor-not-allowed":"bg-white hover:bg-gray-100 active:scale-95 text-gray-900 shadow-sm"}`,children:(0,e.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,e.jsxs)("span",{className:"text-[10px] font-black font-mono text-gray-500 w-10 text-center",children:[r+1," / ",x]}),(0,e.jsx)("button",{disabled:r>=x-1,onClick:()=>c(n=>n+1),className:`p-2 rounded-xl transition-all ${r>=x-1?"opacity-20 cursor-not-allowed":"bg-white hover:bg-gray-100 active:scale-95 text-gray-900 shadow-sm"}`,children:(0,e.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]})]}),(0,e.jsxs)("p",{className:"text-gray-500 mb-8 text-sm leading-relaxed font-medium",children:["Raccogliamo alcuni dati quando visiti"," ",(0,e.jsx)("span",{className:"text-gray-900 font-black",children:a.domain||a.name})," ","per garantire il corretto funzionamento tramite analisi anonime."]}),(0,e.jsx)("div",{className:"space-y-4 grow",children:y.length>0?(0,e.jsx)("div",{className:"grid grid-cols-1 gap-4 animate-in fade-in slide-in-from-bottom-2 duration-300",children:y.map(n=>(0,e.jsxs)("div",{className:"flex items-center gap-4 bg-gray-50/50 p-5 rounded-3xl border border-gray-100 hover:bg-white transition-all group",style:{hoverBorderColor:`${m}33`},children:[(0,e.jsx)("div",{className:"w-12 h-12 rounded-2xl flex items-center justify-center shrink-0 shadow-sm border border-gray-100 transition-all group-hover:scale-110",style:{color:m,backgroundColor:"white"},children:(0,e.jsx)(R,{id:n.id})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("h4",{className:"text-base font-black text-gray-900 leading-none",children:n.name}),(0,e.jsx)("div",{className:"flex flex-wrap gap-2 mt-2",children:n.dataCollected.map(w=>(0,e.jsx)("span",{className:"px-3 py-1 bg-white text-gray-600 text-[11px] font-bold rounded-xl border border-gray-100 shadow-sm",children:w},w))})]})]},n.id))}):(0,e.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,e.jsx)("div",{className:"w-12 h-12 rounded-full bg-gray-50 flex items-center justify-center mb-3",children:(0,e.jsx)("svg",{className:"w-6 h-6 text-gray-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})}),(0,e.jsx)("p",{className:"text-xs text-gray-400 font-bold uppercase tracking-widest",children:"Nessun servizio attivo"})]})})]}),(0,e.jsxs)("div",{className:"bg-white p-8 rounded-[2.5rem] border border-gray-100 shadow-sm flex flex-col transition-all hover:shadow-xl group/card min-h-[750px]",style:{hoverBorderColor:`${m}1a`},children:[(0,e.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 mb-8",children:[(0,e.jsxs)("div",{className:"flex items-center gap-4",children:[(0,e.jsx)("div",{className:"p-3 rounded-2xl shrink-0",style:{backgroundColor:`${m}1a`,color:m},children:(0,e.jsx)("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 8h10M7 12h4m1 8l-4-4H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-3l-4 4z"})})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("h3",{className:"text-xl sm:text-2xl font-black text-gray-900 tracking-tight leading-tight",children:"Dati forniti"}),(0,e.jsx)("p",{className:"text-[10px] text-gray-400 font-black uppercase tracking-widest mt-0.5",children:"Supporto e Feedback"})]})]}),h>1&&(0,e.jsxs)("div",{className:"flex items-center gap-2 bg-gray-50/50 p-1.5 rounded-2xl border border-gray-100 self-end sm:self-center",children:[(0,e.jsx)("button",{disabled:s===0,onClick:()=>p(n=>n-1),className:`p-2 rounded-xl transition-all ${s===0?"opacity-20 cursor-not-allowed":"bg-white hover:bg-gray-100 active:scale-95 text-gray-900 shadow-sm"}`,children:(0,e.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,e.jsxs)("span",{className:"text-[10px] font-black font-mono text-gray-500 w-10 text-center",children:[s+1," / ",h]}),(0,e.jsx)("button",{disabled:s>=h-1,onClick:()=>p(n=>n+1),className:`p-2 rounded-xl transition-all ${s>=h-1?"opacity-20 cursor-not-allowed":"bg-white hover:bg-gray-100 active:scale-95 text-gray-900 shadow-sm"}`,children:(0,e.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]})]}),(0,e.jsx)("p",{className:"text-gray-500 mb-8 text-sm leading-relaxed font-medium",children:"Dati che condividi volontariamente per permetterci di rispondere alle tue richieste o fornirti assistenza."}),(0,e.jsx)("div",{className:"space-y-4 grow",children:z.length>0?(0,e.jsx)("div",{className:"grid grid-cols-1 gap-4 animate-in fade-in slide-in-from-bottom-2 duration-300",children:z.map(n=>(0,e.jsxs)("div",{className:"p-6 bg-gray-50/50 rounded-3xl border border-gray-100 hover:bg-white transition-all group",style:{hoverBorderColor:`${m}33`},children:[(0,e.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,e.jsx)("div",{className:"text-gray-400 group-hover:scale-110 transition-transform",style:{color:m},children:(0,e.jsx)(R,{id:n.id})}),(0,e.jsx)("h4",{className:"text-base font-black text-gray-900 leading-none",children:n.name})]}),(0,e.jsx)("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:m}})]}),(0,e.jsx)("div",{className:"flex flex-wrap gap-2",children:n.dataCollected.map(w=>(0,e.jsx)("span",{className:"px-3 py-1 bg-white text-gray-600 text-[11px] font-bold rounded-xl border border-gray-100 shadow-sm",children:w},w))})]},n.id))}):(0,e.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,e.jsx)("div",{className:"w-12 h-12 rounded-full bg-gray-50 flex items-center justify-center mb-3",children:(0,e.jsx)("svg",{className:"w-6 h-6 text-gray-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})})}),(0,e.jsx)("p",{className:"text-xs text-gray-400 font-bold uppercase tracking-widest",children:"Nessun servizio attivo"})]})})]})]})};var t=require("react/jsx-runtime"),H=()=>{let{config:a}=u();return(0,t.jsx)("div",{className:"bg-white min-h-screen text-gray-900 font-sans selection:bg-[#2c5282]/10 selection:text-[#2c5282]",children:(0,t.jsxs)("div",{className:"max-w-5xl mx-auto px-6 py-20 md:py-32",children:[(0,t.jsxs)("header",{className:"mb-20",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,t.jsx)("span",{className:"px-3 py-1 bg-[#2c5282] text-white text-[10px] font-black uppercase tracking-widest rounded-full",children:"Legal"}),(0,t.jsx)("div",{className:"h-0.5 w-12 bg-gray-100"})]}),(0,t.jsxs)("h1",{className:"text-4xl md:text-6xl font-black tracking-tight mb-8",children:["Privacy Policy di ",(0,t.jsx)("br",{}),(0,t.jsx)("span",{className:"text-[#2c5282] underline decoration-[8px] underline-offset-8 decoration-[#2c5282]/10",children:a.domain||a.name})]}),(0,t.jsxs)("p",{className:"text-xl text-gray-500 leading-relaxed max-w-2xl font-medium",children:["Benvenuto nella privacy policy di ",a.domain||a.name,". Questa policy ti aiuter\xE0 a comprendere quali dati raccogliamo, perch\xE9 li raccogliamo e quali sono i tuoi diritti in merito."]}),(0,t.jsxs)("p",{className:"text-xs text-gray-400 font-bold uppercase tracking-widest mt-8",children:["Ultima modifica:"," ",a.lastUpdated||new Date().toLocaleDateString("it-IT",{day:"numeric",month:"long",year:"numeric"})]})]}),(0,t.jsxs)("div",{className:"space-y-32",children:[(0,t.jsxs)("section",{className:"space-y-8",children:[(0,t.jsx)("h2",{className:"text-sm font-black uppercase tracking-[0.2em] text-gray-400",children:"Titolare del Trattamento dei Dati"}),(0,t.jsxs)("div",{className:"bg-gray-50 p-10 rounded-4xl border border-gray-100",children:[(0,t.jsx)("p",{className:"text-xl font-black text-gray-900",children:a.owners}),(0,t.jsxs)("div",{className:"mt-4 space-y-2 text-gray-600 leading-relaxed font-medium",children:[(Array.isArray(a.addresses)?a.addresses:[a.addresses]).map((r,c)=>(0,t.jsx)("p",{children:r},c)),a.vatNumbers&&(0,t.jsxs)("p",{className:"mt-2 text-sm",children:["P.IVA:"," ",(Array.isArray(a.vatNumbers)?a.vatNumbers:[a.vatNumbers]).join(", ")]}),(0,t.jsxs)("p",{className:"pt-6 font-bold flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-gray-400 font-black uppercase text-[10px] tracking-widest",children:"Email:"}),(0,t.jsx)("span",{className:"text-[#2c5282] underline decoration-2 underline-offset-4",children:a.email})]})]})]})]}),(0,t.jsxs)("section",{className:"space-y-12",children:[(0,t.jsx)("h2",{className:"text-3xl font-black tracking-tight",children:"Riepilogo dei Dati"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:[(0,t.jsxs)("div",{className:"p-8 bg-gray-50 rounded-3xl border border-gray-100",children:[(0,t.jsx)("h3",{className:"font-black text-gray-900 mb-4",children:"Dati raccolti automaticamente"}),(0,t.jsxs)("p",{className:"text-sm text-gray-500 leading-relaxed",children:["Raccogliamo automaticamente i tuoi dati, ad esempio quando visiti ",a.name,". Include: Dati di utilizzo, Strumenti di Tracciamento, numero di Utenti, statistiche delle sessioni."]})]}),(0,t.jsxs)("div",{className:"p-8 bg-gray-50 rounded-3xl border border-gray-100",children:[(0,t.jsx)("h3",{className:"font-black text-gray-900 mb-4",children:"Dati forniti dall'Utente"}),(0,t.jsx)("p",{className:"text-sm text-gray-500 leading-relaxed",children:"Raccogliamo i dati che ci fornisci, ad esempio quando compili un modulo di contatto. Include: nome, email."})]})]})]}),(0,t.jsxs)("section",{className:"space-y-12",children:[(0,t.jsx)("h2",{className:"text-3xl font-black tracking-tight",children:"Dettagli sul trattamento dei Dati Personali"}),(0,t.jsx)("p",{className:"text-gray-600 leading-relaxed text-lg max-w-3xl font-medium",children:"Di seguito sono riportati i dettagli sulle modalit\xE0 di raccolta dei dati e i servizi di terze parti che utilizziamo."}),(0,t.jsx)(N,{})]}),(0,t.jsxs)("section",{className:"space-y-8",children:[(0,t.jsx)("h2",{className:"text-3xl font-black tracking-tight",children:"Modalit\xE0 e luogo del trattamento"}),(0,t.jsxs)("div",{className:"prose prose-gray max-w-none text-gray-600 font-medium leading-relaxed space-y-6",children:[(0,t.jsx)("p",{children:"Il Titolare adotta le opportune misure di sicurezza volte ad impedire l\u2019accesso, la divulgazione, la modifica o la distruzione non autorizzate dei Dati Personali. Il trattamento viene effettuato mediante strumenti informatici e/o telematici, con modalit\xE0 organizzative e con logiche strettamente correlate alle finalit\xE0 indicate."}),(0,t.jsx)("p",{children:"I Dati sono trattati presso le sedi operative del Titolare ed in ogni altro luogo in cui le parti coinvolte nel trattamento siano localizzate. Se non diversamente indicato, i Dati Personali sono trattati e conservati per il tempo richiesto dalla finalit\xE0 per la quale sono stati raccolti."})]})]}),(0,t.jsxs)("section",{className:"space-y-12 bg-gray-950 text-white p-12 rounded-[3.5rem] shadow-2xl",children:[(0,t.jsx)("h2",{className:"text-3xl font-black tracking-tight",children:"I tuoi Diritti (GDPR)"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-12 text-gray-400 text-sm leading-relaxed font-medium",children:[(0,t.jsx)("div",{className:"space-y-4",children:(0,t.jsxs)("ul",{className:"list-disc list-inside space-y-3 marker:text-[#2c5282]",children:[(0,t.jsx)("li",{children:"Revocare il consenso in ogni momento"}),(0,t.jsx)("li",{children:"Opporsi al trattamento dei propri Dati"}),(0,t.jsx)("li",{children:"Accedere ai propri Dati"}),(0,t.jsx)("li",{children:"Verificare e chiedere la rettificazione"})]})}),(0,t.jsx)("div",{className:"space-y-4",children:(0,t.jsxs)("ul",{className:"list-disc list-inside space-y-3 marker:text-[#2c5282]",children:[(0,t.jsx)("li",{children:"Ottenere la limitazione del trattamento"}),(0,t.jsx)("li",{children:"Ottenere la cancellazione o rimozione"}),(0,t.jsx)("li",{children:"Ricevere i propri Dati o farli trasferire ad altro titolare"}),(0,t.jsx)("li",{children:"Proporre reclamo"})]})})]}),(0,t.jsxs)("div",{className:"pt-8 border-t border-white/5 mt-8",children:[(0,t.jsx)("p",{className:"text-xs text-gray-500 font-bold uppercase tracking-[0.2em]",children:"Come esercitare i diritti"}),(0,t.jsx)("p",{className:"text-sm text-gray-300 mt-2 italic",children:"Le richieste vanno indirizzate ai recapiti del Titolare indicati in questo documento. La richiesta \xE8 gratuita e risponderemo nel pi\xF9 breve tempo possibile."})]})]}),(0,t.jsxs)("section",{className:"space-y-12",children:[(0,t.jsx)("h2",{className:"text-3xl font-black tracking-tight",children:"Definizioni e riferimenti legali"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-12 gap-y-12",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("h4",{className:"font-black text-gray-900 border-l-2 border-[#2c5282] pl-4",children:"Dati Personali"}),(0,t.jsx)("p",{className:"text-sm text-gray-500 leading-relaxed font-medium",children:"Qualunque informazione che, direttamente o indirettamente, renda identificata o identificabile una persona fisica."})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("h4",{className:"font-black text-gray-900 border-l-2 border-[#2c5282] pl-4",children:"Dati di Utilizzo"}),(0,t.jsx)("p",{className:"text-sm text-gray-500 leading-relaxed font-medium",children:"Informazioni raccolte automaticamente attraverso questa Applicazione (es. indirizzi IP, orario della richiesta, browser utilizzato)."})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("h4",{className:"font-black text-gray-900 border-l-2 border-[#2c5282] pl-4",children:"Titolare del Trattamento"}),(0,t.jsx)("p",{className:"text-sm text-gray-500 leading-relaxed font-medium",children:"La persona fisica o giuridica che determina le finalit\xE0 e i mezzi del trattamento di dati personali."})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("h4",{className:"font-black text-gray-900 border-l-2 border-[#2c5282] pl-4",children:"Cookie"}),(0,t.jsx)("p",{className:"text-sm text-gray-500 leading-relaxed font-medium",children:"Piccole porzioni di dati conservate all'interno del browser dell'Utente."})]})]})]})]}),(0,t.jsx)("footer",{className:"mt-40 pt-12 border-t border-gray-100 text-center",children:(0,t.jsxs)("p",{className:"text-xs text-gray-400 font-bold uppercase tracking-widest",children:["Generato professionalmente da Graffico \u2022 \xA9"," ",new Date().getFullYear()]})})]})})};var i=require("react/jsx-runtime"),E=()=>{let{config:a,setModalOpen:r,resetConsent:c}=u(),s=a.primaryColor||"#2c5282";return(0,i.jsxs)("div",{className:"bg-white min-h-screen text-gray-900 font-sans selection:bg-[#2c5282]/10 selection:text-[#2c5282]",children:[(0,i.jsxs)("div",{className:"max-w-5xl mx-auto px-6 py-20 md:py-32",children:[(0,i.jsxs)("header",{className:"mb-20",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,i.jsx)("span",{className:"px-3 py-1 text-white text-[10px] font-black uppercase tracking-widest rounded-full",style:{backgroundColor:s},children:"Legal"}),(0,i.jsx)("div",{className:"h-0.5 w-12 bg-gray-100"})]}),(0,i.jsxs)("h1",{className:"text-4xl md:text-6xl font-black tracking-tight mb-8",children:["Cookie Policy di ",(0,i.jsx)("br",{}),(0,i.jsx)("span",{className:"underline decoration-[8px] underline-offset-8 decoration-gray-100",style:{textDecorationColor:`${s}1a`,color:s},children:a.domain||a.name})]}),(0,i.jsxs)("p",{className:"text-xl text-gray-500 leading-relaxed max-w-2xl font-medium",children:["Benvenuto nella cookie policy di ",a.domain||a.name,". Questa policy ti aiuter\xE0 a comprendere quali cookie e tecnologie di tracciamento utilizziamo, come li utilizziamo e quali sono i tuoi diritti in merito."]}),(0,i.jsxs)("p",{className:"text-xs text-gray-400 font-bold uppercase tracking-widest mt-8",children:["Ultima modifica:"," ",a.lastUpdated||new Date().toLocaleDateString("it-IT",{day:"numeric",month:"long",year:"numeric"})]})]}),(0,i.jsxs)("div",{className:"space-y-32",children:[(0,i.jsxs)("section",{className:"bg-gray-50 p-10 rounded-4xl border border-gray-100 space-y-6",children:[(0,i.jsx)("h2",{className:"text-2xl font-black text-gray-900",children:"Introduzione"}),(0,i.jsxs)("div",{className:"prose prose-gray max-w-none text-gray-600 font-medium leading-relaxed space-y-4",children:[(0,i.jsx)("p",{children:"Questo documento contiene informazioni in merito alle tecnologie che consentono a questa Applicazione di raggiungere gli scopi descritti di seguito. Tali tecnologie permettono al Titolare di raccogliere e salvare informazioni (per esempio tramite l\u2019utilizzo di Cookie) o di utilizzare risorse (per esempio eseguendo uno script)."}),(0,i.jsx)("p",{children:"Per semplicit\xE0, in questo documento tali tecnologie sono sinteticamente definite \u201CStrumenti di Tracciamento\u201D. Alcune delle finalit\xE0 per le quali vengono impiegati potrebbero richiedere il consenso dell\u2019Utente."})]})]}),(0,i.jsxs)("section",{className:"space-y-16",children:[(0,i.jsxs)("div",{className:"max-w-3xl",children:[(0,i.jsx)("h2",{className:"text-3xl font-black tracking-tight mb-6",children:"Utilizzo degli Strumenti di Tracciamento"}),(0,i.jsx)("p",{className:"font-black text-lg leading-relaxed",style:{color:s},children:"Questa Applicazione utilizza Strumenti di Tracciamento per svolgere attivit\xE0 che sono strettamente necessarie a garantire il funzionamento e per misurare il traffico tramite analisi."})]}),(0,i.jsx)(N,{})]}),(0,i.jsxs)("section",{className:"space-y-12",children:[(0,i.jsx)("h2",{className:"text-3xl font-black tracking-tight",children:"Come gestire le preferenze"}),(0,i.jsxs)("div",{className:"prose prose-gray max-w-none text-gray-600 font-medium leading-relaxed space-y-6",children:[(0,i.jsx)("p",{children:"Qualora l\u2019utilizzo dei Tracker sia basato sul consenso, l\u2019Utente pu\xF2 fornire o revocare tale consenso impostando o aggiornando le proprie preferenze tramite il relativo pannello delle scelte in materia di privacy disponibile su questa Applicazione."}),(0,i.jsx)("p",{children:"Gli Utenti possono inoltre utilizzare le impostazioni del proprio browser per vedere quali Cookie sono stati installati, bloccarli o cancellarli. Tuttavia, le impostazioni del browser non consentono un controllo granulare del consenso per categoria."})]}),(0,i.jsxs)("div",{className:"p-12 rounded-[3.5rem] text-white space-y-8 shadow-2xl relative overflow-hidden",style:{backgroundColor:s,boxShadow:`0 20px 50px ${s}33`},children:[(0,i.jsxs)("div",{className:"relative z-10",children:[(0,i.jsx)("h3",{className:"text-3xl font-black",children:"Centro Preferenze"}),(0,i.jsx)("p",{className:"text-white/80 font-medium mt-3 max-w-xl",children:"Puoi gestire i tuoi consensi in modo granulare o resettare completamente le tue impostazioni per visualizzare nuovamente il banner iniziale."}),(0,i.jsxs)("div",{className:"pt-10 flex flex-wrap gap-4",children:[(0,i.jsx)("button",{onClick:()=>r(!0),className:"px-8 py-4 bg-white text-gray-900 font-black rounded-2xl hover:scale-105 transition-all text-sm uppercase tracking-widest shadow-xl",style:{color:s},children:"Gestisci preferenze"}),(0,i.jsx)("button",{onClick:c,className:"px-8 py-4 bg-white/10 hover:bg-white/20 text-white font-black rounded-2xl transition-all text-sm uppercase tracking-widest border border-white/10",children:"Resetta e riapri banner"})]}),(0,i.jsxs)("div",{className:"pt-12 flex flex-wrap gap-8 text-[10px] font-black uppercase tracking-widest",children:[(0,i.jsx)("a",{href:"/privacy-policy",className:"text-white/70 hover:text-white transition-colors underline decoration-2 underline-offset-4",children:"Privacy Policy Completa"}),(0,i.jsxs)("span",{className:"cursor-help text-white/70 hover:text-white transition-colors relative group",children:["Info Browser",(0,i.jsxs)("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-4 w-72 p-5 bg-white text-gray-900 text-[12px] font-medium leading-relaxed rounded-2xl opacity-0 group-hover:opacity-100 transition-all pointer-events-none shadow-[0_20px_50px_rgba(0,0,0,0.3)] z-50 normal-case tracking-normal border border-gray-100 scale-95 group-hover:scale-100 origin-bottom",children:[(0,i.jsx)("p",{className:"font-black text-[10px] uppercase tracking-widest text-[#2c5282] mb-2",children:"Impostazioni Browser"}),"I cookie possono essere gestiti anche tramite le impostazioni del tuo browser (Chrome, Safari, Firefox, ecc.) per un controllo totale sulla privacy e sulla conservazione dei dati.",(0,i.jsx)("div",{className:"absolute top-full left-1/2 -translate-x-1/2 border-8 border-transparent border-t-white"})]})]})]})]}),(0,i.jsx)("div",{className:"absolute -bottom-24 -right-24 w-80 h-80 bg-white/10 rounded-full blur-3xl"})]})]}),(0,i.jsxs)("section",{className:"space-y-12 border-t border-gray-100 pt-32",children:[(0,i.jsx)("h2",{className:"text-3xl font-black tracking-tight",children:"Definizioni e riferimenti legali"}),(0,i.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-12 gap-y-12",children:[(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsx)("h4",{className:"font-black text-gray-900 border-l-2 border-[#2c5282] pl-4",children:"Strumento di Tracciamento"}),(0,i.jsx)("p",{className:"text-sm text-gray-500 leading-relaxed font-medium",children:"Qualsiasi tecnologia \u2014 es. Cookie, identificativi univoci, web beacons \u2014 che consenta di tracciare gli Utenti, raccogliendo o salvando informazioni sul dispositivo."})]}),(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsx)("h4",{className:"font-black text-gray-900 border-l-2 border-[#2c5282] pl-4",children:"Interessato"}),(0,i.jsx)("p",{className:"text-sm text-gray-500 leading-relaxed font-medium",children:"La persona fisica cui si riferiscono i Dati Personali."})]})]})]})]}),(0,i.jsx)("footer",{className:"mt-40 pt-12 border-t border-gray-100 text-center",children:(0,i.jsxs)("p",{className:"text-xs text-gray-400 font-bold uppercase tracking-widest",children:["Generato professionalmente da Graffico \u2022 \xA9"," ",new Date().getFullYear()]})})]}),(0,i.jsx)(M,{})]})};0&&(module.exports={ConsentBanner,CookiePolicy,FloatingConsentToggle,LegalProvider,PreferenceModal,PrivacyPolicy,SERVICE_PRESETS,ServiceGrid,resolveService,useLegal});
@@ -0,0 +1,66 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ interface LegalService {
5
+ id: string;
6
+ name: string;
7
+ category: "automatic" | "provided" | "marketing";
8
+ logo?: string;
9
+ purposes: string[];
10
+ dataCollected: string[];
11
+ }
12
+ type ServiceReference = string | LegalService;
13
+ type TogglePosition = "bottom-right" | "bottom-left" | "top-right" | "top-left";
14
+ interface CompanyConfig {
15
+ name: string;
16
+ domain: string;
17
+ owners: string;
18
+ addresses: string | string[];
19
+ vatNumbers: string | string[];
20
+ email: string;
21
+ services?: ServiceReference[];
22
+ togglePosition?: TogglePosition;
23
+ lastUpdated?: string;
24
+ theme?: "light" | "dark";
25
+ primaryColor?: string;
26
+ }
27
+ interface ConsentState {
28
+ necessary: boolean;
29
+ statistical: boolean;
30
+ marketing: boolean;
31
+ consentId?: string;
32
+ timestamp?: string;
33
+ }
34
+ interface LegalContextType {
35
+ config: CompanyConfig;
36
+ consent: ConsentState;
37
+ showBanner: boolean;
38
+ isModalOpen: boolean;
39
+ setModalOpen: (open: boolean) => void;
40
+ acceptAll: () => void;
41
+ declineAll: () => void;
42
+ savePreferences: (prefs: ConsentState) => void;
43
+ resetConsent: () => void;
44
+ }
45
+ declare const LegalProvider: ({ children, config, }: {
46
+ children: ReactNode;
47
+ config: CompanyConfig;
48
+ }) => react_jsx_runtime.JSX.Element | null;
49
+ declare const useLegal: () => LegalContextType;
50
+
51
+ declare const ConsentBanner: () => react_jsx_runtime.JSX.Element;
52
+
53
+ declare const ServiceGrid: () => react_jsx_runtime.JSX.Element;
54
+
55
+ declare const PreferenceModal: () => react_jsx_runtime.JSX.Element | null;
56
+
57
+ declare const FloatingConsentToggle: () => react_jsx_runtime.JSX.Element | null;
58
+
59
+ declare const PrivacyPolicy: () => react_jsx_runtime.JSX.Element;
60
+
61
+ declare const CookiePolicy: () => react_jsx_runtime.JSX.Element;
62
+
63
+ declare const SERVICE_PRESETS: Record<string, LegalService>;
64
+ declare const resolveService: (ref: string | LegalService) => LegalService;
65
+
66
+ export { type CompanyConfig, ConsentBanner, type ConsentState, CookiePolicy, FloatingConsentToggle, LegalProvider, type LegalService, PreferenceModal, PrivacyPolicy, SERVICE_PRESETS, ServiceGrid, type ServiceReference, type TogglePosition, resolveService, useLegal };
@@ -0,0 +1,66 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ interface LegalService {
5
+ id: string;
6
+ name: string;
7
+ category: "automatic" | "provided" | "marketing";
8
+ logo?: string;
9
+ purposes: string[];
10
+ dataCollected: string[];
11
+ }
12
+ type ServiceReference = string | LegalService;
13
+ type TogglePosition = "bottom-right" | "bottom-left" | "top-right" | "top-left";
14
+ interface CompanyConfig {
15
+ name: string;
16
+ domain: string;
17
+ owners: string;
18
+ addresses: string | string[];
19
+ vatNumbers: string | string[];
20
+ email: string;
21
+ services?: ServiceReference[];
22
+ togglePosition?: TogglePosition;
23
+ lastUpdated?: string;
24
+ theme?: "light" | "dark";
25
+ primaryColor?: string;
26
+ }
27
+ interface ConsentState {
28
+ necessary: boolean;
29
+ statistical: boolean;
30
+ marketing: boolean;
31
+ consentId?: string;
32
+ timestamp?: string;
33
+ }
34
+ interface LegalContextType {
35
+ config: CompanyConfig;
36
+ consent: ConsentState;
37
+ showBanner: boolean;
38
+ isModalOpen: boolean;
39
+ setModalOpen: (open: boolean) => void;
40
+ acceptAll: () => void;
41
+ declineAll: () => void;
42
+ savePreferences: (prefs: ConsentState) => void;
43
+ resetConsent: () => void;
44
+ }
45
+ declare const LegalProvider: ({ children, config, }: {
46
+ children: ReactNode;
47
+ config: CompanyConfig;
48
+ }) => react_jsx_runtime.JSX.Element | null;
49
+ declare const useLegal: () => LegalContextType;
50
+
51
+ declare const ConsentBanner: () => react_jsx_runtime.JSX.Element;
52
+
53
+ declare const ServiceGrid: () => react_jsx_runtime.JSX.Element;
54
+
55
+ declare const PreferenceModal: () => react_jsx_runtime.JSX.Element | null;
56
+
57
+ declare const FloatingConsentToggle: () => react_jsx_runtime.JSX.Element | null;
58
+
59
+ declare const PrivacyPolicy: () => react_jsx_runtime.JSX.Element;
60
+
61
+ declare const CookiePolicy: () => react_jsx_runtime.JSX.Element;
62
+
63
+ declare const SERVICE_PRESETS: Record<string, LegalService>;
64
+ declare const resolveService: (ref: string | LegalService) => LegalService;
65
+
66
+ export { type CompanyConfig, ConsentBanner, type ConsentState, CookiePolicy, FloatingConsentToggle, LegalProvider, type LegalService, PreferenceModal, PrivacyPolicy, SERVICE_PRESETS, ServiceGrid, type ServiceReference, type TogglePosition, resolveService, useLegal };
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{createContext as G,useContext as $,useState as S,useEffect as q}from"react";import{jsx as O}from"react/jsx-runtime";var B=G(void 0),Y=({children:t,config:l})=>{let[u,c]=S({necessary:!0,statistical:!1,marketing:!1}),[h,m]=S(!1),[y,x]=S(!1),[k,p]=S(!1);q(()=>{let n=localStorage.getItem("graffico-legal-consent");n?c(JSON.parse(n)):m(!0),p(!0)},[]);let b=n=>{let z=u.consentId||Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),T={...n,necessary:!0,consentId:z,timestamp:new Date().toISOString()};c(T),localStorage.setItem("graffico-legal-consent",JSON.stringify(T)),m(!1),x(!1)},w=()=>{localStorage.removeItem("graffico-legal-consent"),c({necessary:!0,statistical:!1,marketing:!1}),m(!0),x(!1)},N=()=>{b({necessary:!0,statistical:!0,marketing:!0})},L=()=>{b({necessary:!0,statistical:!1,marketing:!1})};return k?O(B.Provider,{value:{config:l,consent:u,showBanner:h,isModalOpen:y,setModalOpen:x,acceptAll:N,declineAll:L,savePreferences:b,resetConsent:w},children:t}):null},f=()=>{let t=$(B);if(!t)throw new Error("useLegal deve essere usato dentro LegalProvider");return t};import{useState as U,useEffect as H}from"react";import{jsx as r,jsxs as g}from"react/jsx-runtime";var M=()=>{let{config:t,consent:l,savePreferences:u,acceptAll:c,declineAll:h,isModalOpen:m,setModalOpen:y}=f(),[x,k]=U(l),p=t.primaryColor||"#2c5282";if(H(()=>{k(l)},[l,m]),!m)return null;let b=w=>{w!=="necessary"&&k(N=>({...N,[w]:!N[w]}))};return r("div",{className:"fixed inset-0 z-10000 flex items-center justify-center p-4 bg-black/60 backdrop-blur-sm animate-in fade-in duration-300",children:g("div",{className:"w-full max-w-2xl max-h-[90vh] bg-white/95 text-gray-900 border-gray-100 rounded-3xl shadow-2xl overflow-hidden flex flex-col animate-in zoom-in-95 duration-300",children:[g("div",{className:"p-6 md:p-8 border-b border-gray-100 flex items-center justify-between",children:[g("div",{children:[r("h2",{className:"text-2xl font-black tracking-tight text-gray-900",children:"Preferenze Privacy"}),r("p",{className:"text-sm text-gray-500 font-medium",children:"Personalizza come trattiamo i tuoi dati"})]}),r("button",{onClick:()=>y(!1),className:"p-2 text-gray-400 hover:text-gray-900 transition-colors",children:r("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),g("div",{className:"flex-1 overflow-y-auto p-6 md:p-8",children:[r("p",{className:"text-sm text-gray-600 leading-relaxed",children:'Questo pannello ti permette di esprimere alcune preferenze relative al trattamento delle tue informazioni personali. Puoi rivedere e modificare le tue scelte in qualsiasi momento. Per rifiutare il tuo consenso alle attivit\xE0 di trattamento descritte di seguito, disattiva i singoli comandi o utilizza il pulsante "Rifiuta tutto".'}),r("div",{className:"space-y-4",children:g("div",{className:"flex flex-col gap-4",children:[g("div",{className:"p-4 bg-gray-50 rounded-2xl border border-gray-100 flex items-center justify-between",children:[g("div",{className:"max-w-[80%]",children:[r("h3",{className:"font-bold text-gray-900",children:"Strettamente necessari"}),r("p",{className:"text-xs text-gray-500 mt-0.5",children:"Questi strumenti sono richiesti per le funzionalit\xE0 base del sito e non possono essere disattivati."})]}),g("div",{className:"relative inline-flex items-center cursor-not-allowed opacity-50",children:[r("div",{className:"w-11 h-6 rounded-full",style:{backgroundColor:p}}),r("div",{className:"absolute left-6 w-4 h-4 bg-white rounded-full"})]})]}),g("div",{className:"p-4 bg-white rounded-2xl border border-gray-100 flex items-center justify-between hover:border-[#2c5282]/30 transition-colors cursor-pointer",onClick:()=>b("statistical"),children:[g("div",{className:"max-w-[80%]",children:[r("h3",{className:"font-bold text-gray-900",children:"Misurazione"}),r("p",{className:"text-xs text-gray-500 mt-0.5",children:"Ci permettono di misurare il traffico e analizzare il tuo comportamento per migliorare il servizio."})]}),r("div",{className:`relative inline-flex items-center h-6 rounded-full w-11 transition-colors duration-200 focus:outline-none ${x.statistical?"":"bg-gray-200"}`,style:{backgroundColor:x.statistical?p:void 0},children:r("span",{className:`inline-block w-4 h-4 transform bg-white rounded-full transition-transform duration-200 ${x.statistical?"translate-x-6":"translate-x-1"}`})})]}),g("div",{className:"p-4 bg-white rounded-2xl border border-gray-100 flex items-center justify-between hover:border-[#2c5282]/30 transition-colors cursor-pointer",onClick:()=>b("marketing"),children:[g("div",{className:"max-w-[80%]",children:[r("h3",{className:"font-bold text-gray-900",children:"Marketing e Profilazione"}),r("p",{className:"text-xs text-gray-500 mt-0.5",children:"Utilizzati per inviarti comunicazioni commerciali personalizzate in base ai tuoi interessi."})]}),r("div",{className:`relative inline-flex items-center h-6 rounded-full w-11 transition-colors duration-200 focus:outline-none ${x.marketing?"":"bg-gray-200"}`,style:{backgroundColor:x.marketing?p:void 0},children:r("span",{className:`inline-block w-4 h-4 transform bg-white rounded-full transition-transform duration-200 ${x.marketing?"translate-x-6":"translate-x-1"}`})})]})]})}),l.consentId&&g("div",{className:"pt-8 mt-4 border-t border-gray-100",children:[r("div",{className:"bg-gray-50/50 p-4 rounded-2xl border border-dashed border-gray-200",children:g("div",{className:"flex flex-col gap-2",children:[g("div",{className:"flex items-center justify-between",children:[r("span",{className:"text-[10px] font-black text-gray-400 uppercase tracking-widest",children:"IDC (Consent ID)"}),r("span",{className:"text-[10px] font-mono text-gray-500 bg-white px-2 py-0.5 rounded border border-gray-100",children:l.consentId})]}),g("div",{className:"flex items-center justify-between",children:[r("span",{className:"text-[10px] font-black text-gray-400 uppercase tracking-widest",children:"Data Consenso"}),r("span",{className:"text-[10px] font-bold text-gray-500",children:l.timestamp?new Date(l.timestamp).toLocaleString("it-IT"):"-"})]})]})}),r("p",{className:"text-[9px] text-gray-400 mt-3 leading-relaxed",children:"Questi identificativi fungono da prova legale del tuo consenso secondo le linee guida GDPR. Puoi richiederne la cancellazione in qualsiasi momento."})]})]}),g("div",{className:"p-6 bg-gray-50 border-t border-gray-100 flex flex-col sm:flex-row gap-3",children:[r("button",{onClick:h,className:"flex-1 px-6 py-3 border border-gray-300 text-gray-700 font-bold rounded-xl hover:bg-white transition-all text-sm uppercase tracking-wider",children:"Rifiuta tutto"}),r("button",{onClick:()=>u(x),className:"flex-1 px-6 py-3 bg-gray-900 text-white font-bold rounded-xl hover:bg-black transition-all text-sm uppercase tracking-wider",children:"Salva e continua"}),r("button",{onClick:c,className:"flex-1 px-6 py-3 text-white font-bold rounded-xl hover:opacity-90 transition-all text-sm uppercase tracking-wider",style:{backgroundColor:p},children:"Accetta tutto"})]})]})})};import{jsx as D,jsxs as E}from"react/jsx-runtime";var I=()=>{let{showBanner:t,setModalOpen:l,config:u}=f();if(t)return null;let c={"bottom-right":"bottom-6 right-6","bottom-left":"bottom-6 left-6","top-right":"top-6 right-6","top-left":"top-6 left-6"},h=u.togglePosition||"bottom-right";return E("button",{onClick:()=>l(!0),className:`fixed ${c[h]} z-8000 w-12 h-12 bg-white rounded-xl shadow-xl border border-gray-100 flex items-center justify-center hover:scale-110 active:scale-95 transition-all group`,style:{color:u.primaryColor||"#2c5282"},"aria-label":"Privacy Preferences",children:[D("svg",{className:"w-6 h-6 group-hover:rotate-12 transition-transform",fill:"currentColor",viewBox:"0 0 24 24",children:D("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z"})}),D("span",{className:"absolute right-full mr-3 px-2 py-1 bg-black text-white text-[10px] rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap pointer-events-none",children:"Preferenze Privacy"})]})};import{Fragment as j,jsx as v,jsxs as C}from"react/jsx-runtime";var A=()=>{let{config:t,showBanner:l,acceptAll:u,declineAll:c,setModalOpen:h}=f();if(!l)return C(j,{children:[v(I,{}),v(M,{})]});let m=t.theme!=="light",y=t.primaryColor||"#2c5282";return C(j,{children:[v("div",{className:"fixed bottom-0 left-0 right-0 p-4 md:p-8 z-9000 flex justify-center animate-in slide-in-from-bottom-full duration-500",children:C("div",{className:`w-full max-w-5xl rounded-4xl shadow-[0_20px_50px_rgba(0,0,0,0.3)] backdrop-blur-xl border p-6 md:p-8 flex flex-col md:flex-row items-center gap-6 relative overflow-hidden ${m?"bg-black/95 text-white border-white/10":"bg-white/95 text-gray-900 border-gray-100"}`,children:[v("div",{className:"absolute -bottom-24 -right-24 w-64 h-64 blur-[100px] opacity-20 transition-colors pointer-events-none",style:{backgroundColor:y}}),C("div",{className:"grow space-y-3 text-center md:text-left relative z-10",children:[v("h3",{className:"text-xl font-black tracking-tight",children:"Informativa sui Cookie"}),C("p",{className:`text-sm leading-relaxed max-w-3xl font-medium ${m?"text-gray-400":"text-gray-500"}`,children:["Noi e terze parti selezionate utilizziamo cookie o tecnologie simili per finalit\xE0 tecniche e, con il tuo consenso, anche per le finalit\xE0 di"," ",v("span",{className:m?"text-white":"text-gray-900",children:"misurazione"})," ","come specificato nella"," ",v("a",{href:"/cookie-policy",className:"underline hover:opacity-80 transition-opacity font-bold",style:{color:m?"inherit":y},children:"cookie policy"}),". Puoi liberamente prestare, rifiutare o revocare il tuo consenso in qualsiasi momento aprendo il pannello delle preferenze."]})]}),C("div",{className:"flex flex-col sm:flex-row items-center gap-3 w-full md:w-auto relative z-10",children:[v("button",{onClick:c,className:`w-full sm:w-auto px-6 py-3 font-black rounded-2xl transition-all text-[11px] uppercase tracking-widest whitespace-nowrap border ${m?"bg-white/5 hover:bg-white/10 text-white border-white/10":"bg-gray-100/50 hover:bg-gray-100 text-gray-700 border-gray-200"}`,children:"Rifiuta"}),v("button",{onClick:()=>h(!0),className:`w-full sm:w-auto px-6 py-3 font-black rounded-2xl transition-all text-[11px] uppercase tracking-widest whitespace-nowrap border ${m?"bg-white/10 hover:bg-white/20 text-white border-white/10":"bg-white hover:bg-gray-50 text-gray-900 border-gray-200"}`,children:"Personalizza"}),v("button",{onClick:u,className:"w-full sm:w-auto px-8 py-3 text-white font-black rounded-2xl transition-all text-[11px] uppercase tracking-widest shadow-lg whitespace-nowrap",style:{backgroundColor:y},children:"Accetta"})]}),v("button",{onClick:()=>h(!0),className:`absolute top-6 right-6 p-2 transition-colors ${m?"text-gray-600 hover:text-white":"text-gray-300 hover:text-gray-600"}`,children:v("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:v("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),v(M,{})]})};import{useState as V}from"react";var Q={"google-analytics":{id:"google-analytics",name:"Google Analytics 4",category:"automatic",purposes:["Statistica","Ottimizzazione"],dataCollected:["Dati di utilizzo","Strumenti di Tracciamento"]},"facebook-pixel":{id:"facebook-pixel",name:"Meta Pixel",category:"automatic",purposes:["Marketing","Targeting","Statistica"],dataCollected:["Dati di utilizzo","Strumenti di Tracciamento"]},"linkedin-insight":{id:"linkedin-insight",name:"LinkedIn Insight Tag",category:"automatic",purposes:["Marketing","Targeting","Statistica"],dataCollected:["Dati di utilizzo","Strumenti di Tracciamento"]},"tiktok-pixel":{id:"tiktok-pixel",name:"TikTok Pixel",category:"automatic",purposes:["Marketing","Targeting","Statistica"],dataCollected:["Dati di utilizzo","Strumenti di Tracciamento"]},"microsoft-clarity":{id:"microsoft-clarity",name:"Microsoft Clarity",category:"automatic",purposes:["Statistica","Analisi del comportamento"],dataCollected:["Dati di utilizzo","Strumenti di Tracciamento","Screencast sessione"]},hotjar:{id:"hotjar",name:"Hotjar",category:"automatic",purposes:["Statistica","Analisi del comportamento"],dataCollected:["Dati di utilizzo","Strumenti di Tracciamento"]},"google-tag-manager":{id:"google-tag-manager",name:"Google Tag Manager",category:"automatic",purposes:["Gestione dei tag"],dataCollected:["Dati di utilizzo"]},mailchimp:{id:"mailchimp",name:"Mailchimp",category:"provided",purposes:["Gestione database Utenti","Invio messaggi"],dataCollected:["Email","Nome","Cognome","Dati di utilizzo"]},newsletter:{id:"newsletter",name:"Newsletter",category:"provided",purposes:["Gestione database Utenti","Invio messaggi"],dataCollected:["Email","Nome","Cognome"]},stripe:{id:"stripe",name:"Stripe",category:"automatic",purposes:["Gestione dei pagamenti"],dataCollected:["Varie tipologie di Dati secondo quanto specificato dalla privacy policy del servizio"]},paypal:{id:"paypal",name:"PayPal",category:"automatic",purposes:["Gestione dei pagamenti"],dataCollected:["Varie tipologie di Dati secondo quanto specificato dalla privacy policy del servizio"]},youtube:{id:"youtube",name:"YouTube Video Widget",category:"automatic",purposes:["Visualizzazione di contenuti da piattaforme esterne"],dataCollected:["Dati di utilizzo","Strumenti di Tracciamento"]},"google-maps":{id:"google-maps",name:"Google Maps Widget",category:"automatic",purposes:["Visualizzazione di contenuti da piattaforme esterne"],dataCollected:["Dati di utilizzo","Posizione geografica","Strumenti di Tracciamento"]},"contact-form":{id:"contact-form",name:"Modulo di Contatto",category:"provided",purposes:["Contattare l'utente","Gestione richieste"],dataCollected:["Email","Nome","Cognome","Dati vari"]},"google-fonts":{id:"google-fonts",name:"Google Fonts",category:"automatic",purposes:["Visualizzazione dei contenuti"],dataCollected:["Dati di utilizzo","Varie tipologie di Dati"]}},R=t=>typeof t=="string"?Q[t]||{id:t,name:t,category:"automatic",purposes:[],dataCollected:[]}:t;import{jsx as e,jsxs as o}from"react/jsx-runtime";var W=({id:t})=>{switch(t){case"google-analytics":return o("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{d:"M12 2L4.5 20.29L5.21 21L12 18L18.79 21L19.5 20.29L12 2Z",fill:"currentColor",fillOpacity:"0.2"}),e("path",{d:"M12 18V2M12 18L5.21 21L4.5 20.29L12 2M12 18L18.79 21L19.5 20.29L12 2",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});case"facebook-pixel":return e("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M18 2H15C12.7909 2 11 3.79086 11 6V9H8V13H11V22H15V13H18L19 9H15V6C15 5.44772 15.4477 5 16 5H18V2Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});case"google-fonts":return e("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M4 7V4H20V7M5 20H19M12 4V20",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});case"linkedin-insight":return o("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e("path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"}),e("rect",{x:"2",y:"9",width:"4",height:"12"}),e("circle",{cx:"4",cy:"4",r:"2"})]});case"tiktok-pixel":return e("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e("path",{d:"M9 12a4 4 0 1 0 4 4V4a5 5 0 0 0 5 5"})});case"microsoft-clarity":case"hotjar":return o("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"}),e("circle",{cx:"12",cy:"12",r:"3"})]});case"google-tag-manager":return e("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e("path",{d:"M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"})});case"mailchimp":case"newsletter":return o("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e("path",{d:"m22 2-7 20-4-9-9-4Z"}),e("path",{d:"M22 2 11 13"})]});case"stripe":case"paypal":return o("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e("rect",{x:"1",y:"4",width:"22",height:"16",rx:"2",ry:"2"}),e("line",{x1:"1",y1:"10",x2:"23",y2:"10"})]});case"youtube":return o("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e("path",{d:"M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z"}),e("polygon",{points:"9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"})]});case"google-maps":return o("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"}),e("circle",{cx:"12",cy:"10",r:"3"})]});case"contact-form":return e("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M3 8L10.89 13.26C11.56 13.71 12.44 13.71 13.11 13.26L21 8M5 19H19C20.1 19 21 18.1 21 17V7C21 5.9 20.1 5 19 5H5C3.9 5 3 5.9 3 7V17C3 18.1 3.9 19 5 19Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});default:return o("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2"}),e("path",{d:"M12 8V16M8 12H16",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}},P=()=>{let{config:t}=f(),[l,u]=V(0),[c,h]=V(0),m=4,y=(t.services||[]).map(R),x=y.filter(n=>n.category==="automatic"),k=y.filter(n=>n.category==="provided"),p=t.primaryColor||"#2c5282",b=Math.ceil(x.length/m),w=Math.ceil(k.length/m),N=x.slice(l*m,(l+1)*m),L=k.slice(c*m,(c+1)*m);return o("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 p-1",children:[o("div",{className:"bg-white p-8 rounded-[2.5rem] border border-gray-100 shadow-sm flex flex-col transition-all hover:shadow-xl group/card min-h-[750px]",style:{hoverBorderColor:`${p}1a`},children:[o("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 mb-8",children:[o("div",{className:"flex items-center gap-4",children:[e("div",{className:"p-3 rounded-2xl shrink-0",style:{backgroundColor:`${p}1a`,color:p},children:o("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04"}),e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})]})}),o("div",{children:[e("h3",{className:"text-xl sm:text-2xl font-black text-gray-900 tracking-tight leading-tight",children:"Dati automatici"}),e("p",{className:"text-[10px] text-gray-400 font-black uppercase tracking-widest mt-0.5",children:"Monitoraggio e Stats"})]})]}),b>1&&o("div",{className:"flex items-center gap-2 bg-gray-50/50 p-1.5 rounded-2xl border border-gray-100 self-end sm:self-center",children:[e("button",{disabled:l===0,onClick:()=>u(n=>n-1),className:`p-2 rounded-xl transition-all ${l===0?"opacity-20 cursor-not-allowed":"bg-white hover:bg-gray-100 active:scale-95 text-gray-900 shadow-sm"}`,children:e("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),o("span",{className:"text-[10px] font-black font-mono text-gray-500 w-10 text-center",children:[l+1," / ",b]}),e("button",{disabled:l>=b-1,onClick:()=>u(n=>n+1),className:`p-2 rounded-xl transition-all ${l>=b-1?"opacity-20 cursor-not-allowed":"bg-white hover:bg-gray-100 active:scale-95 text-gray-900 shadow-sm"}`,children:e("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]})]}),o("p",{className:"text-gray-500 mb-8 text-sm leading-relaxed font-medium",children:["Raccogliamo alcuni dati quando visiti"," ",e("span",{className:"text-gray-900 font-black",children:t.domain||t.name})," ","per garantire il corretto funzionamento tramite analisi anonime."]}),e("div",{className:"space-y-4 grow",children:N.length>0?e("div",{className:"grid grid-cols-1 gap-4 animate-in fade-in slide-in-from-bottom-2 duration-300",children:N.map(n=>o("div",{className:"flex items-center gap-4 bg-gray-50/50 p-5 rounded-3xl border border-gray-100 hover:bg-white transition-all group",style:{hoverBorderColor:`${p}33`},children:[e("div",{className:"w-12 h-12 rounded-2xl flex items-center justify-center shrink-0 shadow-sm border border-gray-100 transition-all group-hover:scale-110",style:{color:p,backgroundColor:"white"},children:e(W,{id:n.id})}),o("div",{children:[e("h4",{className:"text-base font-black text-gray-900 leading-none",children:n.name}),e("div",{className:"flex flex-wrap gap-2 mt-2",children:n.dataCollected.map(z=>e("span",{className:"px-3 py-1 bg-white text-gray-600 text-[11px] font-bold rounded-xl border border-gray-100 shadow-sm",children:z},z))})]})]},n.id))}):o("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e("div",{className:"w-12 h-12 rounded-full bg-gray-50 flex items-center justify-center mb-3",children:e("svg",{className:"w-6 h-6 text-gray-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})}),e("p",{className:"text-xs text-gray-400 font-bold uppercase tracking-widest",children:"Nessun servizio attivo"})]})})]}),o("div",{className:"bg-white p-8 rounded-[2.5rem] border border-gray-100 shadow-sm flex flex-col transition-all hover:shadow-xl group/card min-h-[750px]",style:{hoverBorderColor:`${p}1a`},children:[o("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 mb-8",children:[o("div",{className:"flex items-center gap-4",children:[e("div",{className:"p-3 rounded-2xl shrink-0",style:{backgroundColor:`${p}1a`,color:p},children:e("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 8h10M7 12h4m1 8l-4-4H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-3l-4 4z"})})}),o("div",{children:[e("h3",{className:"text-xl sm:text-2xl font-black text-gray-900 tracking-tight leading-tight",children:"Dati forniti"}),e("p",{className:"text-[10px] text-gray-400 font-black uppercase tracking-widest mt-0.5",children:"Supporto e Feedback"})]})]}),w>1&&o("div",{className:"flex items-center gap-2 bg-gray-50/50 p-1.5 rounded-2xl border border-gray-100 self-end sm:self-center",children:[e("button",{disabled:c===0,onClick:()=>h(n=>n-1),className:`p-2 rounded-xl transition-all ${c===0?"opacity-20 cursor-not-allowed":"bg-white hover:bg-gray-100 active:scale-95 text-gray-900 shadow-sm"}`,children:e("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),o("span",{className:"text-[10px] font-black font-mono text-gray-500 w-10 text-center",children:[c+1," / ",w]}),e("button",{disabled:c>=w-1,onClick:()=>h(n=>n+1),className:`p-2 rounded-xl transition-all ${c>=w-1?"opacity-20 cursor-not-allowed":"bg-white hover:bg-gray-100 active:scale-95 text-gray-900 shadow-sm"}`,children:e("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]})]}),e("p",{className:"text-gray-500 mb-8 text-sm leading-relaxed font-medium",children:"Dati che condividi volontariamente per permetterci di rispondere alle tue richieste o fornirti assistenza."}),e("div",{className:"space-y-4 grow",children:L.length>0?e("div",{className:"grid grid-cols-1 gap-4 animate-in fade-in slide-in-from-bottom-2 duration-300",children:L.map(n=>o("div",{className:"p-6 bg-gray-50/50 rounded-3xl border border-gray-100 hover:bg-white transition-all group",style:{hoverBorderColor:`${p}33`},children:[o("div",{className:"flex items-center justify-between mb-4",children:[o("div",{className:"flex items-center gap-3",children:[e("div",{className:"text-gray-400 group-hover:scale-110 transition-transform",style:{color:p},children:e(W,{id:n.id})}),e("h4",{className:"text-base font-black text-gray-900 leading-none",children:n.name})]}),e("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:p}})]}),e("div",{className:"flex flex-wrap gap-2",children:n.dataCollected.map(z=>e("span",{className:"px-3 py-1 bg-white text-gray-600 text-[11px] font-bold rounded-xl border border-gray-100 shadow-sm",children:z},z))})]},n.id))}):o("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e("div",{className:"w-12 h-12 rounded-full bg-gray-50 flex items-center justify-center mb-3",children:e("svg",{className:"w-6 h-6 text-gray-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})})}),e("p",{className:"text-xs text-gray-400 font-bold uppercase tracking-widest",children:"Nessun servizio attivo"})]})})]})]})};import{jsx as a,jsxs as i}from"react/jsx-runtime";var Ne=()=>{let{config:t}=f();return a("div",{className:"bg-white min-h-screen text-gray-900 font-sans selection:bg-[#2c5282]/10 selection:text-[#2c5282]",children:i("div",{className:"max-w-5xl mx-auto px-6 py-20 md:py-32",children:[i("header",{className:"mb-20",children:[i("div",{className:"flex items-center gap-3 mb-6",children:[a("span",{className:"px-3 py-1 bg-[#2c5282] text-white text-[10px] font-black uppercase tracking-widest rounded-full",children:"Legal"}),a("div",{className:"h-0.5 w-12 bg-gray-100"})]}),i("h1",{className:"text-4xl md:text-6xl font-black tracking-tight mb-8",children:["Privacy Policy di ",a("br",{}),a("span",{className:"text-[#2c5282] underline decoration-[8px] underline-offset-8 decoration-[#2c5282]/10",children:t.domain||t.name})]}),i("p",{className:"text-xl text-gray-500 leading-relaxed max-w-2xl font-medium",children:["Benvenuto nella privacy policy di ",t.domain||t.name,". Questa policy ti aiuter\xE0 a comprendere quali dati raccogliamo, perch\xE9 li raccogliamo e quali sono i tuoi diritti in merito."]}),i("p",{className:"text-xs text-gray-400 font-bold uppercase tracking-widest mt-8",children:["Ultima modifica:"," ",t.lastUpdated||new Date().toLocaleDateString("it-IT",{day:"numeric",month:"long",year:"numeric"})]})]}),i("div",{className:"space-y-32",children:[i("section",{className:"space-y-8",children:[a("h2",{className:"text-sm font-black uppercase tracking-[0.2em] text-gray-400",children:"Titolare del Trattamento dei Dati"}),i("div",{className:"bg-gray-50 p-10 rounded-4xl border border-gray-100",children:[a("p",{className:"text-xl font-black text-gray-900",children:t.owners}),i("div",{className:"mt-4 space-y-2 text-gray-600 leading-relaxed font-medium",children:[(Array.isArray(t.addresses)?t.addresses:[t.addresses]).map((l,u)=>a("p",{children:l},u)),t.vatNumbers&&i("p",{className:"mt-2 text-sm",children:["P.IVA:"," ",(Array.isArray(t.vatNumbers)?t.vatNumbers:[t.vatNumbers]).join(", ")]}),i("p",{className:"pt-6 font-bold flex items-center gap-2",children:[a("span",{className:"text-gray-400 font-black uppercase text-[10px] tracking-widest",children:"Email:"}),a("span",{className:"text-[#2c5282] underline decoration-2 underline-offset-4",children:t.email})]})]})]})]}),i("section",{className:"space-y-12",children:[a("h2",{className:"text-3xl font-black tracking-tight",children:"Riepilogo dei Dati"}),i("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:[i("div",{className:"p-8 bg-gray-50 rounded-3xl border border-gray-100",children:[a("h3",{className:"font-black text-gray-900 mb-4",children:"Dati raccolti automaticamente"}),i("p",{className:"text-sm text-gray-500 leading-relaxed",children:["Raccogliamo automaticamente i tuoi dati, ad esempio quando visiti ",t.name,". Include: Dati di utilizzo, Strumenti di Tracciamento, numero di Utenti, statistiche delle sessioni."]})]}),i("div",{className:"p-8 bg-gray-50 rounded-3xl border border-gray-100",children:[a("h3",{className:"font-black text-gray-900 mb-4",children:"Dati forniti dall'Utente"}),a("p",{className:"text-sm text-gray-500 leading-relaxed",children:"Raccogliamo i dati che ci fornisci, ad esempio quando compili un modulo di contatto. Include: nome, email."})]})]})]}),i("section",{className:"space-y-12",children:[a("h2",{className:"text-3xl font-black tracking-tight",children:"Dettagli sul trattamento dei Dati Personali"}),a("p",{className:"text-gray-600 leading-relaxed text-lg max-w-3xl font-medium",children:"Di seguito sono riportati i dettagli sulle modalit\xE0 di raccolta dei dati e i servizi di terze parti che utilizziamo."}),a(P,{})]}),i("section",{className:"space-y-8",children:[a("h2",{className:"text-3xl font-black tracking-tight",children:"Modalit\xE0 e luogo del trattamento"}),i("div",{className:"prose prose-gray max-w-none text-gray-600 font-medium leading-relaxed space-y-6",children:[a("p",{children:"Il Titolare adotta le opportune misure di sicurezza volte ad impedire l\u2019accesso, la divulgazione, la modifica o la distruzione non autorizzate dei Dati Personali. Il trattamento viene effettuato mediante strumenti informatici e/o telematici, con modalit\xE0 organizzative e con logiche strettamente correlate alle finalit\xE0 indicate."}),a("p",{children:"I Dati sono trattati presso le sedi operative del Titolare ed in ogni altro luogo in cui le parti coinvolte nel trattamento siano localizzate. Se non diversamente indicato, i Dati Personali sono trattati e conservati per il tempo richiesto dalla finalit\xE0 per la quale sono stati raccolti."})]})]}),i("section",{className:"space-y-12 bg-gray-950 text-white p-12 rounded-[3.5rem] shadow-2xl",children:[a("h2",{className:"text-3xl font-black tracking-tight",children:"I tuoi Diritti (GDPR)"}),i("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-12 text-gray-400 text-sm leading-relaxed font-medium",children:[a("div",{className:"space-y-4",children:i("ul",{className:"list-disc list-inside space-y-3 marker:text-[#2c5282]",children:[a("li",{children:"Revocare il consenso in ogni momento"}),a("li",{children:"Opporsi al trattamento dei propri Dati"}),a("li",{children:"Accedere ai propri Dati"}),a("li",{children:"Verificare e chiedere la rettificazione"})]})}),a("div",{className:"space-y-4",children:i("ul",{className:"list-disc list-inside space-y-3 marker:text-[#2c5282]",children:[a("li",{children:"Ottenere la limitazione del trattamento"}),a("li",{children:"Ottenere la cancellazione o rimozione"}),a("li",{children:"Ricevere i propri Dati o farli trasferire ad altro titolare"}),a("li",{children:"Proporre reclamo"})]})})]}),i("div",{className:"pt-8 border-t border-white/5 mt-8",children:[a("p",{className:"text-xs text-gray-500 font-bold uppercase tracking-[0.2em]",children:"Come esercitare i diritti"}),a("p",{className:"text-sm text-gray-300 mt-2 italic",children:"Le richieste vanno indirizzate ai recapiti del Titolare indicati in questo documento. La richiesta \xE8 gratuita e risponderemo nel pi\xF9 breve tempo possibile."})]})]}),i("section",{className:"space-y-12",children:[a("h2",{className:"text-3xl font-black tracking-tight",children:"Definizioni e riferimenti legali"}),i("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-12 gap-y-12",children:[i("div",{className:"space-y-3",children:[a("h4",{className:"font-black text-gray-900 border-l-2 border-[#2c5282] pl-4",children:"Dati Personali"}),a("p",{className:"text-sm text-gray-500 leading-relaxed font-medium",children:"Qualunque informazione che, direttamente o indirettamente, renda identificata o identificabile una persona fisica."})]}),i("div",{className:"space-y-3",children:[a("h4",{className:"font-black text-gray-900 border-l-2 border-[#2c5282] pl-4",children:"Dati di Utilizzo"}),a("p",{className:"text-sm text-gray-500 leading-relaxed font-medium",children:"Informazioni raccolte automaticamente attraverso questa Applicazione (es. indirizzi IP, orario della richiesta, browser utilizzato)."})]}),i("div",{className:"space-y-3",children:[a("h4",{className:"font-black text-gray-900 border-l-2 border-[#2c5282] pl-4",children:"Titolare del Trattamento"}),a("p",{className:"text-sm text-gray-500 leading-relaxed font-medium",children:"La persona fisica o giuridica che determina le finalit\xE0 e i mezzi del trattamento di dati personali."})]}),i("div",{className:"space-y-3",children:[a("h4",{className:"font-black text-gray-900 border-l-2 border-[#2c5282] pl-4",children:"Cookie"}),a("p",{className:"text-sm text-gray-500 leading-relaxed font-medium",children:"Piccole porzioni di dati conservate all'interno del browser dell'Utente."})]})]})]})]}),a("footer",{className:"mt-40 pt-12 border-t border-gray-100 text-center",children:i("p",{className:"text-xs text-gray-400 font-bold uppercase tracking-widest",children:["Generato professionalmente da Graffico \u2022 \xA9"," ",new Date().getFullYear()]})})]})})};import{jsx as s,jsxs as d}from"react/jsx-runtime";var Me=()=>{let{config:t,setModalOpen:l,resetConsent:u}=f(),c=t.primaryColor||"#2c5282";return d("div",{className:"bg-white min-h-screen text-gray-900 font-sans selection:bg-[#2c5282]/10 selection:text-[#2c5282]",children:[d("div",{className:"max-w-5xl mx-auto px-6 py-20 md:py-32",children:[d("header",{className:"mb-20",children:[d("div",{className:"flex items-center gap-3 mb-6",children:[s("span",{className:"px-3 py-1 text-white text-[10px] font-black uppercase tracking-widest rounded-full",style:{backgroundColor:c},children:"Legal"}),s("div",{className:"h-0.5 w-12 bg-gray-100"})]}),d("h1",{className:"text-4xl md:text-6xl font-black tracking-tight mb-8",children:["Cookie Policy di ",s("br",{}),s("span",{className:"underline decoration-[8px] underline-offset-8 decoration-gray-100",style:{textDecorationColor:`${c}1a`,color:c},children:t.domain||t.name})]}),d("p",{className:"text-xl text-gray-500 leading-relaxed max-w-2xl font-medium",children:["Benvenuto nella cookie policy di ",t.domain||t.name,". Questa policy ti aiuter\xE0 a comprendere quali cookie e tecnologie di tracciamento utilizziamo, come li utilizziamo e quali sono i tuoi diritti in merito."]}),d("p",{className:"text-xs text-gray-400 font-bold uppercase tracking-widest mt-8",children:["Ultima modifica:"," ",t.lastUpdated||new Date().toLocaleDateString("it-IT",{day:"numeric",month:"long",year:"numeric"})]})]}),d("div",{className:"space-y-32",children:[d("section",{className:"bg-gray-50 p-10 rounded-4xl border border-gray-100 space-y-6",children:[s("h2",{className:"text-2xl font-black text-gray-900",children:"Introduzione"}),d("div",{className:"prose prose-gray max-w-none text-gray-600 font-medium leading-relaxed space-y-4",children:[s("p",{children:"Questo documento contiene informazioni in merito alle tecnologie che consentono a questa Applicazione di raggiungere gli scopi descritti di seguito. Tali tecnologie permettono al Titolare di raccogliere e salvare informazioni (per esempio tramite l\u2019utilizzo di Cookie) o di utilizzare risorse (per esempio eseguendo uno script)."}),s("p",{children:"Per semplicit\xE0, in questo documento tali tecnologie sono sinteticamente definite \u201CStrumenti di Tracciamento\u201D. Alcune delle finalit\xE0 per le quali vengono impiegati potrebbero richiedere il consenso dell\u2019Utente."})]})]}),d("section",{className:"space-y-16",children:[d("div",{className:"max-w-3xl",children:[s("h2",{className:"text-3xl font-black tracking-tight mb-6",children:"Utilizzo degli Strumenti di Tracciamento"}),s("p",{className:"font-black text-lg leading-relaxed",style:{color:c},children:"Questa Applicazione utilizza Strumenti di Tracciamento per svolgere attivit\xE0 che sono strettamente necessarie a garantire il funzionamento e per misurare il traffico tramite analisi."})]}),s(P,{})]}),d("section",{className:"space-y-12",children:[s("h2",{className:"text-3xl font-black tracking-tight",children:"Come gestire le preferenze"}),d("div",{className:"prose prose-gray max-w-none text-gray-600 font-medium leading-relaxed space-y-6",children:[s("p",{children:"Qualora l\u2019utilizzo dei Tracker sia basato sul consenso, l\u2019Utente pu\xF2 fornire o revocare tale consenso impostando o aggiornando le proprie preferenze tramite il relativo pannello delle scelte in materia di privacy disponibile su questa Applicazione."}),s("p",{children:"Gli Utenti possono inoltre utilizzare le impostazioni del proprio browser per vedere quali Cookie sono stati installati, bloccarli o cancellarli. Tuttavia, le impostazioni del browser non consentono un controllo granulare del consenso per categoria."})]}),d("div",{className:"p-12 rounded-[3.5rem] text-white space-y-8 shadow-2xl relative overflow-hidden",style:{backgroundColor:c,boxShadow:`0 20px 50px ${c}33`},children:[d("div",{className:"relative z-10",children:[s("h3",{className:"text-3xl font-black",children:"Centro Preferenze"}),s("p",{className:"text-white/80 font-medium mt-3 max-w-xl",children:"Puoi gestire i tuoi consensi in modo granulare o resettare completamente le tue impostazioni per visualizzare nuovamente il banner iniziale."}),d("div",{className:"pt-10 flex flex-wrap gap-4",children:[s("button",{onClick:()=>l(!0),className:"px-8 py-4 bg-white text-gray-900 font-black rounded-2xl hover:scale-105 transition-all text-sm uppercase tracking-widest shadow-xl",style:{color:c},children:"Gestisci preferenze"}),s("button",{onClick:u,className:"px-8 py-4 bg-white/10 hover:bg-white/20 text-white font-black rounded-2xl transition-all text-sm uppercase tracking-widest border border-white/10",children:"Resetta e riapri banner"})]}),d("div",{className:"pt-12 flex flex-wrap gap-8 text-[10px] font-black uppercase tracking-widest",children:[s("a",{href:"/privacy-policy",className:"text-white/70 hover:text-white transition-colors underline decoration-2 underline-offset-4",children:"Privacy Policy Completa"}),d("span",{className:"cursor-help text-white/70 hover:text-white transition-colors relative group",children:["Info Browser",d("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-4 w-72 p-5 bg-white text-gray-900 text-[12px] font-medium leading-relaxed rounded-2xl opacity-0 group-hover:opacity-100 transition-all pointer-events-none shadow-[0_20px_50px_rgba(0,0,0,0.3)] z-50 normal-case tracking-normal border border-gray-100 scale-95 group-hover:scale-100 origin-bottom",children:[s("p",{className:"font-black text-[10px] uppercase tracking-widest text-[#2c5282] mb-2",children:"Impostazioni Browser"}),"I cookie possono essere gestiti anche tramite le impostazioni del tuo browser (Chrome, Safari, Firefox, ecc.) per un controllo totale sulla privacy e sulla conservazione dei dati.",s("div",{className:"absolute top-full left-1/2 -translate-x-1/2 border-8 border-transparent border-t-white"})]})]})]})]}),s("div",{className:"absolute -bottom-24 -right-24 w-80 h-80 bg-white/10 rounded-full blur-3xl"})]})]}),d("section",{className:"space-y-12 border-t border-gray-100 pt-32",children:[s("h2",{className:"text-3xl font-black tracking-tight",children:"Definizioni e riferimenti legali"}),d("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-12 gap-y-12",children:[d("div",{className:"space-y-3",children:[s("h4",{className:"font-black text-gray-900 border-l-2 border-[#2c5282] pl-4",children:"Strumento di Tracciamento"}),s("p",{className:"text-sm text-gray-500 leading-relaxed font-medium",children:"Qualsiasi tecnologia \u2014 es. Cookie, identificativi univoci, web beacons \u2014 che consenta di tracciare gli Utenti, raccogliendo o salvando informazioni sul dispositivo."})]}),d("div",{className:"space-y-3",children:[s("h4",{className:"font-black text-gray-900 border-l-2 border-[#2c5282] pl-4",children:"Interessato"}),s("p",{className:"text-sm text-gray-500 leading-relaxed font-medium",children:"La persona fisica cui si riferiscono i Dati Personali."})]})]})]})]}),s("footer",{className:"mt-40 pt-12 border-t border-gray-100 text-center",children:d("p",{className:"text-xs text-gray-400 font-bold uppercase tracking-widest",children:["Generato professionalmente da Graffico \u2022 \xA9"," ",new Date().getFullYear()]})})]}),s(A,{})]})};export{A as ConsentBanner,Me as CookiePolicy,I as FloatingConsentToggle,Y as LegalProvider,M as PreferenceModal,Ne as PrivacyPolicy,Q as SERVICE_PRESETS,P as ServiceGrid,R as resolveService,f as useLegal};
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@graffico/legal",
3
+ "version": "0.1.0",
4
+ "description": "Premium GDPR compliance solution for React/Next.js",
5
+ "license": "SEE LICENSE IN LICENSE",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/graffico-studio/graffico-legal.git"
9
+ },
10
+ "type": "module",
11
+ "main": "./dist/index.cjs",
12
+ "module": "./dist/index.js",
13
+ "types": "./dist/index.d.ts",
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "import": "./dist/index.js",
18
+ "require": "./dist/index.cjs"
19
+ },
20
+ "./style.css": "./dist/index.css"
21
+ },
22
+ "files": [
23
+ "dist"
24
+ ],
25
+ "peerDependencies": {
26
+ "react": ">=18",
27
+ "react-dom": ">=18"
28
+ },
29
+ "devDependencies": {
30
+ "@types/react": "^19",
31
+ "@types/react-dom": "^19",
32
+ "react": "^19",
33
+ "react-dom": "^19",
34
+ "tsup": "^8.3.5",
35
+ "typescript": "^5.7.2"
36
+ },
37
+ "scripts": {
38
+ "build": "tsup",
39
+ "dev": "tsup --watch",
40
+ "lint": "tsc"
41
+ }
42
+ }