@progressive-development/pd-wizard 0.1.62 → 0.1.64

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/PdWizard.js +31 -59
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "order",
15
15
  "steps"
16
16
  ],
17
- "version": "0.1.62",
17
+ "version": "0.1.64",
18
18
  "main": "index.js",
19
19
  "module": "index.js",
20
20
  "scripts": {
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@lit/localize": "^0.11.4",
34
- "@progressive-development/pd-forms": "^0.2.8",
34
+ "@progressive-development/pd-forms": "^0.2.9",
35
35
  "@progressive-development/pd-icon": "^0.1.20",
36
36
  "@progressive-development/pd-shared-styles": "0.1.1",
37
37
  "lit": "^2.8.0"
package/src/PdWizard.js CHANGED
@@ -7,7 +7,7 @@
7
7
  import { LitElement, html, css } from 'lit';
8
8
  import { msg, updateWhenLocaleChanges } from '@lit/localize';
9
9
 
10
- import { ICON_CLOSE as CLOSEICON, ICON_ARROW_BACK, ICON_CAMERA, ICON_CHECKBOX, ICON_NEXT, ICON_PREVIOUS, ICON_XCLOSE } from '@progressive-development/pd-icon/src/PdIcon.js';
10
+ import { ICON_CLOSE as CLOSEICON, ICON_XCLOSE } from '@progressive-development/pd-icon/src/PdIcon.js';
11
11
 
12
12
  import '@progressive-development/pd-icon/pd-icon.js';
13
13
  import '@progressive-development/pd-forms/pd-button.js';
@@ -156,13 +156,8 @@ export class PdWizard extends LitElement {
156
156
  font-family: var(--pd-default-font-title-family);
157
157
  }
158
158
 
159
- .header-icons {
160
- display: flex;
161
- align-items: center;
162
- gap: 0.2em;
163
- }
164
-
165
- .header-icons pd-icon {
159
+ .panel-close-icon {
160
+ --pd-icon-size: 3em;
166
161
  --pd-icon-stroke-col-active: var(--pd-default-col);
167
162
  --pd-icon-col-active: var(--pd-default-light-col);
168
163
  --pd-icon-stroke-col: var(--pd-default-col);
@@ -170,16 +165,6 @@ export class PdWizard extends LitElement {
170
165
  cursor: pointer;
171
166
  }
172
167
 
173
- .next-arrow {
174
- transform: rotate(180deg);
175
- margin-right: 1.8em;
176
- padding-right: 0.5em;
177
- }
178
-
179
- .panel-close-icon {
180
- --pd-icon-size: 3em;
181
- }
182
-
183
168
 
184
169
  /* Size Elements for small width */
185
170
  @media (max-width: 700px) {
@@ -222,19 +207,8 @@ export class PdWizard extends LitElement {
222
207
  <h1>${this.currentNumber >= 1 && this.wizardSteps
223
208
  ? this.wizardSteps[this.currentNumber - 1].title
224
209
  : 'No-Title'}</h1>
225
- <div class="header-icons">
226
-
227
- <pd-icon icon="${ICON_ARROW_BACK}" ?disabled="${this.currentNumber === 1}"
228
- title="Previous Step" activeIcon @click="${this._previousStep}"></pd-icon>
229
- <pd-icon class="next-arrow" icon="${ICON_ARROW_BACK}" ?disabled="${this.wizardSteps[this.currentNumber - 1].next === false || this.currentNumber === this.wizardSteps.length}"
230
- title="Next Step" activeIcon @click="${this._nextStep}"></pd-icon>
231
-
232
- <pd-icon class="panel-close-icon" ?disabled="${this.currentNumber !== this.wizardSteps.length}"
233
- title="Submit" activeIcon icon="${ICON_CHECKBOX}" @click="${this._submit}"></pd-icon>
234
- <pd-icon class="panel-close-icon"
235
- title="Close" activeIcon icon="${ICON_XCLOSE}" @click="${this._closeWizard}"></pd-icon>
236
-
237
- </div>
210
+ <pd-icon class="panel-close-icon"
211
+ title="Close" activeIcon icon="${ICON_XCLOSE}" @click="${this._closeWizard}"></pd-icon>
238
212
  </div>
239
213
  ` : html`
240
214
  <div class="wiz-title">
@@ -278,36 +252,34 @@ export class PdWizard extends LitElement {
278
252
  </div>
279
253
 
280
254
  </div>
281
-
282
- ${!this.panelWizard ? html`
255
+
283
256
  <div class="wiz-buttons">
284
- ${this.currentNumber >= 1 && this.wizardSteps
285
- ? html`
286
- <pd-button
287
- @button-clicked="${this._previousStep}"
288
- text="${msg('Zurück', {desc: '#pd.wizard.back#'})}"
289
- style="visibility: ${this.currentNumber === 1
290
- ? 'hidden'
291
- : 'visible'};"
292
- ></pd-button>
293
- ${this.currentNumber !== this.wizardSteps.length &&
294
- this.wizardSteps[this.currentNumber - 1].next !== false
295
- ? html`<pd-button
296
- @button-clicked="${this._nextStep}"
297
- text="${msg('Weiter', {desc: '#pd.wizard.next#'})}"
298
- ></pd-button>`
299
- : ''}
300
- ${this.currentNumber === this.wizardSteps.length
301
- ? html`<pd-button
302
- primary
303
- @button-clicked="${this._submit}"
304
- text="${msg('Absenden', {desc: '#pd.wizard.submit#'})}"
305
- ></pd-button>`
306
- : ''}
307
- `
308
- : ''}
257
+ ${this.currentNumber >= 1 && this.wizardSteps
258
+ ? html`
259
+ <pd-button
260
+ @button-clicked="${this._previousStep}"
261
+ text="${msg('Zurück', {desc: '#pd.wizard.back#'})}"
262
+ style="visibility: ${this.currentNumber === 1
263
+ ? 'hidden'
264
+ : 'visible'};"
265
+ ></pd-button>
266
+ ${this.currentNumber !== this.wizardSteps.length &&
267
+ this.wizardSteps[this.currentNumber - 1].next !== false
268
+ ? html`<pd-button
269
+ @button-clicked="${this._nextStep}"
270
+ text="${msg('Weiter', {desc: '#pd.wizard.next#'})}"
271
+ ></pd-button>`
272
+ : ''}
273
+ ${this.currentNumber === this.wizardSteps.length
274
+ ? html`<pd-button
275
+ primary
276
+ @button-clicked="${this._submit}"
277
+ text="${msg('Absenden', {desc: '#pd.wizard.submit#'})}"
278
+ ></pd-button>`
279
+ : ''}
280
+ `
281
+ : ''}
309
282
  </div>
310
- ` : ''}
311
283
  `;
312
284
  }
313
285
  return '';