@proximus/lavender-breadcrumb 1.4.6-beta.2 → 1.4.6
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 +0 -1
- package/dist/Breadcrumb.d.ts +0 -1
- package/dist/index.es.js +58 -79
- package/package.json +1 -1
|
@@ -1,6 +1,5 @@
|
|
|
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";
|
|
4
3
|
export declare class BreadcrumbItem extends PxElement<HTMLElement> {
|
|
5
4
|
static nativeName: string;
|
|
6
5
|
private template;
|
package/dist/Breadcrumb.d.ts
CHANGED
package/dist/index.es.js
CHANGED
|
@@ -1,67 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var b = (r, t, e) => t.has(r) ? d("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, e);
|
|
6
|
-
var n = (r, t, e) => (u(r, t, "access private method"), e);
|
|
7
|
-
import { PxElement as v, WithExtraAttributes as x } from "@proximus/lavender-common";
|
|
8
|
-
const g = `: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]{display:flex;flex-wrap:wrap;align-items:center}.breadcrumb ::slotted(px-breadcrumb-item){margin-top:var(--px-spacing-s-mobile)}.breadcrumb ::slotted(px-breadcrumb-item:not(:last-child)){display:flex;align-items:center;margin-right:var(--px-spacing-xs-mobile)}.breadcrumb ::slotted(px-breadcrumb-item:not(:last-child)):after{display:inline-block;content:"";width:16px;height:16px;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:cover;mask-size:cover;-webkit-mask-position:50% 50%;mask-position:50% 50%;-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");background-color:currentColor;color:var(--px-color-icon-neutral-default);margin-left:var(--px-spacing-xs-mobile)}@media only screen and (min-width: 48em){.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 only screen and (min-width: 64.0625em){.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 only screen and (min-width: 90.0625em){.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)}`, f = ":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)}", m = new CSSStyleSheet();
|
|
9
|
-
m.replaceSync(f);
|
|
10
|
-
const h = "px-breadcrumb-item-connected", c = class c extends v {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(m), this.template = () => '<div class="breadcrumb-item" role="listitem"><slot></slot></div>', this.shadowRoot && (this.shadowRoot.innerHTML = this.template());
|
|
13
|
-
}
|
|
14
|
-
static get observedAttributes() {
|
|
15
|
-
return [...super.observedAttributes, "inverted"];
|
|
16
|
-
}
|
|
17
|
-
connectedCallback() {
|
|
18
|
-
this.$icon && this.$icon.setAttribute("size", "s"), this.$link || this.$el.setAttribute("aria-current", "page"), this.dispatchEvent(
|
|
19
|
-
new CustomEvent(h, {
|
|
20
|
-
bubbles: !0,
|
|
21
|
-
composed: !0
|
|
22
|
-
})
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
attributeChangedCallback(t, e, i) {
|
|
26
|
-
if (e !== i)
|
|
27
|
-
switch (t) {
|
|
28
|
-
case "inverted":
|
|
29
|
-
for (let a = 0; a < this.$children.length; a++)
|
|
30
|
-
this.$children[a].hasAttribute("inverted") || this.$children[a].toggleAttribute("inverted");
|
|
31
|
-
break;
|
|
32
|
-
default:
|
|
33
|
-
super.attributeChangedCallback(t, e, i);
|
|
34
|
-
break;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
get $link() {
|
|
38
|
-
return this.querySelector("px-a");
|
|
39
|
-
}
|
|
40
|
-
get $icon() {
|
|
41
|
-
return this.querySelector("px-icon");
|
|
42
|
-
}
|
|
43
|
-
get $children() {
|
|
44
|
-
return this.querySelectorAll("px-breadcrumb-item > *");
|
|
45
|
-
}
|
|
46
|
-
get inverted() {
|
|
47
|
-
return this.hasAttribute("inverted");
|
|
48
|
-
}
|
|
49
|
-
set inverted(t) {
|
|
50
|
-
t ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
c.nativeName = "div";
|
|
54
|
-
let o = c;
|
|
55
|
-
customElements.get("px-breadcrumb-item") || customElements.define("px-breadcrumb-item", o);
|
|
56
|
-
const p = new CSSStyleSheet();
|
|
57
|
-
p.replaceSync(g);
|
|
58
|
-
var s, l;
|
|
59
|
-
class k extends x {
|
|
60
|
-
constructor() {
|
|
61
|
-
super(p);
|
|
62
|
-
b(this, s);
|
|
63
|
-
this.shadowRoot.innerHTML = this.template();
|
|
64
|
-
}
|
|
1
|
+
import { WithExtraAttributes as o, PxElement as c } from "@proximus/lavender-common";
|
|
2
|
+
const d = `: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]{display:flex;flex-wrap:wrap;align-items:center}.breadcrumb ::slotted(px-breadcrumb-item){margin-top:var(--px-spacing-s-mobile)}.breadcrumb ::slotted(px-breadcrumb-item:not(:last-child)){display:flex;align-items:center;margin-right:var(--px-spacing-xs-mobile)}.breadcrumb ::slotted(px-breadcrumb-item:not(:last-child)):after{display:inline-block;content:"";width:16px;height:16px;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:cover;mask-size:cover;-webkit-mask-position:50% 50%;mask-position:50% 50%;-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");background-color:currentColor;color:var(--px-color-icon-neutral-default);margin-left:var(--px-spacing-xs-mobile)}@media only screen and (min-width: 48em){.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 only screen and (min-width: 64.0625em){.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 only screen and (min-width: 90.0625em){.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)}`, n = new CSSStyleSheet();
|
|
3
|
+
n.replaceSync(d);
|
|
4
|
+
class b extends o {
|
|
65
5
|
template() {
|
|
66
6
|
return `
|
|
67
7
|
<nav class="breadcrumb">
|
|
@@ -71,25 +11,27 @@ class k extends x {
|
|
|
71
11
|
</nav>
|
|
72
12
|
`;
|
|
73
13
|
}
|
|
14
|
+
constructor() {
|
|
15
|
+
super(n), this.shadowRoot.innerHTML = this.template();
|
|
16
|
+
}
|
|
74
17
|
connectedCallback() {
|
|
75
|
-
this.ariaLabel || (this.ariaLabel = "Breadcrumb")
|
|
76
|
-
n(this, s, l).call(this);
|
|
77
|
-
}), n(this, s, l).call(this);
|
|
18
|
+
this.ariaLabel || (this.ariaLabel = "Breadcrumb");
|
|
78
19
|
}
|
|
79
20
|
static get observedAttributes() {
|
|
80
21
|
return [...super.observedAttributes, "inverted", "aria-label"];
|
|
81
22
|
}
|
|
82
|
-
attributeChangedCallback(e,
|
|
83
|
-
if (
|
|
23
|
+
attributeChangedCallback(e, r, i) {
|
|
24
|
+
if (r !== i)
|
|
84
25
|
switch (e) {
|
|
85
26
|
case "aria-label":
|
|
86
27
|
this.$el.setAttribute("aria-label", this.ariaLabel);
|
|
87
28
|
break;
|
|
88
29
|
case "inverted":
|
|
89
|
-
|
|
30
|
+
for (let t = 0; t < this.$children.length; t++)
|
|
31
|
+
this.$children[t].hasAttribute("inverted") || this.$children[t].toggleAttribute("inverted");
|
|
90
32
|
break;
|
|
91
33
|
default:
|
|
92
|
-
super.attributeChangedCallback(e,
|
|
34
|
+
super.attributeChangedCallback(e, r, i);
|
|
93
35
|
break;
|
|
94
36
|
}
|
|
95
37
|
}
|
|
@@ -112,14 +54,51 @@ class k extends x {
|
|
|
112
54
|
e ? this.setAttribute("aria-label", e) : this.removeAttribute("aria-label");
|
|
113
55
|
}
|
|
114
56
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
57
|
+
customElements.get("px-breadcrumb") || customElements.define("px-breadcrumb", b);
|
|
58
|
+
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();
|
|
59
|
+
l.replaceSync(m);
|
|
60
|
+
const s = class s extends c {
|
|
61
|
+
constructor() {
|
|
62
|
+
super(l), this.template = () => '<div class="breadcrumb-item" role="listitem"><slot></slot></div>', this.shadowRoot && (this.shadowRoot.innerHTML = this.template());
|
|
63
|
+
}
|
|
64
|
+
static get observedAttributes() {
|
|
65
|
+
return [...super.observedAttributes, "inverted"];
|
|
66
|
+
}
|
|
67
|
+
connectedCallback() {
|
|
68
|
+
this.$icon && this.$icon.setAttribute("size", "s"), this.$link || this.$el.setAttribute("aria-current", "page");
|
|
69
|
+
}
|
|
70
|
+
attributeChangedCallback(e, r, i) {
|
|
71
|
+
if (r !== i)
|
|
72
|
+
switch (e) {
|
|
73
|
+
case "inverted":
|
|
74
|
+
for (let t = 0; t < this.$children.length; t++)
|
|
75
|
+
this.$children[t].hasAttribute("inverted") || this.$children[t].toggleAttribute("inverted");
|
|
76
|
+
break;
|
|
77
|
+
default:
|
|
78
|
+
super.attributeChangedCallback(e, r, i);
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
get $link() {
|
|
83
|
+
return this.querySelector("px-a");
|
|
84
|
+
}
|
|
85
|
+
get $icon() {
|
|
86
|
+
return this.querySelector("px-icon");
|
|
87
|
+
}
|
|
88
|
+
get $children() {
|
|
89
|
+
return this.querySelectorAll("px-breadcrumb-item > *");
|
|
90
|
+
}
|
|
91
|
+
get inverted() {
|
|
92
|
+
return this.hasAttribute("inverted");
|
|
93
|
+
}
|
|
94
|
+
set inverted(e) {
|
|
95
|
+
e ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
|
|
96
|
+
}
|
|
119
97
|
};
|
|
120
|
-
|
|
98
|
+
s.nativeName = "div";
|
|
99
|
+
let a = s;
|
|
100
|
+
customElements.get("px-breadcrumb-item") || customElements.define("px-breadcrumb-item", a);
|
|
121
101
|
export {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
o as BreadcrumbItem
|
|
102
|
+
b as Breadcrumb,
|
|
103
|
+
a as BreadcrumbItem
|
|
125
104
|
};
|