@forjacms/sections 1.2.6

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 (211) hide show
  1. package/README.md +185 -0
  2. package/dist/cjs/a11y-IAJPjMwx.js +27 -0
  3. package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
  4. package/dist/cjs/forja-blog.cjs.entry.js +16 -0
  5. package/dist/cjs/forja-contact.cjs.entry.js +25 -0
  6. package/dist/cjs/forja-cta.cjs.entry.js +15 -0
  7. package/dist/cjs/forja-divider.cjs.entry.js +19 -0
  8. package/dist/cjs/forja-faq.cjs.entry.js +16 -0
  9. package/dist/cjs/forja-features.cjs.entry.js +16 -0
  10. package/dist/cjs/forja-footer.cjs.entry.js +38 -0
  11. package/dist/cjs/forja-gallery.cjs.entry.js +16 -0
  12. package/dist/cjs/forja-hero.cjs.entry.js +20 -0
  13. package/dist/cjs/forja-legal.cjs.entry.js +46 -0
  14. package/dist/cjs/forja-logo-cloud.cjs.entry.js +20 -0
  15. package/dist/cjs/forja-nav.cjs.entry.js +53 -0
  16. package/dist/cjs/forja-newsletter.cjs.entry.js +24 -0
  17. package/dist/cjs/forja-portfolio.cjs.entry.js +37 -0
  18. package/dist/cjs/forja-pricing.cjs.entry.js +16 -0
  19. package/dist/cjs/forja-projects.cjs.entry.js +16 -0
  20. package/dist/cjs/forja-section-renderer.cjs.entry.js +42 -0
  21. package/dist/cjs/forja-sections.cjs.js +25 -0
  22. package/dist/cjs/forja-stats.cjs.entry.js +20 -0
  23. package/dist/cjs/forja-tag-cloud.cjs.entry.js +16 -0
  24. package/dist/cjs/forja-team.cjs.entry.js +18 -0
  25. package/dist/cjs/forja-testimonials.cjs.entry.js +16 -0
  26. package/dist/cjs/forja-text-block.cjs.entry.js +22 -0
  27. package/dist/cjs/forja-timeline.cjs.entry.js +19 -0
  28. package/dist/cjs/forja-video.cjs.entry.js +30 -0
  29. package/dist/cjs/index-Bp-SZu2Y.js +1754 -0
  30. package/dist/cjs/index.cjs.js +15 -0
  31. package/dist/cjs/loader.cjs.js +13 -0
  32. package/dist/collection/collection-manifest.json +36 -0
  33. package/dist/collection/components/forja-blog/forja-blog.js +132 -0
  34. package/dist/collection/components/forja-contact/forja-contact.js +165 -0
  35. package/dist/collection/components/forja-cta/forja-cta.js +126 -0
  36. package/dist/collection/components/forja-divider/forja-divider.js +57 -0
  37. package/dist/collection/components/forja-faq/forja-faq.js +75 -0
  38. package/dist/collection/components/forja-features/forja-features.js +94 -0
  39. package/dist/collection/components/forja-footer/forja-footer.js +184 -0
  40. package/dist/collection/components/forja-gallery/forja-gallery.js +94 -0
  41. package/dist/collection/components/forja-hero/forja-hero.js +169 -0
  42. package/dist/collection/components/forja-legal/forja-legal.js +289 -0
  43. package/dist/collection/components/forja-logo-cloud/forja-logo-cloud.js +117 -0
  44. package/dist/collection/components/forja-nav/forja-nav.js +215 -0
  45. package/dist/collection/components/forja-newsletter/forja-newsletter.js +141 -0
  46. package/dist/collection/components/forja-portfolio/forja-portfolio.js +163 -0
  47. package/dist/collection/components/forja-pricing/forja-pricing.js +94 -0
  48. package/dist/collection/components/forja-projects/forja-projects.js +94 -0
  49. package/dist/collection/components/forja-section-renderer/forja-section-renderer.js +218 -0
  50. package/dist/collection/components/forja-stats/forja-stats.js +117 -0
  51. package/dist/collection/components/forja-tag-cloud/forja-tag-cloud.js +75 -0
  52. package/dist/collection/components/forja-team/forja-team.js +138 -0
  53. package/dist/collection/components/forja-testimonials/forja-testimonials.js +94 -0
  54. package/dist/collection/components/forja-text-block/forja-text-block.js +99 -0
  55. package/dist/collection/components/forja-timeline/forja-timeline.js +120 -0
  56. package/dist/collection/components/forja-video/forja-video.js +146 -0
  57. package/dist/collection/index.js +4 -0
  58. package/dist/collection/types.js +7 -0
  59. package/dist/collection/utils/a11y.js +22 -0
  60. package/dist/collection/utils/a11y.unit.js +46 -0
  61. package/dist/components/forja-blog.d.ts +11 -0
  62. package/dist/components/forja-blog.js +1 -0
  63. package/dist/components/forja-contact.d.ts +11 -0
  64. package/dist/components/forja-contact.js +1 -0
  65. package/dist/components/forja-cta.d.ts +11 -0
  66. package/dist/components/forja-cta.js +1 -0
  67. package/dist/components/forja-divider.d.ts +11 -0
  68. package/dist/components/forja-divider.js +1 -0
  69. package/dist/components/forja-faq.d.ts +11 -0
  70. package/dist/components/forja-faq.js +1 -0
  71. package/dist/components/forja-features.d.ts +11 -0
  72. package/dist/components/forja-features.js +1 -0
  73. package/dist/components/forja-footer.d.ts +11 -0
  74. package/dist/components/forja-footer.js +1 -0
  75. package/dist/components/forja-gallery.d.ts +11 -0
  76. package/dist/components/forja-gallery.js +1 -0
  77. package/dist/components/forja-hero.d.ts +11 -0
  78. package/dist/components/forja-hero.js +1 -0
  79. package/dist/components/forja-legal.d.ts +11 -0
  80. package/dist/components/forja-legal.js +1 -0
  81. package/dist/components/forja-logo-cloud.d.ts +11 -0
  82. package/dist/components/forja-logo-cloud.js +1 -0
  83. package/dist/components/forja-nav.d.ts +11 -0
  84. package/dist/components/forja-nav.js +1 -0
  85. package/dist/components/forja-newsletter.d.ts +11 -0
  86. package/dist/components/forja-newsletter.js +1 -0
  87. package/dist/components/forja-portfolio.d.ts +11 -0
  88. package/dist/components/forja-portfolio.js +1 -0
  89. package/dist/components/forja-pricing.d.ts +11 -0
  90. package/dist/components/forja-pricing.js +1 -0
  91. package/dist/components/forja-projects.d.ts +11 -0
  92. package/dist/components/forja-projects.js +1 -0
  93. package/dist/components/forja-section-renderer.d.ts +11 -0
  94. package/dist/components/forja-section-renderer.js +1 -0
  95. package/dist/components/forja-stats.d.ts +11 -0
  96. package/dist/components/forja-stats.js +1 -0
  97. package/dist/components/forja-tag-cloud.d.ts +11 -0
  98. package/dist/components/forja-tag-cloud.js +1 -0
  99. package/dist/components/forja-team.d.ts +11 -0
  100. package/dist/components/forja-team.js +1 -0
  101. package/dist/components/forja-testimonials.d.ts +11 -0
  102. package/dist/components/forja-testimonials.js +1 -0
  103. package/dist/components/forja-text-block.d.ts +11 -0
  104. package/dist/components/forja-text-block.js +1 -0
  105. package/dist/components/forja-timeline.d.ts +11 -0
  106. package/dist/components/forja-timeline.js +1 -0
  107. package/dist/components/forja-video.d.ts +11 -0
  108. package/dist/components/forja-video.js +1 -0
  109. package/dist/components/index.d.ts +35 -0
  110. package/dist/components/index.js +1 -0
  111. package/dist/components/p-CTbyYfdB.js +1 -0
  112. package/dist/components/p-DTKnQcqm.js +1 -0
  113. package/dist/define-all.d.ts +2 -0
  114. package/dist/define-all.js +24 -0
  115. package/dist/esm/a11y-CTbyYfdB.js +24 -0
  116. package/dist/esm/app-globals-DQuL1Twl.js +3 -0
  117. package/dist/esm/forja-blog.entry.js +14 -0
  118. package/dist/esm/forja-contact.entry.js +23 -0
  119. package/dist/esm/forja-cta.entry.js +13 -0
  120. package/dist/esm/forja-divider.entry.js +17 -0
  121. package/dist/esm/forja-faq.entry.js +14 -0
  122. package/dist/esm/forja-features.entry.js +14 -0
  123. package/dist/esm/forja-footer.entry.js +36 -0
  124. package/dist/esm/forja-gallery.entry.js +14 -0
  125. package/dist/esm/forja-hero.entry.js +18 -0
  126. package/dist/esm/forja-legal.entry.js +44 -0
  127. package/dist/esm/forja-logo-cloud.entry.js +18 -0
  128. package/dist/esm/forja-nav.entry.js +51 -0
  129. package/dist/esm/forja-newsletter.entry.js +22 -0
  130. package/dist/esm/forja-portfolio.entry.js +35 -0
  131. package/dist/esm/forja-pricing.entry.js +14 -0
  132. package/dist/esm/forja-projects.entry.js +14 -0
  133. package/dist/esm/forja-section-renderer.entry.js +40 -0
  134. package/dist/esm/forja-sections.js +21 -0
  135. package/dist/esm/forja-stats.entry.js +18 -0
  136. package/dist/esm/forja-tag-cloud.entry.js +14 -0
  137. package/dist/esm/forja-team.entry.js +16 -0
  138. package/dist/esm/forja-testimonials.entry.js +14 -0
  139. package/dist/esm/forja-text-block.entry.js +20 -0
  140. package/dist/esm/forja-timeline.entry.js +17 -0
  141. package/dist/esm/forja-video.entry.js +28 -0
  142. package/dist/esm/index-WdE4YutY.js +1747 -0
  143. package/dist/esm/index.js +11 -0
  144. package/dist/esm/loader.js +11 -0
  145. package/dist/forja-sections/forja-sections.esm.js +1 -0
  146. package/dist/forja-sections/index.esm.js +1 -0
  147. package/dist/forja-sections/p-0a820467.entry.js +1 -0
  148. package/dist/forja-sections/p-1b0b71f5.entry.js +1 -0
  149. package/dist/forja-sections/p-1e7249c1.entry.js +1 -0
  150. package/dist/forja-sections/p-27f014b1.entry.js +1 -0
  151. package/dist/forja-sections/p-2834de40.entry.js +1 -0
  152. package/dist/forja-sections/p-2a7f54c6.entry.js +1 -0
  153. package/dist/forja-sections/p-2b3d6388.entry.js +1 -0
  154. package/dist/forja-sections/p-4180bd91.entry.js +1 -0
  155. package/dist/forja-sections/p-57c10a67.entry.js +1 -0
  156. package/dist/forja-sections/p-6e48a255.entry.js +1 -0
  157. package/dist/forja-sections/p-6fa65e05.entry.js +1 -0
  158. package/dist/forja-sections/p-732e854c.entry.js +1 -0
  159. package/dist/forja-sections/p-8787f878.entry.js +1 -0
  160. package/dist/forja-sections/p-9b242e13.entry.js +1 -0
  161. package/dist/forja-sections/p-CTbyYfdB.js +1 -0
  162. package/dist/forja-sections/p-DQuL1Twl.js +1 -0
  163. package/dist/forja-sections/p-WdE4YutY.js +2 -0
  164. package/dist/forja-sections/p-a2cdb548.entry.js +1 -0
  165. package/dist/forja-sections/p-aa20264b.entry.js +1 -0
  166. package/dist/forja-sections/p-b5280312.entry.js +1 -0
  167. package/dist/forja-sections/p-c2c2e0ba.entry.js +1 -0
  168. package/dist/forja-sections/p-c4bccd7e.entry.js +1 -0
  169. package/dist/forja-sections/p-d1b739dd.entry.js +1 -0
  170. package/dist/forja-sections/p-d762878f.entry.js +1 -0
  171. package/dist/forja-sections/p-de808791.entry.js +1 -0
  172. package/dist/forja-sections/p-f24d6578.entry.js +1 -0
  173. package/dist/forja-sections/p-fd969566.entry.js +1 -0
  174. package/dist/index.cjs.js +1 -0
  175. package/dist/index.js +1 -0
  176. package/dist/types/components/forja-blog/forja-blog.d.ts +10 -0
  177. package/dist/types/components/forja-contact/forja-contact.d.ts +13 -0
  178. package/dist/types/components/forja-cta/forja-cta.d.ts +9 -0
  179. package/dist/types/components/forja-divider/forja-divider.d.ts +5 -0
  180. package/dist/types/components/forja-faq/forja-faq.d.ts +7 -0
  181. package/dist/types/components/forja-features/forja-features.d.ts +8 -0
  182. package/dist/types/components/forja-footer/forja-footer.d.ts +11 -0
  183. package/dist/types/components/forja-gallery/forja-gallery.d.ts +8 -0
  184. package/dist/types/components/forja-hero/forja-hero.d.ts +11 -0
  185. package/dist/types/components/forja-legal/forja-legal.d.ts +35 -0
  186. package/dist/types/components/forja-logo-cloud/forja-logo-cloud.d.ts +9 -0
  187. package/dist/types/components/forja-nav/forja-nav.d.ts +23 -0
  188. package/dist/types/components/forja-newsletter/forja-newsletter.d.ts +11 -0
  189. package/dist/types/components/forja-portfolio/forja-portfolio.d.ts +13 -0
  190. package/dist/types/components/forja-pricing/forja-pricing.d.ts +8 -0
  191. package/dist/types/components/forja-projects/forja-projects.d.ts +8 -0
  192. package/dist/types/components/forja-section-renderer/forja-section-renderer.d.ts +13 -0
  193. package/dist/types/components/forja-stats/forja-stats.d.ts +9 -0
  194. package/dist/types/components/forja-tag-cloud/forja-tag-cloud.d.ts +7 -0
  195. package/dist/types/components/forja-team/forja-team.d.ts +10 -0
  196. package/dist/types/components/forja-testimonials/forja-testimonials.d.ts +8 -0
  197. package/dist/types/components/forja-text-block/forja-text-block.d.ts +7 -0
  198. package/dist/types/components/forja-timeline/forja-timeline.d.ts +9 -0
  199. package/dist/types/components/forja-video/forja-video.d.ts +11 -0
  200. package/dist/types/components.d.ts +1010 -0
  201. package/dist/types/index.d.ts +3 -0
  202. package/dist/types/stencil-public-runtime.d.ts +1860 -0
  203. package/dist/types/types.d.ts +235 -0
  204. package/dist/types/utils/a11y.d.ts +11 -0
  205. package/dist/types/utils/a11y.unit.d.ts +1 -0
  206. package/loader/cdn.js +1 -0
  207. package/loader/index.cjs.js +1 -0
  208. package/loader/index.d.ts +24 -0
  209. package/loader/index.es2017.js +1 -0
  210. package/loader/index.js +2 -0
  211. package/package.json +66 -0
@@ -0,0 +1,289 @@
1
+ import { h } from "@stencil/core";
2
+ import { sectionLabel } from "../../utils/a11y";
3
+ import { LEGAL_DOC_TYPE_LABELS } from "../../types";
4
+ /**
5
+ * Renders a legal document (Privacy Policy, Terms of Service, etc.)
6
+ * with toggleable metadata sections. Body content is expected as
7
+ * pre-rendered HTML (markdown → HTML conversion happens upstream).
8
+ */
9
+ export class ForjaLegal {
10
+ constructor() {
11
+ // ── Visibility toggles ─────────────────────────────────
12
+ /** Show the document type badge. Default: true. */
13
+ this.showDocumentType = true;
14
+ /** Show the version number. Default: true. */
15
+ this.showVersion = true;
16
+ /** Show the effective / updated date. Default: true. */
17
+ this.showDates = true;
18
+ /** Show the introductory summary above the body. Default: true. */
19
+ this.showIntro = true;
20
+ }
21
+ formatDate(iso) {
22
+ try {
23
+ return new Date(iso).toLocaleDateString(undefined, {
24
+ year: 'numeric',
25
+ month: 'long',
26
+ day: 'numeric',
27
+ });
28
+ }
29
+ catch (_a) {
30
+ return iso;
31
+ }
32
+ }
33
+ hasMetadata() {
34
+ return ((this.showDocumentType && !!this.documentType) ||
35
+ (this.showVersion && this.version != null) ||
36
+ (this.showDates && !!(this.effectiveDate || this.updatedAt || this.createdAt)));
37
+ }
38
+ render() {
39
+ const typeLabel = this.documentType
40
+ ? LEGAL_DOC_TYPE_LABELS[this.documentType] || this.documentType
41
+ : undefined;
42
+ const displayDate = this.effectiveDate || this.updatedAt || this.createdAt;
43
+ return (h("article", { key: 'cc8f30680c29057c92c9974711069119d486baf0', class: "forja-legal", "aria-label": sectionLabel(this.sectionTitle, 'Legal document') }, h("header", { key: '4722e587aaaa5aafd1d5b87373366e037cb56f9f', class: "forja-legal__header" }, this.sectionTitle && h("h1", { key: '8ddda4f7eb1e06edcf0fb2ef151858f6359ed954', class: "forja-legal__title" }, this.sectionTitle), this.hasMetadata() && (h("div", { key: '5c344b92507b3961ba809c5c5ed2b3d436712a4a', class: "forja-legal__meta" }, this.showDocumentType && typeLabel && (h("span", { key: '18ee032889dc39068301751885f0077777095779', class: "forja-legal__type" }, typeLabel)), this.showVersion && this.version != null && (h("span", { key: '62cddb2b691bd00ac0f81e58a5707d9bce43b91c', class: "forja-legal__version" }, "Version ", this.version)), this.showDates && displayDate && (h("time", { key: 'e631e74a06ef96fb3e6d663516e2a8d7e55332cb', class: "forja-legal__date", dateTime: displayDate }, this.effectiveDate ? 'Effective ' : 'Updated ', this.formatDate(displayDate)))))), this.showIntro && this.intro && (h("div", { key: 'e621eccaf2fa1c0059cc7699de0a80c833c2bb8b', class: "forja-legal__intro", innerHTML: this.intro })), this.body ? (h("div", { class: "forja-legal__body", innerHTML: this.body })) : (h("div", { class: "forja-legal__body" }, h("slot", null)))));
44
+ }
45
+ static get is() { return "forja-legal"; }
46
+ static get properties() {
47
+ return {
48
+ "sectionTitle": {
49
+ "type": "string",
50
+ "mutable": false,
51
+ "complexType": {
52
+ "original": "string",
53
+ "resolved": "string | undefined",
54
+ "references": {}
55
+ },
56
+ "required": false,
57
+ "optional": true,
58
+ "docs": {
59
+ "tags": [],
60
+ "text": "Document title (e.g. \"Privacy Policy\")."
61
+ },
62
+ "getter": false,
63
+ "setter": false,
64
+ "reflect": false,
65
+ "attribute": "section-title"
66
+ },
67
+ "intro": {
68
+ "type": "string",
69
+ "mutable": false,
70
+ "complexType": {
71
+ "original": "string",
72
+ "resolved": "string | undefined",
73
+ "references": {}
74
+ },
75
+ "required": false,
76
+ "optional": true,
77
+ "docs": {
78
+ "tags": [],
79
+ "text": "Introductory summary text. Supports HTML."
80
+ },
81
+ "getter": false,
82
+ "setter": false,
83
+ "reflect": false,
84
+ "attribute": "intro"
85
+ },
86
+ "body": {
87
+ "type": "string",
88
+ "mutable": false,
89
+ "complexType": {
90
+ "original": "string",
91
+ "resolved": "string | undefined",
92
+ "references": {}
93
+ },
94
+ "required": false,
95
+ "optional": true,
96
+ "docs": {
97
+ "tags": [],
98
+ "text": "Full document body. Supports HTML (pre-rendered markdown)."
99
+ },
100
+ "getter": false,
101
+ "setter": false,
102
+ "reflect": false,
103
+ "attribute": "body"
104
+ },
105
+ "documentType": {
106
+ "type": "string",
107
+ "mutable": false,
108
+ "complexType": {
109
+ "original": "LegalDocType",
110
+ "resolved": "\"CookieConsent\" | \"Disclaimer\" | \"Imprint\" | \"PrivacyPolicy\" | \"TermsOfService\" | undefined",
111
+ "references": {
112
+ "LegalDocType": {
113
+ "location": "import",
114
+ "path": "../../types",
115
+ "id": "src/types.ts::LegalDocType",
116
+ "referenceLocation": "LegalDocType"
117
+ }
118
+ }
119
+ },
120
+ "required": false,
121
+ "optional": true,
122
+ "docs": {
123
+ "tags": [],
124
+ "text": "Legal document type identifier. Controls the type badge."
125
+ },
126
+ "getter": false,
127
+ "setter": false,
128
+ "reflect": false,
129
+ "attribute": "document-type"
130
+ },
131
+ "version": {
132
+ "type": "number",
133
+ "mutable": false,
134
+ "complexType": {
135
+ "original": "number",
136
+ "resolved": "number | undefined",
137
+ "references": {}
138
+ },
139
+ "required": false,
140
+ "optional": true,
141
+ "docs": {
142
+ "tags": [],
143
+ "text": "Document version number (e.g. 1, 2, 3)."
144
+ },
145
+ "getter": false,
146
+ "setter": false,
147
+ "reflect": false,
148
+ "attribute": "version"
149
+ },
150
+ "createdAt": {
151
+ "type": "string",
152
+ "mutable": false,
153
+ "complexType": {
154
+ "original": "string",
155
+ "resolved": "string | undefined",
156
+ "references": {}
157
+ },
158
+ "required": false,
159
+ "optional": true,
160
+ "docs": {
161
+ "tags": [],
162
+ "text": "ISO 8601 date string for when the document was created."
163
+ },
164
+ "getter": false,
165
+ "setter": false,
166
+ "reflect": false,
167
+ "attribute": "created-at"
168
+ },
169
+ "updatedAt": {
170
+ "type": "string",
171
+ "mutable": false,
172
+ "complexType": {
173
+ "original": "string",
174
+ "resolved": "string | undefined",
175
+ "references": {}
176
+ },
177
+ "required": false,
178
+ "optional": true,
179
+ "docs": {
180
+ "tags": [],
181
+ "text": "ISO 8601 date string for when the document was last updated."
182
+ },
183
+ "getter": false,
184
+ "setter": false,
185
+ "reflect": false,
186
+ "attribute": "updated-at"
187
+ },
188
+ "effectiveDate": {
189
+ "type": "string",
190
+ "mutable": false,
191
+ "complexType": {
192
+ "original": "string",
193
+ "resolved": "string | undefined",
194
+ "references": {}
195
+ },
196
+ "required": false,
197
+ "optional": true,
198
+ "docs": {
199
+ "tags": [],
200
+ "text": "ISO 8601 date string for when the document becomes effective."
201
+ },
202
+ "getter": false,
203
+ "setter": false,
204
+ "reflect": false,
205
+ "attribute": "effective-date"
206
+ },
207
+ "showDocumentType": {
208
+ "type": "boolean",
209
+ "mutable": false,
210
+ "complexType": {
211
+ "original": "boolean",
212
+ "resolved": "boolean | undefined",
213
+ "references": {}
214
+ },
215
+ "required": false,
216
+ "optional": true,
217
+ "docs": {
218
+ "tags": [],
219
+ "text": "Show the document type badge. Default: true."
220
+ },
221
+ "getter": false,
222
+ "setter": false,
223
+ "reflect": false,
224
+ "attribute": "show-document-type",
225
+ "defaultValue": "true"
226
+ },
227
+ "showVersion": {
228
+ "type": "boolean",
229
+ "mutable": false,
230
+ "complexType": {
231
+ "original": "boolean",
232
+ "resolved": "boolean | undefined",
233
+ "references": {}
234
+ },
235
+ "required": false,
236
+ "optional": true,
237
+ "docs": {
238
+ "tags": [],
239
+ "text": "Show the version number. Default: true."
240
+ },
241
+ "getter": false,
242
+ "setter": false,
243
+ "reflect": false,
244
+ "attribute": "show-version",
245
+ "defaultValue": "true"
246
+ },
247
+ "showDates": {
248
+ "type": "boolean",
249
+ "mutable": false,
250
+ "complexType": {
251
+ "original": "boolean",
252
+ "resolved": "boolean | undefined",
253
+ "references": {}
254
+ },
255
+ "required": false,
256
+ "optional": true,
257
+ "docs": {
258
+ "tags": [],
259
+ "text": "Show the effective / updated date. Default: true."
260
+ },
261
+ "getter": false,
262
+ "setter": false,
263
+ "reflect": false,
264
+ "attribute": "show-dates",
265
+ "defaultValue": "true"
266
+ },
267
+ "showIntro": {
268
+ "type": "boolean",
269
+ "mutable": false,
270
+ "complexType": {
271
+ "original": "boolean",
272
+ "resolved": "boolean | undefined",
273
+ "references": {}
274
+ },
275
+ "required": false,
276
+ "optional": true,
277
+ "docs": {
278
+ "tags": [],
279
+ "text": "Show the introductory summary above the body. Default: true."
280
+ },
281
+ "getter": false,
282
+ "setter": false,
283
+ "reflect": false,
284
+ "attribute": "show-intro",
285
+ "defaultValue": "true"
286
+ }
287
+ };
288
+ }
289
+ }
@@ -0,0 +1,117 @@
1
+ import { h } from "@stencil/core";
2
+ import { sectionLabel } from "../../utils/a11y";
3
+ export class ForjaLogoCloud {
4
+ render() {
5
+ const hasLogos = this.logos && this.logos.length > 0;
6
+ const classes = [
7
+ 'forja-logo-cloud',
8
+ this.grayscale && 'forja-logo-cloud--grayscale',
9
+ ].filter(Boolean).join(' ');
10
+ return (h("section", { key: 'cd65ea26049ceb3de18436c961990573c548b8ae', class: classes, "aria-label": sectionLabel(this.sectionTitle, 'Partners') }, h("slot", { key: '8477f0f53553d808a63b3fe241541b0625248828', name: "before" }), this.sectionTitle && h("h2", { key: '09e073ab7deb7ce27bf0f7e5801b10f60840b732', class: "forja-logo-cloud__title" }, this.sectionTitle), this.text && h("div", { key: 'ab4cd6049231cfda659fc191fd560143027bb3c0', class: "forja-logo-cloud__text", innerHTML: this.text }), hasLogos ? (h("ul", { class: "forja-logo-cloud__grid", role: "list", "data-columns": this.columns }, this.logos.map(logo => (h("li", { class: "forja-logo-cloud__item" }, logo.href ? (h("a", { href: logo.href, class: "forja-logo-cloud__link", target: "_blank", rel: "noopener" }, h("img", { src: logo.imageUrl, alt: logo.alt, class: "forja-logo-cloud__image", loading: "lazy" }))) : (h("img", { src: logo.imageUrl, alt: logo.alt, class: "forja-logo-cloud__image", loading: "lazy" }))))))) : (h("slot", null)), h("slot", { key: 'a56c182cd2090916395563b0c30fe21c929d1353', name: "after" })));
11
+ }
12
+ static get is() { return "forja-logo-cloud"; }
13
+ static get properties() {
14
+ return {
15
+ "sectionTitle": {
16
+ "type": "string",
17
+ "mutable": false,
18
+ "complexType": {
19
+ "original": "string",
20
+ "resolved": "string | undefined",
21
+ "references": {}
22
+ },
23
+ "required": false,
24
+ "optional": true,
25
+ "docs": {
26
+ "tags": [],
27
+ "text": ""
28
+ },
29
+ "getter": false,
30
+ "setter": false,
31
+ "reflect": false,
32
+ "attribute": "section-title"
33
+ },
34
+ "text": {
35
+ "type": "string",
36
+ "mutable": false,
37
+ "complexType": {
38
+ "original": "string",
39
+ "resolved": "string | undefined",
40
+ "references": {}
41
+ },
42
+ "required": false,
43
+ "optional": true,
44
+ "docs": {
45
+ "tags": [],
46
+ "text": ""
47
+ },
48
+ "getter": false,
49
+ "setter": false,
50
+ "reflect": false,
51
+ "attribute": "text"
52
+ },
53
+ "logos": {
54
+ "type": "unknown",
55
+ "mutable": false,
56
+ "complexType": {
57
+ "original": "LogoItem[]",
58
+ "resolved": "LogoItem[] | undefined",
59
+ "references": {
60
+ "LogoItem": {
61
+ "location": "import",
62
+ "path": "../../types",
63
+ "id": "src/types.ts::LogoItem",
64
+ "referenceLocation": "LogoItem"
65
+ }
66
+ }
67
+ },
68
+ "required": false,
69
+ "optional": true,
70
+ "docs": {
71
+ "tags": [],
72
+ "text": ""
73
+ },
74
+ "getter": false,
75
+ "setter": false
76
+ },
77
+ "columns": {
78
+ "type": "number",
79
+ "mutable": false,
80
+ "complexType": {
81
+ "original": "number",
82
+ "resolved": "number | undefined",
83
+ "references": {}
84
+ },
85
+ "required": false,
86
+ "optional": true,
87
+ "docs": {
88
+ "tags": [],
89
+ "text": ""
90
+ },
91
+ "getter": false,
92
+ "setter": false,
93
+ "reflect": false,
94
+ "attribute": "columns"
95
+ },
96
+ "grayscale": {
97
+ "type": "boolean",
98
+ "mutable": false,
99
+ "complexType": {
100
+ "original": "boolean",
101
+ "resolved": "boolean | undefined",
102
+ "references": {}
103
+ },
104
+ "required": false,
105
+ "optional": true,
106
+ "docs": {
107
+ "tags": [],
108
+ "text": ""
109
+ },
110
+ "getter": false,
111
+ "setter": false,
112
+ "reflect": false,
113
+ "attribute": "grayscale"
114
+ }
115
+ };
116
+ }
117
+ }
@@ -0,0 +1,215 @@
1
+ import { h } from "@stencil/core";
2
+ export class ForjaNav {
3
+ constructor() {
4
+ this.homeHref = '/';
5
+ this.showThemeToggle = true;
6
+ this.mobileOpen = false;
7
+ this.localeDropdownOpen = false;
8
+ this.toggleMobile = () => {
9
+ this.mobileOpen = !this.mobileOpen;
10
+ };
11
+ this.toggleLocaleDropdown = () => {
12
+ this.localeDropdownOpen = !this.localeDropdownOpen;
13
+ };
14
+ this.selectLocale = (code) => {
15
+ this.localeDropdownOpen = false;
16
+ this.forjaLocaleChange.emit(code);
17
+ };
18
+ this.handleThemeToggle = () => {
19
+ this.forjaThemeToggle.emit();
20
+ };
21
+ }
22
+ renderNavLink(item) {
23
+ return (h("a", { href: item.href, target: item.openInNewTab ? '_blank' : undefined, rel: item.openInNewTab ? 'noopener noreferrer' : undefined, class: "forja-nav__link" }, item.title));
24
+ }
25
+ renderDesktopItem(item) {
26
+ if (item.children && item.children.length > 0) {
27
+ return (h("div", { class: "forja-nav__dropdown" }, h("a", { href: item.href, target: item.openInNewTab ? '_blank' : undefined, rel: item.openInNewTab ? 'noopener noreferrer' : undefined, class: "forja-nav__link" }, item.title), h("div", { class: "forja-nav__dropdown-menu" }, item.children.map(child => (h("a", { href: child.href, target: child.openInNewTab ? '_blank' : undefined, rel: child.openInNewTab ? 'noopener noreferrer' : undefined, class: "forja-nav__dropdown-item" }, child.title))))));
28
+ }
29
+ return this.renderNavLink(item);
30
+ }
31
+ renderThemeToggle() {
32
+ if (!this.showThemeToggle)
33
+ return null;
34
+ return (h("button", { type: "button", "aria-label": "Toggle dark mode", class: "forja-nav__theme-toggle", onClick: this.handleThemeToggle }, h("svg", { class: "forja-nav__icon-moon", xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M21 12.79A9 9 0 1111.21 3a7 7 0 009.79 9.79z" })), h("svg", { class: "forja-nav__icon-sun", xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("circle", { cx: "12", cy: "12", r: "5" }), h("line", { x1: "12", y1: "1", x2: "12", y2: "3" }), h("line", { x1: "12", y1: "21", x2: "12", y2: "23" }), h("line", { x1: "4.22", y1: "4.22", x2: "5.64", y2: "5.64" }), h("line", { x1: "18.36", y1: "18.36", x2: "19.78", y2: "19.78" }), h("line", { x1: "1", y1: "12", x2: "3", y2: "12" }), h("line", { x1: "21", y1: "12", x2: "23", y2: "12" }), h("line", { x1: "4.22", y1: "19.78", x2: "5.64", y2: "18.36" }), h("line", { x1: "18.36", y1: "5.64", x2: "19.78", y2: "4.22" }))));
35
+ }
36
+ renderLocaleSwitcher() {
37
+ if (!this.locales || this.locales.length <= 1)
38
+ return null;
39
+ return (h("div", { class: "forja-nav__locale-switcher" }, h("button", { type: "button", "aria-label": "Switch language", class: "forja-nav__locale-toggle", onClick: this.toggleLocaleDropdown }, this.currentLocale || 'en'), this.localeDropdownOpen && (h("div", { class: "forja-nav__locale-dropdown" }, this.locales.map(locale => (h("button", { type: "button", class: `forja-nav__locale-option${locale.code === this.currentLocale ? ' forja-nav__locale-option--active' : ''}`, onClick: () => this.selectLocale(locale.code) }, locale.name)))))));
40
+ }
41
+ render() {
42
+ const navItems = this.items || [];
43
+ return (h("nav", { key: 'd53286c5cb8ab3a53d319bfc4f56261f14bbd0e7', class: "forja-nav", "aria-label": "Main navigation" }, h("div", { key: 'f6ddbb63413194a4c9b65f28685c856794da9085', class: "forja-nav__container" }, this.siteName && (h("a", { key: '18bf629d717e2bf64da5705900bde85958a4efcc', href: this.homeHref, class: "forja-nav__brand" }, this.siteName)), h("div", { key: '60df3ad46c3d3d8c69ad94956d40e50713143fe1', class: "forja-nav__desktop" }, navItems.map(item => this.renderDesktopItem(item)), this.renderLocaleSwitcher(), this.renderThemeToggle()), h("button", { key: '5a11fece72449bb05dfab14a49dc0e4cb08b3030', type: "button", "aria-label": "Toggle navigation", class: "forja-nav__hamburger", onClick: this.toggleMobile }, h("svg", { key: '19ca0c78e8a9d2c0566f5722e058fe6bfdfa5e26', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("line", { key: '1a61567b4a0e80d1b924a8ddd82e6565e9c87896', x1: "3", y1: "12", x2: "21", y2: "12" }), h("line", { key: 'd57ae9589e5369942d48698b0842bd3390130747', x1: "3", y1: "6", x2: "21", y2: "6" }), h("line", { key: 'dc58d5f24249e2989ce33f7a366d6926a7408496', x1: "3", y1: "18", x2: "21", y2: "18" })))), this.mobileOpen && (h("div", { key: 'c2ae6b8da7095d8851196fc22b2e10bf7abce3b9', class: "forja-nav__mobile" }, navItems.map(item => (h("a", { href: item.href, target: item.openInNewTab ? '_blank' : undefined, rel: item.openInNewTab ? 'noopener noreferrer' : undefined, class: "forja-nav__mobile-link" }, item.title))), this.renderThemeToggle()))));
44
+ }
45
+ static get is() { return "forja-nav"; }
46
+ static get properties() {
47
+ return {
48
+ "siteName": {
49
+ "type": "string",
50
+ "mutable": false,
51
+ "complexType": {
52
+ "original": "string",
53
+ "resolved": "string | undefined",
54
+ "references": {}
55
+ },
56
+ "required": false,
57
+ "optional": true,
58
+ "docs": {
59
+ "tags": [],
60
+ "text": ""
61
+ },
62
+ "getter": false,
63
+ "setter": false,
64
+ "reflect": false,
65
+ "attribute": "site-name"
66
+ },
67
+ "homeHref": {
68
+ "type": "string",
69
+ "mutable": false,
70
+ "complexType": {
71
+ "original": "string",
72
+ "resolved": "string | undefined",
73
+ "references": {}
74
+ },
75
+ "required": false,
76
+ "optional": true,
77
+ "docs": {
78
+ "tags": [],
79
+ "text": ""
80
+ },
81
+ "getter": false,
82
+ "setter": false,
83
+ "reflect": false,
84
+ "attribute": "home-href",
85
+ "defaultValue": "'/'"
86
+ },
87
+ "items": {
88
+ "type": "unknown",
89
+ "mutable": false,
90
+ "complexType": {
91
+ "original": "NavItem[]",
92
+ "resolved": "NavItem[] | undefined",
93
+ "references": {
94
+ "NavItem": {
95
+ "location": "import",
96
+ "path": "../../types",
97
+ "id": "src/types.ts::NavItem",
98
+ "referenceLocation": "NavItem"
99
+ }
100
+ }
101
+ },
102
+ "required": false,
103
+ "optional": true,
104
+ "docs": {
105
+ "tags": [],
106
+ "text": ""
107
+ },
108
+ "getter": false,
109
+ "setter": false
110
+ },
111
+ "locales": {
112
+ "type": "unknown",
113
+ "mutable": false,
114
+ "complexType": {
115
+ "original": "LocaleOption[]",
116
+ "resolved": "LocaleOption[] | undefined",
117
+ "references": {
118
+ "LocaleOption": {
119
+ "location": "import",
120
+ "path": "../../types",
121
+ "id": "src/types.ts::LocaleOption",
122
+ "referenceLocation": "LocaleOption"
123
+ }
124
+ }
125
+ },
126
+ "required": false,
127
+ "optional": true,
128
+ "docs": {
129
+ "tags": [],
130
+ "text": ""
131
+ },
132
+ "getter": false,
133
+ "setter": false
134
+ },
135
+ "currentLocale": {
136
+ "type": "string",
137
+ "mutable": false,
138
+ "complexType": {
139
+ "original": "string",
140
+ "resolved": "string | undefined",
141
+ "references": {}
142
+ },
143
+ "required": false,
144
+ "optional": true,
145
+ "docs": {
146
+ "tags": [],
147
+ "text": ""
148
+ },
149
+ "getter": false,
150
+ "setter": false,
151
+ "reflect": false,
152
+ "attribute": "current-locale"
153
+ },
154
+ "showThemeToggle": {
155
+ "type": "boolean",
156
+ "mutable": false,
157
+ "complexType": {
158
+ "original": "boolean",
159
+ "resolved": "boolean | undefined",
160
+ "references": {}
161
+ },
162
+ "required": false,
163
+ "optional": true,
164
+ "docs": {
165
+ "tags": [],
166
+ "text": ""
167
+ },
168
+ "getter": false,
169
+ "setter": false,
170
+ "reflect": false,
171
+ "attribute": "show-theme-toggle",
172
+ "defaultValue": "true"
173
+ }
174
+ };
175
+ }
176
+ static get states() {
177
+ return {
178
+ "mobileOpen": {},
179
+ "localeDropdownOpen": {}
180
+ };
181
+ }
182
+ static get events() {
183
+ return [{
184
+ "method": "forjaThemeToggle",
185
+ "name": "forjaThemeToggle",
186
+ "bubbles": true,
187
+ "cancelable": true,
188
+ "composed": true,
189
+ "docs": {
190
+ "tags": [],
191
+ "text": ""
192
+ },
193
+ "complexType": {
194
+ "original": "void",
195
+ "resolved": "void",
196
+ "references": {}
197
+ }
198
+ }, {
199
+ "method": "forjaLocaleChange",
200
+ "name": "forjaLocaleChange",
201
+ "bubbles": true,
202
+ "cancelable": true,
203
+ "composed": true,
204
+ "docs": {
205
+ "tags": [],
206
+ "text": ""
207
+ },
208
+ "complexType": {
209
+ "original": "string",
210
+ "resolved": "string",
211
+ "references": {}
212
+ }
213
+ }];
214
+ }
215
+ }