@holmdigital/components 2.0.0 → 2.1.1

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/dist/index.js CHANGED
@@ -1250,132 +1250,60 @@ Heading.displayName = "Heading";
1250
1250
  // src/AccessibilityStatement/AccessibilityStatement.tsx
1251
1251
  var import_standards = require("@holmdigital/standards");
1252
1252
  var import_jsx_runtime16 = require("react/jsx-runtime");
1253
- var ENFORCEMENT_BODIES = {
1254
- SE: "Myndigheten f\xF6r digital f\xF6rvaltning (Digg)",
1255
- NO: "Digitaliseringsdirektoratet (uutilsynet)",
1256
- DK: "Digitaliseringsstyrelsen",
1257
- FI: "Regionf\xF6rvaltningsverket i S\xF6dra Finland (AVI)",
1258
- NL: "Ministerie van Binnenlandse Zaken en Koninkrijksrelaties (BZK)",
1259
- DE: "BFIT-Bund (\xDCberwachungsstelle des Bundes f\xFCr Barrierefreiheit von Informationstechnik)",
1260
- FR: "Direction interminist\xE9rielle du num\xE9rique (DINUM)",
1261
- ES: "Ministerio para la Transformaci\xF3n Digital y de la Funci\xF3n P\xFAblica",
1262
- IE: "National Disability Authority (NDA)",
1263
- GB: "Equality and Human Rights Commission (EHRC)",
1264
- US: "Department of Justice (Civil Rights Division)",
1265
- CA: "Accessibility Commissioner (Canadian Human Rights Commission)",
1266
- EU: "Europeiska kommissionen (DG CNECT)"
1267
- };
1268
1253
  var TEMPLATES = {
1269
- sv: `Tillg\xE4nglighet f\xF6r {<webbplats>}
1270
-
1271
- {<organisation>} st\xE5r bakom den h\xE4r webbplatsen. Vi vill att s\xE5 m\xE5nga som m\xF6jligt ska kunna anv\xE4nda den. Det h\xE4r dokumentet beskriver hur {<webbplats>} uppfyller lagen om tillg\xE4nglighet till digital offentlig service, eventuella k\xE4nda tillg\xE4nglighetsproblem och hur du kan rapportera brister till oss s\xE5 att vi kan \xE5tg\xE4rda dem.
1272
-
1273
- ## Hur tillg\xE4nglig \xE4r webbplatsen?
1274
-
1275
- {Vi har inga k\xE4nda brister i tillg\xE4ngligheten f\xF6r den h\xE4r webbplatsen./Vi \xE4r medvetna om att delar av webbplatsen inte \xE4r helt tillg\xE4ngliga. Se avsnittet om inneh\xE5ll som inte \xE4r tillg\xE4ngligt nedan f\xF6r mer information./Vi \xE4r medvetna om att delar av webbplatsen inte \xE4r helt tillg\xE4ngliga. Se avsnittet om inneh\xE5ll som inte \xE4r tillg\xE4ngligt nedan f\xF6r mer information.}
1276
-
1277
- ## Vad kan du g\xF6ra om du inte kan anv\xE4nda delar av webbplatsen?
1278
-
1279
- Om du beh\xF6ver inneh\xE5ll fr\xE5n {<webbplats>} som inte \xE4r tillg\xE4ngligt f\xF6r dig, men som \xE4r undantaget fr\xE5n lagens till\xE4mpningsomr\xE5de enligt beskrivning nedan, kan du meddela oss.
1280
-
1281
- [Svarstiden \xE4r normalt {<svarstid>}.]
1282
-
1283
- [Du kan ocks\xE5 kontakta oss p\xE5 f\xF6ljande s\xE4tt:
1284
-
1285
- * skicka e-post till {<e-postadress>}
1286
- * ring {<telefonnummer>}]
1287
-
1288
- ## Rapportera brister i webbplatsens tillg\xE4nglighet
1289
-
1290
- Vi str\xE4var hela tiden efter att f\xF6rb\xE4ttra webbplatsens tillg\xE4nglighet. Om du uppt\xE4cker problem som inte \xE4r beskrivna p\xE5 den h\xE4r sidan, eller om du anser att vi inte uppfyller lagens krav, meddela oss s\xE5 att vi f\xE5r veta att problemet finns.
1291
-
1292
- ## Tillsyn
1293
-
1294
- {<enforcement_body>} har ansvaret f\xF6r tillsyn \xF6ver lagen om tillg\xE4nglighet till digital offentlig service. Du kan anm\xE4la till {<enforcement_body>} om du tycker att v\xE5r digitala service har brister i tillg\xE4nglighet.
1295
-
1296
- Du kan ocks\xE5 anm\xE4la till {<enforcement_body>} om du tycker att v\xE5r bed\xF6mning av vad som \xE4r osk\xE4ligt betungande ska granskas, om du tycker att v\xE5r tillg\xE4nglighetsredog\xF6relse har brister eller om du tycker att vi inte har hanterat din beg\xE4ran om tillg\xE4ngligg\xF6rande korrekt.
1297
-
1298
- ## Teknisk information om webbplatsens tillg\xE4nglighet
1299
-
1300
- {Den h\xE4r webbplatsen \xE4r helt f\xF6renlig med lagen om tillg\xE4nglighet till digital offentlig service./Den h\xE4r webbplatsen \xE4r delvis f\xF6renlig med lagen om tillg\xE4nglighet till digital offentlig service, p\xE5 grund av de brister som beskrivs nedan./Den h\xE4r webbplatsen \xE4r inte f\xF6renlig med lagen om tillg\xE4nglighet till digital offentlig service. Otillg\xE4ngliga delar beskrivs nedan.}
1301
-
1302
- ## Inneh\xE5ll som inte \xE4r tillg\xE4ngligt
1303
-
1304
- Det inneh\xE5ll som beskrivs nedan \xE4r p\xE5 ett eller annat s\xE4tt inte helt tillg\xE4ngligt.
1305
-
1306
- [
1307
- ### Bristande f\xF6renlighet med lagkraven
1308
- {<brister>}
1309
- ]
1310
-
1311
- ## Hur vi testat webbplatsen
1312
-
1313
- {Vi har gjort en sj\xE4lvskattning (intern testning) av {<webbplats>}./{<extern akt\xF6r>} har gjort en oberoende granskning av {<webbplats>}./Vi har uppskattat tillg\xE4ngligheten utan granskning.}
1314
-
1315
- Senaste bed\xF6mningen gjordes den {<bed\xF6mningsdatum>}.
1316
-
1317
- [Granskningsmetod: {<metod>}]
1318
-
1319
- Webbplatsen publicerades den {<publiceringsdatum>}.
1320
-
1321
- Redog\xF6relsen uppdaterades senast den {<uppdateringsdatum>}.`,
1322
- en: `Accessibility of {<website>}
1323
-
1324
- This website is run by {<organisation>}. We want as many people as possible to be able to use it, and this document describes how {<website>} complies with the accessibility regulations, any known accessibility issues, and how you can report problems so that we can fix them.
1325
-
1326
- ## How accessible is the website?
1327
-
1328
- {There are no known accessibility issues with this website./We know some parts of this website aren\u2019t fully accessible. See the section on non-accessible content below for more information./We know some parts of this website aren\u2019t fully accessible. See the section on non-accessible content below for more information.}
1329
-
1330
- ## What to do if you can\u2019t access parts of this website?
1331
-
1332
- If you need content from this website that is not accessible for you, but is not within the scope of the accessibility regulations as described below, please contact us.
1333
-
1334
- [Our normal response time is {<response time>}.]
1335
-
1336
- [You can also contact us in the following ways:
1337
-
1338
- * email {<email address>}
1339
- * call {<telephone number>}]
1340
-
1341
- ## Reporting accessibility problems with this website
1342
-
1343
- We\u2019re always looking to improve the accessibility of this website. If you find any problems that aren\u2019t listed on this page or if we\u2019re not meeting the requirements of the accessibility regulations, contact us and let us know about the problem.
1344
-
1345
- ## Enforcement procedure
1346
-
1347
- The {<enforcement_body>} is responsible for enforcing the web accessibility regulations. If you experience accessibility issues on our website, you can submit a complaint to {<enforcement_body>}.
1348
-
1349
- You can also submit a complaint to {<enforcement_body>} if you think that our assessment of what constitutes a disproportionate burden should be reviewed, if you think that our accessibility statement is inadequate, or it you think that your request for excluded content in an accessible format has not been handled correctly.
1350
-
1351
- ## Technical information about this website\u2019s accessibility
1352
-
1353
- {This website is fully compliant with the accessibility regulations./This website is partially compliant with the accessibility regulations, due to the non-compliances listed below./This website is not compliant with the accessibility regulations. The non-accessible sections are listed below.}
1354
-
1355
- ## Non-accessible content
1356
-
1357
- The content described below is, in one way or another, not fully accessible.
1358
-
1359
- [
1360
- ### Non-compliance with the accessibility regulations
1361
-
1362
- {<issues>}
1363
- ]
1364
-
1365
- ## How we tested this website
1366
-
1367
- {We have performed a self-assessment (internal testing) of {<website>}./{<third party>} has tested {<website>}./We have estimated the accessibility without testing.}
1368
-
1369
- The last assessment was made on {<assessment date>}.
1370
-
1371
- [Assessment method: {<method>}]
1372
-
1373
- The website was published on {<publish date>}.
1374
-
1375
- The statement was last updated on {<update date>}.`
1254
+ sv: {
1255
+ title: "Tillg\xE4nglighet f\xF6r {<webbplats>}",
1256
+ intro: "{<organisation>} st\xE5r bakom den h\xE4r webbplatsen. Vi vill att s\xE5 m\xE5nga som m\xF6jligt ska kunna anv\xE4nda den. Det h\xE4r dokumentet beskriver hur {<webbplats>} uppfyller lagen om tillg\xE4nglighet till digital offentlig service, eventuella k\xE4nda tillg\xE4nglighetsproblem och hur du kan rapportera brister till oss s\xE5 att vi kan \xE5tg\xE4rda dem.",
1257
+ sections: [
1258
+ { id: "how-accessible", title: "Hur tillg\xE4nglig \xE4r webbplatsen?", content: "{Vi har inga k\xE4nda brister i tillg\xE4ngligheten f\xF6r den h\xE4r webbplatsen./Vi \xE4r medvetna om att delar av webbplatsen inte \xE4r helt tillg\xE4ngliga. Se avsnittet om inneh\xE5ll som inte \xE4r tillg\xE4ngligt nedan f\xF6r mer information./Vi \xE4r medvetna om att delar av webbplatsen inte \xE4r helt tillg\xE4ngliga. Se avsnittet om inneh\xE5ll som inte \xE4r tillg\xE4ngligt nedan f\xF6r mer information.}" },
1259
+ { id: "what-to-do", title: "Vad kan du g\xF6ra om du inte kan anv\xE4nda delar av webbplatsen?", content: "Om du beh\xF6ver inneh\xE5ll fr\xE5n {<webbplats>} som inte \xE4r tillg\xE4ngligt f\xF6r dig, men som \xE4r undantaget fr\xE5n lagens till\xE4mpningsomr\xE5de enligt beskrivning nedan, kan du meddela oss.\n\n[Svarstiden \xE4r normalt {<svarstid>}.]\n\n[Du kan ocks\xE5 kontakta oss p\xE5 f\xF6ljande s\xE4tt:\n\n* skicka e-post till {<e-postadress>}\n* ring {<telefonnummer>}]" },
1260
+ { id: "reporting", title: "Rapportera brister i webbplatsens tillg\xE4nglighet", content: "Vi str\xE4var hela tiden efter att f\xF6rb\xE4ttra webbplatsens tillg\xE4nglighet. Om du uppt\xE4cker problem som inte \xE4r beskrivna p\xE5 den h\xE4r sidan, eller om du anser att vi inte uppfyller lagens krav, meddela oss s\xE5 att vi f\xE5r veta att problemet finns." },
1261
+ { id: "enforcement", title: "Tillsyn", content: "{<enforcement_body>} har ansvaret f\xF6r tillsyn \xF6ver lagen om tillg\xE4nglighet till digital offentlig service. Du kan anm\xE4la till {<enforcement_body>} om du tycker att v\xE5r digitala service har brister i tillg\xE4nglighet.\n\nDu kan ocks\xE5 anm\xE4la till {<enforcement_body>} om du tycker att v\xE5r bed\xF6mning av vad som \xE4r osk\xE4ligt betungande ska granskas, om du tycker att v\xE5r tillg\xE4nglighetsredog\xF6relse har brister eller om du tycker att vi inte har hanterat din beg\xE4ran om tillg\xE4ngligg\xF6rande korrekt." },
1262
+ { id: "technical", title: "Teknisk information om webbplatsens tillg\xE4nglighet", content: "{Den h\xE4r webbplatsen \xE4r helt f\xF6renlig med lagen om tillg\xE4nglighet till digital offentlig service./Den h\xE4r webbplatsen \xE4r delvis f\xF6renlig med lagen om tillg\xE4nglighet till digital offentlig service, p\xE5 grund av de brister som beskrivs nedan./Den h\xE4r webbplatsen \xE4r inte f\xF6renlig med lagen om tillg\xE4nglighet till digital offentlig service. Otillg\xE4ngliga delar beskrivs nedan.}" },
1263
+ { id: "non-accessible", title: "Inneh\xE5ll som inte \xE4r tillg\xE4ngligt", content: "Det inneh\xE5ll som beskrivs nedan \xE4r p\xE5 ett eller annat s\xE4tt inte helt tillg\xE4ngligt.\n\n[\n### Bristande f\xF6renlighet med lagkraven\n{<brister>}\n]" },
1264
+ { id: "testing", title: "Hur vi testat webbplatsen", content: "{Vi har gjort en sj\xE4lvskattning (intern testning) av {<webbplats>}./{<extern akt\xF6r>} har gjort en oberoende granskning av {<webbplats>}./Vi har uppskattat tillg\xE4ngligheten utan granskning.}\n\nSenaste bed\xF6mningen gjordes den {<bed\xF6mningsdatum>}.\n\n[Granskningsmetod: {<metod>}]\n\nWebbplatsen publicerades den {<publiceringsdatum>}.\n\nRedog\xF6relsen uppdaterades senast den {<uppdateringsdatum>}." }
1265
+ ]
1266
+ },
1267
+ en: {
1268
+ title: "Accessibility of {<website>}",
1269
+ intro: "This website is run by {<organisation>}. We want as many people as possible to be able to use it, and this document describes how {<website>} complies with the accessibility regulations, any known accessibility issues, and how you can report problems so that we can fix them.",
1270
+ sections: [
1271
+ { id: "how-accessible", title: "How accessible is the website?", content: "{There are no known accessibility issues with this website./We know some parts of this website aren\u2019t fully accessible. See the section on non-accessible content below for more information./We know some parts of this website aren\u2019t fully accessible. See the section on non-accessible content below for more information.}" },
1272
+ { id: "what-to-do", title: "What to do if you can\u2019t access parts of this website?", content: "If you need content from this website that is not accessible for you, but is not within the scope of the accessibility regulations as described below, please contact us.\n\n[Our normal response time is {<response time>}.]\n\n[You can also contact us in the following ways:\n\n* email {<email address>}\n* call {<telephone number>}]" },
1273
+ { id: "reporting", title: "Reporting accessibility problems with this website", content: "We\u2019re always looking to improve the accessibility of this website. If you find any problems that aren\u2019t listed on this page or if we\u2019re not meeting the requirements of the accessibility regulations, contact us and let us know about the problem." },
1274
+ { id: "enforcement", title: "Enforcement procedure", content: "The {<enforcement_body>} is responsible for enforcing the web accessibility regulations. If you experience accessibility issues on our website, you can submit a complaint to {<enforcement_body>}.\n\nYou can also submit a complaint to {<enforcement_body>} if you think that our assessment of what constitutes a disproportionate burden should be reviewed, if you think that our accessibility statement is inadequate, or it you think that your request for excluded content in an accessible format has not been handled correctly." },
1275
+ { id: "technical", title: "Technical information about this website\u2019s accessibility", content: "{This website is fully compliant with the accessibility regulations./This website is partially compliant with the accessibility regulations, due to the non-compliances listed below./This website is not compliant with the accessibility regulations. The non-accessible sections are listed below.}" },
1276
+ { id: "non-accessible", title: "Non-accessible content", content: "The content described below is, in one way or another, not fully accessible.\n\n[\n### Non-compliance with the accessibility regulations\n\n{<issues>}\n]" },
1277
+ { id: "testing", title: "How we tested this website", content: "{We have performed a self-assessment (internal testing) of {<website>}./{<third party>} has tested {<website>}./We have estimated the accessibility without testing.}\n\nThe last assessment was made on {<assessment date>}.\n\n[Assessment method: {<method>}]\n\nThe website was published on {<publish date>}.\n\nThe statement was last updated on {<update date>}." }
1278
+ ]
1279
+ },
1280
+ no: {
1281
+ title: "Tilgjengelighet for {<nettsted>}",
1282
+ intro: "{<organisasjon>} st\xE5r bak dette nettstedet. Vi \xF8nsker at flest mulig skal kunne bruke det. Dette dokumentet beskriver hvordan {<nettsted>} oppfyller lov om universell utforming av IKT-l\xF8sninger, eventuelle kjente tilgjengelighetsproblemer og hvordan du kan rapportere mangler til oss slik at vi kan utbedre dem.",
1283
+ sections: [
1284
+ { id: "how-accessible", title: "Hvor tilgjengelig er nettstedet?", content: "{Vi har ingen kjente mangler i tilgjengeligheten for dette nettstedet./Vi er klar over at deler av nettstedet ikke er fullt ut tilgjengelig. See avsnittet om innhold som ikke er tilgjengelig nedenfor for mer informasjon./Vi er klar over at deler av nettstedet ikke er fullt ut tilgjengelig. See avsnittet om innhold som ikke er tilgjengelig nedenfor for mer informasjon.}" },
1285
+ { id: "what-to-do", title: "Hva kan du gj\xF8re hvis du ikke kan bruke deler av nettstedet?", content: "Hvis du trenger innhold fra {<nettsted>} som ikke er tilgjengelig for deg, men som er unntatt fra lovens anvendelsesomr\xE5de som beskrevet nedenfor, kan du melde fra til oss.\n\n[Svartiden er normalt {<svartid>}.]\n\n[Du kan ogs\xE5 kontakte oss p\xE5 f\xF8lgende m\xE5ter:\n\n* send e-post til {<e-postadresse>}\n* ring {<telefonnummer>}]" },
1286
+ { id: "reporting", title: "Rapporter mangler ved nettstedets tilgjengelighet", content: "Vi jobber kontinuerlig med \xE5 forbedre nettstedets tilgjengelighet. Hvis du oppdager problemer som ikke er beskrevet p\xE5 denne siden, eller hvis du mener at vi ikke oppfyller lovens krav, meld fra til oss slik at vi f\xE5r vite om problemet." },
1287
+ { id: "enforcement", title: "Tillsyn", content: "{<enforcement_body>} har ansvaret for tilsyn med lov om universell utforming av IKT-l\xF8sninger. Du kan klage til {<enforcement_body>} hvis du mener at v\xE5r digitale tjeneste har mangler i tilgjengelighet.\n\nDu kan ogs\xE5 klage til {<enforcement_body>} hvis du mener at v\xE5r vurdering av hva som er uforholdsmessig byrdefullt b\xF8r overproves, hvis du mener at v\xE5r tilgjengelighetserkl\xE6ring har mangler eller hvis du mener at vi ikke har h\xE5ndtert din foresp\xF8rsel om tilgjengeliggj\xF8ring korrekt." },
1288
+ { id: "technical", title: "Teknisk informasjon om nettstedets tilgjengelighet", content: "{Dette nettstedet er helt i samsvar med lov om universell utforming av IKT-l\xF8sninger./Dette nettstedet er delvis i samsvar med lov om universell utforming av IKT-l\xF8sninger, p\xE5 grunn av manglene beskrevet nedenfor./Dette nettstedet er ikke i samsvar med lov om universell utforming av IKT-l\xF8sninger. Utilgjengelige deler er beskrevet nedenfor.}" },
1289
+ { id: "non-accessible", title: "Innhold som ikke er tilgjengelig", content: "Innholdet som er beskrevet nedenfor er p\xE5 en eller annen m\xE5te ikke fullt ut tilgjengelig.\n\n[\n### Manglende samsvar med lovkravene\n{<mangler>}\n]" },
1290
+ { id: "testing", title: "Hvordan vi har testet nettstedet", content: "{Vi har gjort en egenevaluering (intern testing) av {<nettsted>}./{<ekstern aktor>} har gjort en uavhengig revisjon av {<nettsted>}./Vi har ansl\xE5tt tilgjengeligheten uten testing.}\n\nSiste vurdering ble gjort den {<vurderingsdato>}.\n\n[Vurderingsmetode: {<metode>}]\n\nNettstedet ble publisert den {<publiseringsdato>}.\n\nErkl\xE6ringen ble sist oppdatert den {<oppdateringsdato>}." }
1291
+ ]
1292
+ }
1376
1293
  };
1377
1294
  var formatDiggDate = (date, locale) => {
1378
- return date.toLocaleDateString(locale === "sv" ? "sv-SE" : "en-US", {
1295
+ const localeMap = {
1296
+ sv: "sv-SE",
1297
+ no: "no-NO",
1298
+ nb: "no-NO",
1299
+ da: "da-DK",
1300
+ fi: "fi-FI",
1301
+ nl: "nl-NL",
1302
+ de: "de-DE",
1303
+ fr: "fr-FR",
1304
+ es: "es-ES"
1305
+ };
1306
+ return date.toLocaleDateString(localeMap[locale] || "en-US", {
1379
1307
  year: "numeric",
1380
1308
  month: "long",
1381
1309
  day: "numeric"
@@ -1402,10 +1330,11 @@ var AccessibilityStatement = ({
1402
1330
  badgeUrl,
1403
1331
  publishDate
1404
1332
  }) => {
1405
- const lang = locale === "sv" ? "sv" : "en";
1333
+ const supportedLocales = { sv: "sv", no: "no", nb: "no" };
1334
+ const lang = supportedLocales[locale] ?? "en";
1406
1335
  const template = TEMPLATES[lang] || TEMPLATES.en;
1407
1336
  const d = (date) => formatDiggDate(date, locale);
1408
- const enforcementBody = ENFORCEMENT_BODIES[country] || ENFORCEMENT_BODIES.EU;
1337
+ const enforcementBody = import_standards.ENFORCEMENT_BODIES[country] || import_standards.ENFORCEMENT_BODIES.EU;
1409
1338
  const replacements = {
1410
1339
  "{<webbplats>}": organizationName,
1411
1340
  // Or websiteUrl, but usually org/site name
@@ -1432,12 +1361,19 @@ var AccessibilityStatement = ({
1432
1361
  };
1433
1362
  let issuesContent = "";
1434
1363
  if (nonComplianceItems.length > 0) {
1435
- issuesContent = "\n\n" + nonComplianceItems.map((item) => `* ${item}`).join("\n");
1364
+ issuesContent = nonComplianceItems.map((item) => `* ${item}`).join("\n");
1436
1365
  } else {
1437
- issuesContent = lang === "sv" ? "Inga k\xE4nda brister." : "No known issues.";
1366
+ issuesContent = lang === "sv" ? "Inga k\xE4nda brister." : lang === "no" ? "Ingen kjente mangler." : "No known issues.";
1438
1367
  }
1439
1368
  replacements["{<brister>}"] = issuesContent;
1440
1369
  replacements["{<issues>}"] = issuesContent;
1370
+ replacements["{<mangler>}"] = issuesContent;
1371
+ replacements["{<nettsted>}"] = organizationName;
1372
+ replacements["{<organisasjon>}"] = organizationName;
1373
+ replacements["{<svartid>}"] = responseTime || "";
1374
+ replacements["{<vurderingsdato>}"] = assessmentDate ? d(assessmentDate) : d(lastReviewDate);
1375
+ replacements["{<publiseringsdatum>}"] = publishDate ? d(publishDate) : "2024-01-01";
1376
+ replacements["{<ekstern aktor>}"] = generatorTool?.name || "HolmDigital Engine";
1441
1377
  const renderTemplate = (tmpl) => {
1442
1378
  let text = tmpl;
1443
1379
  text = text.replace(/\[([\s\S]*?)\]/g, (_match, content) => {
@@ -1465,57 +1401,63 @@ var AccessibilityStatement = ({
1465
1401
  }
1466
1402
  return _match;
1467
1403
  });
1468
- text = text.replace(/\r\n/g, "\n");
1469
- const sections = text.split("\n\n");
1470
- const sectionNodes = sections.map((block, i) => {
1471
- const trimmed = block.trim();
1404
+ return text;
1405
+ };
1406
+ const renderSections = (sections) => {
1407
+ return sections.map((section, i) => {
1408
+ const content = renderTemplate(section.content);
1409
+ const trimmed = content.trim();
1472
1410
  if (!trimmed) return null;
1473
1411
  let IconNode = null;
1474
- if (trimmed.includes("Hur tillg\xE4nglig") || trimmed.includes("How accessible")) {
1412
+ if (section.id === "how-accessible" || trimmed.includes("Hur tillg\xE4nglig") || trimmed.includes("How accessible") || trimmed.includes("Hvor tilgjengelig") || trimmed.includes("Hvor tilg\xE6ngeligt") || trimmed.includes("Kuinka saavutettava") || trimmed.includes("Hoe toegankelijk") || trimmed.includes("Stand der Vereinbarkeit") || trimmed.includes("\xC9tat de conformit\xE9") || trimmed.includes("Situaci\xF3n de cumplimiento")) {
1475
1413
  IconNode = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(IconWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(EyeIcon, {}) });
1476
- } else if (trimmed.includes("Vad kan du g\xF6ra") || trimmed.includes("What to do")) {
1414
+ } else if (section.id === "what-to-do" || trimmed.includes("Vad kan du g\xF6ra") || trimmed.includes("What to do") || trimmed.includes("Hva kan du gj\xF8re") || trimmed.includes("Hvad kan du g\xF8re") || trimmed.includes("Mit\xE4 voit tehd\xE4") || trimmed.includes("Wat kunt u doen") || trimmed.includes("Nicht barrierefreie Inhalte") || trimmed.includes("Contenus non accessibles") || trimmed.includes("Contenido no accesible")) {
1477
1415
  IconNode = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(IconWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(HelpCircleIcon, {}) });
1478
- } else if (trimmed.includes("Rapportera brister") || trimmed.includes("Reporting accessibility")) {
1416
+ } else if (section.id === "reporting" || trimmed.includes("Rapporter brister") || trimmed.includes("Reporting accessibility") || trimmed.includes("Rapporter mangler") || trimmed.includes("Anna palautetta") || trimmed.includes("Meld toegankelijkheidsproblemen") || trimmed.includes("Feedback und Kontaktangaben") || trimmed.includes("Retour d'information") || trimmed.includes("Mecanismo de comunicaci\xF3n")) {
1479
1417
  IconNode = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(IconWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AlertOctagonIcon, {}) });
1480
- } else if (trimmed.includes("Tillsyn") || trimmed.includes("Enforcement procedure")) {
1418
+ } else if (section.id === "enforcement" || trimmed.includes("Tillsyn") || trimmed.includes("Enforcement procedure") || trimmed.includes("Tilsyn") || trimmed.includes("H\xE5ndh\xE6velsesprocedure") || trimmed.includes("T\xE4yt\xE4nt\xF6\xF6npanomenettely") || trimmed.includes("Handhavingsprocedure") || trimmed.includes("Durchsetzungsverfahren") || trimmed.includes("Voies de recours") || trimmed.includes("Procedimiento de aplicaci\xF3n")) {
1481
1419
  IconNode = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(IconWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GavelIcon, {}) });
1482
- } else if (trimmed.includes("Teknisk information") || trimmed.includes("Technical information")) {
1420
+ } else if (section.id === "technical" || trimmed.includes("Teknisk information") || trimmed.includes("Technical information")) {
1483
1421
  IconNode = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(IconWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CpuIcon, {}) });
1484
- } else if (trimmed.includes("Hur vi testat") || trimmed.includes("How we tested")) {
1422
+ } else if (section.id === "testing" || trimmed.includes("Hur vi testat") || trimmed.includes("How we tested") || trimmed.includes("Hvordan vi har testet") || trimmed.includes("Kuinka olemme testanneet") || trimmed.includes("Hoe wij de website hebben getest") || trimmed.includes("Erstellung dieser Erkl\xE4rung") || trimmed.includes("\xC9tablissement de cette d\xE9claration") || trimmed.includes("Preparaci\xF3n de la presente declaraci\xF3n")) {
1485
1423
  IconNode = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(IconWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CheckCircleIcon, {}) });
1486
1424
  }
1487
- if (trimmed.startsWith("## ")) {
1488
- const title = trimmed.replace("## ", "");
1489
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("h2", { style: styles.sectionTitle, children: [
1490
- IconNode,
1491
- title
1492
- ] }, i);
1493
- }
1494
- if (trimmed.startsWith("### ")) {
1495
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h3", { style: { ...styles.sectionTitle, fontSize: "1.4rem" }, children: trimmed.replace("### ", "") }, i);
1496
- }
1497
- if (trimmed.includes("* ") || trimmed.includes("\u2022 ")) {
1498
- const lines = trimmed.split("\n");
1499
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { style: styles.list, children: lines.map((line, li) => {
1500
- const cleanLine = line.trim().replace(/^[*-•]\s*/, "");
1501
- if (!cleanLine) return null;
1502
- const isListItem = line.trim().startsWith("*") || line.trim().startsWith("\u2022") || line.trim().startsWith("-");
1503
- if (!isListItem) {
1504
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { style: styles.paragraph, children: line }, `p-${li}`);
1505
- }
1506
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("li", { style: styles.listItem, children: [
1507
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: styles.listBullet }),
1508
- cleanLine
1509
- ] }, li);
1510
- }) }, i);
1511
- }
1512
- const isCardSection = trimmed.includes("e-post") || trimmed.includes("email") || trimmed.includes("ring ") || trimmed.includes("call ");
1513
- if (isCardSection) {
1514
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: styles.card, children: trimmed }, i);
1515
- }
1516
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { style: styles.paragraph, children: trimmed }, i);
1425
+ const SectionHeader = /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("h2", { style: styles.sectionTitle, children: [
1426
+ IconNode,
1427
+ section.title
1428
+ ] }, `h2-${i}`);
1429
+ const blocks = trimmed.split("\n\n").map((block, bi) => {
1430
+ const blockTrimmed = block.trim();
1431
+ if (!blockTrimmed) return null;
1432
+ if (blockTrimmed.startsWith("## ")) {
1433
+ const title = blockTrimmed.replace("## ", "");
1434
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h2", { style: styles.sectionTitle, children: title }, `${i}-${bi}`);
1435
+ }
1436
+ if (blockTrimmed.startsWith("### ")) {
1437
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h3", { style: { ...styles.sectionTitle, fontSize: "1.4rem" }, children: blockTrimmed.replace("### ", "") }, `${i}-${bi}`);
1438
+ }
1439
+ if (blockTrimmed.includes("* ") || blockTrimmed.includes("\u2022 ")) {
1440
+ const lines = blockTrimmed.split("\n");
1441
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { style: styles.list, children: lines.map((line, li) => {
1442
+ const cleanLine = line.trim().replace(/^[*-•]\s*/, "");
1443
+ if (!cleanLine) return null;
1444
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("li", { style: styles.listItem, children: [
1445
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: styles.listBullet }),
1446
+ cleanLine
1447
+ ] }, li);
1448
+ }) }, `${i}-${bi}`);
1449
+ }
1450
+ const isCardSection = blockTrimmed.includes("e-post") || blockTrimmed.includes("email") || blockTrimmed.includes("ring ") || blockTrimmed.includes("call ");
1451
+ if (isCardSection) {
1452
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: styles.card, children: blockTrimmed }, `${i}-${bi}`);
1453
+ }
1454
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { style: styles.paragraph, children: blockTrimmed }, `${i}-${bi}`);
1455
+ });
1456
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("section", { style: styles.section, children: [
1457
+ SectionHeader,
1458
+ blocks
1459
+ ] }, i);
1517
1460
  });
1518
- return sectionNodes;
1519
1461
  };
1520
1462
  const statementTools = (0, import_standards.getStatementToolsByCountry)(country);
1521
1463
  const usedTool = generatorTool || statementTools.find((t) => t.recommended) || statementTools[0];
@@ -1531,152 +1473,168 @@ var AccessibilityStatement = ({
1531
1473
  display: "flex",
1532
1474
  justifyContent: "space-between",
1533
1475
  alignItems: "center",
1534
- marginBottom: "4.5rem",
1535
- paddingBottom: "2rem",
1536
- borderBottom: "1px solid #f1f5f9"
1476
+ marginBottom: "5rem",
1477
+ paddingBottom: "2.5rem",
1478
+ borderBottom: "1px solid #f8fafc"
1537
1479
  },
1538
1480
  logoContainer: {
1539
1481
  display: "flex",
1540
1482
  alignItems: "center",
1541
1483
  textDecoration: "none",
1542
- marginRight: "1.5rem"
1484
+ marginRight: "2rem"
1543
1485
  },
1544
1486
  divider: {
1545
- height: "2.5rem",
1487
+ height: "2rem",
1546
1488
  width: "1px",
1547
1489
  backgroundColor: "#e2e8f0",
1548
- marginRight: "1.5rem",
1490
+ marginRight: "2rem",
1549
1491
  display: "block"
1550
1492
  },
1551
1493
  websiteContainer: {
1552
1494
  display: "flex",
1553
1495
  alignItems: "center",
1554
- gap: "0.75rem",
1496
+ gap: "0.625rem",
1555
1497
  textDecoration: "none",
1556
- color: "#475569",
1557
- // Slate 600
1558
- fontWeight: 600,
1559
- fontSize: "1rem",
1498
+ color: "#64748b",
1499
+ // Slate 500
1500
+ fontWeight: 500,
1501
+ fontSize: "0.925rem",
1560
1502
  padding: "0.5rem 1rem",
1561
1503
  backgroundColor: "#f8fafc",
1562
- borderRadius: "0.75rem",
1504
+ borderRadius: "100px",
1563
1505
  border: "1px solid #f1f5f9"
1564
1506
  },
1565
1507
  container: {
1566
- maxWidth: "900px",
1567
- margin: "2rem auto",
1568
- padding: "4.5rem",
1508
+ maxWidth: "1000px",
1509
+ margin: "4rem auto",
1510
+ padding: "6rem",
1569
1511
  backgroundColor: "#ffffff",
1570
- borderRadius: "24px",
1571
- boxShadow: "0 25px 50px -12px rgb(0 0 0 / 0.05)",
1512
+ borderRadius: "32px",
1513
+ boxShadow: "0 40px 100px -20px rgba(15, 23, 42, 0.08)",
1572
1514
  border: "1px solid #f1f5f9",
1573
1515
  fontFamily: '"Inter", system-ui, -apple-system, sans-serif',
1574
1516
  color: "#1e293b",
1575
1517
  // Slate 800
1576
- lineHeight: 1.75,
1577
- fontSize: "1.125rem"
1518
+ lineHeight: 1.8,
1519
+ fontSize: "1.125rem",
1520
+ position: "relative",
1521
+ overflow: "hidden"
1578
1522
  },
1579
1523
  mainHeading: {
1580
- fontSize: "3rem",
1581
- fontWeight: 900,
1582
- color: "#082f49",
1583
- // Primary 950
1524
+ fontSize: "3.5rem",
1525
+ fontWeight: 800,
1526
+ color: "#0f172a",
1527
+ // Slate 900
1584
1528
  marginTop: "0",
1585
- marginBottom: "1rem",
1586
- letterSpacing: "-0.04em",
1587
- lineHeight: 1.1
1529
+ marginBottom: "1.5rem",
1530
+ letterSpacing: "-0.05em",
1531
+ lineHeight: 1.05
1588
1532
  },
1589
1533
  metaData: {
1590
1534
  color: "#64748b",
1591
1535
  // Slate 500
1592
1536
  fontSize: "0.925rem",
1593
- marginBottom: "4rem",
1537
+ marginBottom: "5rem",
1594
1538
  fontWeight: 500,
1595
1539
  display: "flex",
1596
- gap: "1.5rem"
1540
+ gap: "2rem",
1541
+ padding: "1.25rem 2rem",
1542
+ backgroundColor: "#f8fafc",
1543
+ borderRadius: "1rem",
1544
+ border: "1px solid #f1f5f9",
1545
+ width: "fit-content"
1597
1546
  },
1598
1547
  section: {
1599
- marginBottom: "4.5rem"
1548
+ marginBottom: "6rem"
1600
1549
  },
1601
1550
  sectionTitle: {
1602
- fontSize: "1.75rem",
1603
- fontWeight: 800,
1604
- color: "#082f49",
1605
- // Primary 950
1606
- marginBottom: "1.5rem",
1551
+ fontSize: "1.875rem",
1552
+ fontWeight: 700,
1553
+ color: "#0f172a",
1554
+ marginBottom: "2rem",
1607
1555
  marginTop: 0,
1608
- letterSpacing: "-0.025em",
1556
+ letterSpacing: "-0.03em",
1609
1557
  display: "flex",
1610
1558
  alignItems: "center",
1611
- gap: "0.75rem"
1559
+ gap: "1rem"
1612
1560
  },
1613
1561
  card: {
1614
1562
  padding: "2.5rem",
1615
- backgroundColor: "#f0f9ff",
1616
- // Primary 50
1563
+ backgroundColor: "#ffffff",
1617
1564
  borderRadius: "1.5rem",
1618
- border: "1px solid #e0f2fe",
1619
- marginBottom: "2.5rem"
1565
+ border: "1px solid #f1f5f9",
1566
+ boxShadow: "0 4px 6px -1px rgba(0, 0, 0, 0.02)",
1567
+ marginBottom: "2.5rem",
1568
+ display: "flex",
1569
+ flexDirection: "column",
1570
+ gap: "1rem"
1620
1571
  },
1621
1572
  paragraph: {
1622
- marginBottom: "1.5rem",
1623
- maxWidth: "65ch",
1624
- whiteSpace: "pre-line"
1573
+ marginBottom: "1.75rem",
1574
+ maxWidth: "70ch",
1575
+ whiteSpace: "pre-line",
1576
+ color: "#475569"
1577
+ // Slate 600
1625
1578
  },
1626
1579
  link: {
1627
- color: "#0284c7",
1628
- // Primary 600
1580
+ color: "#0ea5e9",
1581
+ // Primary 500
1629
1582
  textDecoration: "none",
1630
1583
  fontWeight: 600,
1631
- borderBottom: "2px solid #e0f2fe",
1632
- transition: "border-color 0.2s",
1584
+ borderBottom: "1.5px solid rgba(14, 165, 233, 0.2)",
1585
+ transition: "all 0.2s",
1633
1586
  cursor: "pointer"
1634
1587
  },
1635
1588
  list: {
1636
1589
  listStyleType: "none",
1637
1590
  paddingLeft: 0,
1638
- marginBottom: "1.5rem"
1591
+ marginBottom: "2rem",
1592
+ display: "flex",
1593
+ flexDirection: "column",
1594
+ gap: "1rem"
1639
1595
  },
1640
1596
  listItem: {
1641
- marginBottom: "0.75rem",
1642
- paddingLeft: "1.75rem",
1597
+ padding: "1.25rem 1.75rem 1.25rem 3.5rem",
1643
1598
  position: "relative",
1644
- display: "block"
1599
+ backgroundColor: "#f8fafc",
1600
+ borderRadius: "1rem",
1601
+ border: "1px solid #f1f5f9",
1602
+ fontSize: "1rem",
1603
+ color: "#334155"
1645
1604
  },
1646
1605
  listBullet: {
1647
1606
  position: "absolute",
1648
- left: 0,
1649
- top: "0.6em",
1650
- width: "0.5rem",
1651
- height: "0.5rem",
1652
- borderRadius: "50%",
1653
- backgroundColor: "#0ea5e9"
1654
- // Primary 500
1607
+ left: "1.5rem",
1608
+ top: "50%",
1609
+ transform: "translateY(-50%)",
1610
+ width: "0.75rem",
1611
+ height: "0.75rem",
1612
+ borderRadius: "4px",
1613
+ backgroundColor: "#0ea5e9",
1614
+ opacity: 0.8
1655
1615
  },
1656
1616
  statusBadge: {
1657
1617
  display: "inline-flex",
1658
1618
  alignItems: "center",
1659
- padding: "0.375rem 1rem",
1660
- borderRadius: "9999px",
1619
+ padding: "0.5rem 1.25rem",
1620
+ borderRadius: "100px",
1661
1621
  fontSize: "0.875rem",
1662
- fontWeight: 700,
1663
- backgroundColor: complianceLevel === "full" ? "#dcfce7" : complianceLevel === "partial" ? "#fef9c3" : "#fee2e2",
1664
- color: complianceLevel === "full" ? "#166534" : complianceLevel === "partial" ? "#854d0e" : "#991b1b",
1665
- boxShadow: `0 4px 6px -1px ${complianceLevel === "full" ? "rgba(34, 197, 94, 0.1)" : complianceLevel === "partial" ? "rgba(234, 179, 8, 0.1)" : "rgba(239, 68, 68, 0.1)"}`,
1666
- border: `1px solid ${complianceLevel === "full" ? "#bbf7d0" : complianceLevel === "partial" ? "#fef08a" : "#fecaca"}`,
1667
- marginLeft: "0.5rem"
1622
+ fontWeight: 600,
1623
+ backgroundColor: complianceLevel === "full" ? "#f0fdf4" : complianceLevel === "partial" ? "#fffbeb" : "#fef2f2",
1624
+ color: complianceLevel === "full" ? "#166534" : complianceLevel === "partial" ? "#92400e" : "#991b1b",
1625
+ border: `1px solid ${complianceLevel === "full" ? "#dcfce7" : complianceLevel === "partial" ? "#fef3c7" : "#fee2e2"}`,
1626
+ letterSpacing: "0.01em"
1668
1627
  },
1669
1628
  iconWrapper: {
1670
1629
  display: "flex",
1671
1630
  alignItems: "center",
1672
1631
  justifyContent: "center",
1673
- width: "2.5rem",
1674
- height: "2.5rem",
1675
- borderRadius: "0.75rem",
1676
- backgroundColor: "#ffffff",
1677
- boxShadow: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
1632
+ width: "2.75rem",
1633
+ height: "2.75rem",
1634
+ borderRadius: "12px",
1635
+ backgroundColor: "#f8fafc",
1678
1636
  border: "1px solid #f1f5f9",
1679
- color: "#0284c7"
1637
+ color: "#0ea5e9"
1680
1638
  }
1681
1639
  };
1682
1640
  const Logo = () => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
@@ -1750,16 +1708,26 @@ var AccessibilityStatement = ({
1750
1708
  ] }),
1751
1709
  badgeUrl && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("img", { src: badgeUrl, alt: "Accessibility Badge", style: { height: "1.5rem", width: "auto" } }) })
1752
1710
  ] }),
1753
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "statement-content", children: (() => {
1754
- const parts = template.split("\n");
1755
- const titleRaw = parts[0];
1756
- const bodyRaw = parts.slice(1).join("\n");
1757
- let title = titleRaw.replace("{<webbplats>}", organizationName).replace("{<website>}", organizationName);
1758
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
1759
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h1", { id: "a11y-statement-title", style: styles.mainHeading, children: title }),
1760
- renderTemplate(bodyRaw)
1761
- ] });
1762
- })() }),
1711
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "statement-content", children: [
1712
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("header", { style: { marginBottom: "4rem" }, children: [
1713
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h1", { id: "a11y-statement-title", style: styles.mainHeading, children: renderTemplate(template.title) }),
1714
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: styles.metaData, children: [
1715
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { children: [
1716
+ lang === "sv" ? "Status:" : "Status:",
1717
+ " ",
1718
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { style: styles.statusBadge, children: complianceLevel === "full" ? lang === "sv" ? "Fullt f\xF6renlig" : "Fully compliant" : complianceLevel === "partial" ? lang === "sv" ? "Delvis f\xF6renlig" : "Partially compliant" : lang === "sv" ? "Ej f\xF6renlig" : "Non-compliant" })
1719
+ ] }),
1720
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { style: { color: "#e2e8f0" }, children: "|" }),
1721
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { children: [
1722
+ lang === "sv" ? "Uppdaterad:" : "Updated:",
1723
+ " ",
1724
+ d(lastReviewDate)
1725
+ ] })
1726
+ ] })
1727
+ ] }),
1728
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { style: { ...styles.paragraph, fontSize: "1.25rem", color: "#1e293b", fontWeight: 500, marginBottom: "4rem" }, children: renderTemplate(template.intro) }),
1729
+ renderSections(template.sections)
1730
+ ] }),
1763
1731
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("footer", { style: { marginTop: "3rem", borderTop: "1px solid #e2e8f0", paddingTop: "1.5rem", fontSize: "0.875rem", color: "#64748b" }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("p", { children: [
1764
1732
  lang === "sv" ? "Genererad med hj\xE4lp av" : "Generated using",
1765
1733
  " ",