mypgs 2.1.0 → 3.0.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.
Files changed (135) hide show
  1. package/.vscode/tasks.json +39 -0
  2. package/AGENTS.md +22 -21
  3. package/README.md +2 -2
  4. package/assets/javascript/components/_menu.js +2 -1
  5. package/assets/javascript/components/_modals.js +1 -1
  6. package/assets/javascript/components/_notifications.js +2 -1
  7. package/assets/javascript/components/_slides.js +2 -2
  8. package/assets/scss/base/_body.scss +5 -5
  9. package/assets/scss/base/_general.scss +27 -18
  10. package/assets/scss/base/_variables.scss +1 -1
  11. package/assets/scss/components/_accordion.scss +9 -7
  12. package/assets/scss/components/_alerts.scss +71 -0
  13. package/assets/scss/components/_badges.scss +40 -48
  14. package/assets/scss/components/_button.scss +27 -19
  15. package/assets/scss/components/_card.scss +9 -4
  16. package/assets/scss/components/_formAddon.scss +5 -1
  17. package/assets/scss/components/_logo.scss +3 -4
  18. package/assets/scss/components/_menu.scss +26 -3
  19. package/assets/scss/components/_modals.scss +2 -2
  20. package/assets/scss/components/_stepTabs.scss +2 -1
  21. package/assets/scss/index.scss +2 -3
  22. package/assets/scss/layout/_header.scss +3 -3
  23. package/assets/scss/layout/_responsive.scss +63 -0
  24. package/assets/scss/mixin/_mx-base.scss +4 -8
  25. package/assets/scss/mixin/_mx-button.scss +74 -70
  26. package/assets/scss/mixin/_mx-card.scss +33 -36
  27. package/assets/scss/mixin/_mx-form.scss +10 -5
  28. package/assets/scss/mixin/_mx-formAddon.scss +100 -58
  29. package/assets/scss/mixin/_mx-hover.scss +21 -15
  30. package/assets/scss/mixin/_mx-responsive.scss +81 -201
  31. package/demo/demo.css +9 -6
  32. package/demo/demo.html +7 -5
  33. package/demo/demo.js +34 -32
  34. package/dist/css/index.css +2502 -3507
  35. package/dist/css/index.css.map +1 -1
  36. package/dist/css/index.min.css +1 -1
  37. package/dist/javascript/index.js +7 -5
  38. package/dist/javascript/index.js.map +1 -1
  39. package/dist/javascript/index.min.js +1 -1
  40. package/docs/componenti-e-markup.md +5 -5
  41. package/docs/components/accordion.md +3 -3
  42. package/docs/components/alerts.md +67 -0
  43. package/docs/components/badges.md +11 -8
  44. package/docs/components/breadcumbs.md +1 -1
  45. package/docs/components/button.md +9 -9
  46. package/docs/components/card.md +9 -6
  47. package/docs/components/dropdown.md +1 -1
  48. package/docs/components/form.md +6 -5
  49. package/docs/components/formAddon.md +56 -19
  50. package/docs/components/logo.md +1 -1
  51. package/docs/components/menu.md +2 -2
  52. package/docs/components/modal.md +7 -6
  53. package/docs/components/notification.md +2 -2
  54. package/docs/components/search.md +8 -7
  55. package/docs/components/slides.md +5 -6
  56. package/docs/components/stepTabs.md +7 -7
  57. package/docs/components/steps.md +1 -1
  58. package/docs/components/summary.md +1 -1
  59. package/docs/components/table.md +1 -1
  60. package/docs/components/tooltip.md +4 -3
  61. package/docs/convenzioni.md +1 -1
  62. package/docs/export-e-sviluppo.md +1 -1
  63. package/docs/helper-javascript.md +1 -1
  64. package/docs/layout/body.md +1 -1
  65. package/docs/layout/footer.md +7 -3
  66. package/docs/layout/header.md +5 -4
  67. package/docs/layout/pageShell.md +11 -11
  68. package/docs/layout/responsive.md +90 -0
  69. package/docs/layout/section.md +16 -16
  70. package/docs/patterns/cookieConsent.md +6 -3
  71. package/docs/utilizzo-css-scss.md +26 -2
  72. package/package.json +1 -1
  73. package/{templates → reference}/html/components/accordion.html +2 -2
  74. package/reference/html/components/alerts.html +59 -0
  75. package/{templates → reference}/html/components/badges.html +9 -7
  76. package/{templates → reference}/html/components/button.html +7 -7
  77. package/{templates → reference}/html/components/card.html +7 -5
  78. package/{templates → reference}/html/components/form.html +5 -4
  79. package/reference/html/components/formAddon.html +109 -0
  80. package/{templates → reference}/html/components/menu.html +2 -2
  81. package/{templates → reference}/html/components/modal.html +6 -5
  82. package/{templates → reference}/html/components/notification.html +2 -2
  83. package/{templates → reference}/html/components/search.html +7 -6
  84. package/{templates → reference}/html/components/slides.html +4 -5
  85. package/{templates → reference}/html/components/stepTabs.html +6 -6
  86. package/{templates → reference}/html/components/tooltip.html +3 -2
  87. package/{templates → reference}/html/layout/footer.html +5 -2
  88. package/{templates → reference}/html/layout/header.html +4 -3
  89. package/{templates → reference}/html/layout/pageShell.html +10 -10
  90. package/reference/html/layout/responsive.html +83 -0
  91. package/{templates → reference}/html/layout/section.html +15 -15
  92. package/{templates → reference}/html/patterns/cookieConsent.html +4 -2
  93. package/{templates → reference}/react/components/accordion.jsx +1 -1
  94. package/reference/react/components/alerts.jsx +46 -0
  95. package/{templates → reference}/react/components/button.jsx +4 -4
  96. package/{templates → reference}/react/components/card.jsx +2 -2
  97. package/{templates → reference}/react/components/form.jsx +1 -1
  98. package/{templates → reference}/react/components/modal.jsx +2 -2
  99. package/{templates → reference}/react/components/search.jsx +4 -4
  100. package/{templates → reference}/react/components/slides.jsx +1 -1
  101. package/{templates → reference}/react/components/stepTabs.jsx +4 -4
  102. package/{templates → reference}/react/components/tooltip.jsx +1 -1
  103. package/{templates → reference}/react/layout/pageShell.jsx +2 -2
  104. package/reference/react/layout/responsive.jsx +61 -0
  105. package/{templates → reference}/react/layout/section.jsx +12 -12
  106. package/{templates → reference}/react/patterns/cookieConsent.jsx +1 -1
  107. package/{templates → reference}/react/patterns/footer.jsx +1 -1
  108. package/{templates → reference}/react/patterns/header.jsx +2 -2
  109. package/scripts/generate-component-docs.js +8 -8
  110. package/assets/scss/layout/_flex.scss +0 -49
  111. package/assets/scss/layout/_gap.scss +0 -21
  112. package/assets/scss/layout/_grid.scss +0 -13
  113. package/docs/layout/flex.md +0 -116
  114. package/docs/layout/grid.md +0 -116
  115. package/templates/html/components/formAddon.html +0 -72
  116. package/templates/html/layout/flex.html +0 -109
  117. package/templates/html/layout/grid.html +0 -109
  118. package/templates/react/layout/flex.jsx +0 -36
  119. package/templates/react/layout/grid.jsx +0 -36
  120. /package/{templates → reference}/html/components/breadcumbs.html +0 -0
  121. /package/{templates → reference}/html/components/dropdown.html +0 -0
  122. /package/{templates → reference}/html/components/logo.html +0 -0
  123. /package/{templates → reference}/html/components/steps.html +0 -0
  124. /package/{templates → reference}/html/components/summary.html +0 -0
  125. /package/{templates → reference}/html/components/table.html +0 -0
  126. /package/{templates → reference}/html/layout/body.html +0 -0
  127. /package/{templates → reference}/react/components/breadcumbs.jsx +0 -0
  128. /package/{templates → reference}/react/components/dropdown.jsx +0 -0
  129. /package/{templates → reference}/react/components/logo.jsx +0 -0
  130. /package/{templates → reference}/react/components/menu.jsx +0 -0
  131. /package/{templates → reference}/react/components/notification.jsx +0 -0
  132. /package/{templates → reference}/react/components/steps.jsx +0 -0
  133. /package/{templates → reference}/react/components/summary.jsx +0 -0
  134. /package/{templates → reference}/react/components/table.jsx +0 -0
  135. /package/{templates → reference}/react/layout/body.jsx +0 -0
@@ -1,6 +1,6 @@
1
1
  export default function Search() {
2
2
  return (
3
- <form pgs="buttonNohover search" autoComplete="off" action="" method="get">
3
+ <form pgs="button search" pgs-option="buttonNohover" autoComplete="off" action="" method="get">
4
4
  <button type="submit" title="Search"><i className="fa-solid fa-search"></i></button>
5
5
  <input type="search" name="s" placeholder="Search" defaultValue="" />
6
6
  <ul pgs="search-suggestions"></ul>
@@ -11,13 +11,13 @@ export default function Search() {
11
11
  export function SearchModal() {
12
12
  return (
13
13
  <div pgs="modal search-modal" pgs-option="containerPGS[header]">
14
- <button type="button" pgs="modal-button buttonIcon" title="Search">
14
+ <button type="button" pgs="modal-button button" pgs-option="buttonIcon" title="Search">
15
15
  <i className="fa-solid fa-search"></i>
16
16
  </button>
17
17
 
18
18
  <dialog>
19
19
  <div pgs="flexRow section search-mobile">
20
- <form pgs="buttonNohover search" autoComplete="off" action="/" method="get">
20
+ <form pgs="button search" pgs-option="buttonNohover" autoComplete="off" action="/" method="get">
21
21
  <button type="submit" title="Search">
22
22
  <i className="fa-solid fa-search"></i>
23
23
  </button>
@@ -26,7 +26,7 @@ export function SearchModal() {
26
26
  <ul pgs="search-suggestions"></ul>
27
27
  </form>
28
28
 
29
- <button type="button" pgs="modal-close buttonIcon">
29
+ <button type="button" pgs="modal-close button" pgs-option="buttonIcon">
30
30
  <i className="fa-solid fa-close"></i>
31
31
  </button>
32
32
  </div>
@@ -12,7 +12,7 @@ export default function Slides() {
12
12
  <li key={title}>
13
13
  <article pgs="card flexColumn">
14
14
  <img pgs="card-img imgCover" src={src} alt={alt} />
15
- <div pgs="flexColumnTexts">
15
+ <div pgs="flexColumn">
16
16
  <h3>{title}</h3>
17
17
  <p>{text}</p>
18
18
  </div>
@@ -1,20 +1,20 @@
1
1
  export default function StepTabs() {
2
2
  return (
3
- <div pgs="stepTabs flexColumnElements">
3
+ <div pgs="stepTabs flexColumn gapElements">
4
4
  <div pgs="stepTabs-dots" aria-label="Avanzamento"></div>
5
5
 
6
6
  <div pgs="stepTabs-container">
7
- <section pgs="tab flexColumnTexts" tabIndex="-1" pgs-option="tabIcon[fa-user]">
7
+ <section pgs="tab flexColumn" tabIndex="-1" pgs-option="tabIcon[fa-user]">
8
8
  <h3>Personal details</h3>
9
9
  <p>First tab content.</p>
10
10
  </section>
11
11
 
12
- <section pgs="tab flexColumnTexts" tabIndex="-1" pgs-option="tabIcon[fa-list-check]">
12
+ <section pgs="tab flexColumn" tabIndex="-1" pgs-option="tabIcon[fa-list-check]">
13
13
  <h3>Preferences</h3>
14
14
  <p>Second tab content.</p>
15
15
  </section>
16
16
 
17
- <section pgs="tab flexColumnTexts" tabIndex="-1" pgs-option="tabIcon[fa-check]">
17
+ <section pgs="tab flexColumn" tabIndex="-1" pgs-option="tabIcon[fa-check]">
18
18
  <h3>Confirmation</h3>
19
19
  <p>Third tab content.</p>
20
20
  </section>
@@ -1,7 +1,7 @@
1
1
  export default function Tooltip() {
2
2
  return (
3
3
  <span pgs="dropdown tooltip">
4
- <button pgs="dropdown-button buttonMini tooltip-button" title="open-tooltip" type="button">
4
+ <button pgs="dropdown-button button tooltip-button" pgs-option="buttonMini" title="open-tooltip" type="button">
5
5
  <i className="fa-solid fa-info"></i>
6
6
  </button>
7
7
  <div pgs="dropdown-content tooltip-content">
@@ -4,7 +4,7 @@ function Aside() {
4
4
  return (
5
5
  <aside pgs="pageShell-aside">
6
6
  <div pgs="pageShell-aside-scroll">
7
- <div pgs="flexColumnTexts">
7
+ <div pgs="flexColumn">
8
8
  <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ab modi ut sunt est illum accusantium dolores eum aut cum itaque.</p>
9
9
  </div>
10
10
  </div>
@@ -15,7 +15,7 @@ function Aside() {
15
15
  function MainContent() {
16
16
  return (
17
17
  <main pgs="pageShell-content">
18
- <section pgs="flexColumnElements" id="sezione-uno">
18
+ <section pgs="flexColumn gapElements" id="sezione-uno">
19
19
  <strong>Lorem ipsum</strong>
20
20
  <p>{contentText}</p>
21
21
  </section>
@@ -0,0 +1,61 @@
1
+ const flexColumns = [
2
+ ["Column one", "First flex column."],
3
+ ["Column two", "Second flex column."],
4
+ ["Column three", "Third flex column."],
5
+ ];
6
+
7
+ const gridColumns = [
8
+ ["Column one", "First grid column."],
9
+ ["Column two", "Second grid column."],
10
+ ["Column three", "Third grid column."],
11
+ ["Column four", "Fourth grid column."],
12
+ ];
13
+
14
+ function Column({ title, text }) {
15
+ return (
16
+ <article pgs="box flexColumn">
17
+ <strong>{title}</strong>
18
+ <p>{text}</p>
19
+ </article>
20
+ );
21
+ }
22
+
23
+ export default function Responsive() {
24
+ return (
25
+ <div pgs="flexColumn gapSections">
26
+ <section>
27
+ <strong>Flex</strong>
28
+ <div pgs="flexRow" pgs-option="column-2 m2e">
29
+ {flexColumns.map(([title, text]) => (
30
+ <Column key={title} title={title} text={text} />
31
+ ))}
32
+ </div>
33
+ </section>
34
+
35
+ <section>
36
+ <strong>Grid</strong>
37
+ <div pgs="grid" pgs-option="column-4 m2e">
38
+ {gridColumns.map(([title, text]) => (
39
+ <Column key={title} title={title} text={text} />
40
+ ))}
41
+ </div>
42
+ </section>
43
+
44
+ <section pgs="flexRow">
45
+ <strong>Gap</strong>
46
+ <div pgs="flexRow gapTexts wrap">
47
+ <span pgs="box">Text gap</span>
48
+ <span pgs="box">Text gap</span>
49
+ </div>
50
+ <div pgs="flexRow gapElements wrap">
51
+ <span pgs="box">Element gap</span>
52
+ <span pgs="box">Element gap</span>
53
+ </div>
54
+ <div pgs="flexRow gapSections nowrap">
55
+ <span pgs="box">Section gap</span>
56
+ <span pgs="box">Section gap</span>
57
+ </div>
58
+ </section>
59
+ </div>
60
+ );
61
+ }
@@ -1,40 +1,40 @@
1
1
  export default function Section() {
2
2
  return (
3
- <div pgs="flexColumnSections">
4
- <section pgs="section flexColumnElements">
5
- <div pgs="container flexColumnTexts">
3
+ <div pgs="flexColumn gapSections">
4
+ <section pgs="section flexColumn gapElements">
5
+ <div pgs="container flexColumn">
6
6
  <strong>Standard section</strong>
7
7
  <p>Centered content inside a MyPGS section.</p>
8
8
  </div>
9
9
  </section>
10
10
 
11
- <section pgs="sectionFull flexColumnElements">
12
- <div pgs="container flexColumnTexts">
11
+ <section pgs="sectionFull flexColumn gapElements">
12
+ <div pgs="container flexColumn">
13
13
  <strong>Full-width section</strong>
14
14
  <p>Centered content inside a MyPGS section.</p>
15
15
  </div>
16
16
  </section>
17
17
 
18
- <section pgs="sectionSpecificity flexColumnElements">
19
- <div pgs="container flexColumnTexts">
18
+ <section pgs="sectionSpecificity flexColumn gapElements">
19
+ <div pgs="container flexColumn">
20
20
  <strong>Specificity section</strong>
21
21
  <p>Centered content inside a MyPGS section.</p>
22
22
  </div>
23
- <div pgs="sectionSpecificity-child container flexColumnTexts">
23
+ <div pgs="sectionSpecificity-child container flexColumn">
24
24
  <strong>Specificity-child section</strong>
25
25
  <p>Centered content inside a MyPGS section.</p>
26
26
  </div>
27
27
  </section>
28
28
 
29
- <section pgs="sectionMax flexColumnElements" style={{ backgroundColor: "var(--color-primary-soft)" }}>
30
- <div pgs="container flexColumnTexts">
29
+ <section pgs="sectionMax flexColumn gapElements" style={{ backgroundColor: "var(--color-primary-soft)" }}>
30
+ <div pgs="container flexColumn">
31
31
  <strong>Max-width section</strong>
32
32
  <p>Centered content inside a MyPGS section.</p>
33
33
  </div>
34
34
  </section>
35
35
 
36
- <section pgs="sectionNoPadding flexColumnElements">
37
- <div pgs="container flexColumnTexts">
36
+ <section pgs="sectionNoPadding flexColumn gapElements">
37
+ <div pgs="container flexColumn">
38
38
  <strong>No-padding section</strong>
39
39
  <p>Centered content inside a MyPGS section.</p>
40
40
  </div>
@@ -53,7 +53,7 @@ export default function CookieConsent({
53
53
  <i className="fa-solid fa-duotone fa-sliders"></i>Selected only
54
54
  </button>
55
55
 
56
- <button type="button" pgs="buttonStrong cookieConsent-actionAccept">
56
+ <button type="button" pgs="button cookieConsent-actionAccept" pgs-option="buttonStrong">
57
57
  <i className="fa-solid fa-check"></i> Accept all
58
58
  </button>
59
59
  </div>
@@ -6,7 +6,7 @@ export default function Footer() {
6
6
  </button>
7
7
 
8
8
  <section pgs="footer-top section">
9
- <div pgs="footer-top-content flex-3">
9
+ <div pgs="footer-top-content flexRow" pgs-option="column-3">
10
10
  <div pgs="footer-brand">
11
11
  <a aria-label="Logo" pgs="logo" href="/">
12
12
  <span pgs="logo-text">MyPGS</span>
@@ -42,13 +42,13 @@ export default function Header() {
42
42
  <div pgs="header-element-onlyMobile"></div>
43
43
 
44
44
  <div pgs="header-element-alwaysOnLast">
45
- <button pgs="buttonIcon toggleDarkmode" type="button" aria-label="Change theme">
45
+ <button pgs="button toggleDarkmode" pgs-option="buttonIcon" type="button" aria-label="Change theme">
46
46
  <i className="fa-solid fa-moon"></i>
47
47
  </button>
48
48
  </div>
49
49
 
50
50
  <div pgs="header-element-hamburger modal" pgs-option="containerPGS[header] ">
51
- <button pgs="buttonIcon modal-button modal-close header-element-hamburger-button" type="button"></button>
51
+ <button pgs="button modal-button modal-close header-element-hamburger-button" pgs-option="buttonIcon" type="button"></button>
52
52
 
53
53
  <dialog pgs="modal-dialog" pgs-option="right">
54
54
  <div pgs="modal-dialog-content">
@@ -6,7 +6,7 @@ const fs = require("fs");
6
6
  const path = require("path");
7
7
 
8
8
  const PROJECT_ROOT = path.resolve(__dirname, "..");
9
- const TEMPLATE_ROOT = path.join(PROJECT_ROOT, "templates", "html");
9
+ const REFERENCE_ROOT = path.join(PROJECT_ROOT, "reference", "html");
10
10
  const DOCS_ROOT = path.join(PROJECT_ROOT, "docs");
11
11
  const MANAGED_DOC_DIRECTORIES = ["components", "layout", "patterns"]
12
12
  .map(directory => path.join(DOCS_ROOT, directory));
@@ -18,7 +18,7 @@ const SOURCE_ROOTS = [
18
18
  const TAG_ORDER = ["title", "description", "pgs", "pgs-option", "pgs-state", "api", "related", "return"];
19
19
  const LIST_TAGS = new Set(["pgs", "pgs-option", "pgs-state", "api", "related"]);
20
20
  const REQUIRED_TAGS = ["title", "description", "pgs"];
21
- const GENERATED_MARKER = /^<!-- (?:Automatically generated from (templates\/html\/.+\.html)\. Edit \1 and run npm run docs:generate again\.|File generato automaticamente da (templates\/html\/.+\.html)\. Modificare \2 e rieseguire npm run docs:generate\.) -->$/;
21
+ const GENERATED_MARKER = /^<!-- (?:Automatically generated from ((?:reference|templates)\/html\/.+\.html)\. Edit \1 and run npm run docs:generate again\.|File generato automaticamente da ((?:reference|templates)\/html\/.+\.html)\. Modificare \2 e rieseguire npm run docs:generate\.) -->$/;
22
22
 
23
23
  function toPosix(value) {
24
24
  return value.split(path.sep).join("/");
@@ -29,7 +29,7 @@ function relativeToProject(value) {
29
29
  }
30
30
 
31
31
  function getOutputPath(template) {
32
- const relativeTemplate = path.relative(TEMPLATE_ROOT, template);
32
+ const relativeTemplate = path.relative(REFERENCE_ROOT, template);
33
33
  return path.join(DOCS_ROOT, relativeTemplate.replace(/\.html$/i, ".md"));
34
34
  }
35
35
 
@@ -477,11 +477,11 @@ function printErrors(errors) {
477
477
  }
478
478
 
479
479
  function main() {
480
- const templates = walkFiles(TEMPLATE_ROOT, file => path.extname(file).toLowerCase() === ".html");
480
+ const references = walkFiles(REFERENCE_ROOT, file => path.extname(file).toLowerCase() === ".html");
481
481
  const errors = [];
482
482
  const outputPaths = new Map();
483
483
 
484
- templates.forEach(template => {
484
+ references.forEach(template => {
485
485
  const output = toPosix(path.relative(DOCS_ROOT, getOutputPath(template))).toLowerCase();
486
486
  if (!outputPaths.has(output)) outputPaths.set(output, []);
487
487
  outputPaths.get(output).push(template);
@@ -493,7 +493,7 @@ function main() {
493
493
 
494
494
  const sources = loadSources();
495
495
  const allSourceContent = sources.map(source => source.content).join("\n");
496
- const parsedTemplates = templates.map(template => {
496
+ const parsedReferences = references.map(template => {
497
497
  const source = fs.readFileSync(template, "utf8");
498
498
  const parsed = parseDocumentationBlock(template, source);
499
499
  errors.push(...validateTemplate(template, parsed, sources, allSourceContent));
@@ -509,7 +509,7 @@ function main() {
509
509
  const expected = new Set();
510
510
  const counts = { created: 0, updated: 0, unchanged: 0, removed: 0 };
511
511
 
512
- parsedTemplates.forEach(({ template, parsed }) => {
512
+ parsedReferences.forEach(({ template, parsed }) => {
513
513
  const output = getOutputPath(template);
514
514
  const content = renderMarkdown(template, parsed.data, parsed.markup);
515
515
  expected.add(path.resolve(output));
@@ -546,7 +546,7 @@ function main() {
546
546
  });
547
547
 
548
548
  console.log("");
549
- console.log(`Riepilogo: ${templates.length} template validati; ${counts.created} creati; ${counts.updated} aggiornati; ${counts.unchanged} invariati; ${counts.removed} obsoleti rimossi.`);
549
+ console.log(`Riepilogo: ${references.length} riferimenti HTML validati; ${counts.created} creati; ${counts.updated} aggiornati; ${counts.unchanged} invariati; ${counts.removed} obsoleti rimossi.`);
550
550
  }
551
551
 
552
552
  try {
@@ -1,49 +0,0 @@
1
- @use "../mixin/mixin" as *;
2
-
3
-
4
- //= FLEX
5
-
6
- //== FLEX COLUMN
7
- [pgs~=flexColumn] {
8
- @include flexColumn();
9
- }
10
-
11
- [pgs~=flexColumnTexts] {
12
- @include flexColumn();
13
- }
14
-
15
- [pgs~=flexColumnElements] {
16
- @include flexColumnElements();
17
- }
18
-
19
- [pgs~=flexColumnSections] {
20
- @include flexColumnSections();
21
- }
22
-
23
- //== FLEX ROW
24
- [pgs~=flexRow] {
25
- @include flexRow();
26
- }
27
-
28
- [pgs~=flexRowTexts] {
29
- @include flexRow();
30
- }
31
-
32
- [pgs~=flexRowElements] {
33
- @include flexRowElements();
34
- }
35
-
36
- [pgs~=flexRowSection] {
37
- @include flexRowSection();
38
- }
39
-
40
- //== responsive flex
41
- @for $i from 1 through 10 {
42
- [pgs~=flex-#{$i}] {
43
- @include rFlex($i);
44
- }
45
-
46
- [pgs~=flex-#{$i}-m2e] {
47
- @include rFlex($i, true);
48
- }
49
- }
@@ -1,21 +0,0 @@
1
- //# GAP
2
- [pgs~=gapTexts] {
3
- gap: var(--gap-texts);
4
- }
5
-
6
- [pgs~=gapElements] {
7
- gap: var(--gap-elements);
8
- }
9
-
10
- [pgs~=gapSections] {
11
- gap: var(--gap-sections);
12
- }
13
-
14
- //# wrap
15
- [pgs~=nowrap] {
16
- flex-wrap: nowrap;
17
- }
18
-
19
- [pgs~=wrap] {
20
- flex-wrap: wrap;
21
- }
@@ -1,13 +0,0 @@
1
- @use "../mixin/mixin" as *;
2
-
3
- //== GRID
4
- @for $i from 1 through 10 {
5
- [pgs~=grid-#{$i}] {
6
- @include rGrid($i);
7
- }
8
-
9
- [pgs~=grid-#{$i}-m2e] {
10
- @include rGrid($i, true);
11
- }
12
- }
13
-
@@ -1,116 +0,0 @@
1
- <!-- Automatically generated from templates/html/layout/flex.html. Edit templates/html/layout/flex.html and run npm run docs:generate again. -->
2
-
3
- # Flex
4
-
5
- Flex markup, configuration, behavior, and usage example.
6
-
7
- ## PGS
8
-
9
- - `flex-2`: identifies the flex-2 element used by Flex.
10
- - `flex-3`: identifies the flex-3 element used by Flex.
11
- - `flex-4`: identifies the flex-4 element used by Flex.
12
- - `flex-6`: identifies the flex-6 element used by Flex.
13
-
14
- ## Related elements
15
-
16
- - `container`: defines the container context for the introduction.
17
- - `flexColumnTexts`: vertically organizes and spaces card text and content.
18
- - `card`: makes the demonstration cells of the flex layout visible.
19
-
20
- ## Output
21
-
22
- HTML collection of responsive flex layouts with two, three, four, and six items.
23
-
24
- ## Example
25
-
26
- ```html
27
- <div pgs="container flexColumnTexts">
28
- <strong>Standard section</strong>
29
- <p>Centered content inside a MyPGS section.</p>
30
- </div>
31
-
32
-
33
- <div pgs="flex-2">
34
- <article pgs="card flexColumnTexts">
35
- <strong>Column one</strong>
36
- <p>First column content.</p>
37
- </article>
38
-
39
- <article pgs="card flexColumnTexts">
40
- <strong>Column two</strong>
41
- <p>Second column content.</p>
42
- </article>
43
- </div>
44
-
45
-
46
- <div pgs="flex-3">
47
- <article pgs="card flexColumnTexts">
48
- <strong>Column one</strong>
49
- <p>First column content.</p>
50
- </article>
51
-
52
- <article pgs="card flexColumnTexts">
53
- <strong>Column two</strong>
54
- <p>Second column content.</p>
55
- </article>
56
-
57
- <article pgs="card flexColumnTexts">
58
- <strong>Column three</strong>
59
- <p>Third column content.</p>
60
- </article>
61
- </div>
62
-
63
-
64
- <div pgs="flex-4">
65
- <article pgs="card flexColumnTexts">
66
- <strong>Column one</strong>
67
- <p>First column content.</p>
68
- </article>
69
-
70
- <article pgs="card flexColumnTexts">
71
- <strong>Column two</strong>
72
- <p>Second column content.</p>
73
- </article>
74
-
75
- <article pgs="card flexColumnTexts">
76
- <strong>Column three</strong>
77
- <p>Third column content.</p>
78
- </article>
79
- <article pgs="card flexColumnTexts">
80
- <strong>Column four</strong>
81
- <p>Fourth column content.</p>
82
- </article>
83
- </div>
84
-
85
- <div pgs="flex-6">
86
- <article pgs="card flexColumnTexts">
87
- <strong>Column one</strong>
88
- <p>First column content.</p>
89
- </article>
90
-
91
- <article pgs="card flexColumnTexts">
92
- <strong>Column two</strong>
93
- <p>Second column content.</p>
94
- </article>
95
-
96
- <article pgs="card flexColumnTexts">
97
- <strong>Column three</strong>
98
- <p>Third column content.</p>
99
- </article>
100
-
101
- <article pgs="card flexColumnTexts">
102
- <strong>Column four</strong>
103
- <p>Fourth column content.</p>
104
- </article>
105
-
106
- <article pgs="card flexColumnTexts">
107
- <strong>Column five</strong>
108
- <p>Fifth column content.</p>
109
- </article>
110
-
111
- <article pgs="card flexColumnTexts">
112
- <strong>Column six</strong>
113
- <p>Sixth column content.</p>
114
- </article>
115
- </div
116
- ```
@@ -1,116 +0,0 @@
1
- <!-- Automatically generated from templates/html/layout/grid.html. Edit templates/html/layout/grid.html and run npm run docs:generate again. -->
2
-
3
- # Grid
4
-
5
- Responsive grid examples that distribute two to six columns while preserving design-system gaps and sizing.
6
-
7
- ## PGS
8
-
9
- - `grid-2`: creates a responsive grid with up to two columns.
10
- - `grid-3`: creates a responsive grid with up to three columns.
11
- - `grid-4`: creates a responsive grid with up to four columns.
12
- - `grid-6`: creates a responsive grid with up to six columns.
13
-
14
- ## Related elements
15
-
16
- - `container`: defines the container context for the introduction.
17
- - `flexColumnTexts`: organizes and spaces introductory and card text.
18
- - `card`: makes the demonstration grid cells visible.
19
-
20
- ## Output
21
-
22
- HTML collection of responsive grids with two, three, four, and six columns.
23
-
24
- ## Example
25
-
26
- ```html
27
- <div pgs="container flexColumnTexts">
28
- <strong>Standard section</strong>
29
- <p>Centered content inside a MyPGS section.</p>
30
- </div>
31
-
32
-
33
- <div pgs="grid-2">
34
- <article pgs="card flexColumnTexts">
35
- <strong>Column one</strong>
36
- <p>First column content.</p>
37
- </article>
38
-
39
- <article pgs="card flexColumnTexts">
40
- <strong>Column two</strong>
41
- <p>Second column content.</p>
42
- </article>
43
- </div>
44
-
45
-
46
- <div pgs="grid-3">
47
- <article pgs="card flexColumnTexts">
48
- <strong>Column one</strong>
49
- <p>First column content.</p>
50
- </article>
51
-
52
- <article pgs="card flexColumnTexts">
53
- <strong>Column two</strong>
54
- <p>Second column content.</p>
55
- </article>
56
-
57
- <article pgs="card flexColumnTexts">
58
- <strong>Column three</strong>
59
- <p>Third column content.</p>
60
- </article>
61
- </div>
62
-
63
-
64
- <div pgs="grid-4">
65
- <article pgs="card flexColumnTexts">
66
- <strong>Column one</strong>
67
- <p>First column content.</p>
68
- </article>
69
-
70
- <article pgs="card flexColumnTexts">
71
- <strong>Column two</strong>
72
- <p>Second column content.</p>
73
- </article>
74
-
75
- <article pgs="card flexColumnTexts">
76
- <strong>Column three</strong>
77
- <p>Third column content.</p>
78
- </article>
79
- <article pgs="card flexColumnTexts">
80
- <strong>Column four</strong>
81
- <p>Fourth column content.</p>
82
- </article>
83
- </div>
84
-
85
- <div pgs="grid-6">
86
- <article pgs="card flexColumnTexts">
87
- <strong>Column one</strong>
88
- <p>First column content.</p>
89
- </article>
90
-
91
- <article pgs="card flexColumnTexts">
92
- <strong>Column two</strong>
93
- <p>Second column content.</p>
94
- </article>
95
-
96
- <article pgs="card flexColumnTexts">
97
- <strong>Column three</strong>
98
- <p>Third column content.</p>
99
- </article>
100
-
101
- <article pgs="card flexColumnTexts">
102
- <strong>Column four</strong>
103
- <p>Fourth column content.</p>
104
- </article>
105
-
106
- <article pgs="card flexColumnTexts">
107
- <strong>Column five</strong>
108
- <p>Fifth column content.</p>
109
- </article>
110
-
111
- <article pgs="card flexColumnTexts">
112
- <strong>Column six</strong>
113
- <p>Sixth column content.</p>
114
- </article>
115
- </div
116
- ```