@natoora-libs/core 0.2.12-dev-doug-2 → 0.2.12-dev-doug-3

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.
@@ -831,7 +831,7 @@ interface SearchWithFiltersForTableProps {
831
831
  }
832
832
  declare const _default$5: React.MemoExoticComponent<(props: SearchWithFiltersForTableProps) => react_jsx_runtime.JSX.Element>;
833
833
 
834
- interface ISectionName {
834
+ interface SectionNameProps {
835
835
  name: string;
836
836
  tooltipDescription?: string;
837
837
  sectionId?: string;
@@ -841,7 +841,7 @@ interface ISectionName {
841
841
  buttonDisabled?: boolean;
842
842
  openHistoryLog?: () => void;
843
843
  }
844
- declare const SectionName: ({ name, tooltipDescription, sectionId, handleButtonClick, buttonText, buttonType, buttonDisabled, openHistoryLog, }: ISectionName) => react_jsx_runtime.JSX.Element;
844
+ declare const SectionName: ({ name, tooltipDescription, sectionId, handleButtonClick, buttonText, buttonType, buttonDisabled, openHistoryLog, }: SectionNameProps) => react_jsx_runtime.JSX.Element;
845
845
 
846
846
  type Option = {
847
847
  value?: string | number;
@@ -831,7 +831,7 @@ interface SearchWithFiltersForTableProps {
831
831
  }
832
832
  declare const _default$5: React.MemoExoticComponent<(props: SearchWithFiltersForTableProps) => react_jsx_runtime.JSX.Element>;
833
833
 
834
- interface ISectionName {
834
+ interface SectionNameProps {
835
835
  name: string;
836
836
  tooltipDescription?: string;
837
837
  sectionId?: string;
@@ -841,7 +841,7 @@ interface ISectionName {
841
841
  buttonDisabled?: boolean;
842
842
  openHistoryLog?: () => void;
843
843
  }
844
- declare const SectionName: ({ name, tooltipDescription, sectionId, handleButtonClick, buttonText, buttonType, buttonDisabled, openHistoryLog, }: ISectionName) => react_jsx_runtime.JSX.Element;
844
+ declare const SectionName: ({ name, tooltipDescription, sectionId, handleButtonClick, buttonText, buttonType, buttonDisabled, openHistoryLog, }: SectionNameProps) => react_jsx_runtime.JSX.Element;
845
845
 
846
846
  type Option = {
847
847
  value?: string | number;
@@ -7014,7 +7014,8 @@ var SearchHeader = memo18(
7014
7014
  );
7015
7015
 
7016
7016
  // src/components/SectionName/SectionName.tsx
7017
- import { History as History2, Info as InfoIcon } from "@mui/icons-material";
7017
+ import HistoryIcon from "@mui/icons-material/History";
7018
+ import InfoIcon from "@mui/icons-material/Info";
7018
7019
  import { Box as Box34, Divider as Divider10, IconButton as IconButton4, Tooltip as Tooltip8, Typography as Typography27 } from "@mui/material";
7019
7020
  import { makeStyles as makeStyles42 } from "tss-react/mui";
7020
7021
  import { jsx as jsx113, jsxs as jsxs77 } from "react/jsx-runtime";
@@ -7060,14 +7061,26 @@ var SectionName = ({
7060
7061
  openHistoryLog
7061
7062
  }) => {
7062
7063
  const { classes } = useStyles42();
7064
+ const handleScroll = (e) => {
7065
+ e.preventDefault();
7066
+ if (sectionId) {
7067
+ const targetId = sectionId.startsWith("#") ? sectionId.slice(1) : sectionId;
7068
+ const element = document.getElementById(targetId);
7069
+ if (element) {
7070
+ element.scrollIntoView({
7071
+ behavior: "smooth",
7072
+ block: "start"
7073
+ });
7074
+ }
7075
+ }
7076
+ };
7063
7077
  return /* @__PURE__ */ jsxs77(Box34, { className: classes.container, children: [
7064
7078
  /* @__PURE__ */ jsxs77(Box34, { className: classes.titleContainer, children: [
7065
7079
  /* @__PURE__ */ jsx113(
7066
7080
  Typography27,
7067
7081
  {
7068
7082
  variant: "h5",
7069
- component: "a",
7070
- href: sectionId,
7083
+ onClick: handleScroll,
7071
7084
  className: classes.typography,
7072
7085
  children: name
7073
7086
  }
@@ -7096,7 +7109,7 @@ var SectionName = ({
7096
7109
  }
7097
7110
  ) : null,
7098
7111
  openHistoryLog && buttonText && /* @__PURE__ */ jsx113(Divider10, { orientation: "vertical", sx: { height: "24px" } }),
7099
- openHistoryLog && /* @__PURE__ */ jsx113(IconButton4, { size: "small", onClick: () => openHistoryLog(), children: /* @__PURE__ */ jsx113(History2, {}) })
7112
+ openHistoryLog && /* @__PURE__ */ jsx113(IconButton4, { size: "small", onClick: () => openHistoryLog(), children: /* @__PURE__ */ jsx113(HistoryIcon, {}) })
7100
7113
  ] })
7101
7114
  ] });
7102
7115
  };