optimized-react-component-library-xyz123 0.1.19 → 0.1.21
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 +44 -43
- package/dist/index.mjs +44 -43
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -2057,7 +2057,6 @@ var ValidationErrorSummaryList = ({
|
|
|
2057
2057
|
var ValidationErrorSummaryList_default = ValidationErrorSummaryList;
|
|
2058
2058
|
|
|
2059
2059
|
// src/NewTextComponentStandard/CookieBanner/CookieBanner.tsx
|
|
2060
|
-
var import_react7 = require("react");
|
|
2061
2060
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2062
2061
|
var CookieBanner = ({
|
|
2063
2062
|
visible = false,
|
|
@@ -2066,16 +2065,6 @@ var CookieBanner = ({
|
|
|
2066
2065
|
acceptCookies,
|
|
2067
2066
|
rejectCookies
|
|
2068
2067
|
}) => {
|
|
2069
|
-
(0, import_react7.useEffect)(() => {
|
|
2070
|
-
if (visible) {
|
|
2071
|
-
document.body.classList.add("has-cookie-banner");
|
|
2072
|
-
} else {
|
|
2073
|
-
document.body.classList.remove("has-cookie-banner");
|
|
2074
|
-
}
|
|
2075
|
-
return () => {
|
|
2076
|
-
document.body.classList.remove("has-cookie-banner");
|
|
2077
|
-
};
|
|
2078
|
-
}, [visible]);
|
|
2079
2068
|
if (!visible) return null;
|
|
2080
2069
|
const handleCookieChoice = (accepted) => {
|
|
2081
2070
|
if (accepted) {
|
|
@@ -2090,38 +2079,50 @@ var CookieBanner = ({
|
|
|
2090
2079
|
onClose();
|
|
2091
2080
|
}
|
|
2092
2081
|
};
|
|
2093
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2083
|
+
"div",
|
|
2084
|
+
{
|
|
2085
|
+
className: "pts-cookieBanner",
|
|
2086
|
+
role: "dialog",
|
|
2087
|
+
"aria-labelledby": "cookie-banner-title",
|
|
2088
|
+
"aria-describedby": "cookie-banner-description",
|
|
2089
|
+
"aria-modal": "true",
|
|
2090
|
+
id: "cookie-banner",
|
|
2091
|
+
tabIndex: -1,
|
|
2092
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "content", children: [
|
|
2093
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h3", { id: "cookie-banner-title", children: "Kakor (cookies)" }),
|
|
2094
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { id: "cookie-banner-description", children: "PTS skulle vilja anv\xE4nda en statistikkaka i syfte att l\xF6pande f\xF6rb\xE4ttra webbplatsen. Samtycker du till det? Du kan n\xE4r som helst \xE4ndra ditt val. F\xF6r att \xE5terkalla ditt samtycke klickar du p\xE5 \u201DKakor\u201D i avsnittet l\xE4ngst ned p\xE5 webbplatsen." }),
|
|
2095
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { id: "cookie-banner-description", className: "pts-cookieBanner-Links", children: [
|
|
2096
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2097
|
+
"svg",
|
|
2098
|
+
{
|
|
2099
|
+
width: "27",
|
|
2100
|
+
height: "27",
|
|
2101
|
+
viewBox: "0 0 27 27",
|
|
2102
|
+
fill: "none",
|
|
2103
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2104
|
+
"aria-hidden": "true",
|
|
2105
|
+
children: [
|
|
2106
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("rect", { width: "27", height: "27", rx: "13.5", fill: "#6E3282" }),
|
|
2107
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2108
|
+
"path",
|
|
2109
|
+
{
|
|
2110
|
+
d: "M13.5 18.7116L12.4911 17.7995L16.4559 14.1514H7.83594V12.8485H16.4559L12.4911 9.20036L13.5 8.28833L19.164 13.4999L13.5 18.7116Z",
|
|
2111
|
+
fill: "white"
|
|
2112
|
+
}
|
|
2113
|
+
)
|
|
2114
|
+
]
|
|
2115
|
+
}
|
|
2116
|
+
),
|
|
2117
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("a", { href: "www.pts.se", target: "_blank", rel: "noopener noreferrer", children: "Kakor (cookies) p\xE5 pts.se (\xD6ppnas i nytt f\xF6nster)" })
|
|
2118
|
+
] }),
|
|
2119
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "pts-cookieBanner-Buttons", children: [
|
|
2120
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: () => handleCookieChoice(true), children: "Ja, jag samtycker" }),
|
|
2121
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: () => handleCookieChoice(false), children: "Nej, jag samtycker inte" })
|
|
2122
|
+
] })
|
|
2123
|
+
] })
|
|
2124
|
+
}
|
|
2125
|
+
);
|
|
2125
2126
|
};
|
|
2126
2127
|
var CookieBanner_default = CookieBanner;
|
|
2127
2128
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.mjs
CHANGED
|
@@ -1993,7 +1993,6 @@ var ValidationErrorSummaryList = ({
|
|
|
1993
1993
|
var ValidationErrorSummaryList_default = ValidationErrorSummaryList;
|
|
1994
1994
|
|
|
1995
1995
|
// src/NewTextComponentStandard/CookieBanner/CookieBanner.tsx
|
|
1996
|
-
import { useEffect as useEffect4 } from "react";
|
|
1997
1996
|
import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1998
1997
|
var CookieBanner = ({
|
|
1999
1998
|
visible = false,
|
|
@@ -2002,16 +2001,6 @@ var CookieBanner = ({
|
|
|
2002
2001
|
acceptCookies,
|
|
2003
2002
|
rejectCookies
|
|
2004
2003
|
}) => {
|
|
2005
|
-
useEffect4(() => {
|
|
2006
|
-
if (visible) {
|
|
2007
|
-
document.body.classList.add("has-cookie-banner");
|
|
2008
|
-
} else {
|
|
2009
|
-
document.body.classList.remove("has-cookie-banner");
|
|
2010
|
-
}
|
|
2011
|
-
return () => {
|
|
2012
|
-
document.body.classList.remove("has-cookie-banner");
|
|
2013
|
-
};
|
|
2014
|
-
}, [visible]);
|
|
2015
2004
|
if (!visible) return null;
|
|
2016
2005
|
const handleCookieChoice = (accepted) => {
|
|
2017
2006
|
if (accepted) {
|
|
@@ -2026,38 +2015,50 @@ var CookieBanner = ({
|
|
|
2026
2015
|
onClose();
|
|
2027
2016
|
}
|
|
2028
2017
|
};
|
|
2029
|
-
return /* @__PURE__ */ jsx21(
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2018
|
+
return /* @__PURE__ */ jsx21(
|
|
2019
|
+
"div",
|
|
2020
|
+
{
|
|
2021
|
+
className: "pts-cookieBanner",
|
|
2022
|
+
role: "dialog",
|
|
2023
|
+
"aria-labelledby": "cookie-banner-title",
|
|
2024
|
+
"aria-describedby": "cookie-banner-description",
|
|
2025
|
+
"aria-modal": "true",
|
|
2026
|
+
id: "cookie-banner",
|
|
2027
|
+
tabIndex: -1,
|
|
2028
|
+
children: /* @__PURE__ */ jsxs19("div", { className: "content", children: [
|
|
2029
|
+
/* @__PURE__ */ jsx21("h3", { id: "cookie-banner-title", children: "Kakor (cookies)" }),
|
|
2030
|
+
/* @__PURE__ */ jsx21("p", { id: "cookie-banner-description", children: "PTS skulle vilja anv\xE4nda en statistikkaka i syfte att l\xF6pande f\xF6rb\xE4ttra webbplatsen. Samtycker du till det? Du kan n\xE4r som helst \xE4ndra ditt val. F\xF6r att \xE5terkalla ditt samtycke klickar du p\xE5 \u201DKakor\u201D i avsnittet l\xE4ngst ned p\xE5 webbplatsen." }),
|
|
2031
|
+
/* @__PURE__ */ jsxs19("div", { id: "cookie-banner-description", className: "pts-cookieBanner-Links", children: [
|
|
2032
|
+
/* @__PURE__ */ jsxs19(
|
|
2033
|
+
"svg",
|
|
2034
|
+
{
|
|
2035
|
+
width: "27",
|
|
2036
|
+
height: "27",
|
|
2037
|
+
viewBox: "0 0 27 27",
|
|
2038
|
+
fill: "none",
|
|
2039
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2040
|
+
"aria-hidden": "true",
|
|
2041
|
+
children: [
|
|
2042
|
+
/* @__PURE__ */ jsx21("rect", { width: "27", height: "27", rx: "13.5", fill: "#6E3282" }),
|
|
2043
|
+
/* @__PURE__ */ jsx21(
|
|
2044
|
+
"path",
|
|
2045
|
+
{
|
|
2046
|
+
d: "M13.5 18.7116L12.4911 17.7995L16.4559 14.1514H7.83594V12.8485H16.4559L12.4911 9.20036L13.5 8.28833L19.164 13.4999L13.5 18.7116Z",
|
|
2047
|
+
fill: "white"
|
|
2048
|
+
}
|
|
2049
|
+
)
|
|
2050
|
+
]
|
|
2051
|
+
}
|
|
2052
|
+
),
|
|
2053
|
+
/* @__PURE__ */ jsx21("a", { href: "www.pts.se", target: "_blank", rel: "noopener noreferrer", children: "Kakor (cookies) p\xE5 pts.se (\xD6ppnas i nytt f\xF6nster)" })
|
|
2054
|
+
] }),
|
|
2055
|
+
/* @__PURE__ */ jsxs19("div", { className: "pts-cookieBanner-Buttons", children: [
|
|
2056
|
+
/* @__PURE__ */ jsx21("button", { onClick: () => handleCookieChoice(true), children: "Ja, jag samtycker" }),
|
|
2057
|
+
/* @__PURE__ */ jsx21("button", { onClick: () => handleCookieChoice(false), children: "Nej, jag samtycker inte" })
|
|
2058
|
+
] })
|
|
2059
|
+
] })
|
|
2060
|
+
}
|
|
2061
|
+
);
|
|
2061
2062
|
};
|
|
2062
2063
|
var CookieBanner_default = CookieBanner;
|
|
2063
2064
|
export {
|
package/package.json
CHANGED