optimized-react-component-library-xyz123 0.1.17 → 0.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +34 -25
  2. package/dist/index.mjs +32 -23
  3. package/package.json +14 -11
package/dist/index.js CHANGED
@@ -1789,34 +1789,43 @@ var Modal = ({ showModal: isOpen, activatedLanguage = "" }) => {
1789
1789
  var ModalStandard_default = Modal;
1790
1790
 
1791
1791
  // src/NewTextComponentStandard/TextHeadlineAndBodyStandard/TextHeadlineAndBodyStandard.tsx
1792
+ var import_react5 = require("react");
1792
1793
  var import_dompurify5 = __toESM(require("dompurify"));
1793
1794
  var import_jsx_runtime14 = require("react/jsx-runtime");
1794
1795
  var TextHeadlineAndBody = ({ data, headlineType = "h2" }) => {
1795
- const HeadlineTag = headlineType;
1796
1796
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("section", { className: "pts-textHeadlineAndBody-container", children: [
1797
- data.headline && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(HeadlineTag, { children: data.headline }),
1797
+ data.headline && (0, import_react5.createElement)(headlineType, {}, data.headline),
1798
1798
  data.body && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { dangerouslySetInnerHTML: { __html: import_dompurify5.default.sanitize(data.body) } }),
1799
- data.linksForMoreInfo && data.linksForMoreInfo.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "pts-moreinfo-list", children: data.linksForMoreInfo.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { className: index > 0 ? "notFirstInList" : "", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("a", { href: link.url, target: "_blank", rel: "noopener noreferrer", "aria-label": link.ariaLabel, children: [
1800
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "MoreInfoIcon", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1801
- "svg",
1802
- {
1803
- "aria-hidden": "true",
1804
- xmlns: "http://www.w3.org/2000/svg",
1805
- width: "12",
1806
- height: "10",
1807
- viewBox: "0 0 12 10",
1808
- fill: "none",
1809
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1810
- "path",
1799
+ data.linksForMoreInfo && data.linksForMoreInfo.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "pts-moreinfo-list", children: data.linksForMoreInfo.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { className: index > 0 ? "notFirstInList" : "", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1800
+ "a",
1801
+ {
1802
+ href: link.url,
1803
+ target: "_blank",
1804
+ rel: "noopener noreferrer",
1805
+ "aria-label": link.ariaLabel,
1806
+ children: [
1807
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "MoreInfoIcon", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1808
+ "svg",
1811
1809
  {
1812
- d: "M6.00001 9.63253L5.10321 8.82184L8.62749 5.57905H0.965332V4.42091H8.62749L5.10321 1.17813L6.00001 0.367432L11.0347 4.99998L6.00001 9.63253Z",
1813
- fill: "#ffffff"
1810
+ "aria-hidden": "true",
1811
+ xmlns: "http://www.w3.org/2000/svg",
1812
+ width: "12",
1813
+ height: "10",
1814
+ viewBox: "0 0 12 10",
1815
+ fill: "none",
1816
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1817
+ "path",
1818
+ {
1819
+ d: "M6.00001 9.63253L5.10321 8.82184L8.62749 5.57905H0.965332V4.42091H8.62749L5.10321 1.17813L6.00001 0.367432L11.0347 4.99998L6.00001 9.63253Z",
1820
+ fill: "#ffffff"
1821
+ }
1822
+ )
1814
1823
  }
1815
- )
1816
- }
1817
- ) }),
1818
- link.title
1819
- ] }) }, `more-info-${index}`)) })
1824
+ ) }),
1825
+ link.title
1826
+ ]
1827
+ }
1828
+ ) }, `more-info-${index}`)) })
1820
1829
  ] });
1821
1830
  };
1822
1831
  var TextHeadlineAndBodyStandard_default = TextHeadlineAndBody;
@@ -1952,14 +1961,14 @@ var StepperButtons = ({
1952
1961
  var StepperButtonsStandard_default = StepperButtons;
1953
1962
 
1954
1963
  // src/NewTextComponentStandard/StepperStandard/StepperStandard.tsx
1955
- var import_react5 = __toESM(require("react"));
1964
+ var import_react6 = __toESM(require("react"));
1956
1965
  var import_jsx_runtime19 = require("react/jsx-runtime");
1957
1966
  var Stepper = ({ arraySteps = [], activeStep = 1 }) => {
1958
1967
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "pts-stepper-container", "aria-hidden": "true", children: arraySteps.map((step, index) => {
1959
1968
  const isActive = step.step === activeStep;
1960
1969
  const lastElement = arraySteps.length;
1961
1970
  const isDone = step.step < activeStep;
1962
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react5.default.Fragment, { children: [
1971
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react6.default.Fragment, { children: [
1963
1972
  /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "pts-stepper-step", children: [
1964
1973
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1965
1974
  "div",
@@ -2050,7 +2059,7 @@ var ValidationErrorSummaryList = ({
2050
2059
  var ValidationErrorSummaryList_default = ValidationErrorSummaryList;
2051
2060
 
2052
2061
  // src/NewTextComponentStandard/CookieBanner/CookieBanner.tsx
2053
- var import_react6 = require("react");
2062
+ var import_react7 = require("react");
2054
2063
  var import_jsx_runtime21 = require("react/jsx-runtime");
2055
2064
  var CookieBanner = ({
2056
2065
  visible = false,
@@ -2059,7 +2068,7 @@ var CookieBanner = ({
2059
2068
  acceptCookies,
2060
2069
  rejectCookies
2061
2070
  }) => {
2062
- (0, import_react6.useEffect)(() => {
2071
+ (0, import_react7.useEffect)(() => {
2063
2072
  if (visible) {
2064
2073
  document.body.classList.add("has-cookie-banner");
2065
2074
  } else {
package/dist/index.mjs CHANGED
@@ -1725,34 +1725,43 @@ var Modal = ({ showModal: isOpen, activatedLanguage = "" }) => {
1725
1725
  var ModalStandard_default = Modal;
1726
1726
 
1727
1727
  // src/NewTextComponentStandard/TextHeadlineAndBodyStandard/TextHeadlineAndBodyStandard.tsx
1728
+ import { createElement } from "react";
1728
1729
  import DOMPurify5 from "dompurify";
1729
1730
  import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
1730
1731
  var TextHeadlineAndBody = ({ data, headlineType = "h2" }) => {
1731
- const HeadlineTag = headlineType;
1732
1732
  return /* @__PURE__ */ jsxs14("section", { className: "pts-textHeadlineAndBody-container", children: [
1733
- data.headline && /* @__PURE__ */ jsx14(HeadlineTag, { children: data.headline }),
1733
+ data.headline && createElement(headlineType, {}, data.headline),
1734
1734
  data.body && /* @__PURE__ */ jsx14("div", { dangerouslySetInnerHTML: { __html: DOMPurify5.sanitize(data.body) } }),
1735
- data.linksForMoreInfo && data.linksForMoreInfo.length > 0 && /* @__PURE__ */ jsx14("ul", { className: "pts-moreinfo-list", children: data.linksForMoreInfo.map((link, index) => /* @__PURE__ */ jsx14("li", { className: index > 0 ? "notFirstInList" : "", children: /* @__PURE__ */ jsxs14("a", { href: link.url, target: "_blank", rel: "noopener noreferrer", "aria-label": link.ariaLabel, children: [
1736
- /* @__PURE__ */ jsx14("span", { className: "MoreInfoIcon", children: /* @__PURE__ */ jsx14(
1737
- "svg",
1738
- {
1739
- "aria-hidden": "true",
1740
- xmlns: "http://www.w3.org/2000/svg",
1741
- width: "12",
1742
- height: "10",
1743
- viewBox: "0 0 12 10",
1744
- fill: "none",
1745
- children: /* @__PURE__ */ jsx14(
1746
- "path",
1735
+ data.linksForMoreInfo && data.linksForMoreInfo.length > 0 && /* @__PURE__ */ jsx14("ul", { className: "pts-moreinfo-list", children: data.linksForMoreInfo.map((link, index) => /* @__PURE__ */ jsx14("li", { className: index > 0 ? "notFirstInList" : "", children: /* @__PURE__ */ jsxs14(
1736
+ "a",
1737
+ {
1738
+ href: link.url,
1739
+ target: "_blank",
1740
+ rel: "noopener noreferrer",
1741
+ "aria-label": link.ariaLabel,
1742
+ children: [
1743
+ /* @__PURE__ */ jsx14("span", { className: "MoreInfoIcon", children: /* @__PURE__ */ jsx14(
1744
+ "svg",
1747
1745
  {
1748
- d: "M6.00001 9.63253L5.10321 8.82184L8.62749 5.57905H0.965332V4.42091H8.62749L5.10321 1.17813L6.00001 0.367432L11.0347 4.99998L6.00001 9.63253Z",
1749
- fill: "#ffffff"
1746
+ "aria-hidden": "true",
1747
+ xmlns: "http://www.w3.org/2000/svg",
1748
+ width: "12",
1749
+ height: "10",
1750
+ viewBox: "0 0 12 10",
1751
+ fill: "none",
1752
+ children: /* @__PURE__ */ jsx14(
1753
+ "path",
1754
+ {
1755
+ d: "M6.00001 9.63253L5.10321 8.82184L8.62749 5.57905H0.965332V4.42091H8.62749L5.10321 1.17813L6.00001 0.367432L11.0347 4.99998L6.00001 9.63253Z",
1756
+ fill: "#ffffff"
1757
+ }
1758
+ )
1750
1759
  }
1751
- )
1752
- }
1753
- ) }),
1754
- link.title
1755
- ] }) }, `more-info-${index}`)) })
1760
+ ) }),
1761
+ link.title
1762
+ ]
1763
+ }
1764
+ ) }, `more-info-${index}`)) })
1756
1765
  ] });
1757
1766
  };
1758
1767
  var TextHeadlineAndBodyStandard_default = TextHeadlineAndBody;
@@ -1888,14 +1897,14 @@ var StepperButtons = ({
1888
1897
  var StepperButtonsStandard_default = StepperButtons;
1889
1898
 
1890
1899
  // src/NewTextComponentStandard/StepperStandard/StepperStandard.tsx
1891
- import React4 from "react";
1900
+ import React5 from "react";
1892
1901
  import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
1893
1902
  var Stepper = ({ arraySteps = [], activeStep = 1 }) => {
1894
1903
  return /* @__PURE__ */ jsx19("div", { className: "pts-stepper-container", "aria-hidden": "true", children: arraySteps.map((step, index) => {
1895
1904
  const isActive = step.step === activeStep;
1896
1905
  const lastElement = arraySteps.length;
1897
1906
  const isDone = step.step < activeStep;
1898
- return /* @__PURE__ */ jsxs17(React4.Fragment, { children: [
1907
+ return /* @__PURE__ */ jsxs17(React5.Fragment, { children: [
1899
1908
  /* @__PURE__ */ jsxs17("div", { className: "pts-stepper-step", children: [
1900
1909
  /* @__PURE__ */ jsx19(
1901
1910
  "div",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "optimized-react-component-library-xyz123",
3
- "version": "0.1.17",
4
- "description": "A modern React component library using TypeScript.",
3
+ "version": "0.1.18",
4
+ "description": "A modern React component library using TypeScript with React 19 support.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "exports": {
@@ -30,37 +30,40 @@
30
30
  },
31
31
  "repository": {
32
32
  "type": "git",
33
- "url": "git+https://github.com/YOUR_USERNAME/optimized-react-component-library-xyz123.git"
33
+ "url": "git+https://github.com/YOUR_USERNAME/optimized-react-component-library-xyz123-ch-react19.git"
34
34
  },
35
35
  "keywords": [
36
36
  "react",
37
+ "react19",
37
38
  "component-library",
38
39
  "typescript",
39
40
  "npm",
41
+ "modern-react",
40
42
  "boilerplate"
41
43
  ],
42
44
  "author": "YOUR NAME",
43
45
  "license": "MIT",
44
46
  "peerDependencies": {
45
- "react": ">=17.0.0",
46
- "react-dom": ">=17.0.0"
47
+ "react": "^19.2.0",
48
+ "react-dom": "^19.2.0"
47
49
  },
48
50
  "devDependencies": {
49
51
  "@testing-library/jest-dom": "^6.8.0",
50
52
  "@testing-library/react": "^16.3.0",
51
53
  "@types/dompurify": "^3.0.5",
52
- "@types/react": "^18.0.0",
53
- "@types/react-dom": "^18.0.0",
54
- "eslint": "^8.0.0",
54
+ "@types/react": "^19.2.2",
55
+ "@types/react-dom": "^19.2.1",
56
+ "eslint": "^9.0.0",
55
57
  "eslint-config-prettier": "^9.0.0",
56
- "eslint-plugin-react": "^7.0.0",
58
+ "eslint-plugin-react": "^7.35.0",
59
+ "eslint-plugin-react-hooks": "^5.0.0",
57
60
  "husky": "^9.0.0",
58
61
  "jsdom": "^26.1.0",
59
62
  "prettier": "^3.0.0",
60
63
  "standard-version": "^9.5.0",
61
64
  "tsup": "^8.0.0",
62
- "typescript": "^5.0.0",
63
- "vitest": "^1.0.0"
65
+ "typescript": "^5.6.0",
66
+ "vitest": "^2.0.0"
64
67
  },
65
68
  "dependencies": {
66
69
  "clsx": "^2.1.1",