@proximus/lavender-progress-stepper 0.0.0-stage → 1.4.20-alpha.10

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.
@@ -0,0 +1,39 @@
1
+ import { PxElement } from '@proximus/lavender-common';
2
+ export declare const progressStepperDirectionValues: string[];
3
+ export declare const progressStepperDirectionAttributes: string[];
4
+ /**
5
+ * @summary Displays the progression of a user through a sequence of steps.
6
+ * @slot - `px-progress-stepper-item` elements.
7
+ * @attr {"default" | "vertical" | "horizontal"} direction - Layout direction of the stepper for all breakpoints. Defaults to `horizontal`.
8
+ * @attr {"default" | "vertical" | "horizontal"} direction--mobile - Layout direction on mobile. Overrides `direction`.
9
+ * @attr {"default" | "vertical" | "horizontal"} direction--tablet - Layout direction on tablet. Overrides `direction`.
10
+ * @attr {"default" | "vertical" | "horizontal"} direction--laptop - Layout direction on laptop. Overrides `direction`.
11
+ * @attr {"default" | "vertical" | "horizontal"} direction--desktop - Layout direction on desktop. Overrides `direction`.
12
+ * @attr {string} icon-from - Name of the `px-icon-set` used for the items icons. Defaults to `lavender`.
13
+ */
14
+ export declare class ProgressStepper extends PxElement<HTMLOListElement> {
15
+ #private;
16
+ static nativeName: string;
17
+ protected static readonly template: HTMLTemplateElement;
18
+ constructor();
19
+ static get observedAttributes(): string[];
20
+ connectedCallback(): void;
21
+ disconnectedCallback(): void;
22
+ attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
23
+ updateDirection(attrName: string, newValue: string, attrValues: string[]): void;
24
+ configureChildren(): void;
25
+ get $slot(): HTMLSlotElement | null;
26
+ get $children(): NodeListOf<Element>;
27
+ get direction(): string | null;
28
+ set direction(value: string | null);
29
+ get directionMobile(): string | null;
30
+ set directionMobile(value: string | null);
31
+ get directionTablet(): string | null;
32
+ set directionTablet(value: string | null);
33
+ get directionLaptop(): string | null;
34
+ set directionLaptop(value: string | null);
35
+ get directionDesktop(): string | null;
36
+ set directionDesktop(value: string | null);
37
+ get iconFrom(): string | null;
38
+ set iconFrom(value: string | null);
39
+ }
@@ -0,0 +1,33 @@
1
+ import '@proximus/lavender-icon';
2
+ import { PxElement } from '@proximus/lavender-common';
3
+ export declare const PROGRESS_STEPPER_ITEM_CONNECTED_EVENT = "px-progress-stepper-item-connected";
4
+ export declare const progressStepperItemStateValues: string[];
5
+ /**
6
+ * @summary A single step of a `px-progress-stepper`.
7
+ * @slot title - Title of the step. Rendered inside a link when `href` is set.
8
+ * @slot helper - Helper text displayed below the title.
9
+ * @attr {"upcoming" | "current" | "completed"} state - State of the step. Defaults to `upcoming`.
10
+ * @attr {string} href - Makes the title a link pointing to this URL.
11
+ * @attr {string} icon-from - Name of the `px-icon-set` used for the check icon. Defaults to `lavender`.
12
+ */
13
+ export declare class ProgressStepperItem extends PxElement<HTMLLIElement> {
14
+ #private;
15
+ static nativeName: string;
16
+ protected static readonly template: HTMLTemplateElement;
17
+ constructor();
18
+ static get observedAttributes(): string[];
19
+ connectedCallback(): void;
20
+ attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
21
+ updateState(attrName: string, newValue: string, attrValues: string[]): void;
22
+ get $title(): HTMLElement | null;
23
+ get $indicatorNumber(): HTMLElement | null;
24
+ get $icon(): HTMLElement | null;
25
+ get state(): string | null;
26
+ set state(value: string | null);
27
+ get href(): string | null;
28
+ set href(value: string | null);
29
+ get item(): string | null;
30
+ set item(value: string | null);
31
+ get iconFrom(): string | null;
32
+ set iconFrom(value: string | null);
33
+ }
@@ -0,0 +1,462 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "readme": "",
4
+ "modules": [
5
+ {
6
+ "kind": "javascript-module",
7
+ "path": "src/ProgressStepper.ts",
8
+ "declarations": [
9
+ {
10
+ "kind": "variable",
11
+ "name": "progressStepperDirectionValues",
12
+ "type": {
13
+ "text": "array"
14
+ },
15
+ "default": "[ '', 'default', 'vertical', 'horizontal', ]"
16
+ },
17
+ {
18
+ "kind": "variable",
19
+ "name": "progressStepperDirectionAttributes",
20
+ "type": {
21
+ "text": "array"
22
+ },
23
+ "default": "[ 'direction', 'direction--mobile', 'direction--tablet', 'direction--laptop', 'direction--desktop', ]"
24
+ },
25
+ {
26
+ "kind": "class",
27
+ "description": "",
28
+ "name": "ProgressStepper",
29
+ "slots": [
30
+ {
31
+ "description": "`px-progress-stepper-item` elements.",
32
+ "name": ""
33
+ }
34
+ ],
35
+ "members": [
36
+ {
37
+ "kind": "field",
38
+ "name": "nativeName",
39
+ "type": {
40
+ "text": "string"
41
+ },
42
+ "static": true,
43
+ "default": "'ol'"
44
+ },
45
+ {
46
+ "kind": "field",
47
+ "name": "template",
48
+ "privacy": "protected",
49
+ "static": true,
50
+ "readonly": true
51
+ },
52
+ {
53
+ "kind": "field",
54
+ "name": "#onItemConnected",
55
+ "privacy": "private"
56
+ },
57
+ {
58
+ "kind": "method",
59
+ "name": "updateDirection",
60
+ "parameters": [
61
+ {
62
+ "name": "attrName",
63
+ "type": {
64
+ "text": "string"
65
+ }
66
+ },
67
+ {
68
+ "name": "newValue",
69
+ "type": {
70
+ "text": "string"
71
+ }
72
+ },
73
+ {
74
+ "name": "attrValues",
75
+ "type": {
76
+ "text": "string[]"
77
+ }
78
+ }
79
+ ]
80
+ },
81
+ {
82
+ "kind": "method",
83
+ "name": "#syncAttribute",
84
+ "privacy": "private",
85
+ "parameters": [
86
+ {
87
+ "name": "child",
88
+ "type": {
89
+ "text": "Element"
90
+ }
91
+ },
92
+ {
93
+ "name": "attrName",
94
+ "type": {
95
+ "text": "string"
96
+ }
97
+ }
98
+ ]
99
+ },
100
+ {
101
+ "kind": "method",
102
+ "name": "configureChildren"
103
+ },
104
+ {
105
+ "kind": "field",
106
+ "name": "$slot",
107
+ "readonly": true
108
+ },
109
+ {
110
+ "kind": "field",
111
+ "name": "$children",
112
+ "readonly": true
113
+ },
114
+ {
115
+ "kind": "field",
116
+ "name": "direction"
117
+ },
118
+ {
119
+ "kind": "field",
120
+ "name": "directionMobile"
121
+ },
122
+ {
123
+ "kind": "field",
124
+ "name": "directionTablet"
125
+ },
126
+ {
127
+ "kind": "field",
128
+ "name": "directionLaptop"
129
+ },
130
+ {
131
+ "kind": "field",
132
+ "name": "directionDesktop"
133
+ },
134
+ {
135
+ "kind": "field",
136
+ "name": "iconFrom"
137
+ }
138
+ ],
139
+ "attributes": [
140
+ {
141
+ "name": "icon-from",
142
+ "type": {
143
+ "text": "string"
144
+ },
145
+ "description": "Name of the `px-icon-set` used for the items icons. Defaults to `lavender`."
146
+ },
147
+ {
148
+ "type": {
149
+ "text": "\"default\" | \"vertical\" | \"horizontal\""
150
+ },
151
+ "description": "Layout direction of the stepper for all breakpoints. Defaults to `horizontal`.",
152
+ "name": "direction"
153
+ },
154
+ {
155
+ "type": {
156
+ "text": "\"default\" | \"vertical\" | \"horizontal\""
157
+ },
158
+ "description": "Layout direction on mobile. Overrides `direction`.",
159
+ "name": "direction--mobile"
160
+ },
161
+ {
162
+ "type": {
163
+ "text": "\"default\" | \"vertical\" | \"horizontal\""
164
+ },
165
+ "description": "Layout direction on tablet. Overrides `direction`.",
166
+ "name": "direction--tablet"
167
+ },
168
+ {
169
+ "type": {
170
+ "text": "\"default\" | \"vertical\" | \"horizontal\""
171
+ },
172
+ "description": "Layout direction on laptop. Overrides `direction`.",
173
+ "name": "direction--laptop"
174
+ },
175
+ {
176
+ "type": {
177
+ "text": "\"default\" | \"vertical\" | \"horizontal\""
178
+ },
179
+ "description": "Layout direction on desktop. Overrides `direction`.",
180
+ "name": "direction--desktop"
181
+ }
182
+ ],
183
+ "superclass": {
184
+ "name": "PxElement",
185
+ "package": "@proximus/lavender-common"
186
+ },
187
+ "summary": "Displays the progression of a user through a sequence of steps.",
188
+ "tagName": "px-progress-stepper",
189
+ "customElement": true
190
+ }
191
+ ],
192
+ "exports": [
193
+ {
194
+ "kind": "js",
195
+ "name": "progressStepperDirectionValues",
196
+ "declaration": {
197
+ "name": "progressStepperDirectionValues",
198
+ "module": "src/ProgressStepper.ts"
199
+ }
200
+ },
201
+ {
202
+ "kind": "js",
203
+ "name": "progressStepperDirectionAttributes",
204
+ "declaration": {
205
+ "name": "progressStepperDirectionAttributes",
206
+ "module": "src/ProgressStepper.ts"
207
+ }
208
+ },
209
+ {
210
+ "kind": "js",
211
+ "name": "ProgressStepper",
212
+ "declaration": {
213
+ "name": "ProgressStepper",
214
+ "module": "src/ProgressStepper.ts"
215
+ }
216
+ },
217
+ {
218
+ "kind": "custom-element-definition",
219
+ "name": "px-progress-stepper",
220
+ "declaration": {
221
+ "name": "ProgressStepper",
222
+ "module": "src/ProgressStepper.ts"
223
+ }
224
+ }
225
+ ]
226
+ },
227
+ {
228
+ "kind": "javascript-module",
229
+ "path": "src/ProgressStepperItem.ts",
230
+ "declarations": [
231
+ {
232
+ "kind": "variable",
233
+ "name": "PROGRESS_STEPPER_ITEM_CONNECTED_EVENT",
234
+ "type": {
235
+ "text": "string"
236
+ },
237
+ "default": "'px-progress-stepper-item-connected'"
238
+ },
239
+ {
240
+ "kind": "variable",
241
+ "name": "progressStepperItemStateValues",
242
+ "type": {
243
+ "text": "array"
244
+ },
245
+ "default": "[ '', 'upcoming', 'current', 'completed', ]"
246
+ },
247
+ {
248
+ "kind": "class",
249
+ "description": "",
250
+ "name": "ProgressStepperItem",
251
+ "slots": [
252
+ {
253
+ "description": "Title of the step. Rendered inside a link when `href` is set.",
254
+ "name": "title"
255
+ },
256
+ {
257
+ "description": "Helper text displayed below the title.",
258
+ "name": "helper"
259
+ }
260
+ ],
261
+ "members": [
262
+ {
263
+ "kind": "field",
264
+ "name": "nativeName",
265
+ "type": {
266
+ "text": "string"
267
+ },
268
+ "static": true,
269
+ "default": "'li'"
270
+ },
271
+ {
272
+ "kind": "field",
273
+ "name": "template",
274
+ "privacy": "protected",
275
+ "static": true,
276
+ "readonly": true
277
+ },
278
+ {
279
+ "kind": "method",
280
+ "name": "updateState",
281
+ "parameters": [
282
+ {
283
+ "name": "attrName",
284
+ "type": {
285
+ "text": "string"
286
+ }
287
+ },
288
+ {
289
+ "name": "newValue",
290
+ "type": {
291
+ "text": "string"
292
+ }
293
+ },
294
+ {
295
+ "name": "attrValues",
296
+ "type": {
297
+ "text": "string[]"
298
+ }
299
+ }
300
+ ]
301
+ },
302
+ {
303
+ "kind": "method",
304
+ "name": "#renderTitle",
305
+ "privacy": "private",
306
+ "description": "Swaps the title wrapper between a `<span>` and an `<a>` depending on `href`."
307
+ },
308
+ {
309
+ "kind": "method",
310
+ "name": "#applyAriaCurrent",
311
+ "privacy": "private"
312
+ },
313
+ {
314
+ "kind": "field",
315
+ "name": "$title",
316
+ "readonly": true
317
+ },
318
+ {
319
+ "kind": "field",
320
+ "name": "$indicatorNumber",
321
+ "readonly": true
322
+ },
323
+ {
324
+ "kind": "field",
325
+ "name": "$icon",
326
+ "readonly": true
327
+ },
328
+ {
329
+ "kind": "field",
330
+ "name": "state"
331
+ },
332
+ {
333
+ "kind": "field",
334
+ "name": "href"
335
+ },
336
+ {
337
+ "kind": "field",
338
+ "name": "item"
339
+ },
340
+ {
341
+ "kind": "field",
342
+ "name": "iconFrom"
343
+ }
344
+ ],
345
+ "events": [
346
+ {
347
+ "name": "PROGRESS_STEPPER_ITEM_CONNECTED_EVENT",
348
+ "type": {
349
+ "text": "CustomEvent"
350
+ }
351
+ }
352
+ ],
353
+ "attributes": [
354
+ {
355
+ "name": "state",
356
+ "type": {
357
+ "text": "\"upcoming\" | \"current\" | \"completed\""
358
+ },
359
+ "description": "State of the step. Defaults to `upcoming`."
360
+ },
361
+ {
362
+ "name": "href",
363
+ "type": {
364
+ "text": "string"
365
+ },
366
+ "description": "Makes the title a link pointing to this URL."
367
+ },
368
+ {
369
+ "name": "item"
370
+ },
371
+ {
372
+ "name": "lastchild"
373
+ },
374
+ {
375
+ "name": "icon-from",
376
+ "type": {
377
+ "text": "string"
378
+ },
379
+ "description": "Name of the `px-icon-set` used for the check icon. Defaults to `lavender`."
380
+ }
381
+ ],
382
+ "superclass": {
383
+ "name": "PxElement",
384
+ "package": "@proximus/lavender-common"
385
+ },
386
+ "summary": "A single step of a `px-progress-stepper`.",
387
+ "tagName": "px-progress-stepper-item",
388
+ "customElement": true
389
+ }
390
+ ],
391
+ "exports": [
392
+ {
393
+ "kind": "js",
394
+ "name": "PROGRESS_STEPPER_ITEM_CONNECTED_EVENT",
395
+ "declaration": {
396
+ "name": "PROGRESS_STEPPER_ITEM_CONNECTED_EVENT",
397
+ "module": "src/ProgressStepperItem.ts"
398
+ }
399
+ },
400
+ {
401
+ "kind": "js",
402
+ "name": "progressStepperItemStateValues",
403
+ "declaration": {
404
+ "name": "progressStepperItemStateValues",
405
+ "module": "src/ProgressStepperItem.ts"
406
+ }
407
+ },
408
+ {
409
+ "kind": "js",
410
+ "name": "ProgressStepperItem",
411
+ "declaration": {
412
+ "name": "ProgressStepperItem",
413
+ "module": "src/ProgressStepperItem.ts"
414
+ }
415
+ },
416
+ {
417
+ "kind": "custom-element-definition",
418
+ "name": "px-progress-stepper-item",
419
+ "declaration": {
420
+ "name": "ProgressStepperItem",
421
+ "module": "src/ProgressStepperItem.ts"
422
+ }
423
+ }
424
+ ]
425
+ },
426
+ {
427
+ "kind": "javascript-module",
428
+ "path": "src/index.ts",
429
+ "declarations": [],
430
+ "exports": [
431
+ {
432
+ "kind": "js",
433
+ "name": "*",
434
+ "declaration": {
435
+ "name": "*",
436
+ "module": "src/ProgressStepper"
437
+ }
438
+ },
439
+ {
440
+ "kind": "js",
441
+ "name": "*",
442
+ "declaration": {
443
+ "name": "*",
444
+ "module": "src/ProgressStepperItem"
445
+ }
446
+ }
447
+ ]
448
+ },
449
+ {
450
+ "kind": "javascript-module",
451
+ "path": "src/progress-stepper-item.css",
452
+ "declarations": [],
453
+ "exports": []
454
+ },
455
+ {
456
+ "kind": "javascript-module",
457
+ "path": "src/progress-stepper.css",
458
+ "declarations": [],
459
+ "exports": []
460
+ }
461
+ ]
462
+ }
@@ -0,0 +1,2 @@
1
+ export * from './ProgressStepper';
2
+ export * from './ProgressStepperItem';
@@ -0,0 +1,218 @@
1
+ import { PxElement as e, createTemplate as t, log as n, renderTemplate as r } from "@proximus/lavender-common";
2
+ import "@proximus/lavender-icon";
3
+ //#region src/progress-stepper.css?inline
4
+ var i = ":host{display:block}.progress-stepper{flex-direction:column;margin:0;padding:0;list-style:none;display:flex}:host(:not([direction=vertical])) .progress-stepper{flex-direction:row}:host(:not([direction=vertical])) ::slotted(px-progress-stepper-item){flex:1 1 0;min-width:0}@media screen and (width<=47.938rem){:host([direction--mobile=vertical]) .progress-stepper{flex-direction:column}:host([direction--mobile=vertical]) ::slotted(px-progress-stepper-item){flex:initial;min-width:initial}:host([direction--mobile=horizontal]) .progress-stepper{flex-direction:row}:host([direction--mobile=horizontal]) ::slotted(px-progress-stepper-item){flex:1 1 0;min-width:0}}@media screen and (width>=48rem) and (width<=64rem){:host([direction--tablet=vertical]) .progress-stepper{flex-direction:column}:host([direction--tablet=vertical]) ::slotted(px-progress-stepper-item){flex:initial;min-width:initial}:host([direction--tablet=horizontal]) .progress-stepper{flex-direction:row}:host([direction--tablet=horizontal]) ::slotted(px-progress-stepper-item){flex:1 1 0;min-width:0}}@media screen and (width>=64.0625rem) and (width<=90rem){:host([direction--laptop=vertical]) .progress-stepper{flex-direction:column}:host([direction--laptop=vertical]) ::slotted(px-progress-stepper-item){flex:initial;min-width:initial}:host([direction--laptop=horizontal]) .progress-stepper{flex-direction:row}:host([direction--laptop=horizontal]) ::slotted(px-progress-stepper-item){flex:1 1 0;min-width:0}}@media screen and (width>=90.0625rem){:host([direction--desktop=vertical]) .progress-stepper{flex-direction:column}:host([direction--desktop=vertical]) ::slotted(px-progress-stepper-item){flex:initial;min-width:initial}:host([direction--desktop=horizontal]) .progress-stepper{flex-direction:row}:host([direction--desktop=horizontal]) ::slotted(px-progress-stepper-item){flex:1 1 0;min-width:0}}", a = ":host{--progress-stepper-indicator-size:var(--px-size-icon-m);--progress-stepper-connector-color:var(--px-color-border-main-default);--progress-stepper-gap-vertical:var(--px-spacing-xs-mobile);--progress-stepper-gap-horizontal:var(--px-spacing-2xs-mobile);--progress-stepper-gap:var(--progress-stepper-gap-vertical);--progress-stepper-spacing-bottom:var(--px-padding-m-mobile);display:block}.progress-stepper-item{gap:var(--progress-stepper-gap);font-family:var(--px-font-family);line-height:var(--px-line-height-ratio-l);display:flex}.indicator-area{flex-shrink:0;justify-content:center;display:flex;position:relative}.indicator-area:before{content:\"\";top:var(--progress-stepper-indicator-size);left:calc((var(--progress-stepper-indicator-size) - var(--px-size-border-m)) / 2);width:var(--px-size-border-m);height:calc(100% - var(--progress-stepper-indicator-size));background:var(--progress-stepper-connector-color);display:block;position:absolute}.indicator{box-sizing:border-box;width:var(--progress-stepper-indicator-size);height:var(--progress-stepper-indicator-size);font-weight:var(--px-font-weight-title);font-size:var(--px-text-size-label-m-mobile);color:var(--px-color-text-dimmed-default);background:var(--px-color-background-container-default-default);border-radius:var(--px-radius-pill);justify-content:center;align-items:center;display:flex}.indicator-check{display:none}.content-area{margin-bottom:var(--progress-stepper-spacing-bottom);flex-direction:column;min-width:0;display:flex}:host([state=current]) .indicator{color:var(--px-color-text-neutral-inverted);background:var(--px-color-background-state-active-default)}:host([state=completed]){--progress-stepper-connector-color:var(--px-color-border-brand-default)}:host([state=completed]) .indicator{background:var(--px-color-icon-brand-default)}:host([state=completed]) .indicator-number{display:none}:host([state=completed]) .indicator-check{display:inline-flex}:host([lastchild]){--progress-stepper-spacing-bottom:0}:host([lastchild]) .indicator-area:before{display:none}@media screen and (width>=48rem){:host{--progress-stepper-gap-vertical:var(--px-spacing-xs-tablet);--progress-stepper-gap-horizontal:var(--px-spacing-2xs-tablet);--progress-stepper-spacing-bottom:var(--px-padding-m-tablet)}.indicator{font-size:var(--px-text-size-label-m-tablet)}}@media screen and (width>=64.0625rem){:host{--progress-stepper-gap-vertical:var(--px-spacing-xs-laptop);--progress-stepper-gap-horizontal:var(--px-spacing-2xs-laptop);--progress-stepper-spacing-bottom:var(--px-padding-m-laptop)}.indicator{font-size:var(--px-text-size-label-m-laptop)}}@media screen and (width>=90.0625rem){:host{--progress-stepper-gap-vertical:var(--px-spacing-xs-desktop);--progress-stepper-gap-horizontal:var(--px-spacing-2xs-desktop);--progress-stepper-spacing-bottom:var(--px-padding-m-desktop)}.indicator{font-size:var(--px-text-size-label-m-desktop)}}:host(:not([direction=vertical])){--progress-stepper-gap:var(--progress-stepper-gap-horizontal)}:host(:not([direction=vertical])) .progress-stepper-item{flex-direction:column}:host(:not([direction=vertical])) .indicator-area:before{top:calc((var(--progress-stepper-indicator-size) - var(--px-size-border-m)) / 2);left:calc(50% + var(--progress-stepper-indicator-size) / 2);width:calc(100% - var(--progress-stepper-indicator-size));height:var(--px-size-border-m)}:host(:not([direction=vertical])) .content-area{padding-inline:calc(var(--progress-stepper-gap-vertical) / 2);text-align:center;align-items:center;margin-bottom:0}@media screen and (width<=47.938rem){:host([direction--mobile=vertical]){--progress-stepper-gap:var(--progress-stepper-gap-vertical)}:host([direction--mobile=vertical]) .progress-stepper-item{flex-direction:row}:host([direction--mobile=vertical]) .indicator-area:before{top:var(--progress-stepper-indicator-size);left:calc((var(--progress-stepper-indicator-size) - var(--px-size-border-m)) / 2);width:var(--px-size-border-m);height:calc(100% - var(--progress-stepper-indicator-size))}:host([direction--mobile=vertical]) .content-area{margin-bottom:var(--progress-stepper-spacing-bottom);text-align:start;align-items:stretch;padding-inline:0}:host([direction--mobile=horizontal]){--progress-stepper-gap:var(--progress-stepper-gap-horizontal)}:host([direction--mobile=horizontal]) .progress-stepper-item{flex-direction:column}:host([direction--mobile=horizontal]) .indicator-area:before{top:calc((var(--progress-stepper-indicator-size) - var(--px-size-border-m)) / 2);left:calc(50% + var(--progress-stepper-indicator-size) / 2);width:calc(100% - var(--progress-stepper-indicator-size));height:var(--px-size-border-m)}:host([direction--mobile=horizontal]) .content-area{padding-inline:calc(var(--progress-stepper-gap-vertical) / 2);text-align:center;align-items:center;margin-bottom:0}}@media screen and (width>=48rem) and (width<=64rem){:host([direction--tablet=vertical]){--progress-stepper-gap:var(--progress-stepper-gap-vertical)}:host([direction--tablet=vertical]) .progress-stepper-item{flex-direction:row}:host([direction--tablet=vertical]) .indicator-area:before{top:var(--progress-stepper-indicator-size);left:calc((var(--progress-stepper-indicator-size) - var(--px-size-border-m)) / 2);width:var(--px-size-border-m);height:calc(100% - var(--progress-stepper-indicator-size))}:host([direction--tablet=vertical]) .content-area{margin-bottom:var(--progress-stepper-spacing-bottom);text-align:start;align-items:stretch;padding-inline:0}:host([direction--tablet=horizontal]){--progress-stepper-gap:var(--progress-stepper-gap-horizontal)}:host([direction--tablet=horizontal]) .progress-stepper-item{flex-direction:column}:host([direction--tablet=horizontal]) .indicator-area:before{top:calc((var(--progress-stepper-indicator-size) - var(--px-size-border-m)) / 2);left:calc(50% + var(--progress-stepper-indicator-size) / 2);width:calc(100% - var(--progress-stepper-indicator-size));height:var(--px-size-border-m)}:host([direction--tablet=horizontal]) .content-area{padding-inline:calc(var(--progress-stepper-gap-vertical) / 2);text-align:center;align-items:center;margin-bottom:0}}@media screen and (width>=64.0625rem) and (width<=90rem){:host([direction--laptop=vertical]){--progress-stepper-gap:var(--progress-stepper-gap-vertical)}:host([direction--laptop=vertical]) .progress-stepper-item{flex-direction:row}:host([direction--laptop=vertical]) .indicator-area:before{top:var(--progress-stepper-indicator-size);left:calc((var(--progress-stepper-indicator-size) - var(--px-size-border-m)) / 2);width:var(--px-size-border-m);height:calc(100% - var(--progress-stepper-indicator-size))}:host([direction--laptop=vertical]) .content-area{margin-bottom:var(--progress-stepper-spacing-bottom);text-align:start;align-items:stretch;padding-inline:0}:host([direction--laptop=horizontal]){--progress-stepper-gap:var(--progress-stepper-gap-horizontal)}:host([direction--laptop=horizontal]) .progress-stepper-item{flex-direction:column}:host([direction--laptop=horizontal]) .indicator-area:before{top:calc((var(--progress-stepper-indicator-size) - var(--px-size-border-m)) / 2);left:calc(50% + var(--progress-stepper-indicator-size) / 2);width:calc(100% - var(--progress-stepper-indicator-size));height:var(--px-size-border-m)}:host([direction--laptop=horizontal]) .content-area{padding-inline:calc(var(--progress-stepper-gap-vertical) / 2);text-align:center;align-items:center;margin-bottom:0}}@media screen and (width>=90.0625rem){:host([direction--desktop=vertical]){--progress-stepper-gap:var(--progress-stepper-gap-vertical)}:host([direction--desktop=vertical]) .progress-stepper-item{flex-direction:row}:host([direction--desktop=vertical]) .indicator-area:before{top:var(--progress-stepper-indicator-size);left:calc((var(--progress-stepper-indicator-size) - var(--px-size-border-m)) / 2);width:var(--px-size-border-m);height:calc(100% - var(--progress-stepper-indicator-size))}:host([direction--desktop=vertical]) .content-area{margin-bottom:var(--progress-stepper-spacing-bottom);text-align:start;align-items:stretch;padding-inline:0}:host([direction--desktop=horizontal]){--progress-stepper-gap:var(--progress-stepper-gap-horizontal)}:host([direction--desktop=horizontal]) .progress-stepper-item{flex-direction:column}:host([direction--desktop=horizontal]) .indicator-area:before{top:calc((var(--progress-stepper-indicator-size) - var(--px-size-border-m)) / 2);left:calc(50% + var(--progress-stepper-indicator-size) / 2);width:calc(100% - var(--progress-stepper-indicator-size));height:var(--px-size-border-m)}:host([direction--desktop=horizontal]) .content-area{padding-inline:calc(var(--progress-stepper-gap-vertical) / 2);text-align:center;align-items:center;margin-bottom:0}}", o = new CSSStyleSheet();
5
+ o.replaceSync(a);
6
+ var s = "px-progress-stepper-item-connected", c = [
7
+ "",
8
+ "upcoming",
9
+ "current",
10
+ "completed"
11
+ ], l = class i extends e {
12
+ static {
13
+ this.nativeName = "li";
14
+ }
15
+ static {
16
+ this.template = t("<li class=\"progress-stepper-item\" role=\"listitem\"><div class=\"indicator-area\"><span class=\"indicator\" aria-hidden=\"true\"><span class=\"indicator-number\"></span><px-icon\n class=\"indicator-check\"\n name=\"checkmark\"\n from=\"lavender\"\n size=\"s\"\n color=\"neutral\"\n inverted\n ></px-icon></span></div><div class=\"content-area\"><span class=\"title\"><slot name=\"title\"></slot></span><slot name=\"helper\"></slot></div></li>");
17
+ }
18
+ constructor() {
19
+ super(o), r(this.shadowRoot, i.template);
20
+ }
21
+ static get observedAttributes() {
22
+ return [
23
+ ...super.observedAttributes,
24
+ "state",
25
+ "href",
26
+ "item",
27
+ "lastchild",
28
+ "icon-from"
29
+ ];
30
+ }
31
+ connectedCallback() {
32
+ this.#e(), this.dispatchEvent(new CustomEvent(s, {
33
+ bubbles: !0,
34
+ composed: !0
35
+ }));
36
+ }
37
+ attributeChangedCallback(e, t, n) {
38
+ if (t !== n) switch (e) {
39
+ case "state":
40
+ this.updateState(e, n, c);
41
+ break;
42
+ case "href":
43
+ this.#e();
44
+ break;
45
+ case "item":
46
+ this.$indicatorNumber.textContent = n ?? "";
47
+ break;
48
+ case "lastchild": break;
49
+ case "icon-from":
50
+ this.$icon.setAttribute("from", n || "lavender");
51
+ break;
52
+ default: super.attributeChangedCallback(e, t, n);
53
+ }
54
+ }
55
+ updateState(e, t, r) {
56
+ t !== null && !this.checkName(r, t) && n(`"${t}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${r.join("\", \"")}".`), this.#t();
57
+ }
58
+ #e() {
59
+ let e = this.getAttribute("href"), t = e ? "a" : "span", n = this.$title;
60
+ if (n.localName !== t) {
61
+ let e = document.createElement(t);
62
+ e.className = "title", e.append(...n.childNodes), n.replaceWith(e), n = e;
63
+ }
64
+ e && n.setAttribute("href", e), this.#t();
65
+ }
66
+ #t() {
67
+ let e = this.state === "current", t = this.$title, n = t.localName === "a" ? t : this.$el;
68
+ this.$el.removeAttribute("aria-current"), t.removeAttribute("aria-current"), e && n.setAttribute("aria-current", "step");
69
+ }
70
+ get $title() {
71
+ return this.shadowRoot.querySelector(".title");
72
+ }
73
+ get $indicatorNumber() {
74
+ return this.shadowRoot.querySelector(".indicator-number");
75
+ }
76
+ get $icon() {
77
+ return this.shadowRoot.querySelector(".indicator-check");
78
+ }
79
+ get state() {
80
+ return this.getAttribute("state");
81
+ }
82
+ set state(e) {
83
+ this._updateAttribute("state", e);
84
+ }
85
+ get href() {
86
+ return this.getAttribute("href");
87
+ }
88
+ set href(e) {
89
+ this._updateAttribute("href", e);
90
+ }
91
+ get item() {
92
+ return this.getAttribute("item");
93
+ }
94
+ set item(e) {
95
+ this._updateAttribute("item", e);
96
+ }
97
+ get iconFrom() {
98
+ return this.getAttribute("icon-from");
99
+ }
100
+ set iconFrom(e) {
101
+ this._updateAttribute("icon-from", e);
102
+ }
103
+ };
104
+ customElements.get("px-progress-stepper-item") || customElements.define("px-progress-stepper-item", l);
105
+ //#endregion
106
+ //#region src/ProgressStepper.ts
107
+ var u = new CSSStyleSheet();
108
+ u.replaceSync(i);
109
+ var d = [
110
+ "",
111
+ "default",
112
+ "vertical",
113
+ "horizontal"
114
+ ], f = [
115
+ "direction",
116
+ "direction--mobile",
117
+ "direction--tablet",
118
+ "direction--laptop",
119
+ "direction--desktop"
120
+ ], p = class i extends e {
121
+ static {
122
+ this.nativeName = "ol";
123
+ }
124
+ static {
125
+ this.template = t("<ol class=\"progress-stepper\" role=\"list\"><slot></slot></ol>");
126
+ }
127
+ #e = () => this.configureChildren();
128
+ constructor() {
129
+ super(u), r(this.shadowRoot, i.template);
130
+ }
131
+ static get observedAttributes() {
132
+ return [
133
+ ...super.observedAttributes,
134
+ ...f,
135
+ "icon-from"
136
+ ];
137
+ }
138
+ connectedCallback() {
139
+ this.addEventListener(s, this.#e), this.$slot?.addEventListener("slotchange", this.#e), this.configureChildren();
140
+ }
141
+ disconnectedCallback() {
142
+ this.removeEventListener(s, this.#e), this.$slot?.removeEventListener("slotchange", this.#e);
143
+ }
144
+ attributeChangedCallback(e, t, n) {
145
+ if (t !== n) switch (e) {
146
+ case "direction":
147
+ case "direction--mobile":
148
+ case "direction--tablet":
149
+ case "direction--laptop":
150
+ case "direction--desktop":
151
+ this.updateDirection(e, n, d);
152
+ break;
153
+ case "icon-from":
154
+ for (let t of this.$children) this.#t(t, e);
155
+ break;
156
+ default: super.attributeChangedCallback(e, t, n);
157
+ }
158
+ }
159
+ updateDirection(e, t, r) {
160
+ t !== null && !this.checkName(r, t) && n(`"${t}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${r.join("\", \"")}".`);
161
+ for (let t of this.$children) this.#t(t, e);
162
+ }
163
+ #t(e, t) {
164
+ let n = this.getAttribute(t);
165
+ n === null ? e.removeAttribute(t) : e.setAttribute(t, n);
166
+ }
167
+ configureChildren() {
168
+ let e = this.$children;
169
+ e.forEach((t, n) => {
170
+ t.setAttribute("item", `${n + 1}`), t.toggleAttribute("lastchild", n === e.length - 1), f.forEach((e) => this.#t(t, e)), this.hasAttribute("icon-from") && this.#t(t, "icon-from");
171
+ });
172
+ }
173
+ get $slot() {
174
+ return this.shadowRoot.querySelector("slot");
175
+ }
176
+ get $children() {
177
+ return this.querySelectorAll(":scope > px-progress-stepper-item");
178
+ }
179
+ get direction() {
180
+ return this.getAttribute("direction");
181
+ }
182
+ set direction(e) {
183
+ this._updateAttribute("direction", e);
184
+ }
185
+ get directionMobile() {
186
+ return this.getAttribute("direction--mobile");
187
+ }
188
+ set directionMobile(e) {
189
+ this._updateAttribute("direction--mobile", e);
190
+ }
191
+ get directionTablet() {
192
+ return this.getAttribute("direction--tablet");
193
+ }
194
+ set directionTablet(e) {
195
+ this._updateAttribute("direction--tablet", e);
196
+ }
197
+ get directionLaptop() {
198
+ return this.getAttribute("direction--laptop");
199
+ }
200
+ set directionLaptop(e) {
201
+ this._updateAttribute("direction--laptop", e);
202
+ }
203
+ get directionDesktop() {
204
+ return this.getAttribute("direction--desktop");
205
+ }
206
+ set directionDesktop(e) {
207
+ this._updateAttribute("direction--desktop", e);
208
+ }
209
+ get iconFrom() {
210
+ return this.getAttribute("icon-from");
211
+ }
212
+ set iconFrom(e) {
213
+ this._updateAttribute("icon-from", e);
214
+ }
215
+ };
216
+ customElements.get("px-progress-stepper") || customElements.define("px-progress-stepper", p);
217
+ //#endregion
218
+ export { s as PROGRESS_STEPPER_ITEM_CONNECTED_EVENT, p as ProgressStepper, l as ProgressStepperItem, f as progressStepperDirectionAttributes, d as progressStepperDirectionValues, c as progressStepperItemStateValues };
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
3
+ "version": 1.1,
4
+ "properties": [],
5
+ "pseudoElements": []
6
+ }
@@ -0,0 +1,91 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
3
+ "version": 1.1,
4
+ "tags": [
5
+ {
6
+ "name": "px-progress-stepper",
7
+ "description": "Displays the progression of a user through a sequence of steps.\n---\n\n\n### **Slots:**\n - _default_ - `px-progress-stepper-item` elements.",
8
+ "attributes": [
9
+ {
10
+ "name": "icon-from",
11
+ "description": "Name of the `px-icon-set` used for the items icons. Defaults to `lavender`.",
12
+ "values": []
13
+ },
14
+ {
15
+ "name": "direction",
16
+ "description": "Layout direction of the stepper for all breakpoints. Defaults to `horizontal`.",
17
+ "values": [
18
+ { "name": "default" },
19
+ { "name": "vertical" },
20
+ { "name": "horizontal" }
21
+ ]
22
+ },
23
+ {
24
+ "name": "direction--mobile",
25
+ "description": "Layout direction on mobile. Overrides `direction`.",
26
+ "values": [
27
+ { "name": "default" },
28
+ { "name": "vertical" },
29
+ { "name": "horizontal" }
30
+ ]
31
+ },
32
+ {
33
+ "name": "direction--tablet",
34
+ "description": "Layout direction on tablet. Overrides `direction`.",
35
+ "values": [
36
+ { "name": "default" },
37
+ { "name": "vertical" },
38
+ { "name": "horizontal" }
39
+ ]
40
+ },
41
+ {
42
+ "name": "direction--laptop",
43
+ "description": "Layout direction on laptop. Overrides `direction`.",
44
+ "values": [
45
+ { "name": "default" },
46
+ { "name": "vertical" },
47
+ { "name": "horizontal" }
48
+ ]
49
+ },
50
+ {
51
+ "name": "direction--desktop",
52
+ "description": "Layout direction on desktop. Overrides `direction`.",
53
+ "values": [
54
+ { "name": "default" },
55
+ { "name": "vertical" },
56
+ { "name": "horizontal" }
57
+ ]
58
+ }
59
+ ],
60
+ "references": []
61
+ },
62
+ {
63
+ "name": "px-progress-stepper-item",
64
+ "description": "A single step of a `px-progress-stepper`.\n---\n\n\n### **Events:**\n - **PROGRESS_STEPPER_ITEM_CONNECTED_EVENT**\n\n### **Slots:**\n - **title** - Title of the step. Rendered inside a link when `href` is set.\n- **helper** - Helper text displayed below the title.",
65
+ "attributes": [
66
+ {
67
+ "name": "state",
68
+ "description": "State of the step. Defaults to `upcoming`.",
69
+ "values": [
70
+ { "name": "upcoming" },
71
+ { "name": "current" },
72
+ { "name": "completed" }
73
+ ]
74
+ },
75
+ {
76
+ "name": "href",
77
+ "description": "Makes the title a link pointing to this URL.",
78
+ "values": []
79
+ },
80
+ { "name": "item", "values": [] },
81
+ { "name": "lastchild", "values": [] },
82
+ {
83
+ "name": "icon-from",
84
+ "description": "Name of the `px-icon-set` used for the check icon. Defaults to `lavender`.",
85
+ "values": []
86
+ }
87
+ ],
88
+ "references": []
89
+ }
90
+ ]
91
+ }
@@ -0,0 +1,130 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
+ "name": "@proximus/lavender-progress-stepper",
4
+ "version": "1.4.20-alpha.10",
5
+ "description-markup": "markdown",
6
+ "contributions": {
7
+ "html": {
8
+ "elements": [
9
+ {
10
+ "name": "px-progress-stepper",
11
+ "description": "Displays the progression of a user through a sequence of steps.\n\n---\n\n\n### **Slots:**\n - _default_ - `px-progress-stepper-item` elements.",
12
+ "doc-url": "",
13
+ "attributes": [
14
+ {
15
+ "name": "icon-from",
16
+ "description": "Name of the `px-icon-set` used for the items icons. Defaults to `lavender`.",
17
+ "value": { "type": "string" }
18
+ },
19
+ {
20
+ "name": "direction",
21
+ "description": "Layout direction of the stepper for all breakpoints. Defaults to `horizontal`.",
22
+ "value": { "type": "\"default\" | \"vertical\" | \"horizontal\"" }
23
+ },
24
+ {
25
+ "name": "direction--mobile",
26
+ "description": "Layout direction on mobile. Overrides `direction`.",
27
+ "value": { "type": "\"default\" | \"vertical\" | \"horizontal\"" }
28
+ },
29
+ {
30
+ "name": "direction--tablet",
31
+ "description": "Layout direction on tablet. Overrides `direction`.",
32
+ "value": { "type": "\"default\" | \"vertical\" | \"horizontal\"" }
33
+ },
34
+ {
35
+ "name": "direction--laptop",
36
+ "description": "Layout direction on laptop. Overrides `direction`.",
37
+ "value": { "type": "\"default\" | \"vertical\" | \"horizontal\"" }
38
+ },
39
+ {
40
+ "name": "direction--desktop",
41
+ "description": "Layout direction on desktop. Overrides `direction`.",
42
+ "value": { "type": "\"default\" | \"vertical\" | \"horizontal\"" }
43
+ }
44
+ ],
45
+ "slots": [
46
+ {
47
+ "name": "",
48
+ "description": "`px-progress-stepper-item` elements."
49
+ }
50
+ ],
51
+ "events": [],
52
+ "js": {
53
+ "properties": [
54
+ { "name": "$slot" },
55
+ { "name": "$children" },
56
+ { "name": "direction" },
57
+ { "name": "directionMobile" },
58
+ { "name": "directionTablet" },
59
+ { "name": "directionLaptop" },
60
+ { "name": "directionDesktop" },
61
+ { "name": "iconFrom" }
62
+ ],
63
+ "events": []
64
+ }
65
+ },
66
+ {
67
+ "name": "px-progress-stepper-item",
68
+ "description": "A single step of a `px-progress-stepper`.\n\n---\n\n\n### **Events:**\n - **PROGRESS_STEPPER_ITEM_CONNECTED_EVENT**\n\n### **Slots:**\n - **title** - Title of the step. Rendered inside a link when `href` is set.\n- **helper** - Helper text displayed below the title.",
69
+ "doc-url": "",
70
+ "attributes": [
71
+ {
72
+ "name": "state",
73
+ "description": "State of the step. Defaults to `upcoming`.",
74
+ "value": { "type": "\"upcoming\" | \"current\" | \"completed\"" }
75
+ },
76
+ {
77
+ "name": "href",
78
+ "description": "Makes the title a link pointing to this URL.",
79
+ "value": { "type": "string" }
80
+ },
81
+ { "name": "item", "value": { "type": "string" } },
82
+ { "name": "lastchild", "value": { "type": "string" } },
83
+ {
84
+ "name": "icon-from",
85
+ "description": "Name of the `px-icon-set` used for the check icon. Defaults to `lavender`.",
86
+ "value": { "type": "string" }
87
+ }
88
+ ],
89
+ "slots": [
90
+ {
91
+ "name": "title",
92
+ "description": "Title of the step. Rendered inside a link when `href` is set."
93
+ },
94
+ {
95
+ "name": "helper",
96
+ "description": "Helper text displayed below the title."
97
+ }
98
+ ],
99
+ "events": [
100
+ {
101
+ "name": "PROGRESS_STEPPER_ITEM_CONNECTED_EVENT",
102
+ "type": "CustomEvent"
103
+ }
104
+ ],
105
+ "js": {
106
+ "properties": [
107
+ { "name": "$title" },
108
+ { "name": "$indicatorNumber" },
109
+ { "name": "$icon" },
110
+ { "name": "state" },
111
+ { "name": "href" },
112
+ { "name": "item" },
113
+ { "name": "iconFrom" }
114
+ ],
115
+ "events": [
116
+ {
117
+ "name": "PROGRESS_STEPPER_ITEM_CONNECTED_EVENT",
118
+ "type": "CustomEvent"
119
+ }
120
+ ]
121
+ }
122
+ }
123
+ ]
124
+ },
125
+ "css": {
126
+ "properties": [],
127
+ "pseudo-elements": []
128
+ }
129
+ }
130
+ }
package/package.json CHANGED
@@ -1,6 +1,24 @@
1
1
  {
2
2
  "name": "@proximus/lavender-progress-stepper",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.4.20-alpha.10",
4
+ "description": "",
5
+ "main": "dist/index.es.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "type": "module",
11
+ "scripts": {
12
+ "transform-package-json": "node ../../../scripts/tranformPackageJson.js package.json dist/far/away",
13
+ "clean": "rm -rf dist",
14
+ "build": "npm run clean && NODE_ENV=development vite build && tsc && npm run transform-package-json && npm run wc-manifest",
15
+ "test": "vitest run --coverage",
16
+ "wc-manifest": "cem analyze --globs \"src/*\" --config ../../custom-elements-manifest.config.js --outdir dist"
17
+ },
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
21
+ "customElements": "dist/custom-elements.json",
22
+ "web-types": "./dist/web-types.json",
23
+ "gitHead": "460ebd4c7e0171baabc0871a7058f475b5c9adbb"
24
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.