mypgs 1.3.6 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/{AI_GUIDELINES.md → AGENTS.md} +17 -15
  2. package/README.md +8 -172
  3. package/assets/scss/mixin/_mx-responsive.scss +11 -10
  4. package/dist/css/index.css.map +1 -1
  5. package/package.json +1 -1
  6. package/templates/react/components/accordion.jsx +27 -0
  7. package/templates/react/components/breadcumbs.jsx +27 -0
  8. package/templates/react/components/button.jsx +33 -0
  9. package/templates/react/components/card.jsx +27 -0
  10. package/templates/react/components/dropdown.jsx +29 -0
  11. package/templates/react/components/form.jsx +30 -0
  12. package/templates/react/components/logo.jsx +14 -0
  13. package/templates/react/components/menu.jsx +37 -0
  14. package/templates/react/components/modal.jsx +84 -0
  15. package/templates/react/components/notification.jsx +31 -0
  16. package/templates/react/components/searchbar.jsx +34 -0
  17. package/templates/react/components/slides.jsx +25 -0
  18. package/templates/react/components/stepTabs.jsx +40 -0
  19. package/templates/react/components/steps.jsx +21 -0
  20. package/templates/react/components/table.jsx +28 -0
  21. package/templates/react/components/tooltip.jsx +12 -0
  22. package/templates/react/layout/body.jsx +7 -0
  23. package/templates/react/layout/flex.jsx +36 -0
  24. package/templates/react/layout/grid.jsx +36 -0
  25. package/templates/react/layout/pageShell.jsx +48 -0
  26. package/templates/react/layout/section.jsx +44 -0
  27. package/templates/react/patterns/cookieConsent.jsx +62 -0
  28. package/templates/react/patterns/footer.jsx +40 -0
  29. package/templates/react/patterns/header.jsx +62 -0
  30. /package/templates/{components → html/components}/accordion.html +0 -0
  31. /package/templates/{components → html/components}/breadcumbs.html +0 -0
  32. /package/templates/{components → html/components}/button.html +0 -0
  33. /package/templates/{components → html/components}/card.html +0 -0
  34. /package/templates/{components → html/components}/dropdown.html +0 -0
  35. /package/templates/{components → html/components}/form.html +0 -0
  36. /package/templates/{components → html/components}/logo.html +0 -0
  37. /package/templates/{components → html/components}/menu.html +0 -0
  38. /package/templates/{components → html/components}/modal.html +0 -0
  39. /package/templates/{components → html/components}/notification.html +0 -0
  40. /package/templates/{components → html/components}/searchbar.html +0 -0
  41. /package/templates/{components → html/components}/slides.html +0 -0
  42. /package/templates/{components → html/components}/stepTabs.html +0 -0
  43. /package/templates/{components → html/components}/steps.html +0 -0
  44. /package/templates/{components → html/components}/table.html +0 -0
  45. /package/templates/{components → html/components}/tooltip.html +0 -0
  46. /package/templates/{demo.css → html/demo.css} +0 -0
  47. /package/templates/{demo.html → html/demo.html} +0 -0
  48. /package/templates/{demo.js → html/demo.js} +0 -0
  49. /package/templates/{layout → html/layout}/body.html +0 -0
  50. /package/templates/{layout → html/layout}/flex.html +0 -0
  51. /package/templates/{layout → html/layout}/grid.html +0 -0
  52. /package/templates/{layout → html/layout}/pageShell.html +0 -0
  53. /package/templates/{layout → html/layout}/section.html +0 -0
  54. /package/templates/{patterns → html/patterns}/cookieConsent.html +0 -0
  55. /package/templates/{patterns → html/patterns}/footer.html +0 -0
  56. /package/templates/{patterns → html/patterns}/header.html +0 -0
@@ -0,0 +1,44 @@
1
+ export default function Section() {
2
+ return (
3
+ <div pgs="flexColumnSections">
4
+ <section pgs="section flexColumnElements">
5
+ <div pgs="container flexColumnTexts">
6
+ <strong>Sezione standard</strong>
7
+ <p>Contenuto centrato dentro una sezione MyPGS.</p>
8
+ </div>
9
+ </section>
10
+
11
+ <section pgs="sectionFull flexColumnElements">
12
+ <div pgs="container flexColumnTexts">
13
+ <strong>Sezione full-width</strong>
14
+ <p>Contenuto centrato dentro una sezione MyPGS.</p>
15
+ </div>
16
+ </section>
17
+
18
+ <section pgs="sectionSpecificity flexColumnElements">
19
+ <div pgs="container flexColumnTexts">
20
+ <strong>Sezione specificità</strong>
21
+ <p>Contenuto centrato dentro una sezione MyPGS.</p>
22
+ </div>
23
+ <div pgs="sectionSpecificity-child container flexColumnTexts">
24
+ <strong>Sezione specificità-child</strong>
25
+ <p>Contenuto centrato dentro una sezione MyPGS.</p>
26
+ </div>
27
+ </section>
28
+
29
+ <section pgs="sectionMax flexColumnElements" style={{ backgroundColor: "var(--color-primary-soft)" }}>
30
+ <div pgs="container flexColumnTexts">
31
+ <strong>Sezione max-width</strong>
32
+ <p>Contenuto centrato dentro una sezione MyPGS.</p>
33
+ </div>
34
+ </section>
35
+
36
+ <section pgs="sectionNoPadding flexColumnElements">
37
+ <div pgs="container flexColumnTexts">
38
+ <strong>Sezione no-padding</strong>
39
+ <p>Contenuto centrato dentro una sezione MyPGS.</p>
40
+ </div>
41
+ </section>
42
+ </div>
43
+ );
44
+ }
@@ -0,0 +1,62 @@
1
+ export default function CookieConsent({
2
+ enabled = true,
3
+ gaMeasurementId = "",
4
+ privacyUrl = "",
5
+ cookiePolicyUrl = "/cookie-policy/",
6
+ }) {
7
+ if (!enabled) return null;
8
+
9
+ return (
10
+ <div id="cookieConsent" pgs="cookieConsent" role="dialog" aria-modal="true" data-ga-id={gaMeasurementId} hidden tabIndex="-1">
11
+ <p><i className="fa-duotone fa-solid fa-cookie-bite"></i> Cookie e privacy <br /></p>
12
+ <h2>La tua privacy prima di tutto</h2>
13
+
14
+ <p>
15
+ Utilizziamo cookie tecnici per offrire il servizio e, previo consenso, cookie analitici di
16
+ <strong>Google Analytics</strong> per misurare in modo anonimo il traffico e migliorare i contenuti.
17
+ Puoi modificare la scelta in qualsiasi momento.
18
+ </p>
19
+
20
+ <p>
21
+ <a href={privacyUrl} target="_blank" rel="noopener noreferrer">Privacy Policy</a> -
22
+ <a href={cookiePolicyUrl} target="_blank" rel="noopener noreferrer">Cookie Policy</a>
23
+ </p>
24
+
25
+ <div pgs="cookieConsent-panel flexColumn" role="group" aria-label="Preferenze cookie">
26
+ <div pgs="flexRow nowrap cookieConsent-featureEssential">
27
+ <div>
28
+ <p>
29
+ <strong>Cookie tecnici</strong>
30
+ <br />
31
+ <small>Sempre attivi per garantire il corretto funzionamento del sito.</small>
32
+ </p>
33
+ </div>
34
+
35
+ <span pgs="cookieConsent-panel-badge">Attivi</span>
36
+ </div>
37
+
38
+ <div pgs="flexRow cookieConsent-featureAnalytics">
39
+ <label pgs="toggle">
40
+ <p>
41
+ <strong>Analytics</strong>
42
+ <br />
43
+ <small>Dati di navigazione raccolti in forma aggregata per statistiche anonime.</small>
44
+ </p>
45
+
46
+ <input type="checkbox" pgs="cookieConsent-toggleAnalytics" aria-label="Abilita Google Analytics" />
47
+ </label>
48
+ </div>
49
+ </div>
50
+
51
+ <div pgs="flexRow">
52
+ <button type="button" pgs="button cookieConsent-actionReject">
53
+ <i className="fa-solid fa-duotone fa-sliders"></i>Solo selezionati
54
+ </button>
55
+
56
+ <button type="button" pgs="buttonStrong cookieConsent-actionAccept">
57
+ <i className="fa-solid fa-check"></i> Accetta tutto
58
+ </button>
59
+ </div>
60
+ </div>
61
+ );
62
+ }
@@ -0,0 +1,40 @@
1
+ export default function Footer() {
2
+ return (
3
+ <footer pgs="footer">
4
+ <button pgs="button toggleDarkmode" type="button" aria-label="Cambia tema">
5
+ <i className="fa-solid fa-moon"></i>
6
+ </button>
7
+
8
+ <section pgs="footer-top section">
9
+ <div pgs="footer-top-content flex-3">
10
+ <div pgs="footer-brand">
11
+ <a aria-label="Logo" pgs="logo" href="/">
12
+ <span pgs="logo-text">MyPGS</span>
13
+ </a>
14
+ <p pgs="footer-brand-motto">Componenti frontend riutilizzabili.</p>
15
+ </div>
16
+
17
+ <div pgs="footer-content">
18
+ <h2>Menu</h2>
19
+ <nav pgs="menuFooter" aria-label="Menu footer">
20
+ <ul>
21
+ <li><a href="/">Home</a></li>
22
+ <li><a href="/contatti">Contatti</a></li>
23
+ </ul>
24
+ </nav>
25
+ </div>
26
+ </div>
27
+ </section>
28
+
29
+ <section pgs="footer-legal section">
30
+ <div pgs="footer-legal-content">
31
+ <button type="button" pgs="button cookieConsent-actionOpen">Preferenze cookie</button>
32
+ <p><a href="">Privacy Policy</a></p>
33
+ <p><a href="">Cookie Policy</a></p>
34
+ <p><a href="">Termini e Condizioni</a></p>
35
+ <p>© 2026 MyPgs. Nessun diritto riservato.</p>
36
+ </div>
37
+ </section>
38
+ </footer>
39
+ );
40
+ }
@@ -0,0 +1,62 @@
1
+ import { useEffect } from "react";
2
+
3
+ export default function Header() {
4
+ useEffect(() => {
5
+ if (localStorage.getItem("screenIsDarkMode") === "true") {
6
+ document.body.classList.add("darkmode");
7
+ document.querySelector(":root")?.setAttribute("data-darkmode", "true");
8
+ document.body.setAttribute("data-darkmode", "true");
9
+ }
10
+
11
+ if (window.innerWidth < 600 && window.pgs) {
12
+ window.pgs(document.querySelector("header")).state.add("mobileActive");
13
+ window.pgs(document.querySelector("[pgs~=header-element]")).state.add("mobileActive");
14
+ }
15
+ }, []);
16
+
17
+ return (
18
+ <header pgs="header">
19
+ <div pgs="header-element">
20
+ <div pgs="header-element-alwaysOn">
21
+ <a aria-label="Logo" pgs="logo" href="/">
22
+ <span pgs="logo-text">MyPGS</span>
23
+ </a>
24
+ </div>
25
+
26
+ <div pgs="header-element-onlyDesktop">
27
+ <nav pgs="menu" pgs-option="horizontal menuHeader" aria-label="Menu principale">
28
+ <ul>
29
+ <li><a href="/">Home</a></li>
30
+ <li><a href="#componenti">Componenti</a></li>
31
+ <li><a href="#layout">Layout</a></li>
32
+ </ul>
33
+ </nav>
34
+ </div>
35
+
36
+ <div pgs="header-element-onlyMobile"></div>
37
+
38
+ <div pgs="header-element-alwaysOnLast">
39
+ <button pgs="buttonIcon toggleDarkmode" type="button" aria-label="Cambia tema">
40
+ <i className="fa-solid fa-moon"></i>
41
+ </button>
42
+ </div>
43
+
44
+ <div pgs="header-element-hamburger modal" pgs-option="containerPGS[header] ">
45
+ <button pgs="buttonIcon modal-button modal-close header-element-hamburger-button" type="button"></button>
46
+
47
+ <dialog pgs="modal-dialog" pgs-option="right">
48
+ <div pgs="modal-dialog-content">
49
+ <nav pgs="menu" pgs-option="vertical menuHeader" aria-label="Menu mobile">
50
+ <ul>
51
+ <li><a href="/">Home</a></li>
52
+ <li><a href="#componenti">Componenti</a></li>
53
+ <li><a href="#layout">Layout</a></li>
54
+ </ul>
55
+ </nav>
56
+ </div>
57
+ </dialog>
58
+ </div>
59
+ </div>
60
+ </header>
61
+ );
62
+ }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes