@proximus/lavender-progress-stepper 0.0.0-stage → 1.4.19-beta.4
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/dist/ProgressStepper.d.ts +39 -0
- package/dist/ProgressStepperBase.d.ts +25 -0
- package/dist/ProgressStepperItem.d.ts +16 -0
- package/dist/ProgressStepperLink.d.ts +20 -0
- package/dist/custom-elements.json +966 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.es.js +277 -0
- package/dist/vscode.css-custom-data.json +6 -0
- package/dist/vscode.html-custom-data.json +125 -0
- package/dist/web-types.json +199 -0
- package/package.json +22 -4
- package/README.md +0 -3
package/dist/index.d.ts
ADDED
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { WithExtraAttributes as e, createTemplate as t, log as n, propertyToAttributeSetter as r, renderTemplate as i } from "@proximus/lavender-common";
|
|
2
|
+
import "@proximus/lavender-icon";
|
|
3
|
+
import "@proximus/lavender-span";
|
|
4
|
+
// src/progress-stepper.css?inline
|
|
5
|
+
var a = ":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),:host(:not([direction=vertical])) ::slotted(px-progress-stepper-link){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),:host([direction--mobile=vertical]) ::slotted(px-progress-stepper-link){flex:initial;min-width:initial}:host([direction--mobile=horizontal]) .progress-stepper{flex-direction:row}:host([direction--mobile=horizontal]) ::slotted(px-progress-stepper-item),:host([direction--mobile=horizontal]) ::slotted(px-progress-stepper-link){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),:host([direction--tablet=vertical]) ::slotted(px-progress-stepper-link){flex:initial;min-width:initial}:host([direction--tablet=horizontal]) .progress-stepper{flex-direction:row}:host([direction--tablet=horizontal]) ::slotted(px-progress-stepper-item),:host([direction--tablet=horizontal]) ::slotted(px-progress-stepper-link){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),:host([direction--laptop=vertical]) ::slotted(px-progress-stepper-link){flex:initial;min-width:initial}:host([direction--laptop=horizontal]) .progress-stepper{flex-direction:row}:host([direction--laptop=horizontal]) ::slotted(px-progress-stepper-item),:host([direction--laptop=horizontal]) ::slotted(px-progress-stepper-link){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),:host([direction--desktop=vertical]) ::slotted(px-progress-stepper-link){flex:initial;min-width:initial}:host([direction--desktop=horizontal]) .progress-stepper{flex-direction:row}:host([direction--desktop=horizontal]) ::slotted(px-progress-stepper-item),:host([direction--desktop=horizontal]) ::slotted(px-progress-stepper-link){flex:1 1 0;min-width:0}}", o = ":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);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);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;font-size:.875rem;display:flex}.indicator-check{display:none}.content-area{margin-bottom:var(--progress-stepper-spacing-bottom);flex-direction:column;min-width:0;display:flex}.content-area px-span[shown--sr]{display:none}.content-area .title,.content-area ::slotted([slot=helper]){font-size:var(--px-text-size-label-s-mobile);color:var(--px-color-text-dimmed-default);line-height:var(--px-line-height-ratio-l)}.content-area a.title{--btn-transition:all .2s ease-in-out 0s;transition:var(--btn-transition)}.content-area a.title:hover{color:var(--px-color-text-state-hover-default)}.content-area a.title:focus-visible{outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default)}:host([state=current]) .indicator{color:var(--px-color-text-neutral-inverted);background:var(--px-color-background-state-active-default)}:host([state=current]) .content-area .title{color:var(--px-color-text-neutral-default);font-weight:var(--px-font-weight-title)}:host([state=current]) .content-area a.title:hover{color:var(--px-color-text-state-hover-default)}:host([state=completed]){--progress-stepper-connector-color:var(--px-color-border-brand-default)}:host([state=completed]) .indicator{background:var(--px-color-background-state-active-default)}:host([state=completed]) .indicator-number{display:none}:host([state=completed]) .indicator-check{display:inline-flex}:host([state=completed]) .content-area px-span[shown--sr]{display:block}: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)}.content-area .title,.content-area ::slotted([slot=helper]){font-size:var(--px-text-size-label-s-tablet)}.content-area a.title:focus-visible{outline-offset:var(--px-focus-offset-tablet);outline-width:var(--px-focus-outline-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)}.content-area .title,.content-area ::slotted([slot=helper]){font-size:var(--px-text-size-label-s-laptop)}.content-area a.title:focus-visible{outline-offset:var(--px-focus-offset-laptop);outline-width:var(--px-focus-outline-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)}.content-area .title,.content-area ::slotted([slot=helper]){font-size:var(--px-text-size-label-s-desktop)}.content-area a.title:focus-visible{outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-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}}", s = new CSSStyleSheet();
|
|
6
|
+
s.replaceSync(o);
|
|
7
|
+
var c = [
|
|
8
|
+
"",
|
|
9
|
+
"upcoming",
|
|
10
|
+
"current",
|
|
11
|
+
"completed"
|
|
12
|
+
], l = class extends e {
|
|
13
|
+
static createItemTemplate(e) {
|
|
14
|
+
return t(`
|
|
15
|
+
<li class="progress-stepper-item" role="listitem">
|
|
16
|
+
<div class="indicator-area">
|
|
17
|
+
<span class="indicator" aria-hidden="true">
|
|
18
|
+
<span class="indicator-number"></span>
|
|
19
|
+
<px-icon
|
|
20
|
+
class="indicator-check"
|
|
21
|
+
name="checkmark"
|
|
22
|
+
from="lavender"
|
|
23
|
+
size="s"
|
|
24
|
+
color="neutral"
|
|
25
|
+
inverted
|
|
26
|
+
></px-icon>
|
|
27
|
+
</span>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="content-area">
|
|
30
|
+
<px-span shown--sr=""></px-span>
|
|
31
|
+
<${e} class="title"><slot name="title"></slot></${e}>
|
|
32
|
+
<slot name="helper"></slot>
|
|
33
|
+
</div>
|
|
34
|
+
</li>
|
|
35
|
+
`);
|
|
36
|
+
}
|
|
37
|
+
constructor(e) {
|
|
38
|
+
super(s), i(this.shadowRoot, e);
|
|
39
|
+
}
|
|
40
|
+
static get observedAttributes() {
|
|
41
|
+
return [
|
|
42
|
+
...super.observedAttributes,
|
|
43
|
+
"state",
|
|
44
|
+
"item",
|
|
45
|
+
"lastchild",
|
|
46
|
+
"icon-from",
|
|
47
|
+
"completed-label"
|
|
48
|
+
];
|
|
49
|
+
}
|
|
50
|
+
attributeChangedCallback(e, t, n) {
|
|
51
|
+
if (t !== n) switch (e) {
|
|
52
|
+
case "state":
|
|
53
|
+
this.updateState(e, n, c);
|
|
54
|
+
break;
|
|
55
|
+
case "item":
|
|
56
|
+
this.$indicatorNumber.textContent = n ?? "";
|
|
57
|
+
break;
|
|
58
|
+
case "lastchild": break;
|
|
59
|
+
case "icon-from":
|
|
60
|
+
this.$icon.setAttribute("from", n || "lavender");
|
|
61
|
+
break;
|
|
62
|
+
case "completed-label":
|
|
63
|
+
this.$shownSR.textContent = n;
|
|
64
|
+
break;
|
|
65
|
+
default: super.attributeChangedCallback(e, t, n);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
updateState(e, t, r) {
|
|
69
|
+
t !== null && !this.checkName(r, t) && n(`"${t}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${r.join("\", \"")}".`), this.applyAriaCurrent();
|
|
70
|
+
}
|
|
71
|
+
applyAriaCurrent() {
|
|
72
|
+
let e = this.state === "current", t = this.$title, n = t.localName === "a" && t.hasAttribute("href") ? t : this.$el;
|
|
73
|
+
this.$el.removeAttribute("aria-current"), t.removeAttribute("aria-current"), e && n.setAttribute("aria-current", "step");
|
|
74
|
+
}
|
|
75
|
+
get $el() {
|
|
76
|
+
return this.shadowRoot.querySelector("li");
|
|
77
|
+
}
|
|
78
|
+
get $title() {
|
|
79
|
+
return this.shadowRoot.querySelector(".title");
|
|
80
|
+
}
|
|
81
|
+
get $indicatorNumber() {
|
|
82
|
+
return this.shadowRoot.querySelector(".indicator-number");
|
|
83
|
+
}
|
|
84
|
+
get $icon() {
|
|
85
|
+
return this.shadowRoot.querySelector(".indicator-check");
|
|
86
|
+
}
|
|
87
|
+
get $shownSR() {
|
|
88
|
+
return this.shadowRoot.querySelector("px-span[shown--sr]");
|
|
89
|
+
}
|
|
90
|
+
get state() {
|
|
91
|
+
return this.getAttribute("state");
|
|
92
|
+
}
|
|
93
|
+
set state(e) {
|
|
94
|
+
r(this, "state", e);
|
|
95
|
+
}
|
|
96
|
+
get item() {
|
|
97
|
+
return this.getAttribute("item");
|
|
98
|
+
}
|
|
99
|
+
set item(e) {
|
|
100
|
+
r(this, "item", e);
|
|
101
|
+
}
|
|
102
|
+
get iconFrom() {
|
|
103
|
+
return this.getAttribute("icon-from");
|
|
104
|
+
}
|
|
105
|
+
set iconFrom(e) {
|
|
106
|
+
r(this, "icon-from", e);
|
|
107
|
+
}
|
|
108
|
+
get completedLabel() {
|
|
109
|
+
return this.getAttribute("completed-label");
|
|
110
|
+
}
|
|
111
|
+
set completedLabel(e) {
|
|
112
|
+
r(this, "completed-label", e);
|
|
113
|
+
}
|
|
114
|
+
}, u = "px-progress-stepper-item-connected", d = class e extends l {
|
|
115
|
+
static {
|
|
116
|
+
this.template = this.createItemTemplate("span");
|
|
117
|
+
}
|
|
118
|
+
constructor() {
|
|
119
|
+
super(e.template);
|
|
120
|
+
}
|
|
121
|
+
connectedCallback() {
|
|
122
|
+
this.dispatchEvent(new CustomEvent(u, {
|
|
123
|
+
bubbles: !0,
|
|
124
|
+
composed: !0
|
|
125
|
+
}));
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
customElements.get("px-progress-stepper-item") || customElements.define("px-progress-stepper-item", d);
|
|
129
|
+
// src/ProgressStepperLink.ts
|
|
130
|
+
var f = "px-progress-stepper-link-connected", p = class e extends l {
|
|
131
|
+
static {
|
|
132
|
+
this.template = this.createItemTemplate("a");
|
|
133
|
+
}
|
|
134
|
+
constructor() {
|
|
135
|
+
super(e.template);
|
|
136
|
+
}
|
|
137
|
+
static get observedAttributes() {
|
|
138
|
+
return [...super.observedAttributes, "href"];
|
|
139
|
+
}
|
|
140
|
+
connectedCallback() {
|
|
141
|
+
this.dispatchEvent(new CustomEvent(f, {
|
|
142
|
+
bubbles: !0,
|
|
143
|
+
composed: !0
|
|
144
|
+
}));
|
|
145
|
+
}
|
|
146
|
+
attributeChangedCallback(e, t, n) {
|
|
147
|
+
e === "href" ? (n === null ? this.$title.removeAttribute("href") : this.$title.setAttribute("href", n), this.applyAriaCurrent()) : super.attributeChangedCallback(e, t, n);
|
|
148
|
+
}
|
|
149
|
+
get href() {
|
|
150
|
+
return this.getAttribute("href");
|
|
151
|
+
}
|
|
152
|
+
set href(e) {
|
|
153
|
+
r(this, "href", e);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
customElements.get("px-progress-stepper-link") || customElements.define("px-progress-stepper-link", p);
|
|
157
|
+
// src/ProgressStepper.ts
|
|
158
|
+
var m = new CSSStyleSheet();
|
|
159
|
+
m.replaceSync(a);
|
|
160
|
+
var h = [
|
|
161
|
+
"",
|
|
162
|
+
"default",
|
|
163
|
+
"vertical",
|
|
164
|
+
"horizontal"
|
|
165
|
+
], g = [
|
|
166
|
+
"direction",
|
|
167
|
+
"direction--mobile",
|
|
168
|
+
"direction--tablet",
|
|
169
|
+
"direction--laptop",
|
|
170
|
+
"direction--desktop"
|
|
171
|
+
], _ = class a extends e {
|
|
172
|
+
static {
|
|
173
|
+
this.template = t("<div class=\"navigation\"><ol class=\"progress-stepper\" role=\"list\"><slot></slot></ol></div>");
|
|
174
|
+
}
|
|
175
|
+
#e = () => this.configureChildren();
|
|
176
|
+
constructor() {
|
|
177
|
+
super(m), i(this.shadowRoot, a.template);
|
|
178
|
+
}
|
|
179
|
+
static get observedAttributes() {
|
|
180
|
+
return [
|
|
181
|
+
...super.observedAttributes,
|
|
182
|
+
...g,
|
|
183
|
+
"icon-from",
|
|
184
|
+
"aria-label"
|
|
185
|
+
];
|
|
186
|
+
}
|
|
187
|
+
connectedCallback() {
|
|
188
|
+
this.addEventListener(u, this.#e), this.addEventListener(f, this.#e), this.$slot?.addEventListener("slotchange", this.#e), this.configureChildren();
|
|
189
|
+
}
|
|
190
|
+
disconnectedCallback() {
|
|
191
|
+
this.removeEventListener(u, this.#e), this.removeEventListener(f, this.#e), this.$slot?.removeEventListener("slotchange", this.#e);
|
|
192
|
+
}
|
|
193
|
+
attributeChangedCallback(e, t, n) {
|
|
194
|
+
if (t !== n) switch (e) {
|
|
195
|
+
case "aria-label":
|
|
196
|
+
this.#n();
|
|
197
|
+
break;
|
|
198
|
+
case "direction":
|
|
199
|
+
case "direction--mobile":
|
|
200
|
+
case "direction--tablet":
|
|
201
|
+
case "direction--laptop":
|
|
202
|
+
case "direction--desktop":
|
|
203
|
+
this.updateDirection(e, n, h);
|
|
204
|
+
break;
|
|
205
|
+
case "icon-from":
|
|
206
|
+
for (let t of this.$children) this.#t(t, e);
|
|
207
|
+
break;
|
|
208
|
+
default: super.attributeChangedCallback(e, t, n);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
updateDirection(e, t, r) {
|
|
212
|
+
t !== null && !this.checkName(r, t) && n(`"${t}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${r.join("\", \"")}".`);
|
|
213
|
+
for (let t of this.$children) this.#t(t, e);
|
|
214
|
+
}
|
|
215
|
+
#t(e, t) {
|
|
216
|
+
let n = this.getAttribute(t);
|
|
217
|
+
n === null ? e.removeAttribute(t) : e.setAttribute(t, n);
|
|
218
|
+
}
|
|
219
|
+
configureChildren() {
|
|
220
|
+
let e = this.$children;
|
|
221
|
+
this.#n(), e.forEach((t, n) => {
|
|
222
|
+
t.setAttribute("item", `${n + 1}`), t.toggleAttribute("lastchild", n === e.length - 1), g.forEach((e) => this.#t(t, e)), this.hasAttribute("icon-from") && this.#t(t, "icon-from");
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
#n() {
|
|
226
|
+
let e = this.shadowRoot.querySelector(".navigation");
|
|
227
|
+
if (this.querySelector(":scope > px-progress-stepper-link")) {
|
|
228
|
+
e.setAttribute("role", "navigation");
|
|
229
|
+
let t = this.getAttribute("aria-label");
|
|
230
|
+
t ? e.setAttribute("aria-label", t) : e.removeAttribute("aria-label");
|
|
231
|
+
} else e.removeAttribute("role"), e.removeAttribute("aria-label");
|
|
232
|
+
}
|
|
233
|
+
get $slot() {
|
|
234
|
+
return this.shadowRoot.querySelector("slot");
|
|
235
|
+
}
|
|
236
|
+
get $children() {
|
|
237
|
+
return this.querySelectorAll(":scope > px-progress-stepper-item, :scope > px-progress-stepper-link");
|
|
238
|
+
}
|
|
239
|
+
get direction() {
|
|
240
|
+
return this.getAttribute("direction");
|
|
241
|
+
}
|
|
242
|
+
set direction(e) {
|
|
243
|
+
r(this, "direction", e);
|
|
244
|
+
}
|
|
245
|
+
get directionMobile() {
|
|
246
|
+
return this.getAttribute("direction--mobile");
|
|
247
|
+
}
|
|
248
|
+
set directionMobile(e) {
|
|
249
|
+
r(this, "direction--mobile", e);
|
|
250
|
+
}
|
|
251
|
+
get directionTablet() {
|
|
252
|
+
return this.getAttribute("direction--tablet");
|
|
253
|
+
}
|
|
254
|
+
set directionTablet(e) {
|
|
255
|
+
r(this, "direction--tablet", e);
|
|
256
|
+
}
|
|
257
|
+
get directionLaptop() {
|
|
258
|
+
return this.getAttribute("direction--laptop");
|
|
259
|
+
}
|
|
260
|
+
set directionLaptop(e) {
|
|
261
|
+
r(this, "direction--laptop", e);
|
|
262
|
+
}
|
|
263
|
+
get directionDesktop() {
|
|
264
|
+
return this.getAttribute("direction--desktop");
|
|
265
|
+
}
|
|
266
|
+
set directionDesktop(e) {
|
|
267
|
+
r(this, "direction--desktop", e);
|
|
268
|
+
}
|
|
269
|
+
get iconFrom() {
|
|
270
|
+
return this.getAttribute("icon-from");
|
|
271
|
+
}
|
|
272
|
+
set iconFrom(e) {
|
|
273
|
+
r(this, "icon-from", e);
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
customElements.get("px-progress-stepper") || customElements.define("px-progress-stepper", _);
|
|
277
|
+
export { u as PROGRESS_STEPPER_ITEM_CONNECTED_EVENT, f as PROGRESS_STEPPER_LINK_CONNECTED_EVENT, _ as ProgressStepper, d as ProgressStepperItem, p as ProgressStepperLink, g as progressStepperDirectionAttributes, h as progressStepperDirectionValues, c as progressStepperItemStateValues };
|
|
@@ -0,0 +1,125 @@
|
|
|
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` and `px-progress-stepper-link` 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": "aria-label",
|
|
16
|
+
"description": "Navigation label when steps contain links.",
|
|
17
|
+
"values": []
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "direction",
|
|
21
|
+
"description": "Layout direction of the stepper for all breakpoints. Defaults to `horizontal`.",
|
|
22
|
+
"values": [
|
|
23
|
+
{ "name": "default" },
|
|
24
|
+
{ "name": "vertical" },
|
|
25
|
+
{ "name": "horizontal" }
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "direction--mobile",
|
|
30
|
+
"description": "Layout direction on mobile. Overrides `direction`.",
|
|
31
|
+
"values": [
|
|
32
|
+
{ "name": "default" },
|
|
33
|
+
{ "name": "vertical" },
|
|
34
|
+
{ "name": "horizontal" }
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "direction--tablet",
|
|
39
|
+
"description": "Layout direction on tablet. Overrides `direction`.",
|
|
40
|
+
"values": [
|
|
41
|
+
{ "name": "default" },
|
|
42
|
+
{ "name": "vertical" },
|
|
43
|
+
{ "name": "horizontal" }
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "direction--laptop",
|
|
48
|
+
"description": "Layout direction on laptop. Overrides `direction`.",
|
|
49
|
+
"values": [
|
|
50
|
+
{ "name": "default" },
|
|
51
|
+
{ "name": "vertical" },
|
|
52
|
+
{ "name": "horizontal" }
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "direction--desktop",
|
|
57
|
+
"description": "Layout direction on desktop. Overrides `direction`.",
|
|
58
|
+
"values": [
|
|
59
|
+
{ "name": "default" },
|
|
60
|
+
{ "name": "vertical" },
|
|
61
|
+
{ "name": "horizontal" }
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"references": []
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "px-progress-stepper-item",
|
|
69
|
+
"description": "A non-clickable 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.\n- **helper** - Helper text displayed below the title.",
|
|
70
|
+
"attributes": [
|
|
71
|
+
{
|
|
72
|
+
"name": "state",
|
|
73
|
+
"description": "State of the step. Defaults to `upcoming`.",
|
|
74
|
+
"values": [
|
|
75
|
+
{ "name": "upcoming" },
|
|
76
|
+
{ "name": "current" },
|
|
77
|
+
{ "name": "completed" }
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "icon-from",
|
|
82
|
+
"description": "Name of the `px-icon-set` used for the check icon. Defaults to `lavender`.",
|
|
83
|
+
"values": []
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "completed-label",
|
|
87
|
+
"description": "Screen-reader text for a completed step.",
|
|
88
|
+
"values": []
|
|
89
|
+
},
|
|
90
|
+
{ "name": "item", "values": [] },
|
|
91
|
+
{ "name": "lastchild", "values": [] }
|
|
92
|
+
],
|
|
93
|
+
"references": []
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "px-progress-stepper-link",
|
|
97
|
+
"description": "A clickable step of a `px-progress-stepper`.\n---\n\n\n### **Events:**\n - **PROGRESS_STEPPER_LINK_CONNECTED_EVENT**\n\n### **Slots:**\n - **title** - Title of the step, rendered as a link.\n- **helper** - Helper text displayed below the title.",
|
|
98
|
+
"attributes": [
|
|
99
|
+
{ "name": "href", "description": "URL of the step.", "values": [] },
|
|
100
|
+
{
|
|
101
|
+
"name": "state",
|
|
102
|
+
"description": "State of the step. Defaults to `upcoming`.",
|
|
103
|
+
"values": [
|
|
104
|
+
{ "name": "upcoming" },
|
|
105
|
+
{ "name": "current" },
|
|
106
|
+
{ "name": "completed" }
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "icon-from",
|
|
111
|
+
"description": "Name of the `px-icon-set` used for the check icon. Defaults to `lavender`.",
|
|
112
|
+
"values": []
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": "completed-label",
|
|
116
|
+
"description": "Screen-reader text for a completed step.",
|
|
117
|
+
"values": []
|
|
118
|
+
},
|
|
119
|
+
{ "name": "item", "values": [] },
|
|
120
|
+
{ "name": "lastchild", "values": [] }
|
|
121
|
+
],
|
|
122
|
+
"references": []
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
@@ -0,0 +1,199 @@
|
|
|
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.19-beta.4",
|
|
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### **Slots:**\n - _default_ - `px-progress-stepper-item` and `px-progress-stepper-link` 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": "aria-label",
|
|
21
|
+
"description": "Navigation label when steps contain links.",
|
|
22
|
+
"value": { "type": "string" }
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "direction",
|
|
26
|
+
"description": "Layout direction of the stepper for all breakpoints. Defaults to `horizontal`.",
|
|
27
|
+
"value": { "type": "\"default\" | \"vertical\" | \"horizontal\"" }
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "direction--mobile",
|
|
31
|
+
"description": "Layout direction on mobile. Overrides `direction`.",
|
|
32
|
+
"value": { "type": "\"default\" | \"vertical\" | \"horizontal\"" }
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "direction--tablet",
|
|
36
|
+
"description": "Layout direction on tablet. Overrides `direction`.",
|
|
37
|
+
"value": { "type": "\"default\" | \"vertical\" | \"horizontal\"" }
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "direction--laptop",
|
|
41
|
+
"description": "Layout direction on laptop. Overrides `direction`.",
|
|
42
|
+
"value": { "type": "\"default\" | \"vertical\" | \"horizontal\"" }
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "direction--desktop",
|
|
46
|
+
"description": "Layout direction on desktop. Overrides `direction`.",
|
|
47
|
+
"value": { "type": "\"default\" | \"vertical\" | \"horizontal\"" }
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"slots": [
|
|
51
|
+
{
|
|
52
|
+
"name": "",
|
|
53
|
+
"description": "`px-progress-stepper-item` and `px-progress-stepper-link` elements."
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"events": [],
|
|
57
|
+
"js": {
|
|
58
|
+
"properties": [
|
|
59
|
+
{ "name": "$slot" },
|
|
60
|
+
{ "name": "$children" },
|
|
61
|
+
{ "name": "direction" },
|
|
62
|
+
{ "name": "directionMobile" },
|
|
63
|
+
{ "name": "directionTablet" },
|
|
64
|
+
{ "name": "directionLaptop" },
|
|
65
|
+
{ "name": "directionDesktop" },
|
|
66
|
+
{ "name": "iconFrom" }
|
|
67
|
+
],
|
|
68
|
+
"events": []
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "px-progress-stepper-item",
|
|
73
|
+
"description": "A non-clickable 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.\n- **helper** - Helper text displayed below the title.",
|
|
74
|
+
"doc-url": "",
|
|
75
|
+
"attributes": [
|
|
76
|
+
{
|
|
77
|
+
"name": "state",
|
|
78
|
+
"description": "State of the step. Defaults to `upcoming`.",
|
|
79
|
+
"value": { "type": "\"upcoming\" | \"current\" | \"completed\"" }
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "icon-from",
|
|
83
|
+
"description": "Name of the `px-icon-set` used for the check icon. Defaults to `lavender`.",
|
|
84
|
+
"value": { "type": "string" }
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "completed-label",
|
|
88
|
+
"description": "Screen-reader text for a completed step.",
|
|
89
|
+
"value": { "type": "string" }
|
|
90
|
+
},
|
|
91
|
+
{ "name": "item", "value": { "type": "string" } },
|
|
92
|
+
{ "name": "lastchild", "value": { "type": "string" } }
|
|
93
|
+
],
|
|
94
|
+
"slots": [
|
|
95
|
+
{ "name": "title", "description": "Title of the step." },
|
|
96
|
+
{
|
|
97
|
+
"name": "helper",
|
|
98
|
+
"description": "Helper text displayed below the title."
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"events": [
|
|
102
|
+
{
|
|
103
|
+
"name": "PROGRESS_STEPPER_ITEM_CONNECTED_EVENT",
|
|
104
|
+
"type": "CustomEvent"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"js": {
|
|
108
|
+
"properties": [
|
|
109
|
+
{ "name": "$el", "type": "HTMLLIElement" },
|
|
110
|
+
{ "name": "$title" },
|
|
111
|
+
{ "name": "$indicatorNumber" },
|
|
112
|
+
{ "name": "$icon" },
|
|
113
|
+
{ "name": "$shownSR" },
|
|
114
|
+
{ "name": "state" },
|
|
115
|
+
{ "name": "item" },
|
|
116
|
+
{ "name": "iconFrom" },
|
|
117
|
+
{ "name": "completedLabel" }
|
|
118
|
+
],
|
|
119
|
+
"events": [
|
|
120
|
+
{
|
|
121
|
+
"name": "PROGRESS_STEPPER_ITEM_CONNECTED_EVENT",
|
|
122
|
+
"type": "CustomEvent"
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "px-progress-stepper-link",
|
|
129
|
+
"description": "A clickable step of a `px-progress-stepper`.\n---\n\n\n### **Events:**\n - **PROGRESS_STEPPER_LINK_CONNECTED_EVENT**\n\n### **Slots:**\n - **title** - Title of the step, rendered as a link.\n- **helper** - Helper text displayed below the title.",
|
|
130
|
+
"doc-url": "",
|
|
131
|
+
"attributes": [
|
|
132
|
+
{
|
|
133
|
+
"name": "href",
|
|
134
|
+
"description": "URL of the step.",
|
|
135
|
+
"value": { "type": "string" }
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "state",
|
|
139
|
+
"description": "State of the step. Defaults to `upcoming`.",
|
|
140
|
+
"value": { "type": "\"upcoming\" | \"current\" | \"completed\"" }
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"name": "icon-from",
|
|
144
|
+
"description": "Name of the `px-icon-set` used for the check icon. Defaults to `lavender`.",
|
|
145
|
+
"value": { "type": "string" }
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "completed-label",
|
|
149
|
+
"description": "Screen-reader text for a completed step.",
|
|
150
|
+
"value": { "type": "string" }
|
|
151
|
+
},
|
|
152
|
+
{ "name": "item", "value": { "type": "string" } },
|
|
153
|
+
{ "name": "lastchild", "value": { "type": "string" } }
|
|
154
|
+
],
|
|
155
|
+
"slots": [
|
|
156
|
+
{
|
|
157
|
+
"name": "title",
|
|
158
|
+
"description": "Title of the step, rendered as a link."
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"name": "helper",
|
|
162
|
+
"description": "Helper text displayed below the title."
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
"events": [
|
|
166
|
+
{
|
|
167
|
+
"name": "PROGRESS_STEPPER_LINK_CONNECTED_EVENT",
|
|
168
|
+
"type": "CustomEvent"
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
"js": {
|
|
172
|
+
"properties": [
|
|
173
|
+
{ "name": "href" },
|
|
174
|
+
{ "name": "$el", "type": "HTMLLIElement" },
|
|
175
|
+
{ "name": "$title" },
|
|
176
|
+
{ "name": "$indicatorNumber" },
|
|
177
|
+
{ "name": "$icon" },
|
|
178
|
+
{ "name": "$shownSR" },
|
|
179
|
+
{ "name": "state" },
|
|
180
|
+
{ "name": "item" },
|
|
181
|
+
{ "name": "iconFrom" },
|
|
182
|
+
{ "name": "completedLabel" }
|
|
183
|
+
],
|
|
184
|
+
"events": [
|
|
185
|
+
{
|
|
186
|
+
"name": "PROGRESS_STEPPER_LINK_CONNECTED_EVENT",
|
|
187
|
+
"type": "CustomEvent"
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
"css": {
|
|
195
|
+
"properties": [],
|
|
196
|
+
"pseudo-elements": []
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proximus/lavender-progress-stepper",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.4.19-beta.4",
|
|
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