aw-wizard-forms 4.9.0 → 4.9.2

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.
@@ -16,8 +16,8 @@
16
16
  --wf-color-badge-bg: #fcfcfc;
17
17
  --wf-color-badge-border: #d4d4d4;
18
18
  --wf-color-badge-text: #5f5f5f;
19
- --wf-color-progress-active: rgba(0, 0, 0, 0.1);
20
- --wf-color-progress-inactive: rgba(0, 0, 0, 0.05);
19
+ --wf-color-progress-active: rgba(136, 66, 240, 0.6);
20
+ --wf-color-progress-inactive: rgba(255, 255, 255, 0.6);
21
21
 
22
22
  /* Focus ring */
23
23
  --wf-focus-ring-width: 3px;
@@ -1017,15 +1017,15 @@
1017
1017
  .wf-progress-segment {
1018
1018
  width: 32px;
1019
1019
  height: 8px;
1020
- background-color: rgba(255, 255, 255, 0.6);
1021
-
1020
+ background-color: var(--wf-color-progress-inactive);
1021
+
1022
1022
  border-radius: 100vw;
1023
1023
  transition: background-color 300ms ease;
1024
1024
  }
1025
1025
 
1026
1026
  .wf-progress-segment.completed,
1027
1027
  .wf-progress-segment.active {
1028
- background-color: rgba(136, 66, 240, 0.6);
1028
+ background-color: var(--wf-color-progress-active);
1029
1029
  }
1030
1030
  `];var ye=Object.defineProperty,Se=Object.getOwnPropertyDescriptor,xe=(t,e,s,r)=>{for(var i,o=r>1?void 0:r?Se(e,s):e,a=t.length-1;a>=0;a--)(i=t[a])&&(o=(r?i(e,s,o):i(o))||o);return r&&o&&ye(e,s,o),o};t.WfProgress=class extends ct{constructor(){super(...arguments),this.for="",this._currentStep=1,this._totalSteps=1,this._isComplete=!1,this._wizard=null,this._boundHandleStepChange=this._handleStepChange.bind(this),this._boundHandleSuccess=this._handleSuccess.bind(this),this._boundHandleStepsDiscovered=this._handleStepsDiscovered.bind(this)}connectedCallback(){super.connectedCallback(),document.addEventListener("wf:steps-discovered",this._boundHandleStepsDiscovered),requestAnimationFrame(()=>{this._connectToWizard()})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("wf:steps-discovered",this._boundHandleStepsDiscovered),this._disconnectFromWizard()}_connectToWizard(){this.for?this._wizard=document.getElementById(this.for):this._wizard=this.closest("wizard-form"),this._wizard&&(this._currentStep=this._wizard.currentStep||1,this._totalSteps=this._wizard.totalSteps||1,this._isComplete=this._wizard.isSubmitted||!1,this._wizard.addEventListener("wf:step-change",this._boundHandleStepChange),this._wizard.addEventListener("wf:success",this._boundHandleSuccess))}_disconnectFromWizard(){this._wizard&&(this._wizard.removeEventListener("wf:step-change",this._boundHandleStepChange),this._wizard.removeEventListener("wf:success",this._boundHandleSuccess),this._wizard=null)}_handleStepChange(t){this._currentStep=t.detail.to,this._wizard&&(this._totalSteps=this._wizard.totalSteps)}_handleStepsDiscovered(t){const{wizard:e,wizardId:s,totalSteps:r,currentStep:i}=t.detail;if(this.for){if(s!==this.for)return}else{const t=this.closest("wizard-form");if(!t||t!==e)return}!this._wizard&&e&&(this._wizard=e,e.addEventListener("wf:step-change",this._boundHandleStepChange),e.addEventListener("wf:success",this._boundHandleSuccess)),this._totalSteps=r,this._currentStep=i}_handleSuccess(){this._isComplete=!0}render(){if(this._isComplete)return null;const t=[];for(let e=1;e<=this._totalSteps;e++){const s=e<this._currentStep,r=e===this._currentStep;t.push(K`
1031
1031
  <div