Добавить трёхшаговый UI регистрации

This commit is contained in:
AidarKC
2026-11-05 00:04:05 +03:00
parent c13734cbc9
commit 41d5e79f83
19 changed files with 900 additions and 170 deletions
@@ -0,0 +1,19 @@
/** В выборе тарифа счётчик не показываем: он начинается с логина. */
export function createRegistrationStepper(step) {
const current = Math.max(1, Math.min(3, Number(step) || 1));
const wrapper = document.createElement('div');
wrapper.className = 'signup-stepper';
wrapper.setAttribute('aria-label', `Регистрация: шаг ${current} из 3`);
const dots = document.createElement('div');
dots.className = 'signup-stepper__dots';
for (let i = 1; i <= 3; i += 1) {
const dot = document.createElement('span');
dot.className = `signup-stepper__dot${i === current ? ' is-active' : ''}${i < current ? ' is-complete' : ''}`;
dots.append(dot);
}
const label = document.createElement('span');
label.className = 'signup-stepper__label';
label.textContent = `Шаг ${current} из 3`;
wrapper.append(dots, label);
return wrapper;
}