Compare commits

...

5 Commits

Author SHA1 Message Date
ca7aa12218 v2.0.2
Some checks failed
Default (tags) / security (push) Failing after 16s
Default (tags) / test (push) Failing after 17s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2025-11-30 23:57:14 +00:00
c2ee19308d fix(dees-stepper): Make step validation abortable and cancel active step listeners when navigating 2025-11-30 23:57:14 +00:00
5e27449e50 v2.0.1
Some checks failed
Default (tags) / security (push) Failing after 17s
Default (tags) / test (push) Failing after 18s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2025-11-30 23:46:39 +00:00
d69f777b25 fix(dees-stepper): Improve dees-stepper visual style and transitions 2025-11-30 23:46:39 +00:00
caa954a539 update 2025-11-30 23:39:04 +00:00
5 changed files with 49 additions and 20 deletions

View File

@@ -1,5 +1,23 @@
# Changelog # Changelog
## 2025-11-30 - 2.0.2 - fix(dees-stepper)
Make step validation abortable and cancel active step listeners when navigating
- Extend IStep.validationFunc signature to accept an optional AbortSignal so validation handlers can be cancelled.
- Store an AbortController on the selected step and pass its signal into validationFunc when invoked.
- Abort the step's AbortController when navigating to the previous or next step to cancel any active listeners or async operations.
## 2025-11-30 - 2.0.1 - fix(dees-stepper)
Improve dees-stepper visual style and transitions
- Smooth animation: extend .step transition duration and use a cubic-bezier curve for smoother motion.
- Add .step.entrance class with a shorter easing for entrance animations to keep entrance timing distinct.
- Visual tweaks: reduce border-radius from 18px to 12px and increase inner content padding to 32px.
- Color and border updates: adjust background and border colors for light/dark themes to more consistent values.
- Shadow simplification: replace theme-dependent heavy shadows with a single subtle shadow (0 8px 32px rgba(0,0,0,0.4)).
- Remove selected-state border/box-shadow overrides (selection visuals simplified).
- Remove background-clip: padding-box to simplify rendering.
## 2025-11-17 - 2.0.0 - BREAKING CHANGE(decorators) ## 2025-11-17 - 2.0.0 - BREAKING CHANGE(decorators)
Migrate to TC39 standard decorators (accessor) across components, update tsconfig and bump dependencies Migrate to TC39 standard decorators (accessor) across components, update tsconfig and bump dependencies

View File

@@ -1,6 +1,6 @@
{ {
"name": "@design.estate/dees-catalog", "name": "@design.estate/dees-catalog",
"version": "2.0.0", "version": "2.0.2",
"private": false, "private": false,
"description": "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.", "description": "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.",
"main": "dist_ts_web/index.js", "main": "dist_ts_web/index.js",

View File

@@ -1,4 +0,0 @@
onlyBuiltDependencies:
- esbuild
- mongodb-memory-server
- puppeteer

View File

@@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@design.estate/dees-catalog', name: '@design.estate/dees-catalog',
version: '2.0.0', version: '2.0.2',
description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.' description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
} }

View File

@@ -19,9 +19,10 @@ import { stepperDemo } from './dees-stepper.demo.js';
export interface IStep { export interface IStep {
title: string; title: string;
content: TemplateResult; content: TemplateResult;
validationFunc?: (stepper: DeesStepper, htmlElement: HTMLElement) => Promise<any>; validationFunc?: (stepper: DeesStepper, htmlElement: HTMLElement, signal?: AbortSignal) => Promise<any>;
onReturnToStepFunc?: (stepper: DeesStepper, htmlElement: HTMLElement) => Promise<any>; onReturnToStepFunc?: (stepper: DeesStepper, htmlElement: HTMLElement) => Promise<any>;
validationFuncCalled?: boolean; validationFuncCalled?: boolean;
abortController?: AbortController;
} }
declare global { declare global {
@@ -60,7 +61,6 @@ export class DeesStepper extends DeesElement {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: ${cssManager.bdTheme('#eeeeeb', '#000')};
overflow: hidden; overflow: hidden;
} }
@@ -68,32 +68,35 @@ export class DeesStepper extends DeesElement {
position: relative; position: relative;
pointer-events: none; pointer-events: none;
overflow: hidden; overflow: hidden;
transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease, border 0.35s ease; transition: transform 0.7s cubic-bezier(0.87, 0, 0.13, 1), box-shadow 0.7s cubic-bezier(0.87, 0, 0.13, 1), filter 0.7s cubic-bezier(0.87, 0, 0.13, 1), border 0.7s cubic-bezier(0.87, 0, 0.13, 1);
max-width: 500px; max-width: 500px;
min-height: 300px; min-height: 300px;
border-radius: 18px; border-radius: 12px;
background: ${cssManager.bdTheme('#ffffff', '#18181b')}; background: ${cssManager.bdTheme('#ffffff', '#0f0f11')};
border: 1px solid ${cssManager.bdTheme('rgba(226, 232, 240, 0.9)', 'rgba(63, 63, 70, 0.85)')}; border: 1px solid ${cssManager.bdTheme('#e2e8f0', '#272729')};
color: ${cssManager.bdTheme('#0f172a', '#f5f5f5')}; color: ${cssManager.bdTheme('#0f172a', '#f5f5f5')};
margin: auto; margin: auto;
margin-bottom: 20px; margin-bottom: 20px;
filter: opacity(0.55) saturate(0.85); filter: opacity(0.55) saturate(0.85);
box-shadow: ${cssManager.bdTheme('0 20px 40px -25px rgba(15, 23, 42, 0.45)', '0 20px 36px -22px rgba(15, 23, 42, 0.65)')}; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
user-select: none; user-select: none;
background-clip: padding-box;
} }
.step.selected { .step.selected {
pointer-events: all; pointer-events: all;
filter: opacity(1) saturate(1); filter: opacity(1) saturate(1);
transform: translateY(-6px);
border: 1px solid ${cssManager.bdTheme(colors.dark.blue, colors.dark.blue)};
box-shadow: ${cssManager.bdTheme('0 28px 60px -30px rgba(15, 23, 42, 0.42)', '0 26px 55px -28px rgba(37, 99, 235, 0.6)')};
user-select: auto; user-select: auto;
} }
.step.hiddenStep { .step.hiddenStep {
filter: opacity(0); filter: opacity(0);
}
.step.entrance {
transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease, border 0.35s ease;
}
.step.entrance.hiddenStep {
transform: translateY(16px); transform: translateY(16px);
} }
@@ -164,7 +167,7 @@ export class DeesStepper extends DeesElement {
} }
.step .content { .step .content {
padding: 24px 28px 32px; padding: 32px;
} }
`, `,
]; ];
@@ -179,7 +182,7 @@ export class DeesStepper extends DeesElement {
? 'selected' ? 'selected'
: null} ${this.getIndexOfStep(stepArg) > this.getIndexOfStep(this.selectedStep) : null} ${this.getIndexOfStep(stepArg) > this.getIndexOfStep(this.selectedStep)
? 'hiddenStep' ? 'hiddenStep'
: ''}" : ''} ${this.getIndexOfStep(stepArg) === 0 ? 'entrance' : ''}"
> >
${this.getIndexOfStep(stepArg) > 0 ${this.getIndexOfStep(stepArg) > 0
? html`<div class="goBack" @click=${this.goBack}><span style="font-family: Inter"><-</span> go to previous step</div>` ? html`<div class="goBack" @click=${this.goBack}><span style="font-family: Inter"><-</span> go to previous step</div>`
@@ -205,6 +208,9 @@ export class DeesStepper extends DeesElement {
await this.domtools.convenience.smartdelay.delayFor(0); await this.domtools.convenience.smartdelay.delayFor(0);
this.selectedStep = this.steps[0]; this.selectedStep = this.steps[0];
this.setScrollStatus(); this.setScrollStatus();
// Remove entrance class after initial animation completes
await this.domtools.convenience.smartdelay.delayFor(350);
this.shadowRoot.querySelector('.step.entrance')?.classList.remove('entrance');
} }
public async updated() { public async updated() {
@@ -245,8 +251,9 @@ export class DeesStepper extends DeesElement {
); );
} }
if (!this.selectedStep.validationFuncCalled && this.selectedStep.validationFunc) { if (!this.selectedStep.validationFuncCalled && this.selectedStep.validationFunc) {
this.selectedStep.abortController = new AbortController();
this.selectedStep.validationFuncCalled = true; this.selectedStep.validationFuncCalled = true;
await this.selectedStep.validationFunc(this, selectedStepElement); await this.selectedStep.validationFunc(this, selectedStepElement, this.selectedStep.abortController.signal);
} }
this.scroller.to(scrollPosition); this.scroller.to(scrollPosition);
} }
@@ -256,6 +263,10 @@ export class DeesStepper extends DeesElement {
if (currentIndex <= 0) { if (currentIndex <= 0) {
return; return;
} }
// Abort any active listeners on current step
if (this.selectedStep.abortController) {
this.selectedStep.abortController.abort();
}
const currentStep = this.steps[currentIndex]; const currentStep = this.steps[currentIndex];
currentStep.validationFuncCalled = false; currentStep.validationFuncCalled = false;
const previousStep = this.steps[currentIndex - 1]; const previousStep = this.steps[currentIndex - 1];
@@ -271,6 +282,10 @@ export class DeesStepper extends DeesElement {
if (currentIndex < 0 || currentIndex >= this.steps.length - 1) { if (currentIndex < 0 || currentIndex >= this.steps.length - 1) {
return; return;
} }
// Abort any active listeners on current step
if (this.selectedStep.abortController) {
this.selectedStep.abortController.abort();
}
const currentStep = this.steps[currentIndex]; const currentStep = this.steps[currentIndex];
currentStep.validationFuncCalled = false; currentStep.validationFuncCalled = false;
const nextStep = this.steps[currentIndex + 1]; const nextStep = this.steps[currentIndex + 1];