UNPKG

@pagopa/mui-italia

Version:

[Material-UI](https://mui.com/core/) theme inspired by [Bootstrap Italia](https://italia.github.io/bootstrap-italia/).

262 lines (261 loc) 9.45 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Checkout = exports.PostLogin = exports.PreLogin = void 0; const jsx_runtime_1 = require("react/jsx-runtime"); const FooterCheckout_1 = require("../FooterCheckout"); const _theme_1 = require("../../theme/index"); const Footer_1 = require("./Footer"); exports.default = { title: "Components/Footer (WIP)", component: Footer_1.Footer, decorators: [ (Story) => ((0, jsx_runtime_1.jsx)("div", Object.assign({ style: { padding: 0, backgroundColor: "#F5F5F5" } }, { children: (0, jsx_runtime_1.jsx)(Story, {}) }))), ], parameters: { controls: { hideNoControlsWarning: true }, chromatic: { viewports: _theme_1.breakpointsChromaticValues, }, }, argTypes: { hideProductColums: { description: "If true, it will not render the products column. As default, the column will be visible", }, productsJsonUrl: { description: "This URL contains a json with the list of products to list inside the Footer. By default it's set with https://selfcare.pagopa.it/assets/products.json", }, }, }; const companyLegalInfo = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("strong", { children: "PagoPA S.p.A." }), " \u2014 societ\u00E0 per azioni con socio unico - capitale sociale di euro 1,000,000 interamente versato - sede legale in Roma, Piazza Colonna 370,", (0, jsx_runtime_1.jsx)("br", {}), "CAP 00187 - n. di iscrizione a Registro Imprese di Roma, CF e P.IVA 15376371009"] })); /* Languages Section */ const LANGUAGES = { it: { it: "Italiano", en: "Inglese", fr: "Francese", }, en: { it: "Italian", en: "English", fr: "French", }, fr: { it: "Italien", en: "Anglais", fr: "Français", }, }; /* type LangCode = "it" | "en"; */ /* Links Section */ const pagoPALink = { href: "https://www.pagopa.it/", ariaLabel: "Link: vai al sito di PagoPA S.p.A.", }; const postLoginLinks = [ { label: "Informativa Privacy", href: "#informativa-privacy", ariaLabel: "Vai al link: Informativa Privacy", linkType: "internal", }, { label: "Diritto alla protezione dei dati personali", href: "#diritto-allaprotezionedipersonalidati", ariaLabel: "Vai al link: Diritto alla protezione dei dati personali", linkType: "internal", }, { label: "Termini e condizioni", href: "#terms-conditions", ariaLabel: "Vai al link: Termini e condizioni", linkType: "internal", }, { label: "Accessibilità", href: "#accessibility", ariaLabel: "Vai al link: Accessibilità", linkType: "internal", }, ]; const checkoutLinks = [ { label: "Informativa Privacy", href: "#informativa-privacy", ariaLabel: "Vai al link: Informativa Privacy", linkType: "internal", }, { label: "Termini e condizioni", href: "#terms-conditions", ariaLabel: "Vai al link: Termini e condizioni", linkType: "internal", }, { label: "Accessibilità", href: "#accessibility", ariaLabel: "Vai al link: Accessibilità", linkType: "internal", }, ]; const preLoginLinks = { // First column aboutUs: { title: undefined, links: [ { label: "Chi siamo", href: "#chi-siamo", ariaLabel: "Vai al link: Chi siamo", linkType: "internal", }, { label: "PNRR", href: "#pnrr", ariaLabel: "Vai al link: PNRR", linkType: "internal", }, { label: "Media", href: "#media", ariaLabel: "Vai al link: Media", linkType: "internal", }, { label: "Lavora con noi", href: "#lavora-con-noi", ariaLabel: "Vai al link: Lavora con noi", linkType: "internal", }, ], }, // Third column resources: { title: "Risorse", links: [ { label: "Informativa Privacy", href: "#informativa-privacy", ariaLabel: "Vai al link: Informativa Privacy", linkType: "internal", }, { label: "Certificazioni", href: "#certificazioni", ariaLabel: "Vai al link: Certificazioni", linkType: "internal", }, { label: "Sicurezza delle informazioni", href: "#sicurezza-delle-informazioni", ariaLabel: "Vai al link: Sicurezza delle informazioni", linkType: "internal", }, { label: "Diritto alla protezione dei dati personali", ariaLabel: "Vai al link: Diritto alla protezione dei dati personali", linkType: "internal", onClick: () => { console.log("onClick"); }, }, { label: "Preferenze Cookie", href: "#preferenze-cookie", ariaLabel: "Vai al link: Preferenze Cookie", linkType: "internal", onClick: () => { console.log("onClick"); }, }, { label: "Termini e Condizioni", href: "#terms-conditions", ariaLabel: "Vai al link: Termini e Condizioni", linkType: "internal", }, { label: "Società trasparente", href: "#societa-trasparente", ariaLabel: "Vai al link: Società trasparente", linkType: "internal", }, { label: "Responsible Disclosure Policy", href: "#responsible-disclosure-policy", ariaLabel: "Vai al link: Responsible Disclosure Policy", linkType: "internal", }, { label: "Modello 321", href: "#modello-321", ariaLabel: "Vai al link: Modello 321", linkType: "internal", }, ], }, // Fourth column followUs: { title: "Seguici su", socialLinks: [ { icon: "linkedin", title: "LinkedIn", href: "https://www.linkedin.com/company/pagopa/", ariaLabel: "Link: vai al sito LinkedIn di PagoPA S.p.A.", }, { icon: "instagram", title: "Instagram", href: "https://www.instagram.com/pagopaspa/", ariaLabel: "Link: vai al sito Instagram di PagoPA S.p.A.", }, { icon: "threads", title: "Threads", href: "https://www.threads.net/@pagopaspa", ariaLabel: "Link: vai al sito Threads di PagoPA S.p.A.", }, { icon: "youtube", title: "Youtube", href: "https://www.youtube.com/channel/UCFBGOEJUPQ6t3xtZFc_UIEQ", ariaLabel: "Link: vai al sito Youtube di PagoPA S.p.A.", }, ], links: [ { label: "Accessibilità", href: "#accessibilità", ariaLabel: "Vai al link: Accessibilità", linkType: "internal", }, ], }, }; const PreLogin = () => ( /* const { lang, setLang } = useState<LangCode>("it"); */ (0, jsx_runtime_1.jsx)(Footer_1.Footer, { loggedUser: false, companyLink: pagoPALink, legalInfo: companyLegalInfo, postLoginLinks: postLoginLinks, preLoginLinks: preLoginLinks, currentLangCode: "it", onLanguageChanged: ( /* newLang */) => { console.log("Changed Language"); }, languages: LANGUAGES, onExit: (exitAction) => { console.log("Executing exit Action"); exitAction(); }, productsJsonUrl: "https://dev.selfcare.pagopa.it/assets/products.json", hideProductsColumn: false })); exports.PreLogin = PreLogin; const PostLogin = () => ( /* const { lang, setLang } = useState<LangCode>("it"); */ (0, jsx_runtime_1.jsx)(Footer_1.Footer, { loggedUser: true, companyLink: pagoPALink, legalInfo: companyLegalInfo, postLoginLinks: postLoginLinks, preLoginLinks: preLoginLinks, currentLangCode: "it", onLanguageChanged: ( /* newLang */) => { console.log("Changed Language"); }, languages: LANGUAGES, productsJsonUrl: "https://dev.selfcare.pagopa.it/assets/products.json", hideProductsColumn: false })); exports.PostLogin = PostLogin; const Checkout = () => ( /* const { lang, setLang } = useState<LangCode>("it"); */ (0, jsx_runtime_1.jsx)(FooterCheckout_1.FooterCheckout, { companyLink: pagoPALink, links: checkoutLinks, currentLangCode: "it", onLanguageChanged: ( /* newLang */) => { console.log("Changed Language"); }, languages: LANGUAGES, onExit: () => { console.log("Exit Action Blocked"); } })); exports.Checkout = Checkout;