next-helios-fe 1.7.24 → 1.7.25

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.24",
3
+ "version": "1.7.25",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,6 +13,7 @@ interface WizardProps {
13
13
  options?: {
14
14
  border?: boolean;
15
15
  disableNavigationClick?: boolean;
16
+ hideNavigationOnFirstWindow?: boolean;
16
17
  };
17
18
  onPreviousClick?: () => void;
18
19
  onNextClick?: () => void;
@@ -68,45 +69,51 @@ export const Wizard: WizardComponent = ({
68
69
 
69
70
  return (
70
71
  <div className="flex flex-col gap-8 h-full overflow-hidden">
71
- <div className="space-x-8 relative before:absolute before:inset-0 before:mt-6 md:before:translate-y-0 before:w-full before:h-0.5 before:bg-gradient-to-r before:from-transparent before:via-primary before:to-transparent">
72
- <div
73
- ref={wizardNavigationRef}
74
- className="relative flex justify-between overflow-auto [&::-webkit-scrollbar]:hidden"
75
- >
76
- {tabs?.slice(0, childrenList.length)?.map((tab, index) => {
77
- return (
78
- <div
79
- key={index}
80
- id={`wizard-tab-${index}`}
81
- className={`group flex flex-col items-center gap-2 min-w-32 max-w-40 px-2 ${
82
- activeTab >= index && "is-active"
83
- }`}
84
- >
85
- <div className="rounded-full bg-secondary-bg">
86
- <button
87
- className={`flex justify-center items-center w-12 h-12 shadow border border-white rounded-full bg-secondary-light duration-300 group-[.is-active]:bg-primary group-[.is-active]:text-white ${
88
- !options?.disableNavigationClick &&
89
- "hover:border-primary hover:bg-primary-transparent hover:text-primary"
90
- }`}
91
- disabled={options?.disableNavigationClick}
92
- onClick={() => {
93
- setActiveTab(index);
94
- }}
95
- >
96
- <Icon icon={tab.icon} className="text-2xl" />
97
- </button>
98
- </div>
99
- <div className="flex flex-col items-center text-center">
100
- <h1 className="text-sm font-medium group-[.is-active]:text-primary">
101
- {tab.title}
102
- </h1>
103
- <p className="text-xs">{tab.subTitle}</p>
104
- </div>
105
- </div>
106
- );
107
- })}
72
+ {(!options?.hideNavigationOnFirstWindow || activeTab !== 0) && (
73
+ <div className="space-x-8 relative before:absolute before:inset-0 before:mt-6 md:before:translate-y-0 before:w-full before:h-0.5 before:bg-gradient-to-r before:from-transparent before:via-primary before:to-transparent">
74
+ <div
75
+ ref={wizardNavigationRef}
76
+ className="relative flex justify-between overflow-auto [&::-webkit-scrollbar]:hidden"
77
+ >
78
+ {tabs?.map((tab, index) => {
79
+ {
80
+ if (!options?.hideNavigationOnFirstWindow || index !== 0) {
81
+ return (
82
+ <div
83
+ key={index}
84
+ id={`wizard-tab-${index}`}
85
+ className={`group flex flex-col items-center gap-2 min-w-32 max-w-40 px-2 ${
86
+ activeTab >= index && "is-active"
87
+ }`}
88
+ >
89
+ <div className="rounded-full bg-secondary-bg">
90
+ <button
91
+ className={`flex justify-center items-center w-12 h-12 shadow border border-white rounded-full bg-secondary-light duration-300 group-[.is-active]:bg-primary group-[.is-active]:text-white ${
92
+ !options?.disableNavigationClick &&
93
+ "hover:border-primary hover:bg-primary-transparent hover:text-primary"
94
+ }`}
95
+ disabled={options?.disableNavigationClick}
96
+ onClick={() => {
97
+ setActiveTab(index);
98
+ }}
99
+ >
100
+ <Icon icon={tab.icon} className="text-2xl" />
101
+ </button>
102
+ </div>
103
+ <div className="flex flex-col items-center text-center">
104
+ <h1 className="text-sm font-medium group-[.is-active]:text-primary">
105
+ {tab.title}
106
+ </h1>
107
+ <p className="text-xs">{tab.subTitle}</p>
108
+ </div>
109
+ </div>
110
+ );
111
+ }
112
+ }
113
+ })}
114
+ </div>
108
115
  </div>
109
- </div>
116
+ )}
110
117
  <div
111
118
  className={`flex-1 overflow-auto ${
112
119
  options?.border && "border rounded-md px-4 py-6"