next-helios-fe 1.7.26 → 1.7.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-helios-fe",
3
- "version": "1.7.26",
3
+ "version": "1.7.28",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -34,7 +34,7 @@ export const Tab: TabComponent = ({ children, tabs, options, onChangeTab }) => {
34
34
  title: tabs[activeTab].title,
35
35
  });
36
36
  }
37
- }, [activeTab]);
37
+ }, [tabs, activeTab]);
38
38
 
39
39
  return (
40
40
  <div
@@ -7,7 +7,7 @@ interface WizardProps {
7
7
  children: React.ReactNode;
8
8
  tabs: {
9
9
  title: string;
10
- subTitle: string;
10
+ subTitle?: string;
11
11
  icon: string;
12
12
  }[];
13
13
  options?: {
@@ -17,7 +17,7 @@ interface WizardProps {
17
17
  };
18
18
  onPreviousClick?: () => void;
19
19
  onNextClick?: () => void;
20
- onChangeWindow?: (window: any) => void;
20
+ onChangeTab?: (tab: any) => void;
21
21
  }
22
22
 
23
23
  interface WizardComponent extends React.FC<WizardProps> {
@@ -30,7 +30,7 @@ export const Wizard: WizardComponent = ({
30
30
  options,
31
31
  onPreviousClick,
32
32
  onNextClick,
33
- onChangeWindow,
33
+ onChangeTab,
34
34
  }) => {
35
35
  const wizardNavigationRef = useRef<HTMLDivElement>(null);
36
36
  const childrenList = React.Children.toArray(children);
@@ -40,10 +40,13 @@ export const Wizard: WizardComponent = ({
40
40
  const [activeTab, setActiveTab] = useState(0);
41
41
 
42
42
  useEffect(() => {
43
- if (onChangeWindow) {
44
- onChangeWindow(activeTab);
43
+ if (onChangeTab) {
44
+ onChangeTab({
45
+ index: activeTab,
46
+ title: tabs[activeTab].title,
47
+ });
45
48
  }
46
- }, [activeTab]);
49
+ }, [tabs, activeTab]);
47
50
 
48
51
  const handleOnPreviousClick = () => {
49
52
  if (activeTab - 1 === 0) {
@@ -105,7 +108,7 @@ export const Wizard: WizardComponent = ({
105
108
  setActiveTab(index);
106
109
  }}
107
110
  >
108
- <Icon icon={tab.icon} className="text-2xl" />
111
+ <Icon icon={tab.icon} className="text-2xl pointer-events-none" />
109
112
  </button>
110
113
  </div>
111
114
  <div className="flex flex-col items-center text-center">