@papernote/ui 1.7.3 → 1.7.5

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": "@papernote/ui",
3
- "version": "1.7.3",
3
+ "version": "1.7.5",
4
4
  "type": "module",
5
5
  "description": "A modern React component library with a paper notebook aesthetic - minimal, professional, and expressive",
6
6
  "main": "dist/index.js",
@@ -34,7 +34,6 @@ export default function FormWizard({
34
34
 
35
35
  const isFirstStep = currentStep === 0;
36
36
  const isLastStep = currentStep === steps.length - 1;
37
- const canGoNext = allowSkip || completedSteps.has(currentStep);
38
37
 
39
38
  // Go to specific step
40
39
  const goToStep = (stepIndex: number) => {
@@ -69,8 +68,11 @@ export default function FormWizard({
69
68
  setIsSubmitting(false);
70
69
  }
71
70
  } else {
72
- // Go to next step
73
- goToStep(currentStep + 1);
71
+ // Advance to next step directly (don't use goToStep which checks completedSteps
72
+ // before React has re-rendered with the updated state)
73
+ const nextStepIndex = currentStep + 1;
74
+ setCurrentStep(nextStepIndex);
75
+ onStepChange?.(nextStepIndex);
74
76
  }
75
77
  };
76
78
 
@@ -191,7 +193,7 @@ export default function FormWizard({
191
193
  <button
192
194
  type="button"
193
195
  onClick={nextStep}
194
- disabled={!allowSkip && !canGoNext && !isLastStep || isSubmitting}
196
+ disabled={isSubmitting}
195
197
  className="px-4 py-2 text-sm font-medium text-white bg-accent-500 rounded-lg hover:bg-accent-600 disabled:opacity-40 disabled:cursor-not-allowed transition-all"
196
198
  >
197
199
  {isSubmitting ? 'Submitting...' : isLastStep ? 'Complete' : 'Next'}