optimized-react-component-library-xyz123 0.1.8 → 0.1.10
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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +33 -16
- package/dist/index.mjs +33 -16
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -240,8 +240,13 @@ var PrevieMultipleCheckboxes = ({
|
|
|
240
240
|
// src/NewInputComponentStandard/TextAreaStandard/TextAreaStandard.tsx
|
|
241
241
|
var import_dompurify = __toESM(require("dompurify"));
|
|
242
242
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
243
|
-
var InputTextarea = ({
|
|
244
|
-
|
|
243
|
+
var InputTextarea = ({
|
|
244
|
+
question,
|
|
245
|
+
isTouched,
|
|
246
|
+
showPreview = false,
|
|
247
|
+
activatedLanguage
|
|
248
|
+
}) => {
|
|
249
|
+
var _a, _b, _c, _d, _e;
|
|
245
250
|
const questionId = `question-${question.id}`;
|
|
246
251
|
const inputId = `textarea-${question.id}`;
|
|
247
252
|
const aboutId = `about-${question.id}`;
|
|
@@ -287,15 +292,15 @@ var InputTextarea = ({ question, isTouched, showPreview = false, activatedLangua
|
|
|
287
292
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { "aria-label": "Felmeddelande.", className: "errorDot", children: "!" }),
|
|
288
293
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "errorText", children: question.validationDefaultMessesege })
|
|
289
294
|
] }),
|
|
290
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
295
|
+
!((_b = question.questionExtraAttribute) == null ? void 0 : _b.hideTextCounter) && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
291
296
|
"div",
|
|
292
297
|
{
|
|
293
|
-
className: `pts-character-counter ${question.answer && (((
|
|
298
|
+
className: `pts-character-counter ${question.answer && (((_c = question.questionExtraAttribute) == null ? void 0 : _c.answerMaxLength) || defaultMaxLength) && question.answer.length > (((_d = question.questionExtraAttribute) == null ? void 0 : _d.answerMaxLength) || defaultMaxLength) ? "error" : ""}`,
|
|
294
299
|
children: [
|
|
295
300
|
question.answer ? question.answer.length : 0,
|
|
296
301
|
" av",
|
|
297
302
|
" ",
|
|
298
|
-
((
|
|
303
|
+
((_e = question.questionExtraAttribute) == null ? void 0 : _e.answerMaxLength) || defaultMaxLength,
|
|
299
304
|
" tecken"
|
|
300
305
|
]
|
|
301
306
|
}
|
|
@@ -1188,7 +1193,7 @@ var EditPreviewLinkStandard_default = EditPreviewLink;
|
|
|
1188
1193
|
// src/NewTextComponentStandard/FooterStandard/FooterStandard.tsx
|
|
1189
1194
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1190
1195
|
var Footer = ({ activatedLanguage = "sv" }) => {
|
|
1191
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("
|
|
1196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("footer", { className: "pts-footer-container", children: [
|
|
1192
1197
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1193
1198
|
"svg",
|
|
1194
1199
|
{
|
|
@@ -1224,14 +1229,22 @@ var Footer = ({ activatedLanguage = "sv" }) => {
|
|
|
1224
1229
|
className: "pts-footer-linkList",
|
|
1225
1230
|
"aria-label": activatedLanguage === "en" ? "Footer navigation" : "Sidfotsnavigering",
|
|
1226
1231
|
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("ul", { children: [
|
|
1227
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("a", { href: "https://www.pts.se/kontakt/", target: "_blank", rel: "noopener noreferrer", children: [
|
|
1228
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "sr-only", children: activatedLanguage === "en" ? "PTS Contact (opens in new tab)" : "PTS Kontakt (\xF6ppnas i ny flik)" }),
|
|
1229
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { "aria-hidden": "true", children: activatedLanguage === "en" ? "Contact" : "Kontakt" })
|
|
1230
|
-
] }) }),
|
|
1231
1232
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1232
1233
|
"a",
|
|
1233
1234
|
{
|
|
1234
|
-
href: "https://www.pts.se/
|
|
1235
|
+
href: activatedLanguage === "en" ? "https://pts.se/en/contact/" : "https://www.pts.se/kontakt/",
|
|
1236
|
+
target: "_blank",
|
|
1237
|
+
rel: "noopener noreferrer",
|
|
1238
|
+
children: [
|
|
1239
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "sr-only", children: activatedLanguage === "en" ? "PTS Contact (opens in new tab)" : "PTS Kontakt (\xF6ppnas i ny flik)" }),
|
|
1240
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { "aria-hidden": "true", children: activatedLanguage === "en" ? "Contact" : "Kontakt" })
|
|
1241
|
+
]
|
|
1242
|
+
}
|
|
1243
|
+
) }),
|
|
1244
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1245
|
+
"a",
|
|
1246
|
+
{
|
|
1247
|
+
href: activatedLanguage === "en" ? "https://pts.se/en/gdpr" : "https://www.pts.se/gdpr/",
|
|
1235
1248
|
target: "_blank",
|
|
1236
1249
|
rel: "noopener noreferrer",
|
|
1237
1250
|
children: [
|
|
@@ -1243,7 +1256,7 @@ var Footer = ({ activatedLanguage = "sv" }) => {
|
|
|
1243
1256
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1244
1257
|
"a",
|
|
1245
1258
|
{
|
|
1246
|
-
href: "https://
|
|
1259
|
+
href: activatedLanguage === "en" ? "https://pts.se/en/accessibility-eservices" : "https://www.pts.se/tillganglighet-etjanster",
|
|
1247
1260
|
target: "_blank",
|
|
1248
1261
|
rel: "noopener noreferrer",
|
|
1249
1262
|
children: [
|
|
@@ -1255,7 +1268,7 @@ var Footer = ({ activatedLanguage = "sv" }) => {
|
|
|
1255
1268
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1256
1269
|
"a",
|
|
1257
1270
|
{
|
|
1258
|
-
href: "https://
|
|
1271
|
+
href: activatedLanguage === "en" ? "https://pts.se/en/cookies-eservices" : "https://www.pts.se/kakor-etjanster",
|
|
1259
1272
|
target: "_blank",
|
|
1260
1273
|
rel: "noopener noreferrer",
|
|
1261
1274
|
children: [
|
|
@@ -1650,8 +1663,12 @@ var Logo_en = () => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("svg", { widt
|
|
|
1650
1663
|
|
|
1651
1664
|
// src/NewTextComponentStandard/HeaderStandard/HeaderStandard.tsx
|
|
1652
1665
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1653
|
-
var Header = ({
|
|
1654
|
-
|
|
1666
|
+
var Header = ({
|
|
1667
|
+
activatedLanguage = "sv",
|
|
1668
|
+
useLanguage = true,
|
|
1669
|
+
SetActivatedLanguage = () => {
|
|
1670
|
+
}
|
|
1671
|
+
}) => {
|
|
1655
1672
|
const logoLink = activatedLanguage === "en" ? "https://pts.se/en" : "https://pts.se/";
|
|
1656
1673
|
const handleLanguageClick = () => {
|
|
1657
1674
|
if (activatedLanguage === "sv") {
|
|
@@ -1664,7 +1681,7 @@ var Header = ({ activatedLanguage = "sv", useLanguage = true, SetActivatedLangua
|
|
|
1664
1681
|
if (activatedLanguage === "sv") return "English";
|
|
1665
1682
|
else return "Svenska";
|
|
1666
1683
|
};
|
|
1667
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("
|
|
1684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("header", { className: "pts-header-container", children: [
|
|
1668
1685
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1669
1686
|
"a",
|
|
1670
1687
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -177,8 +177,13 @@ var PrevieMultipleCheckboxes = ({
|
|
|
177
177
|
// src/NewInputComponentStandard/TextAreaStandard/TextAreaStandard.tsx
|
|
178
178
|
import DOMPurify from "dompurify";
|
|
179
179
|
import { Fragment as Fragment3, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
180
|
-
var InputTextarea = ({
|
|
181
|
-
|
|
180
|
+
var InputTextarea = ({
|
|
181
|
+
question,
|
|
182
|
+
isTouched,
|
|
183
|
+
showPreview = false,
|
|
184
|
+
activatedLanguage
|
|
185
|
+
}) => {
|
|
186
|
+
var _a, _b, _c, _d, _e;
|
|
182
187
|
const questionId = `question-${question.id}`;
|
|
183
188
|
const inputId = `textarea-${question.id}`;
|
|
184
189
|
const aboutId = `about-${question.id}`;
|
|
@@ -224,15 +229,15 @@ var InputTextarea = ({ question, isTouched, showPreview = false, activatedLangua
|
|
|
224
229
|
/* @__PURE__ */ jsx3("span", { "aria-label": "Felmeddelande.", className: "errorDot", children: "!" }),
|
|
225
230
|
/* @__PURE__ */ jsx3("span", { className: "errorText", children: question.validationDefaultMessesege })
|
|
226
231
|
] }),
|
|
227
|
-
/* @__PURE__ */ jsxs3(
|
|
232
|
+
!((_b = question.questionExtraAttribute) == null ? void 0 : _b.hideTextCounter) && /* @__PURE__ */ jsxs3(
|
|
228
233
|
"div",
|
|
229
234
|
{
|
|
230
|
-
className: `pts-character-counter ${question.answer && (((
|
|
235
|
+
className: `pts-character-counter ${question.answer && (((_c = question.questionExtraAttribute) == null ? void 0 : _c.answerMaxLength) || defaultMaxLength) && question.answer.length > (((_d = question.questionExtraAttribute) == null ? void 0 : _d.answerMaxLength) || defaultMaxLength) ? "error" : ""}`,
|
|
231
236
|
children: [
|
|
232
237
|
question.answer ? question.answer.length : 0,
|
|
233
238
|
" av",
|
|
234
239
|
" ",
|
|
235
|
-
((
|
|
240
|
+
((_e = question.questionExtraAttribute) == null ? void 0 : _e.answerMaxLength) || defaultMaxLength,
|
|
236
241
|
" tecken"
|
|
237
242
|
]
|
|
238
243
|
}
|
|
@@ -1125,7 +1130,7 @@ var EditPreviewLinkStandard_default = EditPreviewLink;
|
|
|
1125
1130
|
// src/NewTextComponentStandard/FooterStandard/FooterStandard.tsx
|
|
1126
1131
|
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1127
1132
|
var Footer = ({ activatedLanguage = "sv" }) => {
|
|
1128
|
-
return /* @__PURE__ */ jsxs9("
|
|
1133
|
+
return /* @__PURE__ */ jsxs9("footer", { className: "pts-footer-container", children: [
|
|
1129
1134
|
/* @__PURE__ */ jsxs9(
|
|
1130
1135
|
"svg",
|
|
1131
1136
|
{
|
|
@@ -1161,14 +1166,22 @@ var Footer = ({ activatedLanguage = "sv" }) => {
|
|
|
1161
1166
|
className: "pts-footer-linkList",
|
|
1162
1167
|
"aria-label": activatedLanguage === "en" ? "Footer navigation" : "Sidfotsnavigering",
|
|
1163
1168
|
children: /* @__PURE__ */ jsxs9("ul", { children: [
|
|
1164
|
-
/* @__PURE__ */ jsx9("li", { children: /* @__PURE__ */ jsxs9("a", { href: "https://www.pts.se/kontakt/", target: "_blank", rel: "noopener noreferrer", children: [
|
|
1165
|
-
/* @__PURE__ */ jsx9("span", { className: "sr-only", children: activatedLanguage === "en" ? "PTS Contact (opens in new tab)" : "PTS Kontakt (\xF6ppnas i ny flik)" }),
|
|
1166
|
-
/* @__PURE__ */ jsx9("span", { "aria-hidden": "true", children: activatedLanguage === "en" ? "Contact" : "Kontakt" })
|
|
1167
|
-
] }) }),
|
|
1168
1169
|
/* @__PURE__ */ jsx9("li", { children: /* @__PURE__ */ jsxs9(
|
|
1169
1170
|
"a",
|
|
1170
1171
|
{
|
|
1171
|
-
href: "https://www.pts.se/
|
|
1172
|
+
href: activatedLanguage === "en" ? "https://pts.se/en/contact/" : "https://www.pts.se/kontakt/",
|
|
1173
|
+
target: "_blank",
|
|
1174
|
+
rel: "noopener noreferrer",
|
|
1175
|
+
children: [
|
|
1176
|
+
/* @__PURE__ */ jsx9("span", { className: "sr-only", children: activatedLanguage === "en" ? "PTS Contact (opens in new tab)" : "PTS Kontakt (\xF6ppnas i ny flik)" }),
|
|
1177
|
+
/* @__PURE__ */ jsx9("span", { "aria-hidden": "true", children: activatedLanguage === "en" ? "Contact" : "Kontakt" })
|
|
1178
|
+
]
|
|
1179
|
+
}
|
|
1180
|
+
) }),
|
|
1181
|
+
/* @__PURE__ */ jsx9("li", { children: /* @__PURE__ */ jsxs9(
|
|
1182
|
+
"a",
|
|
1183
|
+
{
|
|
1184
|
+
href: activatedLanguage === "en" ? "https://pts.se/en/gdpr" : "https://www.pts.se/gdpr/",
|
|
1172
1185
|
target: "_blank",
|
|
1173
1186
|
rel: "noopener noreferrer",
|
|
1174
1187
|
children: [
|
|
@@ -1180,7 +1193,7 @@ var Footer = ({ activatedLanguage = "sv" }) => {
|
|
|
1180
1193
|
/* @__PURE__ */ jsx9("li", { children: /* @__PURE__ */ jsxs9(
|
|
1181
1194
|
"a",
|
|
1182
1195
|
{
|
|
1183
|
-
href: "https://
|
|
1196
|
+
href: activatedLanguage === "en" ? "https://pts.se/en/accessibility-eservices" : "https://www.pts.se/tillganglighet-etjanster",
|
|
1184
1197
|
target: "_blank",
|
|
1185
1198
|
rel: "noopener noreferrer",
|
|
1186
1199
|
children: [
|
|
@@ -1192,7 +1205,7 @@ var Footer = ({ activatedLanguage = "sv" }) => {
|
|
|
1192
1205
|
/* @__PURE__ */ jsx9("li", { children: /* @__PURE__ */ jsxs9(
|
|
1193
1206
|
"a",
|
|
1194
1207
|
{
|
|
1195
|
-
href: "https://
|
|
1208
|
+
href: activatedLanguage === "en" ? "https://pts.se/en/cookies-eservices" : "https://www.pts.se/kakor-etjanster",
|
|
1196
1209
|
target: "_blank",
|
|
1197
1210
|
rel: "noopener noreferrer",
|
|
1198
1211
|
children: [
|
|
@@ -1587,8 +1600,12 @@ var Logo_en = () => /* @__PURE__ */ jsxs10("svg", { width: "189.0", height: "46.
|
|
|
1587
1600
|
|
|
1588
1601
|
// src/NewTextComponentStandard/HeaderStandard/HeaderStandard.tsx
|
|
1589
1602
|
import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1590
|
-
var Header = ({
|
|
1591
|
-
|
|
1603
|
+
var Header = ({
|
|
1604
|
+
activatedLanguage = "sv",
|
|
1605
|
+
useLanguage = true,
|
|
1606
|
+
SetActivatedLanguage = () => {
|
|
1607
|
+
}
|
|
1608
|
+
}) => {
|
|
1592
1609
|
const logoLink = activatedLanguage === "en" ? "https://pts.se/en" : "https://pts.se/";
|
|
1593
1610
|
const handleLanguageClick = () => {
|
|
1594
1611
|
if (activatedLanguage === "sv") {
|
|
@@ -1601,7 +1618,7 @@ var Header = ({ activatedLanguage = "sv", useLanguage = true, SetActivatedLangua
|
|
|
1601
1618
|
if (activatedLanguage === "sv") return "English";
|
|
1602
1619
|
else return "Svenska";
|
|
1603
1620
|
};
|
|
1604
|
-
return /* @__PURE__ */ jsxs11("
|
|
1621
|
+
return /* @__PURE__ */ jsxs11("header", { className: "pts-header-container", children: [
|
|
1605
1622
|
/* @__PURE__ */ jsx11(
|
|
1606
1623
|
"a",
|
|
1607
1624
|
{
|