@proximus/lavender-breadcrumb 2.0.0-alpha.2 → 2.0.0-alpha.200
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/Breadcrumb-item.d.ts +1 -0
- package/dist/Breadcrumb.d.ts +4 -2
- package/dist/custom-elements.json +220 -0
- package/dist/index.es.js +103 -99
- package/dist/vscode.css-custom-data.json +6 -0
- package/dist/vscode.html-custom-data.json +21 -0
- package/dist/web-types.json +59 -0
- package/package.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PxElement } from '@proximus/lavender-common';
|
|
2
2
|
import type { Icon } from '@proximus/lavender-icon';
|
|
3
|
+
export declare const BREADCRUMB_ITEM_CONNECTED_EVENT = "px-breadcrumb-item-connected";
|
|
3
4
|
export declare class BreadcrumbItem extends PxElement<HTMLElement> {
|
|
4
5
|
static nativeName: string;
|
|
5
6
|
private template;
|
package/dist/Breadcrumb.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { WithExtraAttributes } from '@proximus/lavender-common';
|
|
2
2
|
export declare class Breadcrumb extends WithExtraAttributes {
|
|
3
|
+
#private;
|
|
3
4
|
private template;
|
|
4
5
|
constructor();
|
|
6
|
+
connectedCallback(): void;
|
|
5
7
|
static get observedAttributes(): string[];
|
|
6
8
|
attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
|
|
7
9
|
get $el(): HTMLElement;
|
|
8
10
|
get $children(): NodeListOf<Element>;
|
|
9
11
|
get inverted(): boolean;
|
|
10
12
|
set inverted(value: boolean);
|
|
11
|
-
get ariaLabel(): string;
|
|
12
|
-
set ariaLabel(value: string);
|
|
13
|
+
get ariaLabel(): string | null;
|
|
14
|
+
set ariaLabel(value: string | null);
|
|
13
15
|
}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"readme": "",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "src/Breadcrumb-item.ts",
|
|
8
|
+
"declarations": [
|
|
9
|
+
{
|
|
10
|
+
"kind": "variable",
|
|
11
|
+
"name": "BREADCRUMB_ITEM_CONNECTED_EVENT",
|
|
12
|
+
"type": {
|
|
13
|
+
"text": "string"
|
|
14
|
+
},
|
|
15
|
+
"default": "'px-breadcrumb-item-connected'"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"kind": "class",
|
|
19
|
+
"description": "",
|
|
20
|
+
"name": "BreadcrumbItem",
|
|
21
|
+
"members": [
|
|
22
|
+
{
|
|
23
|
+
"kind": "field",
|
|
24
|
+
"name": "nativeName",
|
|
25
|
+
"type": {
|
|
26
|
+
"text": "string"
|
|
27
|
+
},
|
|
28
|
+
"static": true,
|
|
29
|
+
"default": "'div'"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"kind": "field",
|
|
33
|
+
"name": "template",
|
|
34
|
+
"privacy": "private"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"kind": "field",
|
|
38
|
+
"name": "$link",
|
|
39
|
+
"readonly": true
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"kind": "field",
|
|
43
|
+
"name": "$icon",
|
|
44
|
+
"readonly": true
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"kind": "field",
|
|
48
|
+
"name": "$children",
|
|
49
|
+
"readonly": true
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"kind": "field",
|
|
53
|
+
"name": "inverted",
|
|
54
|
+
"type": {
|
|
55
|
+
"text": "boolean"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"events": [
|
|
60
|
+
{
|
|
61
|
+
"name": "BREADCRUMB_ITEM_CONNECTED_EVENT",
|
|
62
|
+
"type": {
|
|
63
|
+
"text": "CustomEvent"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"attributes": [
|
|
68
|
+
{
|
|
69
|
+
"name": "inverted"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"superclass": {
|
|
73
|
+
"name": "PxElement",
|
|
74
|
+
"package": "@proximus/lavender-common"
|
|
75
|
+
},
|
|
76
|
+
"tagName": "px-breadcrumb-item",
|
|
77
|
+
"customElement": true
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"exports": [
|
|
81
|
+
{
|
|
82
|
+
"kind": "js",
|
|
83
|
+
"name": "BREADCRUMB_ITEM_CONNECTED_EVENT",
|
|
84
|
+
"declaration": {
|
|
85
|
+
"name": "BREADCRUMB_ITEM_CONNECTED_EVENT",
|
|
86
|
+
"module": "src/Breadcrumb-item.ts"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"kind": "js",
|
|
91
|
+
"name": "BreadcrumbItem",
|
|
92
|
+
"declaration": {
|
|
93
|
+
"name": "BreadcrumbItem",
|
|
94
|
+
"module": "src/Breadcrumb-item.ts"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"kind": "custom-element-definition",
|
|
99
|
+
"name": "px-breadcrumb-item",
|
|
100
|
+
"declaration": {
|
|
101
|
+
"name": "BreadcrumbItem",
|
|
102
|
+
"module": "src/Breadcrumb-item.ts"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"kind": "javascript-module",
|
|
109
|
+
"path": "src/Breadcrumb.ts",
|
|
110
|
+
"declarations": [
|
|
111
|
+
{
|
|
112
|
+
"kind": "class",
|
|
113
|
+
"description": "",
|
|
114
|
+
"name": "Breadcrumb",
|
|
115
|
+
"members": [
|
|
116
|
+
{
|
|
117
|
+
"kind": "method",
|
|
118
|
+
"name": "template",
|
|
119
|
+
"privacy": "private"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"kind": "method",
|
|
123
|
+
"name": "#applyInverted",
|
|
124
|
+
"privacy": "private"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"kind": "field",
|
|
128
|
+
"name": "$el",
|
|
129
|
+
"readonly": true
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"kind": "field",
|
|
133
|
+
"name": "$children",
|
|
134
|
+
"readonly": true
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"kind": "field",
|
|
138
|
+
"name": "inverted"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"kind": "field",
|
|
142
|
+
"name": "ariaLabel"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"kind": "field",
|
|
146
|
+
"name": "innerHTML"
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"attributes": [
|
|
150
|
+
{
|
|
151
|
+
"name": "inverted"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "aria-label"
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
"superclass": {
|
|
158
|
+
"name": "WithExtraAttributes",
|
|
159
|
+
"package": "@proximus/lavender-common"
|
|
160
|
+
},
|
|
161
|
+
"tagName": "px-breadcrumb",
|
|
162
|
+
"customElement": true
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
"exports": [
|
|
166
|
+
{
|
|
167
|
+
"kind": "js",
|
|
168
|
+
"name": "Breadcrumb",
|
|
169
|
+
"declaration": {
|
|
170
|
+
"name": "Breadcrumb",
|
|
171
|
+
"module": "src/Breadcrumb.ts"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"kind": "custom-element-definition",
|
|
176
|
+
"name": "px-breadcrumb",
|
|
177
|
+
"declaration": {
|
|
178
|
+
"name": "Breadcrumb",
|
|
179
|
+
"module": "src/Breadcrumb.ts"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"kind": "javascript-module",
|
|
186
|
+
"path": "src/breadcrumb-item.css",
|
|
187
|
+
"declarations": [],
|
|
188
|
+
"exports": []
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"kind": "javascript-module",
|
|
192
|
+
"path": "src/breadcrumb.css",
|
|
193
|
+
"declarations": [],
|
|
194
|
+
"exports": []
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"kind": "javascript-module",
|
|
198
|
+
"path": "src/index.ts",
|
|
199
|
+
"declarations": [],
|
|
200
|
+
"exports": [
|
|
201
|
+
{
|
|
202
|
+
"kind": "js",
|
|
203
|
+
"name": "*",
|
|
204
|
+
"declaration": {
|
|
205
|
+
"name": "*",
|
|
206
|
+
"module": "src/Breadcrumb"
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"kind": "js",
|
|
211
|
+
"name": "*",
|
|
212
|
+
"declaration": {
|
|
213
|
+
"name": "*",
|
|
214
|
+
"module": "src/Breadcrumb-item"
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
]
|
|
220
|
+
}
|
package/dist/index.es.js
CHANGED
|
@@ -1,101 +1,105 @@
|
|
|
1
|
-
import { WithExtraAttributes as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
set inverted(e) {
|
|
45
|
-
e ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
|
|
46
|
-
}
|
|
47
|
-
get ariaLabel() {
|
|
48
|
-
return this.getAttribute("aria-label");
|
|
49
|
-
}
|
|
50
|
-
set ariaLabel(e) {
|
|
51
|
-
e ? this.setAttribute("aria-label", e) : this.removeAttribute("aria-label");
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
customElements.get("px-breadcrumb") || customElements.define("px-breadcrumb", b);
|
|
55
|
-
const m = ":host{display:block}:host *{box-sizing:border-box}.breadcrumb-item{display:flex}:host:has(px-a[variant=icon-link][color=inherit]) .breadcrumb-item{color:var(--px-color-icon-accent-default)}:host:has(px-a[variant=icon-link][color=inherit]) .breadcrumb-item:hover{color:var(--px-color-text-state-hover-default)}:host:not(:has(px-a[variant=icon-link][color=inherit])) .breadcrumb-item{line-height:var(--px-font-line-height-s);font-size:var(--px-text-size-link-s-mobile)}@media only screen and (min-width: 48em){:host:not(:has(px-a[variant=icon-link][color=inherit])) .breadcrumb-item{font-size:var(--px-text-size-link-s-tablet)}}@media only screen and (min-width: 64.0625em){:host:not(:has(px-a[variant=icon-link][color=inherit])) .breadcrumb-item{font-size:var(--px-text-size-link-s-laptop)}}@media only screen and (min-width: 90.0625em){:host:not(:has(px-a[variant=icon-link][color=inherit])) .breadcrumb-item{font-size:var(--px-text-size-link-s-desktop)}}:host([inverted]):has(px-a[variant=icon-link][color=inherit]) .breadcrumb-item{color:var(--px-color-icon-accent-inverted)}:host([inverted]):has(px-a[variant=icon-link][color=inherit]) .breadcrumb-item:hover{color:var(--px-color-text-state-hover-inverted)}", l = new CSSStyleSheet();
|
|
56
|
-
l.replaceSync(m);
|
|
57
|
-
const s = class s extends c {
|
|
58
|
-
constructor() {
|
|
59
|
-
super(l), this.template = () => '<div class="breadcrumb-item" role="listitem"><slot></slot></div>', this.shadowRoot && (this.shadowRoot.innerHTML = this.template());
|
|
60
|
-
}
|
|
61
|
-
static get observedAttributes() {
|
|
62
|
-
return [...super.observedAttributes, "inverted"];
|
|
63
|
-
}
|
|
64
|
-
connectedCallback() {
|
|
65
|
-
super.connectedCallback(), this.$icon && this.$icon.setAttribute("size", "s"), this.$link || this.$el.setAttribute("aria-current", "page");
|
|
66
|
-
}
|
|
67
|
-
attributeChangedCallback(e, r, i) {
|
|
68
|
-
if (r !== i)
|
|
69
|
-
switch (e) {
|
|
70
|
-
case "inverted":
|
|
71
|
-
for (let t = 0; t < this.$children.length; t++)
|
|
72
|
-
this.$children[t].hasAttribute("inverted") || this.$children[t].toggleAttribute("inverted");
|
|
73
|
-
break;
|
|
74
|
-
default:
|
|
75
|
-
super.attributeChangedCallback(e, r, i);
|
|
76
|
-
break;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
get $link() {
|
|
80
|
-
return this.querySelector("px-a");
|
|
81
|
-
}
|
|
82
|
-
get $icon() {
|
|
83
|
-
return this.querySelector("px-icon");
|
|
84
|
-
}
|
|
85
|
-
get $children() {
|
|
86
|
-
return this.querySelectorAll("px-breadcrumb-item > *");
|
|
87
|
-
}
|
|
88
|
-
get inverted() {
|
|
89
|
-
return this.hasAttribute("inverted");
|
|
90
|
-
}
|
|
91
|
-
set inverted(e) {
|
|
92
|
-
e ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
|
|
93
|
-
}
|
|
1
|
+
import { PxElement as e, WithExtraAttributes as t, booleanPropertyToAttributeSetter as n, propertyToAttributeSetter as r } from "@proximus/lavender-common";
|
|
2
|
+
//#region src/breadcrumb.css?inline
|
|
3
|
+
var i = ":host{display:block}:host *{box-sizing:border-box}.breadcrumb{font-family:var(--px-font-family);color:var(--px-color-text-neutral-default);margin:calc(var(--px-spacing-s-mobile) * -1) 0 0 0;padding:0}.breadcrumb div[role=list]{flex-wrap:wrap;align-items:center;display:flex}.breadcrumb ::slotted(px-breadcrumb-item){margin-top:var(--px-spacing-s-mobile)}.breadcrumb ::slotted(px-breadcrumb-item:not(:last-child)){margin-right:var(--px-spacing-xs-mobile);align-items:center;display:flex}.breadcrumb ::slotted(px-breadcrumb-item:not(:last-child)):after{content:\"\";width:16px;height:16px;color:var(--px-color-icon-neutral-default);margin-left:var(--px-spacing-xs-mobile);background-color:currentColor;display:inline-block;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M5.90255 3.61987C5.6515 3.8749 5.6515 4.2884 5.90255 4.54343L9.30512 8.00002L5.90255 11.4566C5.6515 11.7116 5.6515 12.1251 5.90255 12.3802C6.1536 12.6352 6.56063 12.6352 6.81169 12.3802L10.6688 8.4618C10.9199 8.20677 10.9199 7.79327 10.6688 7.53823L6.81169 3.61987C6.56063 3.36483 6.1536 3.36483 5.90255 3.61987Z' fill='%23252525'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M5.90255 3.61987C5.6515 3.8749 5.6515 4.2884 5.90255 4.54343L9.30512 8.00002L5.90255 11.4566C5.6515 11.7116 5.6515 12.1251 5.90255 12.3802C6.1536 12.6352 6.56063 12.6352 6.81169 12.3802L10.6688 8.4618C10.9199 8.20677 10.9199 7.79327 10.6688 7.53823L6.81169 3.61987C6.56063 3.36483 6.1536 3.36483 5.90255 3.61987Z' fill='%23252525'/%3E%3C/svg%3E\");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:cover;mask-size:cover;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}@media screen and (width>=48rem){.breadcrumb{margin:calc(var(--px-spacing-s-tablet) * -1) 0 0 0}.breadcrumb ::slotted(px-breadcrumb-item){margin-top:var(--px-spacing-s-tablet)}.breadcrumb ::slotted(px-breadcrumb-item:not(:last-child)){margin-right:var(--px-spacing-xs-tablet)}.breadcrumb ::slotted(px-breadcrumb-item:not(:last-child)):after{margin-left:var(--px-spacing-xs-tablet)}}@media screen and (width>=64.0625rem){.breadcrumb{margin:calc(var(--px-spacing-s-laptop) * -1) 0 0 0}.breadcrumb ::slotted(px-breadcrumb-item){margin-top:var(--px-spacing-s-laptop)}.breadcrumb ::slotted(px-breadcrumb-item:not(:last-child)){margin-right:var(--px-spacing-xs-laptop)}.breadcrumb ::slotted(px-breadcrumb-item:not(:last-child)):after{margin-left:var(--px-spacing-xs-laptop)}}@media screen and (width>=90.0625rem){.breadcrumb{margin:calc(var(--px-spacing-s-desktop) * -1) 0 0 0}.breadcrumb ::slotted(px-breadcrumb-item){margin-top:var(--px-spacing-s-desktop)}.breadcrumb ::slotted(px-breadcrumb-item:not(:last-child)){margin-right:var(--px-spacing-xs-desktop)}.breadcrumb ::slotted(px-breadcrumb-item:not(:last-child)):after{margin-left:var(--px-spacing-xs-desktop)}}:host([inverted]) .breadcrumb{color:var(--px-color-text-neutral-inverted)}:host([inverted]) .breadcrumb ::slotted(px-breadcrumb-item:not(:last-child)):after{color:var(--px-color-icon-neutral-inverted)}", a = ":host{display:block}:host *{box-sizing:border-box}.breadcrumb-item{line-height:var(--px-line-height-ratio-l);font-size:var(--px-text-size-label-m-mobile);display:flex}:host ::slotted(px-a[variant=icon-link][color=inherit]){color:var(--px-color-icon-accent-default)}:host ::slotted(px-a[variant=icon-link][color=inherit]):hover{color:var(--px-color-icon-accent-default)}@media screen and (width>=48rem){.breadcrumb-item{font-size:var(--px-text-size-label-m-tablet)}}@media screen and (width>=64.0625rem){.breadcrumb-item{font-size:var(--px-text-size-label-m-laptop)}}@media screen and (width>=90.0625rem){.breadcrumb-item{font-size:var(--px-text-size-label-m-desktop)}}:host([inverted]) ::slotted(px-a[variant=icon-link][color=inherit]){color:var(--px-color-icon-accent-inverted)}:host([inverted]) ::slotted(px-a[variant=icon-link][color=inherit]):hover{color:var(--px-color-icon-accent-inverted)}", o = new CSSStyleSheet();
|
|
4
|
+
o.replaceSync(a);
|
|
5
|
+
var s = "px-breadcrumb-item-connected", c = class extends e {
|
|
6
|
+
static {
|
|
7
|
+
this.nativeName = "div";
|
|
8
|
+
}
|
|
9
|
+
constructor() {
|
|
10
|
+
super(o), this.template = () => "<div class=\"breadcrumb-item\" role=\"listitem\"><slot></slot></div>", this.shadowRoot && (this.shadowRoot.innerHTML = this.template());
|
|
11
|
+
}
|
|
12
|
+
static get observedAttributes() {
|
|
13
|
+
return [...super.observedAttributes, "inverted"];
|
|
14
|
+
}
|
|
15
|
+
connectedCallback() {
|
|
16
|
+
this.$icon && this.$icon.setAttribute("size", "s"), this.$link || this.$el.setAttribute("aria-current", "page"), this.dispatchEvent(new CustomEvent(s, {
|
|
17
|
+
bubbles: !0,
|
|
18
|
+
composed: !0
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
attributeChangedCallback(e, t, n) {
|
|
22
|
+
if (t !== n) switch (e) {
|
|
23
|
+
case "inverted":
|
|
24
|
+
for (let e = 0; e < this.$children.length; e++) this.$children[e].hasAttribute("inverted") || this.$children[e].toggleAttribute("inverted");
|
|
25
|
+
break;
|
|
26
|
+
default: super.attributeChangedCallback(e, t, n);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
get $link() {
|
|
30
|
+
return this.querySelector("px-a");
|
|
31
|
+
}
|
|
32
|
+
get $icon() {
|
|
33
|
+
return this.querySelector("px-icon");
|
|
34
|
+
}
|
|
35
|
+
get $children() {
|
|
36
|
+
return this.querySelectorAll("px-breadcrumb-item > *");
|
|
37
|
+
}
|
|
38
|
+
get inverted() {
|
|
39
|
+
return this.hasAttribute("inverted");
|
|
40
|
+
}
|
|
41
|
+
set inverted(e) {
|
|
42
|
+
e ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
|
|
43
|
+
}
|
|
94
44
|
};
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
45
|
+
customElements.get("px-breadcrumb-item") || customElements.define("px-breadcrumb-item", c);
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/Breadcrumb.ts
|
|
48
|
+
var l = new CSSStyleSheet();
|
|
49
|
+
l.replaceSync(i);
|
|
50
|
+
var u = class extends t {
|
|
51
|
+
template() {
|
|
52
|
+
return "\n <nav class=\"breadcrumb\">\n <div role=\"list\">\n <slot></slot>\n </div>\n </nav>\n ";
|
|
53
|
+
}
|
|
54
|
+
constructor() {
|
|
55
|
+
super(l), this.shadowRoot.innerHTML = this.template();
|
|
56
|
+
}
|
|
57
|
+
connectedCallback() {
|
|
58
|
+
this.ariaLabel ||= "Breadcrumb", this.addEventListener(s, () => {
|
|
59
|
+
this.#e();
|
|
60
|
+
}), this.#e();
|
|
61
|
+
}
|
|
62
|
+
#e() {
|
|
63
|
+
let e = this.hasAttribute("inverted");
|
|
64
|
+
for (let t = 0; t < this.$children.length; t++) this.$children[t].toggleAttribute("inverted", e);
|
|
65
|
+
}
|
|
66
|
+
static get observedAttributes() {
|
|
67
|
+
return [
|
|
68
|
+
...super.observedAttributes,
|
|
69
|
+
"inverted",
|
|
70
|
+
"aria-label"
|
|
71
|
+
];
|
|
72
|
+
}
|
|
73
|
+
attributeChangedCallback(e, t, n) {
|
|
74
|
+
if (t !== n) switch (e) {
|
|
75
|
+
case "aria-label":
|
|
76
|
+
r(this.$el, "aria-label", this.ariaLabel);
|
|
77
|
+
break;
|
|
78
|
+
case "inverted":
|
|
79
|
+
this.isConnected && this.#e();
|
|
80
|
+
break;
|
|
81
|
+
default: super.attributeChangedCallback(e, t, n);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
get $el() {
|
|
85
|
+
return this.shadowRoot.querySelector(".breadcrumb");
|
|
86
|
+
}
|
|
87
|
+
get $children() {
|
|
88
|
+
return this.querySelectorAll("px-breadcrumb > *");
|
|
89
|
+
}
|
|
90
|
+
get inverted() {
|
|
91
|
+
return this.hasAttribute("inverted");
|
|
92
|
+
}
|
|
93
|
+
set inverted(e) {
|
|
94
|
+
n(this, "inverted", e);
|
|
95
|
+
}
|
|
96
|
+
get ariaLabel() {
|
|
97
|
+
return this.getAttribute("aria-label");
|
|
98
|
+
}
|
|
99
|
+
set ariaLabel(e) {
|
|
100
|
+
r(this, "aria-label", e);
|
|
101
|
+
}
|
|
101
102
|
};
|
|
103
|
+
customElements.get("px-breadcrumb") || customElements.define("px-breadcrumb", u);
|
|
104
|
+
//#endregion
|
|
105
|
+
export { s as BREADCRUMB_ITEM_CONNECTED_EVENT, u as Breadcrumb, c as BreadcrumbItem };
|
|
@@ -0,0 +1,21 @@
|
|
|
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-breadcrumb-item",
|
|
7
|
+
"description": "\n---\n\n\n### **Events:**\n - **BREADCRUMB_ITEM_CONNECTED_EVENT**",
|
|
8
|
+
"attributes": [{ "name": "inverted", "values": [] }],
|
|
9
|
+
"references": []
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "px-breadcrumb",
|
|
13
|
+
"description": "\n---\n",
|
|
14
|
+
"attributes": [
|
|
15
|
+
{ "name": "inverted", "values": [] },
|
|
16
|
+
{ "name": "aria-label", "values": [] }
|
|
17
|
+
],
|
|
18
|
+
"references": []
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
|
+
"name": "@proximus/lavender-breadcrumb",
|
|
4
|
+
"version": "2.0.0-alpha.200",
|
|
5
|
+
"description-markup": "markdown",
|
|
6
|
+
"contributions": {
|
|
7
|
+
"html": {
|
|
8
|
+
"elements": [
|
|
9
|
+
{
|
|
10
|
+
"name": "px-breadcrumb-item",
|
|
11
|
+
"description": "\n---\n\n\n### **Events:**\n - **BREADCRUMB_ITEM_CONNECTED_EVENT**",
|
|
12
|
+
"doc-url": "",
|
|
13
|
+
"attributes": [{ "name": "inverted", "value": { "type": "string" } }],
|
|
14
|
+
"events": [
|
|
15
|
+
{ "name": "BREADCRUMB_ITEM_CONNECTED_EVENT", "type": "CustomEvent" }
|
|
16
|
+
],
|
|
17
|
+
"js": {
|
|
18
|
+
"properties": [
|
|
19
|
+
{ "name": "$link" },
|
|
20
|
+
{ "name": "$icon" },
|
|
21
|
+
{ "name": "$children" },
|
|
22
|
+
{ "name": "inverted", "type": "boolean" }
|
|
23
|
+
],
|
|
24
|
+
"events": [
|
|
25
|
+
{
|
|
26
|
+
"name": "BREADCRUMB_ITEM_CONNECTED_EVENT",
|
|
27
|
+
"type": "CustomEvent"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "px-breadcrumb",
|
|
34
|
+
"description": "\n---\n",
|
|
35
|
+
"doc-url": "",
|
|
36
|
+
"attributes": [
|
|
37
|
+
{ "name": "inverted", "value": { "type": "string" } },
|
|
38
|
+
{ "name": "aria-label", "value": { "type": "string" } }
|
|
39
|
+
],
|
|
40
|
+
"events": [],
|
|
41
|
+
"js": {
|
|
42
|
+
"properties": [
|
|
43
|
+
{ "name": "$el" },
|
|
44
|
+
{ "name": "$children" },
|
|
45
|
+
{ "name": "inverted" },
|
|
46
|
+
{ "name": "ariaLabel" },
|
|
47
|
+
{ "name": "innerHTML" }
|
|
48
|
+
],
|
|
49
|
+
"events": []
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"css": {
|
|
55
|
+
"properties": [],
|
|
56
|
+
"pseudo-elements": []
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proximus/lavender-breadcrumb",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.200",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.es.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"clean": "rm -rf dist",
|
|
14
14
|
"build": "npm run clean && NODE_ENV=development vite build && tsc && npm run transform-package-json && npm run wc-manifest",
|
|
15
15
|
"test": "vitest run --coverage",
|
|
16
|
-
"wc-manifest": "cem analyze --globs \"src/*\" --config
|
|
16
|
+
"wc-manifest": "cem analyze --globs \"src/*\" --config ../../custom-elements-manifest.config.js --outdir dist"
|
|
17
17
|
},
|
|
18
18
|
"publishConfig": {
|
|
19
19
|
"access": "public"
|