@progressive-development/pd-wizard 0.9.1 → 1.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.
Files changed (75) hide show
  1. package/LICENSE +21 -2
  2. package/README.md +33 -57
  3. package/dist/default-step-address/DefaultStepAddress.d.ts +26 -0
  4. package/dist/default-step-address/DefaultStepAddress.d.ts.map +1 -0
  5. package/dist/default-step-address/DefaultStepAddress.js +66 -0
  6. package/dist/default-step-address/default-step-address.d.ts +2 -0
  7. package/dist/default-step-address/default-step-address.d.ts.map +1 -0
  8. package/dist/default-step-address.d.ts +2 -0
  9. package/dist/default-step-address.js +1 -0
  10. package/dist/default-step-summary/DefaultStepSummary.d.ts +58 -0
  11. package/dist/default-step-summary/DefaultStepSummary.d.ts.map +1 -0
  12. package/dist/default-step-summary/DefaultStepSummary.js +77 -0
  13. package/dist/default-step-summary/default-step-summary.d.ts +3 -0
  14. package/dist/default-step-summary/default-step-summary.d.ts.map +1 -0
  15. package/dist/default-step-summary.d.ts +2 -0
  16. package/dist/default-step-summary.js +1 -0
  17. package/dist/default-wizard/DefaultWizard.d.ts +57 -0
  18. package/dist/default-wizard/DefaultWizard.d.ts.map +1 -0
  19. package/dist/default-wizard/DefaultWizard.js +270 -0
  20. package/dist/default-wizard/default-wizard.d.ts +3 -0
  21. package/dist/default-wizard/default-wizard.d.ts.map +1 -0
  22. package/dist/default-wizard.d.ts +2 -0
  23. package/dist/default-wizard.js +1 -0
  24. package/dist/generated/locales/be.d.ts +17 -0
  25. package/dist/generated/locales/be.d.ts.map +1 -1
  26. package/dist/generated/locales/de.d.ts +17 -0
  27. package/dist/generated/locales/de.d.ts.map +1 -1
  28. package/dist/generated/locales/en.d.ts +17 -0
  29. package/dist/generated/locales/en.d.ts.map +1 -1
  30. package/dist/index.d.ts +10 -0
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +8 -0
  33. package/dist/locales/be.js +20 -1
  34. package/dist/locales/de.js +20 -1
  35. package/dist/locales/en.js +20 -1
  36. package/dist/pd-components/pd-content/dist/pd-notice-box/PdNoticeBox.js +224 -0
  37. package/dist/pd-components/pd-content/dist/pd-notice-box/pd-notice-box.js +8 -0
  38. package/dist/pd-default-wizard-step/PdDefaultWizardStep.d.ts +85 -0
  39. package/dist/pd-default-wizard-step/PdDefaultWizardStep.d.ts.map +1 -0
  40. package/dist/pd-default-wizard-step/PdDefaultWizardStep.js +167 -0
  41. package/dist/pd-default-wizard-step/pd-default-wizard-step.d.ts +2 -0
  42. package/dist/pd-default-wizard-step/pd-default-wizard-step.d.ts.map +1 -0
  43. package/dist/pd-default-wizard-step.d.ts +2 -0
  44. package/dist/pd-default-wizard-step.js +1 -0
  45. package/dist/pd-utils/dist/date-helper.js +35 -0
  46. package/dist/pd-utils/dist/locale-format.js +6 -0
  47. package/dist/pd-wizard/PdWizard.d.ts +36 -23
  48. package/dist/pd-wizard/PdWizard.d.ts.map +1 -1
  49. package/dist/pd-wizard/PdWizard.js +91 -145
  50. package/dist/pd-wizard/pd-steps/PdSteps.d.ts +26 -10
  51. package/dist/pd-wizard/pd-steps/PdSteps.d.ts.map +1 -1
  52. package/dist/pd-wizard/pd-steps/PdSteps.js +126 -62
  53. package/dist/pd-wizard/pd-steps/pd-steps.stories.d.ts +45 -37
  54. package/dist/pd-wizard/pd-steps/pd-steps.stories.d.ts.map +1 -1
  55. package/dist/pd-wizard/pd-wizard.stories.d.ts +46 -7
  56. package/dist/pd-wizard/pd-wizard.stories.d.ts.map +1 -1
  57. package/dist/wizard-close-popup/WizardClosePopup.d.ts +12 -0
  58. package/dist/wizard-close-popup/WizardClosePopup.d.ts.map +1 -0
  59. package/dist/wizard-close-popup/WizardClosePopup.js +56 -0
  60. package/dist/wizard-close-popup/wizard-close-popup.d.ts +2 -0
  61. package/dist/wizard-close-popup/wizard-close-popup.d.ts.map +1 -0
  62. package/dist/wizard-close-popup/wizard-close-popup.stories.d.ts +39 -0
  63. package/dist/wizard-close-popup/wizard-close-popup.stories.d.ts.map +1 -0
  64. package/dist/wizard-close-popup.d.ts +2 -0
  65. package/dist/wizard-close-popup.js +1 -0
  66. package/dist/wizard-reload-popup/WizardReloadPopup.d.ts +19 -0
  67. package/dist/wizard-reload-popup/WizardReloadPopup.d.ts.map +1 -0
  68. package/dist/wizard-reload-popup/WizardReloadPopup.js +88 -0
  69. package/dist/wizard-reload-popup/wizard-reload-popup.d.ts +3 -0
  70. package/dist/wizard-reload-popup/wizard-reload-popup.d.ts.map +1 -0
  71. package/dist/wizard-reload-popup/wizard-reload-popup.stories.d.ts +42 -0
  72. package/dist/wizard-reload-popup/wizard-reload-popup.stories.d.ts.map +1 -0
  73. package/dist/wizard-reload-popup.d.ts +2 -0
  74. package/dist/wizard-reload-popup.js +1 -0
  75. package/package.json +19 -6
@@ -1,6 +1,8 @@
1
1
  import { LitElement, css, html } from 'lit';
2
2
  import { property } from 'lit/decorators.js';
3
- import { PdColorStyles, PdFontStyles } from '@progressive-development/pd-shared-styles';
3
+ import { classMap } from 'lit/directives/class-map.js';
4
+ import { ifDefined } from 'lit/directives/if-defined.js';
5
+ import { msg, str } from '@lit/localize';
4
6
 
5
7
  var __defProp = Object.defineProperty;
6
8
  var __decorateClass = (decorators, target, key, kind) => {
@@ -20,15 +22,20 @@ class PdSteps extends LitElement {
20
22
  }
21
23
  static {
22
24
  this.styles = [
23
- PdColorStyles,
24
- PdFontStyles,
25
25
  css`
26
+ /* =========================================================================
27
+ HOST & LAYOUT
28
+ ========================================================================= */
26
29
  :host {
27
- --circle-size: var(--pd-step-circle-size, 40px);
30
+ --_circle-size: var(--pd-step-circle-size, 40px);
31
+ --_name-font-size: var(--pd-step-name-font-size, 0.9em);
32
+ --_color: var(--pd-step-color, var(--pd-on-primary-col));
33
+ --_bg: var(--pd-step-bg, var(--pd-default-col));
34
+
28
35
  display: block;
29
- background-color: var(--pd-steps-bg-color, var(--pd-default-col));
30
- padding-top: var(--pd-step-padding-top, 0.5em);
31
- padding-bottom: calc(var(--pd-step-name-font-size, 1em) * 2.5);
36
+ background-color: var(--_bg);
37
+ padding-top: 0.5em;
38
+ padding-bottom: calc(var(--_name-font-size) * 2.5);
32
39
  }
33
40
 
34
41
  .parent {
@@ -38,6 +45,9 @@ class PdSteps extends LitElement {
38
45
  position: relative;
39
46
  }
40
47
 
48
+ /* =========================================================================
49
+ STEP CONTAINER (state holder)
50
+ ========================================================================= */
41
51
  .step-container {
42
52
  display: flex;
43
53
  flex-direction: column;
@@ -48,81 +58,108 @@ class PdSteps extends LitElement {
48
58
  position: relative;
49
59
  }
50
60
 
51
- .step.circle {
52
- width: var(--circle-size);
53
- height: var(--circle-size);
61
+ /* =========================================================================
62
+ CIRCLE (the clickable step indicator)
63
+ ========================================================================= */
64
+ .step {
65
+ width: var(--_circle-size);
66
+ height: var(--_circle-size);
54
67
  border-radius: 50%;
55
- border: solid var(--pd-step-circle-border-size, 2px)
56
- var(--pd-step-circle-border-color, white);
57
- background-color: var(--pd-step-circle-bg-color, var(--pd-default-col));
68
+ border: solid 2px var(--_color);
69
+ background-color: var(--_bg);
58
70
  display: flex;
59
71
  justify-content: center;
60
72
  align-items: center;
61
73
  position: relative;
62
- z-index: 51; /* Ensure the circle is above the hr line */
74
+ z-index: 51;
63
75
  }
64
76
 
65
- /* Dynamische Schriftgröße der Nummer */
77
+ /* =========================================================================
78
+ STEP NUMBER (inside circle)
79
+ ========================================================================= */
66
80
  .step-nr {
67
81
  font-family: var(--pd-default-font-title-family);
68
82
  font-weight: bold;
69
- color: var(--pd-step-circle-nr-color, white);
70
- font-size: calc(var(--circle-size) / 1.8);
83
+ font-size: calc(var(--_circle-size) / 1.8);
84
+ color: var(--_color);
71
85
  position: absolute;
72
86
  pointer-events: none;
73
87
  }
74
88
 
89
+ /* =========================================================================
90
+ CONNECTING LINE
91
+ ========================================================================= */
75
92
  hr {
76
- background-color: var(--pd-step-hr-color, white);
93
+ background-color: var(--_color);
77
94
  height: 2px;
78
95
  position: absolute;
79
96
  top: 50%;
80
97
  left: 0;
81
98
  width: 100%;
82
99
  z-index: 50;
83
- border-style: none;
84
- border-width: 0;
100
+ border: none;
85
101
  margin: 0;
86
102
  }
87
103
 
104
+ /* =========================================================================
105
+ STEP NAME (below circle)
106
+ ========================================================================= */
88
107
  .step-name {
89
108
  font-family: var(--pd-default-font-title-family);
90
- color: var(--pd-step-name-color, white);
91
- font-size: var(--pd-step-name-font-size, 1em);
92
109
  font-weight: bold;
110
+ font-size: var(--_name-font-size);
111
+ color: var(--_color);
93
112
  position: absolute;
94
- top: calc(
95
- var(--circle-size) + (var(--pd-step-name-font-size, 1em) / 2)
96
- );
97
- }
98
-
99
- .current {
100
- color: var(--pd-step-color-current, var(--pd-default-hover-col));
113
+ top: calc(var(--_circle-size) + (var(--_name-font-size) / 2));
101
114
  }
102
115
 
103
- .step.circle.current {
104
- border-color: var(--pd-step-color-current, var(--pd-default-hover-col));
116
+ /* =========================================================================
117
+ STATE: CURRENT
118
+ ========================================================================= */
119
+ .step-container.current .step {
120
+ border-color: var(--pd-step-current-color, var(--pd-default-hover-col));
105
121
  }
106
122
 
107
- .passed {
108
- color: var(--pd-step-color-passed, var(--pd-default-dark-col));
123
+ .step-container.current .step-nr,
124
+ .step-container.current .step-name {
125
+ color: var(--pd-step-current-color, var(--pd-default-hover-col));
109
126
  }
110
127
 
111
- .step.circle.passed {
112
- border-color: var(
113
- --pd-step-color-passed,
114
- var(--pd-default-success-col)
128
+ /* =========================================================================
129
+ STATE: PASSED
130
+ ========================================================================= */
131
+ .step-container.passed .step {
132
+ border-color: var(--pd-default-success-col);
133
+ background-color: var(
134
+ --pd-step-passed-bg,
135
+ var(--pd-default-success-light-col)
115
136
  );
116
- background-color: var(--pd-default-success-light-col);
117
137
  cursor: pointer;
118
138
  }
119
139
 
140
+ .step-container.passed .step-nr {
141
+ color: var(--pd-step-passed-nr-color, var(--pd-default-col));
142
+ }
143
+
144
+ /* passed name uses default --_color (same as pending) */
145
+
146
+ .step-container.passed .step:hover {
147
+ transform: scale(1.1);
148
+ transition: transform 0.15s ease-in-out;
149
+ }
150
+
151
+ .step-container.passed .step:focus-visible {
152
+ outline: 2px solid var(--pd-focus-ring-col, var(--pd-default-hover-col));
153
+ outline-offset: 2px;
154
+ }
155
+
156
+ /* =========================================================================
157
+ RESPONSIVE
158
+ ========================================================================= */
120
159
  @media (max-width: 700px) {
121
160
  :host {
122
- --circle-size: 30px;
123
- }
124
- .step-name {
125
- font-size: 0.9em;
161
+ --_circle-size: var(--pd-step-circle-size, 30px);
162
+ --_name-font-size: var(--pd-step-name-font-size, 0.8em);
126
163
  }
127
164
  }
128
165
  `
@@ -133,35 +170,45 @@ class PdSteps extends LitElement {
133
170
  }
134
171
  _renderCircle() {
135
172
  return html`
136
- <div class="parent ${this.styleTyp}">
137
- ${this.styleTyp === "circle" ? html`<hr />` : ""}
173
+ <div
174
+ class="parent"
175
+ role="list"
176
+ aria-label="${msg("Wizard-Schritte", { id: "pd.steps.aria.label" })}"
177
+ >
178
+ <hr />
138
179
  ${this.steps.map((st, index) => {
139
180
  const stepNr = index + 1;
140
181
  const isCurrent = this.currentStepNr === stepNr;
141
182
  const isPassed = this.currentStepNr > stepNr;
142
- const classNames = [
143
- "step",
144
- this.styleTyp,
145
- isCurrent ? "current" : isPassed ? "passed" : ""
146
- ].join(" ");
147
- const nrClassNames = [
148
- "step-nr",
149
- isCurrent ? "current" : isPassed ? "passed" : ""
150
- ].join(" ");
151
- const nameClassNames = [
152
- "step-name",
153
- isCurrent ? "current" : isPassed ? "passed" : ""
154
- ].join(" ");
183
+ const containerClasses = classMap({
184
+ "step-container": true,
185
+ current: isCurrent,
186
+ passed: isPassed
187
+ });
188
+ const stepLabel = isPassed ? msg(
189
+ str`Schritt ${stepNr}: ${st.name ?? ""} - abgeschlossen, klicken um zurückzukehren`,
190
+ { id: "pd.steps.aria.passed" }
191
+ ) : isCurrent ? msg(
192
+ str`Schritt ${stepNr}: ${st.name ?? ""} - aktueller Schritt`,
193
+ { id: "pd.steps.aria.current" }
194
+ ) : msg(str`Schritt ${stepNr}: ${st.name ?? ""} - ausstehend`, {
195
+ id: "pd.steps.aria.pending"
196
+ });
155
197
  return html`
156
- <div class="step-container">
198
+ <div class="${containerClasses}" role="listitem">
157
199
  <div
158
- class="${classNames}"
200
+ class="step"
159
201
  data-step="${stepNr}"
160
- @click=${this._stepClicked}
202
+ tabindex="${isPassed ? "0" : "-1"}"
203
+ role="${ifDefined(isPassed ? "button" : void 0)}"
204
+ aria-label="${stepLabel}"
205
+ aria-current="${ifDefined(isCurrent ? "step" : void 0)}"
206
+ @click="${this._stepClicked}"
207
+ @keydown="${this._handleStepKeydown}"
161
208
  >
162
- <span class="${nrClassNames}">${stepNr}</span>
209
+ <span class="step-nr" aria-hidden="true">${stepNr}</span>
163
210
  </div>
164
- <span class="${nameClassNames}">${st.name}</span>
211
+ <span class="step-name" aria-hidden="true">${st.name}</span>
165
212
  </div>
166
213
  `;
167
214
  })}
@@ -170,6 +217,23 @@ class PdSteps extends LitElement {
170
217
  }
171
218
  _stepClicked(e) {
172
219
  const stepStr = e.currentTarget.dataset.step;
220
+ this._navigateToStep(stepStr);
221
+ }
222
+ /**
223
+ * Handles keyboard events on step circles.
224
+ * Activates on Enter or Space key.
225
+ */
226
+ _handleStepKeydown(e) {
227
+ if (e.key === "Enter" || e.key === " ") {
228
+ e.preventDefault();
229
+ const stepStr = e.currentTarget.dataset.step;
230
+ this._navigateToStep(stepStr);
231
+ }
232
+ }
233
+ /**
234
+ * Navigates to a specific step if it's a passed step.
235
+ */
236
+ _navigateToStep(stepStr) {
173
237
  const step = Number(stepStr);
174
238
  if (!isNaN(step) && step < this.currentStepNr) {
175
239
  this.dispatchEvent(
@@ -1,42 +1,50 @@
1
- import { StoryObj } from '@storybook/web-components';
2
- declare const meta: {
3
- title: string;
4
- component: string;
5
- tags: string[];
6
- render: ({ steps, currentStepNr, styleTyp }: import('@storybook/web-components').Args) => import('lit').TemplateResult<1>;
7
- argTypes: {
8
- steps: {
9
- control: "object";
10
- };
11
- currentStepNr: {
12
- control: {
13
- type: "number";
14
- min: number;
15
- max: number;
16
- };
17
- };
18
- styleTyp: {
19
- control: "select";
20
- options: string[];
21
- };
22
- };
23
- };
24
- export default meta;
25
- type Story = StoryObj;
26
- /**
27
- * Standard-Zustand mit mehreren Schritten und aktuellem Schritt
28
- */
29
- export declare const DefaultSteps: Story;
1
+ import { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ import { PdWizardStep } from '../../types.js';
30
3
  /**
31
- * Variante mit anderem Layout-Stil (tab), nur zwei Schritte
4
+ * Story arguments interface for pd-steps component.
5
+ * Maps to the component's public API.
32
6
  */
33
- export declare const TabSteps: Story;
7
+ interface PdStepsArgs {
8
+ /** Step definitions with names */
9
+ steps: PdWizardStep[];
10
+ /** Current visible step (1-based) */
11
+ currentStepNr: number;
12
+ /** Display mode: circle or tab */
13
+ styleTyp: "circle" | "tab";
14
+ }
34
15
  /**
35
- * Zeigt die erste Stufe als aktiv
16
+ * ## pd-steps
17
+ *
18
+ * A progress indicator component that displays wizard steps as numbered circles
19
+ * with connecting lines, showing current, passed, and future states.
20
+ *
21
+ * ### Features
22
+ * - Circle-style step indicators with numbered circles and connecting line
23
+ * - Three visual states: current (accent color), passed (green, clickable), and pending
24
+ * - Click navigation on passed steps to go back
25
+ * - Full keyboard accessibility on passed step circles
26
+ * - Responsive sizing for smaller screens
27
+ * - Step name labels displayed below each circle
28
+ * - CSS Custom Properties for circle size, colors, and font sizes
29
+ *
30
+ * ### Accessibility
31
+ * - Uses `role="list"` / `role="listitem"` for semantic step structure
32
+ * - Passed steps have `role="button"` and are keyboard focusable
33
+ * - `aria-current="step"` marks the current step
34
+ * - Each step has a descriptive `aria-label` with state information
35
+ * - Focus-visible styling on interactive passed steps
36
36
  */
37
- export declare const FirstStepActive: Story;
38
- /**
39
- * Zeigt alle Schritte als "abgeschlossen"
40
- */
41
- export declare const AllStepsPassed: Story;
37
+ declare const meta: Meta<PdStepsArgs>;
38
+ export default meta;
39
+ type Story = StoryObj<PdStepsArgs>;
40
+ /** Default step indicator with four steps, second step active. Interactive via Controls panel. */
41
+ export declare const Default: Story;
42
+ /** All step states shown in one overview: first step, middle step, last step, and all passed. */
43
+ export declare const AllStates: Story;
44
+ /** Six steps demonstrating how the indicator handles a larger number of steps. */
45
+ export declare const ManySteps: Story;
46
+ /** Tab-style display variant (alternative to circle style). */
47
+ export declare const TabStyle: Story;
48
+ /** CSS Custom Properties — Branded and Redesigned variants. */
49
+ export declare const CustomStyling: Story;
42
50
  //# sourceMappingURL=pd-steps.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pd-steps.stories.d.ts","sourceRoot":"","sources":["../../../src/pd-wizard/pd-steps/pd-steps.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,eAAe,CAAC;AAEvB,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;CAuBM,CAAC;AAEjB,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAEtB;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAW1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,KAU7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,KAM5B,CAAC"}
1
+ {"version":3,"file":"pd-steps.stories.d.ts","sourceRoot":"","sources":["../../../src/pd-wizard/pd-steps/pd-steps.stories.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAGrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,eAAe,CAAC;AAMvB;;;GAGG;AACH,UAAU,WAAW;IACnB,kCAAkC;IAClC,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,qCAAqC;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,kCAAkC;IAClC,QAAQ,EAAE,QAAQ,GAAG,KAAK,CAAC;CAC5B;AAgCD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,WAAW,CA0F3B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;AAMnC,kGAAkG;AAClG,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAMjC,iGAAiG;AACjG,eAAO,MAAM,SAAS,EAAE,KAwDvB,CAAC;AAMF,kFAAkF;AAClF,eAAO,MAAM,SAAS,EAAE,KAavB,CAAC;AAMF,+DAA+D;AAC/D,eAAO,MAAM,QAAQ,EAAE,KAiBtB,CAAC;AAMF,+DAA+D;AAC/D,eAAO,MAAM,aAAa,EAAE,KA+E3B,CAAC"}
@@ -1,12 +1,51 @@
1
- import { Meta, StoryObj } from '@storybook/web-components';
1
+ import { Meta, StoryObj } from '@storybook/web-components-vite';
2
2
  import { PdWizardStep } from '../types.js';
3
- type WizardArgs = {
3
+ /**
4
+ * Story arguments interface for pd-wizard component.
5
+ * Maps to the component's public API.
6
+ */
7
+ interface PdWizardArgs {
8
+ /** List of wizard step definitions */
4
9
  wizardSteps: PdWizardStep[];
10
+ /** Current step number (1-based index) */
5
11
  currentNumber: number;
6
- };
7
- declare const meta: Meta<WizardArgs>;
12
+ }
13
+ /**
14
+ * ## pd-wizard
15
+ *
16
+ * A multi-step wizard UI component with navigation, progress tracking, and submit handling.
17
+ *
18
+ * ### Features
19
+ * - Step navigation with Back/Next buttons and automatic visibility
20
+ * - Visual progress indicator via integrated pd-steps component
21
+ * - Dynamic step content via named slots (step-1, step-2, etc.)
22
+ * - Submit handling on final step with disabled-after-submit protection
23
+ * - Close button with keyboard accessibility (Enter/Space)
24
+ * - CSS Parts for full styling control (`::part(header)`, `::part(content)`, `::part(buttons)`)
25
+ * - CSS Custom Properties for token-based theming
26
+ * - Responsive padding adjustments for mobile screens
27
+ *
28
+ * ### Accessibility
29
+ * - Close icon is keyboard-focusable with `role="button"` and `aria-label`
30
+ * - Focus-visible styling on close icon for keyboard users
31
+ * - Back/Next buttons use native `<pd-button>` with full keyboard support
32
+ * - Step indicator supports keyboard navigation for passed steps
33
+ */
34
+ declare const meta: Meta<PdWizardArgs>;
8
35
  export default meta;
9
- type Story = StoryObj<WizardArgs>;
10
- export declare const Wizard: Story;
11
- export declare const WizardPanel: Story;
36
+ type Story = StoryObj<PdWizardArgs>;
37
+ /** Default wizard with four steps at the first step. Interactive via Controls panel. */
38
+ export declare const Default: Story;
39
+ /** Wizard navigated to the second step, showing Back and Next buttons. */
40
+ export declare const MiddleStep: Story;
41
+ /** Wizard at the final step with the Submit button replacing Next. */
42
+ export declare const FinalStep: Story;
43
+ /** A shorter wizard with three steps, demonstrating flexible step count. */
44
+ export declare const ThreeSteps: Story;
45
+ /** Default scroll behavior — content scrolls within fixed wizard height. */
46
+ export declare const ScrollableContent: Story;
47
+ /** Growing wizard — wizard expands with content, no internal scroll. */
48
+ export declare const GrowingContent: Story;
49
+ /** CSS Custom Properties and CSS Parts — Branded and Redesigned variants. */
50
+ export declare const CustomStyling: Story;
12
51
  //# sourceMappingURL=pd-wizard.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pd-wizard.stories.d.ts","sourceRoot":"","sources":["../../src/pd-wizard/pd-wizard.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,gBAAgB,CAAC;AAExB,KAAK,UAAU,GAAG;IAChB,WAAW,EAAE,YAAY,EAAE,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAAU,CA2B1B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;AAElC,eAAO,MAAM,MAAM,EAAE,KAUpB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAkEzB,CAAC"}
1
+ {"version":3,"file":"pd-wizard.stories.d.ts","sourceRoot":"","sources":["../../src/pd-wizard/pd-wizard.stories.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAGrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,gBAAgB,CAAC;AAMxB;;;GAGG;AACH,UAAU,YAAY;IACpB,sCAAsC;IACtC,WAAW,EAAE,YAAY,EAAE,CAAC;IAC5B,0CAA0C;IAC1C,aAAa,EAAE,MAAM,CAAC;CACvB;AAuBD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,YAAY,CAuH5B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;AAMpC,wFAAwF;AACxF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAMF,0EAA0E;AAC1E,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAC;AAMF,sEAAsE;AACtE,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC;AAMF,4EAA4E;AAC5E,eAAO,MAAM,UAAU,EAAE,KAgCxB,CAAC;AA2BF,4EAA4E;AAC5E,eAAO,MAAM,iBAAiB,EAAE,KAsC/B,CAAC;AAMF,wEAAwE;AACxE,eAAO,MAAM,cAAc,EAAE,KAqC5B,CAAC;AAMF,6EAA6E;AAC7E,eAAO,MAAM,aAAa,EAAE,KA+I3B,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { CSSResultGroup } from 'lit';
2
+ import { PdConfirmDialog, PdDialogType } from '@progressive-development/pd-dialog';
3
+ export declare class WizardClosePopup extends PdConfirmDialog {
4
+ protected _singleButton: boolean;
5
+ protected _dialogType: PdDialogType;
6
+ protected _dialogTitle: string;
7
+ /** Whether local storage persistence is enabled */
8
+ withStorage: boolean;
9
+ static styles: CSSResultGroup;
10
+ protected _renderContent(): import('lit').TemplateResult<1>;
11
+ }
12
+ //# sourceMappingURL=WizardClosePopup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardClosePopup.d.ts","sourceRoot":"","sources":["../../src/wizard-close-popup/WizardClosePopup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAa,cAAc,EAAE,MAAM,KAAK,CAAC;AAIhD,OAAO,EACL,eAAe,EACf,YAAY,EACb,MAAM,oCAAoC,CAAC;AAE5C,qBACa,gBAAiB,SAAQ,eAAe;IACnD,SAAS,CAAC,aAAa,UAAS;IAEhC,SAAS,CAAC,WAAW,EAAE,YAAY,CAAU;IAE7C,SAAS,CAAC,YAAY,SAEnB;IAEH,mDAAmD;IAEnD,WAAW,UAAS;IAEpB,MAAM,CAAC,MAAM,EAQR,cAAc,CAAC;IAEpB,SAAS,CAAC,cAAc;CAezB"}
@@ -0,0 +1,56 @@
1
+ import { css, html } from 'lit';
2
+ import { property, customElement } from 'lit/decorators.js';
3
+ import { msg } from '@lit/localize';
4
+ import { PdConfirmDialog } from '@progressive-development/pd-dialog';
5
+
6
+ var __defProp = Object.defineProperty;
7
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
+ var __decorateClass = (decorators, target, key, kind) => {
9
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
10
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
11
+ if (decorator = decorators[i])
12
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
13
+ if (kind && result) __defProp(target, key, result);
14
+ return result;
15
+ };
16
+ let WizardClosePopup = class extends PdConfirmDialog {
17
+ constructor() {
18
+ super(...arguments);
19
+ this._singleButton = false;
20
+ this._dialogType = "warn";
21
+ this._dialogTitle = msg("Änderungen verwerfen?", {
22
+ id: "pdWizard.close.popup.title"
23
+ });
24
+ this.withStorage = false;
25
+ }
26
+ _renderContent() {
27
+ return html`
28
+ <div class="popup-content">
29
+ <p>
30
+ ${this.withStorage ? msg("Eingaben für später speichern oder verwerfen?", {
31
+ id: "pdWizard.close.popup.storage.content"
32
+ }) : msg("Nicht gespeicherte Daten gehen verloren.", {
33
+ id: "pdWizard.close.popup.noStorage.content"
34
+ })}
35
+ </p>
36
+ </div>
37
+ `;
38
+ }
39
+ };
40
+ WizardClosePopup.styles = [
41
+ PdConfirmDialog.styles,
42
+ css`
43
+ .popup-content {
44
+ display: flex;
45
+ flex-direction: column;
46
+ }
47
+ `
48
+ ];
49
+ __decorateClass([
50
+ property({ type: Boolean })
51
+ ], WizardClosePopup.prototype, "withStorage", 2);
52
+ WizardClosePopup = __decorateClass([
53
+ customElement("wizard-close-popup")
54
+ ], WizardClosePopup);
55
+
56
+ export { WizardClosePopup };
@@ -0,0 +1,2 @@
1
+ export { WizardClosePopup } from './WizardClosePopup.js';
2
+ //# sourceMappingURL=wizard-close-popup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wizard-close-popup.d.ts","sourceRoot":"","sources":["../../src/wizard-close-popup/wizard-close-popup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ /**
3
+ * Story arguments interface for wizard-close-popup component.
4
+ * Maps to the component's public API.
5
+ */
6
+ interface WizardClosePopupArgs {
7
+ /** Whether local storage persistence is enabled */
8
+ withStorage: boolean;
9
+ /** Text for the confirm button */
10
+ confirmButtonText: string;
11
+ /** Text for the cancel button */
12
+ cancelButtonText: string;
13
+ }
14
+ /**
15
+ * ## wizard-close-popup
16
+ *
17
+ * A confirmation dialog shown when a user attempts to close a wizard with unsaved changes.
18
+ * Extends PdConfirmDialog with warning-style presentation.
19
+ *
20
+ * ### Features
21
+ * - Warning dialog type for visual emphasis on data loss
22
+ * - Two modes: with storage (save/discard) and without storage (close/cancel)
23
+ * - Customizable button texts via properties
24
+ * - Inherits full PdConfirmDialog behavior and styling
25
+ *
26
+ * ### Usage
27
+ * This component is typically used internally by DefaultWizard.
28
+ * It is instantiated programmatically when the close-wizard event fires.
29
+ */
30
+ declare const meta: Meta<WizardClosePopupArgs>;
31
+ export default meta;
32
+ type Story = StoryObj<WizardClosePopupArgs>;
33
+ /** Default close popup without storage — warns about losing unsaved data. */
34
+ export declare const Default: Story;
35
+ /** Close popup with storage enabled — offers save/discard options. */
36
+ export declare const WithStorage: Story;
37
+ /** Side-by-side comparison of both modes: without and with storage. */
38
+ export declare const BothModes: Story;
39
+ //# sourceMappingURL=wizard-close-popup.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wizard-close-popup.stories.d.ts","sourceRoot":"","sources":["../../src/wizard-close-popup/wizard-close-popup.stories.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAGrE,OAAO,uBAAuB,CAAC;AAM/B;;;GAGG;AACH,UAAU,oBAAoB;IAC5B,mDAAmD;IACnD,WAAW,EAAE,OAAO,CAAC;IACrB,kCAAkC;IAClC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iCAAiC;IACjC,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAMD;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,oBAAoB,CAqEpC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,oBAAoB,CAAC,CAAC;AAM5C,6EAA6E;AAC7E,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAMjC,sEAAsE;AACtE,eAAO,MAAM,WAAW,EAAE,KAmBzB,CAAC;AAMF,uEAAuE;AACvE,eAAO,MAAM,SAAS,EAAE,KAkCvB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './wizard-close-popup/wizard-close-popup'
2
+ export {}
@@ -0,0 +1 @@
1
+ export { WizardClosePopup } from './wizard-close-popup/WizardClosePopup.js';
@@ -0,0 +1,19 @@
1
+ import { CSSResultGroup } from 'lit';
2
+ import { PdConfirmDialog, PdDialogType } from '@progressive-development/pd-dialog';
3
+ /** Reload item data from storage */
4
+ export interface WizardReloadItem {
5
+ /** Timestamp when data was saved */
6
+ timestamp: string;
7
+ /** Step number where user left off */
8
+ wizardStep: number;
9
+ }
10
+ export declare class WizardReloadPopup extends PdConfirmDialog {
11
+ protected _singleButton: boolean;
12
+ protected _dialogType: PdDialogType;
13
+ protected _dialogTitle: string;
14
+ /** Saved wizard state to display */
15
+ reloadItem: WizardReloadItem;
16
+ static styles: CSSResultGroup;
17
+ protected _renderContent(): import('lit').TemplateResult<1>;
18
+ }
19
+ //# sourceMappingURL=WizardReloadPopup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardReloadPopup.d.ts","sourceRoot":"","sources":["../../src/wizard-reload-popup/WizardReloadPopup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAa,cAAc,EAAE,MAAM,KAAK,CAAC;AAIhD,OAAO,0CAA0C,CAAC;AAElD,OAAO,mDAAmD,CAAC;AAE3D,OAAO,EACL,eAAe,EACf,YAAY,EACb,MAAM,oCAAoC,CAAC;AAO5C,oCAAoC;AACpC,MAAM,WAAW,gBAAgB;IAC/B,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,qBACa,iBAAkB,SAAQ,eAAe;IACpD,SAAS,CAAC,aAAa,UAAS;IAEhC,SAAS,CAAC,WAAW,EAAE,YAAY,CAAU;IAE7C,SAAS,CAAC,YAAY,SAEnB;IAEH,oCAAoC;IAEpC,UAAU,EAAG,gBAAgB,CAAC;IAE9B,MAAM,CAAC,MAAM,EA0BR,cAAc,CAAC;IAEpB,SAAS,CAAC,cAAc;CA4BzB"}