@carbon/ibm-products-web-components 0.25.0 → 0.26.0-rc.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.
- package/custom-elements.json +174 -0
- package/es/components/side-panel/side-panel.js +2 -6
- package/es/components/side-panel/side-panel.js.map +1 -1
- package/es/components/step-flow/_story-assets/step-tearsheet.d.ts +40 -0
- package/es/components/step-flow/_story-assets/step-tearsheet.js +251 -0
- package/es/components/step-flow/_story-assets/step-tearsheet.js.map +1 -0
- package/es/components/step-flow/index.d.ts +10 -0
- package/es/components/step-flow/index.js +10 -0
- package/es/components/step-flow/index.js.map +1 -0
- package/es/components/step-flow/step-flow-signal.d.ts +24 -0
- package/es/components/step-flow/step-flow-signal.js +54 -0
- package/es/components/step-flow/step-flow-signal.js.map +1 -0
- package/es/components/step-flow/step-flow-signal.test.d.ts +7 -0
- package/es/components/step-flow/step-flow-signal.test.js +88 -0
- package/es/components/step-flow/step-flow-signal.test.js.map +1 -0
- package/es/components/step-flow/step-group.d.ts +15 -0
- package/es/components/step-flow/step-group.js +28 -0
- package/es/components/step-flow/step-group.js.map +1 -0
- package/es/components/step-flow/story-styles.scss.js +13 -0
- package/es/components/step-flow/story-styles.scss.js.map +1 -0
- package/es/packages/ibm-products-web-components/package.json.js +1 -1
- package/es-custom/components/side-panel/side-panel.js +2 -6
- package/es-custom/components/side-panel/side-panel.js.map +1 -1
- package/es-custom/components/step-flow/_story-assets/step-tearsheet.d.ts +40 -0
- package/es-custom/components/step-flow/_story-assets/step-tearsheet.js +251 -0
- package/es-custom/components/step-flow/_story-assets/step-tearsheet.js.map +1 -0
- package/es-custom/components/step-flow/index.d.ts +10 -0
- package/es-custom/components/step-flow/index.js +10 -0
- package/es-custom/components/step-flow/index.js.map +1 -0
- package/es-custom/components/step-flow/step-flow-signal.d.ts +24 -0
- package/es-custom/components/step-flow/step-flow-signal.js +54 -0
- package/es-custom/components/step-flow/step-flow-signal.js.map +1 -0
- package/es-custom/components/step-flow/step-flow-signal.test.d.ts +7 -0
- package/es-custom/components/step-flow/step-flow-signal.test.js +88 -0
- package/es-custom/components/step-flow/step-flow-signal.test.js.map +1 -0
- package/es-custom/components/step-flow/step-group.d.ts +15 -0
- package/es-custom/components/step-flow/step-group.js +28 -0
- package/es-custom/components/step-flow/step-group.js.map +1 -0
- package/es-custom/components/step-flow/story-styles.scss.js +13 -0
- package/es-custom/components/step-flow/story-styles.scss.js.map +1 -0
- package/es-custom/packages/ibm-products-web-components/package.json.js +1 -1
- package/lib/components/step-flow/_story-assets/step-tearsheet.d.ts +40 -0
- package/lib/components/step-flow/index.d.ts +10 -0
- package/lib/components/step-flow/step-flow-signal.d.ts +24 -0
- package/lib/components/step-flow/step-flow-signal.test.d.ts +7 -0
- package/lib/components/step-flow/step-group.d.ts +15 -0
- package/package.json +6 -5
@@ -0,0 +1,251 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { __decorate } from 'tslib';
|
9
|
+
import { LitElement, nothing, html } from 'lit';
|
10
|
+
import { state, customElement } from 'lit/decorators.js';
|
11
|
+
import { SignalWatcher } from '@lit-labs/signals';
|
12
|
+
import styles from '../story-styles.scss.js';
|
13
|
+
import { StepInstance } from '../step-flow-signal.js';
|
14
|
+
import '@carbon/web-components/es/components/progress-indicator/index.js';
|
15
|
+
import '@carbon/web-components/es/components/stack/index.js';
|
16
|
+
import '@carbon/web-components/es/components/code-snippet/index.js';
|
17
|
+
import '../step-group.js';
|
18
|
+
import '../../tearsheet/tearsheet.js';
|
19
|
+
import { registerFocusableContainers, trapFocus } from '../../../utilities/manageFocusTrap/manageFocusTrap.js';
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Copyright IBM Corp. 2025, 2025
|
23
|
+
*
|
24
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
26
|
+
*/
|
27
|
+
let StepTearsheet = class StepTearsheet extends SignalWatcher(LitElement) {
|
28
|
+
constructor() {
|
29
|
+
super(...arguments);
|
30
|
+
this._open = false;
|
31
|
+
this._email = '';
|
32
|
+
this._city = '';
|
33
|
+
this._state = '';
|
34
|
+
this._trapFocusAPI = null;
|
35
|
+
this._stepInfo = new StepInstance();
|
36
|
+
}
|
37
|
+
_onButtonClick() {
|
38
|
+
this._open = true;
|
39
|
+
}
|
40
|
+
_handleCancelButton() {
|
41
|
+
this._open = false;
|
42
|
+
this._stepInfo.reset();
|
43
|
+
}
|
44
|
+
_handleBackButton() {
|
45
|
+
const { currentStep } = this._stepInfo.data;
|
46
|
+
if (currentStep === 0) {
|
47
|
+
return;
|
48
|
+
}
|
49
|
+
return this._stepInfo.handlePrevious();
|
50
|
+
}
|
51
|
+
_handleNextButton() {
|
52
|
+
const { currentStep, totalSteps } = this._stepInfo.data;
|
53
|
+
if (currentStep + 1 === totalSteps) {
|
54
|
+
this._open = false;
|
55
|
+
this._stepInfo.reset();
|
56
|
+
return;
|
57
|
+
}
|
58
|
+
return this._stepInfo.handleNext();
|
59
|
+
}
|
60
|
+
_handleEmailInput(e) {
|
61
|
+
const savedFormState = structuredClone(this._stepInfo.data.formState);
|
62
|
+
savedFormState.email = e.target.value;
|
63
|
+
this._stepInfo.updateFormState = savedFormState;
|
64
|
+
}
|
65
|
+
_handleCityInput(e) {
|
66
|
+
const savedFormState = structuredClone(this._stepInfo.data.formState);
|
67
|
+
savedFormState.city = e.target.value;
|
68
|
+
this._stepInfo.updateFormState = savedFormState;
|
69
|
+
}
|
70
|
+
_handleStateInput(e) {
|
71
|
+
const savedFormState = structuredClone(this._stepInfo.data.formState);
|
72
|
+
savedFormState.state = e.target.value;
|
73
|
+
this._stepInfo.updateFormState = savedFormState;
|
74
|
+
}
|
75
|
+
connectedCallback() {
|
76
|
+
super.connectedCallback();
|
77
|
+
this._stepInfo.updateTotalStepCount = 3;
|
78
|
+
}
|
79
|
+
disconnectedCallback() {
|
80
|
+
var _a;
|
81
|
+
(_a = this._trapFocusAPI) === null || _a === void 0 ? void 0 : _a.cleanup();
|
82
|
+
}
|
83
|
+
firstUpdated(_changedProperties) {
|
84
|
+
var _a;
|
85
|
+
registerFocusableContainers((_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`c4p-tearsheet`));
|
86
|
+
}
|
87
|
+
updated(changedProps) {
|
88
|
+
if (changedProps.has('_open')) {
|
89
|
+
const isOpen = this._open;
|
90
|
+
if (isOpen) {
|
91
|
+
// `focusableContainers` holds the containers where we can query DOM elements.
|
92
|
+
// Our strategy here is to let child/slotted components register their containers,
|
93
|
+
// which are then passed to `trapFocus`. This allows the utility to query elements
|
94
|
+
// directly without being blocked by shadow DOM boundaries.
|
95
|
+
this._trapFocusAPI = trapFocus();
|
96
|
+
}
|
97
|
+
}
|
98
|
+
}
|
99
|
+
render() {
|
100
|
+
const { formState, totalSteps, currentStep } = this._stepInfo.data;
|
101
|
+
return html ` <cds-button
|
102
|
+
type="button"
|
103
|
+
size="md"
|
104
|
+
@click="${this._onButtonClick}"
|
105
|
+
>
|
106
|
+
Start create flow
|
107
|
+
</cds-button>
|
108
|
+
<c4p-tearsheet
|
109
|
+
class=${'step-tearsheet-with-util'}
|
110
|
+
selector-initial-focus=${'#tearsheet-story-text-input-a'}
|
111
|
+
?open=${this._open}
|
112
|
+
width=${'wide'}
|
113
|
+
influencer-placement=${'left'}
|
114
|
+
prevent-close-on-click-outside
|
115
|
+
>
|
116
|
+
<!-- default slotted content -->
|
117
|
+
<step-group>
|
118
|
+
${currentStep + 1 === 1
|
119
|
+
? html `<div>
|
120
|
+
<cds-stack gap="6" orientation="horizontal">
|
121
|
+
<cds-text-input
|
122
|
+
label="Email"
|
123
|
+
id="tearsheet-story-text-input-a"
|
124
|
+
value=${this._email}
|
125
|
+
@input="${this._handleEmailInput}"
|
126
|
+
></cds-text-input>
|
127
|
+
</cds-stack>
|
128
|
+
</div>`
|
129
|
+
: nothing}
|
130
|
+
${currentStep + 1 === 2
|
131
|
+
? html `<div>
|
132
|
+
<cds-stack gap="6" orientation="horizontal">
|
133
|
+
<cds-text-input
|
134
|
+
label="City"
|
135
|
+
id="tearsheet-story-text-input-city"
|
136
|
+
value=${this._city}
|
137
|
+
@input="${this._handleCityInput}"
|
138
|
+
></cds-text-input>
|
139
|
+
<cds-text-input
|
140
|
+
label="State"
|
141
|
+
id="tearsheet-story-text-input-state"
|
142
|
+
value=${this._state}
|
143
|
+
@input="${this._handleStateInput}"
|
144
|
+
></cds-text-input>
|
145
|
+
</cds-stack>
|
146
|
+
</div>`
|
147
|
+
: nothing}
|
148
|
+
${currentStep + 1 === 3
|
149
|
+
? html `<div>
|
150
|
+
<!-- //cspell: disable -->
|
151
|
+
<cds-code-snippet
|
152
|
+
type="multi"
|
153
|
+
copy-text=""
|
154
|
+
maxcollapsednumberofrows="15"
|
155
|
+
maxexpandednumberofrows=""
|
156
|
+
mincollapsednumberofrows="3"
|
157
|
+
minexpandednumberofrows=""
|
158
|
+
show-less-text="Show less"
|
159
|
+
show-more-text="Show more"
|
160
|
+
feedback=""
|
161
|
+
feedback-timeout="0"
|
162
|
+
tooltip-content="Copy to clipboard"
|
163
|
+
>
|
164
|
+
${JSON.stringify(formState, null, 2)}
|
165
|
+
</cds-code-snippet>
|
166
|
+
<!-- //cspell: enable -->
|
167
|
+
</div>`
|
168
|
+
: nothing}
|
169
|
+
</step-group>
|
170
|
+
|
171
|
+
<!-- slotted header label -->
|
172
|
+
<span slot="label">Optional label for context</span>
|
173
|
+
|
174
|
+
<!-- slotted header title -->
|
175
|
+
<span slot="title">Create tearsheet title</span>
|
176
|
+
|
177
|
+
<!-- slotted header description -->
|
178
|
+
<span slot="description">
|
179
|
+
This is a description for the tearsheet, providing an opportunity to
|
180
|
+
describe the flow over a couple of lines in the header of the
|
181
|
+
tearsheet.
|
182
|
+
</span>
|
183
|
+
|
184
|
+
<!-- slotted action items cds-buttons -->
|
185
|
+
<cds-button
|
186
|
+
slot="actions"
|
187
|
+
kind=${'ghost'}
|
188
|
+
@click=${this._handleCancelButton}
|
189
|
+
>
|
190
|
+
Cancel
|
191
|
+
</cds-button>
|
192
|
+
<cds-button
|
193
|
+
slot="actions"
|
194
|
+
kind=${'secondary'}
|
195
|
+
@click=${this._handleBackButton}
|
196
|
+
>
|
197
|
+
Back
|
198
|
+
</cds-button>
|
199
|
+
<cds-button slot="actions" @click=${this._handleNextButton}>
|
200
|
+
${currentStep + 1 < totalSteps ? 'Next' : 'Submit'}
|
201
|
+
</cds-button>
|
202
|
+
<!-- slotted influencer -->
|
203
|
+
<div slot="influencer">
|
204
|
+
<cds-progress-indicator
|
205
|
+
vertical
|
206
|
+
class=${`custom-step-util__dummy-content-block`}
|
207
|
+
>
|
208
|
+
<cds-progress-step
|
209
|
+
label="First step"
|
210
|
+
state=${currentStep + 1 === 1 ? 'current' : 'complete'}
|
211
|
+
></cds-progress-step>
|
212
|
+
<cds-progress-step
|
213
|
+
label="Second step"
|
214
|
+
state=${currentStep + 1 === 2
|
215
|
+
? 'current'
|
216
|
+
: currentStep + 1 < 2
|
217
|
+
? 'incomplete'
|
218
|
+
: 'complete'}
|
219
|
+
></cds-progress-step>
|
220
|
+
<cds-progress-step
|
221
|
+
label="Third step"
|
222
|
+
state=${currentStep + 1 === 3
|
223
|
+
? 'current'
|
224
|
+
: currentStep + 1 < 3
|
225
|
+
? 'incomplete'
|
226
|
+
: 'complete'}
|
227
|
+
></cds-progress-step>
|
228
|
+
</cds-progress-indicator>
|
229
|
+
</div>
|
230
|
+
</c4p-tearsheet>`;
|
231
|
+
}
|
232
|
+
};
|
233
|
+
StepTearsheet.styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader
|
234
|
+
__decorate([
|
235
|
+
state()
|
236
|
+
], StepTearsheet.prototype, "_open", void 0);
|
237
|
+
__decorate([
|
238
|
+
state()
|
239
|
+
], StepTearsheet.prototype, "_email", void 0);
|
240
|
+
__decorate([
|
241
|
+
state()
|
242
|
+
], StepTearsheet.prototype, "_city", void 0);
|
243
|
+
__decorate([
|
244
|
+
state()
|
245
|
+
], StepTearsheet.prototype, "_state", void 0);
|
246
|
+
StepTearsheet = __decorate([
|
247
|
+
customElement('step-tearsheet')
|
248
|
+
], StepTearsheet);
|
249
|
+
|
250
|
+
export { StepTearsheet };
|
251
|
+
//# sourceMappingURL=step-tearsheet.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"step-tearsheet.js","sources":["../../../../src/components/step-flow/_story-assets/step-tearsheet.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;AAKG;AAwBU,IAAA,aAAa,GAAnB,MAAM,aAAc,SAAQ,aAAa,CAAC,UAAU,CAAC,CAAA;AAArD,IAAA,WAAA,GAAA;;QAEG,IAAK,CAAA,KAAA,GAAY,KAAK;QAGtB,IAAM,CAAA,MAAA,GAAW,EAAE;QAGnB,IAAK,CAAA,KAAA,GAAW,EAAE;QAGlB,IAAM,CAAA,MAAA,GAAW,EAAE;QAEnB,IAAa,CAAA,aAAA,GAAmC,IAAI;AAqDpD,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,YAAY,EAAE;;IAnD9B,cAAc,GAAA;AACpB,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI;;IAGX,mBAAmB,GAAA;AACzB,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK;AAClB,QAAA,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;;IAGhB,iBAAiB,GAAA;QACvB,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI;AAC3C,QAAA,IAAI,WAAW,KAAK,CAAC,EAAE;YACrB;;AAEF,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE;;IAGhC,iBAAiB,GAAA;QACvB,MAAM,EAAE,WAAW,EAAE,UA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A,EAAA,aAAa,CAwOzB;;;;"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import './step-flow-signal.js';
|
9
|
+
import './step-group.js';
|
10
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2025, 2025
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
interface formStateType {
|
8
|
+
[key: string]: any;
|
9
|
+
}
|
10
|
+
export declare class StepInstance {
|
11
|
+
#private;
|
12
|
+
get data(): {
|
13
|
+
totalSteps: number;
|
14
|
+
formState: {};
|
15
|
+
currentStep: number;
|
16
|
+
};
|
17
|
+
set handleGoToStep(value: number);
|
18
|
+
set updateTotalStepCount(value: number);
|
19
|
+
set updateFormState(newFormValue: formStateType);
|
20
|
+
handleNext(): void;
|
21
|
+
handlePrevious(): void;
|
22
|
+
reset(): void;
|
23
|
+
}
|
24
|
+
export {};
|
@@ -0,0 +1,54 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { __classPrivateFieldGet } from 'tslib';
|
9
|
+
import { signal } from '@lit-labs/signals';
|
10
|
+
|
11
|
+
/**
|
12
|
+
* Copyright IBM Corp. 2025, 2025
|
13
|
+
*
|
14
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
15
|
+
* LICENSE file in the root directory of this source tree.
|
16
|
+
*/
|
17
|
+
var _StepInstance_data;
|
18
|
+
class StepInstance {
|
19
|
+
constructor() {
|
20
|
+
_StepInstance_data.set(this, signal({
|
21
|
+
totalSteps: 0,
|
22
|
+
formState: {},
|
23
|
+
currentStep: 0,
|
24
|
+
}));
|
25
|
+
}
|
26
|
+
get data() {
|
27
|
+
return __classPrivateFieldGet(this, _StepInstance_data, "f").get();
|
28
|
+
}
|
29
|
+
set handleGoToStep(value) {
|
30
|
+
__classPrivateFieldGet(this, _StepInstance_data, "f").set(Object.assign(Object.assign({}, __classPrivateFieldGet(this, _StepInstance_data, "f").get()), { currentStep: value }));
|
31
|
+
}
|
32
|
+
set updateTotalStepCount(value) {
|
33
|
+
__classPrivateFieldGet(this, _StepInstance_data, "f").set(Object.assign(Object.assign({}, __classPrivateFieldGet(this, _StepInstance_data, "f").get()), { totalSteps: value }));
|
34
|
+
}
|
35
|
+
set updateFormState(newFormValue) {
|
36
|
+
__classPrivateFieldGet(this, _StepInstance_data, "f").set(Object.assign(Object.assign({}, __classPrivateFieldGet(this, _StepInstance_data, "f").get()), { formState: newFormValue }));
|
37
|
+
}
|
38
|
+
handleNext() {
|
39
|
+
const currentStep = __classPrivateFieldGet(this, _StepInstance_data, "f").get().currentStep + 1;
|
40
|
+
const totalSteps = __classPrivateFieldGet(this, _StepInstance_data, "f").get().totalSteps;
|
41
|
+
__classPrivateFieldGet(this, _StepInstance_data, "f").set(Object.assign(Object.assign({}, __classPrivateFieldGet(this, _StepInstance_data, "f").get()), { currentStep: currentStep < totalSteps ? currentStep : totalSteps }));
|
42
|
+
}
|
43
|
+
handlePrevious() {
|
44
|
+
const currentStep = __classPrivateFieldGet(this, _StepInstance_data, "f").get().currentStep;
|
45
|
+
__classPrivateFieldGet(this, _StepInstance_data, "f").set(Object.assign(Object.assign({}, __classPrivateFieldGet(this, _StepInstance_data, "f").get()), { currentStep: currentStep > 0 ? currentStep - 1 : 0 }));
|
46
|
+
}
|
47
|
+
reset() {
|
48
|
+
__classPrivateFieldGet(this, _StepInstance_data, "f").set(Object.assign(Object.assign({}, __classPrivateFieldGet(this, _StepInstance_data, "f").get()), { formState: {}, currentStep: 0 }));
|
49
|
+
}
|
50
|
+
}
|
51
|
+
_StepInstance_data = new WeakMap();
|
52
|
+
|
53
|
+
export { StepInstance };
|
54
|
+
//# sourceMappingURL=step-flow-signal.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"step-flow-signal.js","sources":["../../../src/components/step-flow/step-flow-signal.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;AAAA;;;;;AAKG;;MAWU,YAAY,CAAA;AAAzB,IAAA,WAAA,GAAA;AACE,QAAA,kBAAA,CAAA,GAAA,CAAA,IAAA,EAAQ,MAAM,CAAC;AACb,YAAA,UAAU,EAAE,CAAC;AACb,YAAA,SAAS,EAAE,EAAE;AACb,YAAA,WAAW,EAAE,CAAC;AACf,SAAA,CAAC,CAAC;;AAEH,IAAA,IAAI,IAAI,GAAA;AACN,QAAA,OAAO,uBAAA,IAAI,EAAA,kBAAA,EAAA,GAAA,CAAM,CAAC,GAAG,EAAE;;IAGzB,IAAI,cAAc,CAAC,KAAa,EAAA;AAC9B,QAAA,sBAAA,CAAA,IAAI,EAAM,kBAAA,EAAA,GAAA,CAAA,CAAC,GAAG,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACT,uBAAA,IAAI,EAAA,kBAAA,EAAA,GAAA,CAAM,CAAC,GAAG,EAAE,CACnB,EAAA,EAAA,WAAW,EAAE,KAAK,IAClB;;IAGJ,IAAI,oBAAoB,CAAC,KAAa,EAAA;AACpC,QAAA,sBAAA,CAAA,IAAI,EAAM,kBAAA,EAAA,GAAA,CAAA,CAAC,GAAG,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACT,uBAAA,IAAI,EAAA,kBAAA,EAAA,GAAA,C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AA,EACnB,WAAW,EAAE,WAAW,GAAG,CAAC,GAAG,WAAW,GAAG,CAAC,GAAG,CAAC,EAAA,CAAA,CAClD;;IAGJ,KAAK,GAAA;QACH,sBAAA,CAAA,IAAI,0BAAM,CAAC,GAAG,iCACT,sBAAA,CAAA,IAAI,0BAAM,CAAC,GAAG,EAAE,CACnB,EAAA,EAAA,SAAS,EAAE,EAAE,EACb,WAAW,EAAE,CAAC,IACd;;AAEL;;;;;"}
|
@@ -0,0 +1,88 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { describe, it, expect } from 'vitest';
|
9
|
+
import { StepInstance } from './step-flow-signal.js';
|
10
|
+
|
11
|
+
/**
|
12
|
+
* Copyright IBM Corp. 2025, 2025
|
13
|
+
*
|
14
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
15
|
+
* LICENSE file in the root directory of this source tree.
|
16
|
+
*/
|
17
|
+
describe('step flow', () => {
|
18
|
+
it('should initial and return default signal state', () => {
|
19
|
+
const { totalSteps, formState, currentStep } = new StepInstance().data;
|
20
|
+
expect(totalSteps).toEqual(0);
|
21
|
+
expect(currentStep).toEqual(0);
|
22
|
+
expect(formState).toEqual({});
|
23
|
+
});
|
24
|
+
it('should update total steps', () => {
|
25
|
+
const myStepInstance = new StepInstance();
|
26
|
+
myStepInstance.updateTotalStepCount = 100;
|
27
|
+
expect(myStepInstance.data.totalSteps).toEqual(100);
|
28
|
+
});
|
29
|
+
it('should increment the current step', async () => {
|
30
|
+
const myStepInstance = new StepInstance();
|
31
|
+
myStepInstance.updateTotalStepCount = 100;
|
32
|
+
myStepInstance.handleNext();
|
33
|
+
expect(myStepInstance.data.currentStep).toEqual(1);
|
34
|
+
myStepInstance.handleNext();
|
35
|
+
expect(myStepInstance.data.currentStep).toEqual(2);
|
36
|
+
});
|
37
|
+
it('should decrement the current step', () => {
|
38
|
+
const myStepInstance = new StepInstance();
|
39
|
+
myStepInstance.updateTotalStepCount = 100;
|
40
|
+
myStepInstance.handleNext();
|
41
|
+
myStepInstance.handleNext();
|
42
|
+
myStepInstance.handlePrevious();
|
43
|
+
expect(myStepInstance.data.currentStep).toEqual(1);
|
44
|
+
});
|
45
|
+
it('should update form state', () => {
|
46
|
+
const exampleEmail = 'example@example.com';
|
47
|
+
const myStepInstance = new StepInstance();
|
48
|
+
const savedFormState = structuredClone(myStepInstance.data.formState);
|
49
|
+
savedFormState.email = exampleEmail;
|
50
|
+
myStepInstance.updateFormState = savedFormState;
|
51
|
+
expect(myStepInstance.data.formState.email).toEqual(exampleEmail);
|
52
|
+
});
|
53
|
+
it('should jump to a step', () => {
|
54
|
+
const myStepInstance = new StepInstance();
|
55
|
+
myStepInstance.updateTotalStepCount = 100;
|
56
|
+
myStepInstance.handleGoToStep = 25;
|
57
|
+
expect(myStepInstance.data.currentStep).toEqual(25);
|
58
|
+
});
|
59
|
+
it('should reset to default state', () => {
|
60
|
+
const myStepInstance = new StepInstance();
|
61
|
+
myStepInstance.updateTotalStepCount = 100;
|
62
|
+
myStepInstance.handleGoToStep = 25;
|
63
|
+
myStepInstance.reset();
|
64
|
+
expect(myStepInstance.data.currentStep).toEqual(0);
|
65
|
+
expect(myStepInstance.data.formState).toEqual({});
|
66
|
+
});
|
67
|
+
it('should remain on last step when handleNext is called from the last step', () => {
|
68
|
+
const myStepInstance = new StepInstance();
|
69
|
+
myStepInstance.updateTotalStepCount = 2;
|
70
|
+
myStepInstance.handleNext();
|
71
|
+
myStepInstance.handleNext();
|
72
|
+
myStepInstance.handleNext();
|
73
|
+
expect(myStepInstance.data.currentStep).toEqual(2);
|
74
|
+
});
|
75
|
+
it('should remain on first step when handlePrevious is called from the first step', () => {
|
76
|
+
const myStepInstance = new StepInstance();
|
77
|
+
myStepInstance.updateTotalStepCount = 10;
|
78
|
+
myStepInstance.handleNext();
|
79
|
+
myStepInstance.handleNext();
|
80
|
+
myStepInstance.handleNext();
|
81
|
+
myStepInstance.handlePrevious();
|
82
|
+
myStepInstance.handlePrevious();
|
83
|
+
myStepInstance.handlePrevious();
|
84
|
+
myStepInstance.handlePrevious();
|
85
|
+
expect(myStepInstance.data.currentStep).toEqual(0);
|
86
|
+
});
|
87
|
+
});
|
88
|
+
//# sourceMappingURL=step-flow-signal.test.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"step-flow-signal.test.js","sources":["../../../src/components/step-flow/step-flow-signal.test.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;AAAA;;;;;AAKG;AAKH,QAAQ,CAAC,WAAW,EAAE,MAAK;AACzB,IAAA,EAAE,CAAC,gDAAgD,EAAE,MAAK;AACxD,QAAA,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,IAAI,YAAY,EAAE,CAAC,IAAI;QACtE,MAAM,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,MAAM,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;AAC/B,KAAC,CAAC;AACF,IAAA,EAAE,CAAC,2BAA2B,EAAE,MAAK;AACnC,QAAA,MAAM,cAAc,GAAG,IAAI,YAAY,EAAE;AACzC,QAAA,cAAc,CAAC,oBAAoB,GAAG,GAAG;AACzC,QAAA,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;AACrD,KAAC,CAAC;AACF,IAAA,EAAE,CAAC,mCAAmC,EAAE,YAAW;AACjD,QAAA,MAAM,cAAc,GAAG,IAAI,YAAY,EAAE;AACzC,QAAA,cAAc,CAAC,oBAAoB,GAAG,GAAG;QACzC,cAAc,CAAC,UAAU,EAAE;AAC3B,QAAA,MAAM,CAAC,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
@@ -0,0 +1,15 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2025, 2025
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
import { LitElement } from 'lit';
|
8
|
+
export declare class StepGroup extends LitElement {
|
9
|
+
render(): import("lit-html").TemplateResult<1>;
|
10
|
+
}
|
11
|
+
declare global {
|
12
|
+
interface HTMLElementTagNameMap {
|
13
|
+
'step-group': StepGroup;
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { __decorate } from 'tslib';
|
9
|
+
import { LitElement, html } from 'lit';
|
10
|
+
import { customElement } from 'lit/decorators.js';
|
11
|
+
|
12
|
+
/**
|
13
|
+
* Copyright IBM Corp. 2025, 2025
|
14
|
+
*
|
15
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
17
|
+
*/
|
18
|
+
let StepGroup = class StepGroup extends LitElement {
|
19
|
+
render() {
|
20
|
+
return html `<slot></slot>`;
|
21
|
+
}
|
22
|
+
};
|
23
|
+
StepGroup = __decorate([
|
24
|
+
customElement('step-group')
|
25
|
+
], StepGroup);
|
26
|
+
|
27
|
+
export { StepGroup };
|
28
|
+
//# sourceMappingURL=step-group.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"step-group.js","sources":["../../../src/components/step-flow/step-group.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;AAKG;AAMI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,UAAU,CAAA;IACvC,MAAM,GAAA;QACJ,OAAO,IAAI,CAAA,CAAA,aAAA,CAAe;;;AAFjB,SAAS,GAAA,UAAA,CAAA;IADrB,aAAa,CAAC,YAAY;AACd,CAAA,EAAA,SAAS,CAIrB;;;;"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { css } from 'lit';
|
9
|
+
|
10
|
+
var styles = css([""]);
|
11
|
+
|
12
|
+
export { styles as default };
|
13
|
+
//# sourceMappingURL=story-styles.scss.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"story-styles.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|
@@ -481,18 +481,14 @@ let CDSSidePanel = class CDSSidePanel extends HostListenerMixin(LitElement) {
|
|
481
481
|
return html ``;
|
482
482
|
}
|
483
483
|
const actionsMultiple = ['', 'single', 'double', 'triple'][this._actionsCount];
|
484
|
-
const titleTemplate = html
|
484
|
+
const titleTemplate = html ` <div
|
485
485
|
class=${`${blockClass}__title`}
|
486
486
|
?no-label=${!!labelText}
|
487
487
|
>
|
488
|
-
<h2 class=${title ? `${blockClass}__title-text` : ''}
|
489
|
-
${title}
|
490
|
-
</h2>
|
491
|
-
|
488
|
+
<h2 class=${title ? `${blockClass}__title-text` : ''}>${title}</h2>
|
492
489
|
${this._doAnimateTitle
|
493
490
|
? html `<h2
|
494
491
|
class=${`${blockClass}__collapsed-title-text`}
|
495
|
-
title=${title}
|
496
492
|
aria-hidden="true"
|
497
493
|
>
|
498
494
|
${title}
|