@holmdigital/components 2.0.0 → 2.1.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.
- package/README.md +2 -4
- package/dist/AccessibilityStatement/AccessibilityStatement.js +109 -177
- package/dist/AccessibilityStatement/AccessibilityStatement.mjs +1 -1
- package/dist/chunk-OFTOD72G.mjs +462 -0
- package/dist/index.js +109 -177
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-FKSBWEX3.mjs +0 -529
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:
|
|
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
|
-
|
|
1274
|
-
|
|
1275
|
-
{
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
{
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
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
|
-
|
|
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"
|
|
@@ -1405,7 +1333,7 @@ var AccessibilityStatement = ({
|
|
|
1405
1333
|
const lang = locale === "sv" ? "sv" : "en";
|
|
1406
1334
|
const template = TEMPLATES[lang] || TEMPLATES.en;
|
|
1407
1335
|
const d = (date) => formatDiggDate(date, locale);
|
|
1408
|
-
const enforcementBody = ENFORCEMENT_BODIES[country] || ENFORCEMENT_BODIES.EU;
|
|
1336
|
+
const enforcementBody = import_standards.ENFORCEMENT_BODIES[country] || import_standards.ENFORCEMENT_BODIES.EU;
|
|
1409
1337
|
const replacements = {
|
|
1410
1338
|
"{<webbplats>}": organizationName,
|
|
1411
1339
|
// Or websiteUrl, but usually org/site name
|
|
@@ -1432,12 +1360,19 @@ var AccessibilityStatement = ({
|
|
|
1432
1360
|
};
|
|
1433
1361
|
let issuesContent = "";
|
|
1434
1362
|
if (nonComplianceItems.length > 0) {
|
|
1435
|
-
issuesContent =
|
|
1363
|
+
issuesContent = nonComplianceItems.map((item) => `* ${item}`).join("\n");
|
|
1436
1364
|
} else {
|
|
1437
|
-
issuesContent = lang === "sv" ? "Inga k\xE4nda brister." : "No known issues.";
|
|
1365
|
+
issuesContent = lang === "sv" ? "Inga k\xE4nda brister." : lang === "no" ? "Ingen kjente mangler." : "No known issues.";
|
|
1438
1366
|
}
|
|
1439
1367
|
replacements["{<brister>}"] = issuesContent;
|
|
1440
1368
|
replacements["{<issues>}"] = issuesContent;
|
|
1369
|
+
replacements["{<mangler>}"] = issuesContent;
|
|
1370
|
+
replacements["{<nettsted>}"] = organizationName;
|
|
1371
|
+
replacements["{<organisasjon>}"] = organizationName;
|
|
1372
|
+
replacements["{<svartid>}"] = responseTime || "";
|
|
1373
|
+
replacements["{<vurderingsdato>}"] = assessmentDate ? d(assessmentDate) : d(lastReviewDate);
|
|
1374
|
+
replacements["{<publiseringsdatum>}"] = publishDate ? d(publishDate) : "2024-01-01";
|
|
1375
|
+
replacements["{<ekstern aktor>}"] = generatorTool?.name || "HolmDigital Engine";
|
|
1441
1376
|
const renderTemplate = (tmpl) => {
|
|
1442
1377
|
let text = tmpl;
|
|
1443
1378
|
text = text.replace(/\[([\s\S]*?)\]/g, (_match, content) => {
|
|
@@ -1465,57 +1400,59 @@ var AccessibilityStatement = ({
|
|
|
1465
1400
|
}
|
|
1466
1401
|
return _match;
|
|
1467
1402
|
});
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1403
|
+
return text;
|
|
1404
|
+
};
|
|
1405
|
+
const renderSections = (sections) => {
|
|
1406
|
+
return sections.map((section, i) => {
|
|
1407
|
+
const content = renderTemplate(section.content);
|
|
1408
|
+
const trimmed = content.trim();
|
|
1472
1409
|
if (!trimmed) return null;
|
|
1473
1410
|
let IconNode = null;
|
|
1474
|
-
if (trimmed.includes("Hur tillg\xE4nglig") || trimmed.includes("How accessible")) {
|
|
1411
|
+
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
1412
|
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")) {
|
|
1413
|
+
} 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
1414
|
IconNode = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(IconWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(HelpCircleIcon, {}) });
|
|
1478
|
-
} else if (trimmed.includes("
|
|
1415
|
+
} 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
1416
|
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")) {
|
|
1417
|
+
} 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
1418
|
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")) {
|
|
1419
|
+
} else if (section.id === "technical" || trimmed.includes("Teknisk information") || trimmed.includes("Technical information")) {
|
|
1483
1420
|
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")) {
|
|
1421
|
+
} 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
1422
|
IconNode = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(IconWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CheckCircleIcon, {}) });
|
|
1486
1423
|
}
|
|
1487
|
-
|
|
1488
|
-
const
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
title
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
}
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1424
|
+
const blocks = trimmed.split("\n\n").map((block, bi) => {
|
|
1425
|
+
const blockTrimmed = block.trim();
|
|
1426
|
+
if (!blockTrimmed) return null;
|
|
1427
|
+
if (blockTrimmed.startsWith("## ")) {
|
|
1428
|
+
const title = blockTrimmed.replace("## ", "");
|
|
1429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("h2", { style: styles.sectionTitle, children: [
|
|
1430
|
+
IconNode,
|
|
1431
|
+
title
|
|
1432
|
+
] }, `${i}-${bi}`);
|
|
1433
|
+
}
|
|
1434
|
+
if (blockTrimmed.startsWith("### ")) {
|
|
1435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h3", { style: { ...styles.sectionTitle, fontSize: "1.4rem" }, children: blockTrimmed.replace("### ", "") }, `${i}-${bi}`);
|
|
1436
|
+
}
|
|
1437
|
+
if (blockTrimmed.includes("* ") || blockTrimmed.includes("\u2022 ")) {
|
|
1438
|
+
const lines = blockTrimmed.split("\n");
|
|
1439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { style: styles.list, children: lines.map((line, li) => {
|
|
1440
|
+
const cleanLine = line.trim().replace(/^[*-•]\s*/, "");
|
|
1441
|
+
if (!cleanLine) return null;
|
|
1442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("li", { style: styles.listItem, children: [
|
|
1443
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: styles.listBullet }),
|
|
1444
|
+
cleanLine
|
|
1445
|
+
] }, li);
|
|
1446
|
+
}) }, `${i}-${bi}`);
|
|
1447
|
+
}
|
|
1448
|
+
const isCardSection = blockTrimmed.includes("e-post") || blockTrimmed.includes("email") || blockTrimmed.includes("ring ") || blockTrimmed.includes("call ");
|
|
1449
|
+
if (isCardSection) {
|
|
1450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: styles.card, children: blockTrimmed }, `${i}-${bi}`);
|
|
1451
|
+
}
|
|
1452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { style: styles.paragraph, children: blockTrimmed }, `${i}-${bi}`);
|
|
1453
|
+
});
|
|
1454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("section", { style: styles.section, children: blocks }, i);
|
|
1517
1455
|
});
|
|
1518
|
-
return sectionNodes;
|
|
1519
1456
|
};
|
|
1520
1457
|
const statementTools = (0, import_standards.getStatementToolsByCountry)(country);
|
|
1521
1458
|
const usedTool = generatorTool || statementTools.find((t) => t.recommended) || statementTools[0];
|
|
@@ -1750,16 +1687,11 @@ var AccessibilityStatement = ({
|
|
|
1750
1687
|
] }),
|
|
1751
1688
|
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
1689
|
] }),
|
|
1753
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
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
|
-
})() }),
|
|
1690
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "statement-content", children: [
|
|
1691
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h1", { id: "a11y-statement-title", style: styles.mainHeading, children: renderTemplate(template.title) }),
|
|
1692
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { style: styles.paragraph, children: renderTemplate(template.intro) }),
|
|
1693
|
+
renderSections(template.sections)
|
|
1694
|
+
] }),
|
|
1763
1695
|
/* @__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
1696
|
lang === "sv" ? "Genererad med hj\xE4lp av" : "Generated using",
|
|
1765
1697
|
" ",
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holmdigital/components",
|
|
3
3
|
"author": "Holm Digital AB",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.1.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
"typescript": "^5.7.2"
|
|
155
155
|
},
|
|
156
156
|
"dependencies": {
|
|
157
|
-
"@holmdigital/standards": "^2.
|
|
157
|
+
"@holmdigital/standards": "^2.1.0",
|
|
158
158
|
"lucide-react": "^0.556.0"
|
|
159
159
|
}
|
|
160
160
|
}
|