optimized-react-component-library-xyz123 0.1.74 → 0.1.76

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
@@ -2572,7 +2572,24 @@ var ServiceHeadlineAndBodyStandard_default = ServiceHeadlineAndBody;
2572
2572
  // src/NewTextComponentStandard/SkipLinkStandard/SkipLinkStandard.tsx
2573
2573
  var import_jsx_runtime23 = require("react/jsx-runtime");
2574
2574
  var SkipLink = () => {
2575
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "pts-skipLink-container", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href: "#main-content", children: "Till huvudinneh\xE5ll" }) });
2575
+ function scrollToMainContent() {
2576
+ const container = document.getElementById(`main-content`);
2577
+ if (container) {
2578
+ container.scrollIntoView({ behavior: "smooth", block: "center" });
2579
+ container.focus();
2580
+ }
2581
+ }
2582
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "pts-skipLink-container", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2583
+ "a",
2584
+ {
2585
+ href: "#",
2586
+ onClick: (e) => {
2587
+ e.preventDefault();
2588
+ scrollToMainContent();
2589
+ },
2590
+ children: "Till huvudinneh\xE5ll"
2591
+ }
2592
+ ) });
2576
2593
  };
2577
2594
  var SkipLinkStandard_default = SkipLink;
2578
2595
 
@@ -2712,7 +2729,7 @@ var ValidationErrorSummaryList = ({
2712
2729
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("ul", { id: "errorSummary-ul", children: filteredIds.map((questionId, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2713
2730
  "a",
2714
2731
  {
2715
- href: `#question-${questionId}`,
2732
+ href: "#",
2716
2733
  onClick: (e) => {
2717
2734
  e.preventDefault();
2718
2735
  scrollToQuestion(questionId);
package/dist/index.mjs CHANGED
@@ -2507,7 +2507,24 @@ var ServiceHeadlineAndBodyStandard_default = ServiceHeadlineAndBody;
2507
2507
  // src/NewTextComponentStandard/SkipLinkStandard/SkipLinkStandard.tsx
2508
2508
  import { jsx as jsx23 } from "react/jsx-runtime";
2509
2509
  var SkipLink = () => {
2510
- return /* @__PURE__ */ jsx23("div", { className: "pts-skipLink-container", children: /* @__PURE__ */ jsx23("a", { href: "#main-content", children: "Till huvudinneh\xE5ll" }) });
2510
+ function scrollToMainContent() {
2511
+ const container = document.getElementById(`main-content`);
2512
+ if (container) {
2513
+ container.scrollIntoView({ behavior: "smooth", block: "center" });
2514
+ container.focus();
2515
+ }
2516
+ }
2517
+ return /* @__PURE__ */ jsx23("div", { className: "pts-skipLink-container", children: /* @__PURE__ */ jsx23(
2518
+ "a",
2519
+ {
2520
+ href: "#",
2521
+ onClick: (e) => {
2522
+ e.preventDefault();
2523
+ scrollToMainContent();
2524
+ },
2525
+ children: "Till huvudinneh\xE5ll"
2526
+ }
2527
+ ) });
2511
2528
  };
2512
2529
  var SkipLinkStandard_default = SkipLink;
2513
2530
 
@@ -2647,7 +2664,7 @@ var ValidationErrorSummaryList = ({
2647
2664
  /* @__PURE__ */ jsx26("ul", { id: "errorSummary-ul", children: filteredIds.map((questionId, i) => /* @__PURE__ */ jsx26("li", { children: /* @__PURE__ */ jsx26(
2648
2665
  "a",
2649
2666
  {
2650
- href: `#question-${questionId}`,
2667
+ href: "#",
2651
2668
  onClick: (e) => {
2652
2669
  e.preventDefault();
2653
2670
  scrollToQuestion(questionId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optimized-react-component-library-xyz123",
3
- "version": "0.1.74",
3
+ "version": "0.1.76",
4
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",