@rubenpazch/stepper 2.0.0 → 3.0.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../src/Stepper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,IAAI;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,KAAK,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAChD,UAAU,OAAO;IACf,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAoBD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,OAAO,CAmFpC,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../src/Stepper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,IAAI;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,KAAK,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAChD,UAAU,OAAO;IACf,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAuBD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,OAAO,CAiGpC,CAAC;AAEF,eAAe,aAAa,CAAC"}
package/dist/index.cjs.js CHANGED
@@ -424,21 +424,53 @@ function requireJsxRuntime () {
424
424
 
425
425
  var jsxRuntimeExports = requireJsxRuntime();
426
426
 
427
+ function styleInject(css, ref) {
428
+ if ( ref === void 0 ) ref = {};
429
+ var insertAt = ref.insertAt;
430
+
431
+ if (typeof document === 'undefined') { return; }
432
+
433
+ var head = document.head || document.getElementsByTagName('head')[0];
434
+ var style = document.createElement('style');
435
+ style.type = 'text/css';
436
+
437
+ if (insertAt === 'top') {
438
+ if (head.firstChild) {
439
+ head.insertBefore(style, head.firstChild);
440
+ } else {
441
+ head.appendChild(style);
442
+ }
443
+ } else {
444
+ head.appendChild(style);
445
+ }
446
+
447
+ if (style.styleSheet) {
448
+ style.styleSheet.cssText = css;
449
+ } else {
450
+ style.appendChild(document.createTextNode(css));
451
+ }
452
+ }
453
+
454
+ var css_248z = "/* Container */\n.Stepper-module_container__DJqqd {\n margin-bottom: 2rem;\n}\n\n/* Step container */\n.Stepper-module_stepsContainer__BSRre {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.Stepper-module_stepWrapper__tLZrN {\n display: flex;\n align-items: center;\n flex: 1;\n}\n\n.Stepper-module_stepContent__U41GC {\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n/* Circle */\n.Stepper-module_circle__NG20I {\n border-radius: 9999px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-weight: 600;\n transition: all 150ms ease;\n}\n\n/* Circle sizes */\n.Stepper-module_circleSmall__OvjYU {\n width: 1.5rem;\n height: 1.5rem;\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.Stepper-module_circleMedium__4USpR {\n width: 2.5rem;\n height: 2.5rem;\n font-size: 1rem;\n line-height: 1.5rem;\n}\n\n.Stepper-module_circleLarge__YJTfR {\n width: 4rem;\n height: 4rem;\n font-size: 1.25rem;\n line-height: 1.75rem;\n}\n\n/* Circle states */\n.Stepper-module_circleActive__b9Mg5 {\n background: #2563eb;\n color: white;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);\n transform: scale(1.1);\n}\n\n.Stepper-module_circleActiveSmall__y038c {\n box-shadow: 0 0 0 2px #93c5fd;\n}\n\n.Stepper-module_circleActiveMedium__f5x7y {\n box-shadow: 0 0 0 4px #93c5fd;\n}\n\n.Stepper-module_circleActiveLarge__k5w2P {\n box-shadow: 0 0 0 8px #93c5fd;\n}\n\n.Stepper-module_circleCompleted__3PZzz {\n background: #eff6ff;\n color: #2563eb;\n}\n\n.Stepper-module_circleFuture__5QSu9 {\n background: #d1d5db;\n color: #4b5563;\n}\n\n/* Title */\n.Stepper-module_title__-ugD2 {\n margin-top: 0.5rem;\n font-weight: 500;\n transition: all 150ms ease;\n}\n\n/* Title sizes */\n.Stepper-module_titleSmall__UaJEH {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.Stepper-module_titleMedium__9l6Ig {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n\n.Stepper-module_titleLarge__CK7gk {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n\n/* Title states */\n.Stepper-module_titleActive__DUnmr {\n color: #1d4ed8;\n font-weight: 700;\n}\n\n.Stepper-module_titleClickable__b3i-v {\n color: #2563eb;\n text-decoration: underline;\n cursor: pointer;\n}\n\n.Stepper-module_titleClickable__b3i-v:hover {\n color: #1e40af;\n}\n\n.Stepper-module_titleCompleted__VdB7c {\n color: #2563eb;\n}\n\n.Stepper-module_titleFuture__cSPZD {\n color: #6b7280;\n}\n\n/* Link and button styles */\n.Stepper-module_link__3WBTp {\n text-decoration: none;\n}\n\n.Stepper-module_link__3WBTp:hover {\n text-decoration: underline;\n}\n\n.Stepper-module_link__3WBTp:focus {\n outline: none;\n}\n\n.Stepper-module_button__2p5jI {\n background: transparent;\n border: none;\n padding: 0;\n margin: 0;\n cursor: pointer;\n}\n\n.Stepper-module_button__2p5jI:focus {\n outline: none;\n}\n\n/* Connector line */\n.Stepper-module_connector__7JYHQ {\n height: 0.25rem;\n flex: 1;\n margin-left: 1rem;\n margin-right: 1rem;\n margin-top: -1.25rem;\n}\n\n.Stepper-module_connectorCompleted__ZrGL7 {\n background: #2563eb;\n}\n\n.Stepper-module_connectorIncomplete__6Gg1g {\n background: #d1d5db;\n}\n";
455
+ var styles = {"container":"Stepper-module_container__DJqqd","stepsContainer":"Stepper-module_stepsContainer__BSRre","stepWrapper":"Stepper-module_stepWrapper__tLZrN","stepContent":"Stepper-module_stepContent__U41GC","circle":"Stepper-module_circle__NG20I","circleSmall":"Stepper-module_circleSmall__OvjYU","circleMedium":"Stepper-module_circleMedium__4USpR","circleLarge":"Stepper-module_circleLarge__YJTfR","circleActive":"Stepper-module_circleActive__b9Mg5","circleActiveSmall":"Stepper-module_circleActiveSmall__y038c","circleActiveMedium":"Stepper-module_circleActiveMedium__f5x7y","circleActiveLarge":"Stepper-module_circleActiveLarge__k5w2P","circleCompleted":"Stepper-module_circleCompleted__3PZzz","circleFuture":"Stepper-module_circleFuture__5QSu9","title":"Stepper-module_title__-ugD2","titleSmall":"Stepper-module_titleSmall__UaJEH","titleMedium":"Stepper-module_titleMedium__9l6Ig","titleLarge":"Stepper-module_titleLarge__CK7gk","titleActive":"Stepper-module_titleActive__DUnmr","titleClickable":"Stepper-module_titleClickable__b3i-v","titleCompleted":"Stepper-module_titleCompleted__VdB7c","titleFuture":"Stepper-module_titleFuture__cSPZD","link":"Stepper-module_link__3WBTp","button":"Stepper-module_button__2p5jI","connector":"Stepper-module_connector__7JYHQ","connectorCompleted":"Stepper-module_connectorCompleted__ZrGL7","connectorIncomplete":"Stepper-module_connectorIncomplete__6Gg1g"};
456
+ styleInject(css_248z);
457
+
458
+ const classNames = (...classes) => classes.filter(Boolean).join(" ");
427
459
  const sizeMap = {
428
460
  small: {
429
- circle: "w-6 h-6 text-xs",
430
- title: "text-xs",
431
- ring: "ring-2",
461
+ circle: styles.circleSmall,
462
+ title: styles.titleSmall,
463
+ ring: styles.circleActiveSmall,
432
464
  },
433
465
  medium: {
434
- circle: "w-10 h-10 text-base",
435
- title: "text-sm",
436
- ring: "ring-4",
466
+ circle: styles.circleMedium,
467
+ title: styles.titleMedium,
468
+ ring: styles.circleActiveMedium,
437
469
  },
438
470
  large: {
439
- circle: "w-16 h-16 text-xl",
440
- title: "text-lg",
441
- ring: "ring-8",
471
+ circle: styles.circleLarge,
472
+ title: styles.titleLarge,
473
+ ring: styles.circleActiveLarge,
442
474
  },
443
475
  };
444
476
  const ProgressSteps = ({ steps, currentStep, className = "", stepClickable = false, onStepChange, size = "medium", }) => {
@@ -449,24 +481,18 @@ const ProgressSteps = ({ steps, currentStep, className = "", stepClickable = fal
449
481
  if (onStepChange)
450
482
  onStepChange(step.number);
451
483
  };
452
- return (jsxRuntimeExports.jsx("div", { className: `mb-8 ${className}`, children: jsxRuntimeExports.jsx("div", { className: "flex items-center justify-between", children: steps.map((step, index) => {
484
+ return (jsxRuntimeExports.jsx("div", { className: classNames(styles.container, className), "data-testid": "progress-steps", children: jsxRuntimeExports.jsx("div", { className: styles.stepsContainer, children: steps.map((step, index) => {
453
485
  const isClickable = stepClickable && (step.link || step.onClick || onStepChange);
454
486
  const isActive = step.number === currentStep;
455
487
  const isFuture = step.number > currentStep;
456
488
  const isClickableStep = isClickable && !isActive;
457
- const stepContent = (jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center", children: [jsxRuntimeExports.jsx("div", { className: `rounded-full flex items-center justify-center font-semibold transition-all
458
- ${sizeStyles.circle}
459
- ${isActive ? `bg-blue-600 text-white ${sizeStyles.ring} ring-blue-300 shadow-lg scale-110` : ""}
460
- ${!isActive && !isFuture ? "bg-blue-50 text-blue-600" : ""}
461
- ${isFuture ? "bg-gray-300 text-gray-600" : ""}
462
- `, children: step.number }), jsxRuntimeExports.jsx("span", { className: `mt-2 font-medium transition-all
463
- ${sizeStyles.title}
464
- ${isActive ? "text-blue-700 font-bold" : ""}
465
- ${isClickableStep ? "text-blue-600 underline cursor-pointer hover:text-blue-800" : ""}
466
- ${!isActive && !isClickableStep && !isFuture ? "text-blue-600" : ""}
467
- ${isFuture ? "text-gray-500" : ""}
468
- `, children: step.title })] }));
469
- return (jsxRuntimeExports.jsxs("div", { className: "flex items-center flex-1", children: [isClickable ? (step.link ? (jsxRuntimeExports.jsx("a", { href: step.link, className: "hover:underline focus:outline-none", tabIndex: 0, children: stepContent })) : (jsxRuntimeExports.jsx("button", { type: "button", onClick: () => handleStepClick(step), className: "bg-transparent border-none p-0 m-0 focus:outline-none", children: stepContent }))) : (stepContent), index < steps.length - 1 && (jsxRuntimeExports.jsx("div", { className: `h-1 flex-1 mx-4 mt-[-20px] ${step.number < currentStep ? "bg-blue-600" : "bg-gray-300"}` }))] }, step.number));
489
+ const stepContent = (jsxRuntimeExports.jsxs("div", { className: styles.stepContent, children: [jsxRuntimeExports.jsx("div", { className: classNames(styles.circle, sizeStyles.circle, isActive && styles.circleActive, isActive && sizeStyles.ring, !isActive && !isFuture && styles.circleCompleted, isFuture && styles.circleFuture), "data-testid": `step-circle-${step.number}`, "data-active": isActive, "data-completed": !isActive && !isFuture, "data-future": isFuture, children: step.number }), jsxRuntimeExports.jsx("span", { className: classNames(styles.title, sizeStyles.title, isActive && styles.titleActive, isClickableStep && styles.titleClickable, !isActive &&
490
+ !isClickableStep &&
491
+ !isFuture &&
492
+ styles.titleCompleted, isFuture && styles.titleFuture), "data-testid": `step-title-${step.number}`, children: step.title })] }));
493
+ return (jsxRuntimeExports.jsxs("div", { className: styles.stepWrapper, children: [isClickable ? (step.link ? (jsxRuntimeExports.jsx("a", { href: step.link, className: styles.link, tabIndex: 0, children: stepContent })) : (jsxRuntimeExports.jsx("button", { type: "button", onClick: () => handleStepClick(step), className: styles.button, children: stepContent }))) : (stepContent), index < steps.length - 1 && (jsxRuntimeExports.jsx("div", { className: classNames(styles.connector, step.number < currentStep
494
+ ? styles.connectorCompleted
495
+ : styles.connectorIncomplete), "data-testid": `connector-${step.number}` }))] }, step.number));
470
496
  }) }) }));
471
497
  };
472
498
 
package/dist/index.esm.js CHANGED
@@ -422,21 +422,53 @@ function requireJsxRuntime () {
422
422
 
423
423
  var jsxRuntimeExports = requireJsxRuntime();
424
424
 
425
+ function styleInject(css, ref) {
426
+ if ( ref === void 0 ) ref = {};
427
+ var insertAt = ref.insertAt;
428
+
429
+ if (typeof document === 'undefined') { return; }
430
+
431
+ var head = document.head || document.getElementsByTagName('head')[0];
432
+ var style = document.createElement('style');
433
+ style.type = 'text/css';
434
+
435
+ if (insertAt === 'top') {
436
+ if (head.firstChild) {
437
+ head.insertBefore(style, head.firstChild);
438
+ } else {
439
+ head.appendChild(style);
440
+ }
441
+ } else {
442
+ head.appendChild(style);
443
+ }
444
+
445
+ if (style.styleSheet) {
446
+ style.styleSheet.cssText = css;
447
+ } else {
448
+ style.appendChild(document.createTextNode(css));
449
+ }
450
+ }
451
+
452
+ var css_248z = "/* Container */\n.Stepper-module_container__DJqqd {\n margin-bottom: 2rem;\n}\n\n/* Step container */\n.Stepper-module_stepsContainer__BSRre {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.Stepper-module_stepWrapper__tLZrN {\n display: flex;\n align-items: center;\n flex: 1;\n}\n\n.Stepper-module_stepContent__U41GC {\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n/* Circle */\n.Stepper-module_circle__NG20I {\n border-radius: 9999px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-weight: 600;\n transition: all 150ms ease;\n}\n\n/* Circle sizes */\n.Stepper-module_circleSmall__OvjYU {\n width: 1.5rem;\n height: 1.5rem;\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.Stepper-module_circleMedium__4USpR {\n width: 2.5rem;\n height: 2.5rem;\n font-size: 1rem;\n line-height: 1.5rem;\n}\n\n.Stepper-module_circleLarge__YJTfR {\n width: 4rem;\n height: 4rem;\n font-size: 1.25rem;\n line-height: 1.75rem;\n}\n\n/* Circle states */\n.Stepper-module_circleActive__b9Mg5 {\n background: #2563eb;\n color: white;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);\n transform: scale(1.1);\n}\n\n.Stepper-module_circleActiveSmall__y038c {\n box-shadow: 0 0 0 2px #93c5fd;\n}\n\n.Stepper-module_circleActiveMedium__f5x7y {\n box-shadow: 0 0 0 4px #93c5fd;\n}\n\n.Stepper-module_circleActiveLarge__k5w2P {\n box-shadow: 0 0 0 8px #93c5fd;\n}\n\n.Stepper-module_circleCompleted__3PZzz {\n background: #eff6ff;\n color: #2563eb;\n}\n\n.Stepper-module_circleFuture__5QSu9 {\n background: #d1d5db;\n color: #4b5563;\n}\n\n/* Title */\n.Stepper-module_title__-ugD2 {\n margin-top: 0.5rem;\n font-weight: 500;\n transition: all 150ms ease;\n}\n\n/* Title sizes */\n.Stepper-module_titleSmall__UaJEH {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.Stepper-module_titleMedium__9l6Ig {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n\n.Stepper-module_titleLarge__CK7gk {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n\n/* Title states */\n.Stepper-module_titleActive__DUnmr {\n color: #1d4ed8;\n font-weight: 700;\n}\n\n.Stepper-module_titleClickable__b3i-v {\n color: #2563eb;\n text-decoration: underline;\n cursor: pointer;\n}\n\n.Stepper-module_titleClickable__b3i-v:hover {\n color: #1e40af;\n}\n\n.Stepper-module_titleCompleted__VdB7c {\n color: #2563eb;\n}\n\n.Stepper-module_titleFuture__cSPZD {\n color: #6b7280;\n}\n\n/* Link and button styles */\n.Stepper-module_link__3WBTp {\n text-decoration: none;\n}\n\n.Stepper-module_link__3WBTp:hover {\n text-decoration: underline;\n}\n\n.Stepper-module_link__3WBTp:focus {\n outline: none;\n}\n\n.Stepper-module_button__2p5jI {\n background: transparent;\n border: none;\n padding: 0;\n margin: 0;\n cursor: pointer;\n}\n\n.Stepper-module_button__2p5jI:focus {\n outline: none;\n}\n\n/* Connector line */\n.Stepper-module_connector__7JYHQ {\n height: 0.25rem;\n flex: 1;\n margin-left: 1rem;\n margin-right: 1rem;\n margin-top: -1.25rem;\n}\n\n.Stepper-module_connectorCompleted__ZrGL7 {\n background: #2563eb;\n}\n\n.Stepper-module_connectorIncomplete__6Gg1g {\n background: #d1d5db;\n}\n";
453
+ var styles = {"container":"Stepper-module_container__DJqqd","stepsContainer":"Stepper-module_stepsContainer__BSRre","stepWrapper":"Stepper-module_stepWrapper__tLZrN","stepContent":"Stepper-module_stepContent__U41GC","circle":"Stepper-module_circle__NG20I","circleSmall":"Stepper-module_circleSmall__OvjYU","circleMedium":"Stepper-module_circleMedium__4USpR","circleLarge":"Stepper-module_circleLarge__YJTfR","circleActive":"Stepper-module_circleActive__b9Mg5","circleActiveSmall":"Stepper-module_circleActiveSmall__y038c","circleActiveMedium":"Stepper-module_circleActiveMedium__f5x7y","circleActiveLarge":"Stepper-module_circleActiveLarge__k5w2P","circleCompleted":"Stepper-module_circleCompleted__3PZzz","circleFuture":"Stepper-module_circleFuture__5QSu9","title":"Stepper-module_title__-ugD2","titleSmall":"Stepper-module_titleSmall__UaJEH","titleMedium":"Stepper-module_titleMedium__9l6Ig","titleLarge":"Stepper-module_titleLarge__CK7gk","titleActive":"Stepper-module_titleActive__DUnmr","titleClickable":"Stepper-module_titleClickable__b3i-v","titleCompleted":"Stepper-module_titleCompleted__VdB7c","titleFuture":"Stepper-module_titleFuture__cSPZD","link":"Stepper-module_link__3WBTp","button":"Stepper-module_button__2p5jI","connector":"Stepper-module_connector__7JYHQ","connectorCompleted":"Stepper-module_connectorCompleted__ZrGL7","connectorIncomplete":"Stepper-module_connectorIncomplete__6Gg1g"};
454
+ styleInject(css_248z);
455
+
456
+ const classNames = (...classes) => classes.filter(Boolean).join(" ");
425
457
  const sizeMap = {
426
458
  small: {
427
- circle: "w-6 h-6 text-xs",
428
- title: "text-xs",
429
- ring: "ring-2",
459
+ circle: styles.circleSmall,
460
+ title: styles.titleSmall,
461
+ ring: styles.circleActiveSmall,
430
462
  },
431
463
  medium: {
432
- circle: "w-10 h-10 text-base",
433
- title: "text-sm",
434
- ring: "ring-4",
464
+ circle: styles.circleMedium,
465
+ title: styles.titleMedium,
466
+ ring: styles.circleActiveMedium,
435
467
  },
436
468
  large: {
437
- circle: "w-16 h-16 text-xl",
438
- title: "text-lg",
439
- ring: "ring-8",
469
+ circle: styles.circleLarge,
470
+ title: styles.titleLarge,
471
+ ring: styles.circleActiveLarge,
440
472
  },
441
473
  };
442
474
  const ProgressSteps = ({ steps, currentStep, className = "", stepClickable = false, onStepChange, size = "medium", }) => {
@@ -447,24 +479,18 @@ const ProgressSteps = ({ steps, currentStep, className = "", stepClickable = fal
447
479
  if (onStepChange)
448
480
  onStepChange(step.number);
449
481
  };
450
- return (jsxRuntimeExports.jsx("div", { className: `mb-8 ${className}`, children: jsxRuntimeExports.jsx("div", { className: "flex items-center justify-between", children: steps.map((step, index) => {
482
+ return (jsxRuntimeExports.jsx("div", { className: classNames(styles.container, className), "data-testid": "progress-steps", children: jsxRuntimeExports.jsx("div", { className: styles.stepsContainer, children: steps.map((step, index) => {
451
483
  const isClickable = stepClickable && (step.link || step.onClick || onStepChange);
452
484
  const isActive = step.number === currentStep;
453
485
  const isFuture = step.number > currentStep;
454
486
  const isClickableStep = isClickable && !isActive;
455
- const stepContent = (jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center", children: [jsxRuntimeExports.jsx("div", { className: `rounded-full flex items-center justify-center font-semibold transition-all
456
- ${sizeStyles.circle}
457
- ${isActive ? `bg-blue-600 text-white ${sizeStyles.ring} ring-blue-300 shadow-lg scale-110` : ""}
458
- ${!isActive && !isFuture ? "bg-blue-50 text-blue-600" : ""}
459
- ${isFuture ? "bg-gray-300 text-gray-600" : ""}
460
- `, children: step.number }), jsxRuntimeExports.jsx("span", { className: `mt-2 font-medium transition-all
461
- ${sizeStyles.title}
462
- ${isActive ? "text-blue-700 font-bold" : ""}
463
- ${isClickableStep ? "text-blue-600 underline cursor-pointer hover:text-blue-800" : ""}
464
- ${!isActive && !isClickableStep && !isFuture ? "text-blue-600" : ""}
465
- ${isFuture ? "text-gray-500" : ""}
466
- `, children: step.title })] }));
467
- return (jsxRuntimeExports.jsxs("div", { className: "flex items-center flex-1", children: [isClickable ? (step.link ? (jsxRuntimeExports.jsx("a", { href: step.link, className: "hover:underline focus:outline-none", tabIndex: 0, children: stepContent })) : (jsxRuntimeExports.jsx("button", { type: "button", onClick: () => handleStepClick(step), className: "bg-transparent border-none p-0 m-0 focus:outline-none", children: stepContent }))) : (stepContent), index < steps.length - 1 && (jsxRuntimeExports.jsx("div", { className: `h-1 flex-1 mx-4 mt-[-20px] ${step.number < currentStep ? "bg-blue-600" : "bg-gray-300"}` }))] }, step.number));
487
+ const stepContent = (jsxRuntimeExports.jsxs("div", { className: styles.stepContent, children: [jsxRuntimeExports.jsx("div", { className: classNames(styles.circle, sizeStyles.circle, isActive && styles.circleActive, isActive && sizeStyles.ring, !isActive && !isFuture && styles.circleCompleted, isFuture && styles.circleFuture), "data-testid": `step-circle-${step.number}`, "data-active": isActive, "data-completed": !isActive && !isFuture, "data-future": isFuture, children: step.number }), jsxRuntimeExports.jsx("span", { className: classNames(styles.title, sizeStyles.title, isActive && styles.titleActive, isClickableStep && styles.titleClickable, !isActive &&
488
+ !isClickableStep &&
489
+ !isFuture &&
490
+ styles.titleCompleted, isFuture && styles.titleFuture), "data-testid": `step-title-${step.number}`, children: step.title })] }));
491
+ return (jsxRuntimeExports.jsxs("div", { className: styles.stepWrapper, children: [isClickable ? (step.link ? (jsxRuntimeExports.jsx("a", { href: step.link, className: styles.link, tabIndex: 0, children: stepContent })) : (jsxRuntimeExports.jsx("button", { type: "button", onClick: () => handleStepClick(step), className: styles.button, children: stepContent }))) : (stepContent), index < steps.length - 1 && (jsxRuntimeExports.jsx("div", { className: classNames(styles.connector, step.number < currentStep
492
+ ? styles.connectorCompleted
493
+ : styles.connectorIncomplete), "data-testid": `connector-${step.number}` }))] }, step.number));
468
494
  }) }) }));
469
495
  };
470
496
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubenpazch/stepper",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "Stepper component",
5
5
  "private": false,
6
6
  "main": "dist/index.cjs.js",
@@ -16,7 +16,9 @@
16
16
  "files": [
17
17
  "dist"
18
18
  ],
19
- "sideEffects": false,
19
+ "sideEffects": [
20
+ "**/*.css"
21
+ ],
20
22
  "exports": {
21
23
  ".": {
22
24
  "import": "./dist/index.esm.js",