@florid-kit/components 3.2.14 → 3.2.16
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/components/breadcrumb.d.ts +1 -0
- package/components/breadcrumb.mjs +27 -14
- package/components/breadcrumbs.d.ts +1 -0
- package/components/breadcrumbs.mjs +20 -13
- package/components/icon-button.d.ts +5 -0
- package/components/icon-button.mjs +22 -19
- package/index.mjs +1 -1
- package/loader.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,26 @@
|
|
|
1
|
-
import { i as p, m as h, a as v, x as
|
|
2
|
-
import { n as
|
|
3
|
-
import { f as u } from "../css-C8WrrxT-.mjs";
|
|
4
|
-
var d = Object.defineProperty, g = Object.getOwnPropertyDescriptor,
|
|
5
|
-
for (var e = i > 1 ? void 0 : i ? g(o,
|
|
6
|
-
(
|
|
7
|
-
return i && e && d(o,
|
|
1
|
+
import { i as p, m as h, a as v, x as f, t as m } from "../performance-mixin-D7YmSeqN.mjs";
|
|
2
|
+
import { n as c } from "../property-S_Y9cb04.mjs";
|
|
3
|
+
import { f as u, s as y } from "../css-C8WrrxT-.mjs";
|
|
4
|
+
var d = Object.defineProperty, g = Object.getOwnPropertyDescriptor, n = (r, o, s, i) => {
|
|
5
|
+
for (var e = i > 1 ? void 0 : i ? g(o, s) : o, a = r.length - 1, l; a >= 0; a--)
|
|
6
|
+
(l = r[a]) && (e = (i ? l(o, s, e) : l(e)) || e);
|
|
7
|
+
return i && e && d(o, s, e), e;
|
|
8
8
|
};
|
|
9
9
|
let t = class extends h(v) {
|
|
10
10
|
constructor() {
|
|
11
|
-
super(...arguments), this.href = "", this.active = !1;
|
|
11
|
+
super(...arguments), this.href = "", this.active = !1, this.srlabel = "";
|
|
12
12
|
}
|
|
13
13
|
_handleClick(r) {
|
|
14
14
|
(!this.href || this.href === "#") && r.preventDefault();
|
|
15
15
|
}
|
|
16
16
|
render() {
|
|
17
|
-
return this.active ?
|
|
17
|
+
return this.active ? f`
|
|
18
|
+
<li>
|
|
19
|
+
<p>
|
|
20
|
+
<span class="sr-only">${this.srlabel}</span>
|
|
21
|
+
<slot></slot>
|
|
22
|
+
</p>
|
|
23
|
+
</li> ` : f`
|
|
18
24
|
<li>
|
|
19
25
|
<a
|
|
20
26
|
href="${this.href}"
|
|
@@ -68,14 +74,21 @@ t.styles = p`
|
|
|
68
74
|
:host(.a--tabfocus) {
|
|
69
75
|
outline: none !important;
|
|
70
76
|
}
|
|
77
|
+
|
|
78
|
+
.sr-only {
|
|
79
|
+
${y}
|
|
80
|
+
}
|
|
71
81
|
`;
|
|
72
|
-
|
|
73
|
-
|
|
82
|
+
n([
|
|
83
|
+
c({ type: String })
|
|
74
84
|
], t.prototype, "href", 2);
|
|
75
|
-
|
|
76
|
-
|
|
85
|
+
n([
|
|
86
|
+
c({ type: Boolean, reflect: !0 })
|
|
77
87
|
], t.prototype, "active", 2);
|
|
78
|
-
|
|
88
|
+
n([
|
|
89
|
+
c({ type: String })
|
|
90
|
+
], t.prototype, "srlabel", 2);
|
|
91
|
+
t = n([
|
|
79
92
|
m("o-breadcrumb")
|
|
80
93
|
], t);
|
|
81
94
|
export {
|
|
@@ -2,6 +2,7 @@ import { LitElement } from 'lit';
|
|
|
2
2
|
|
|
3
3
|
declare const OBreadcrumbs_base: import('../behaviors/mixin.js').MixinReturn<typeof LitElement>;
|
|
4
4
|
export declare class OBreadcrumbs extends OBreadcrumbs_base {
|
|
5
|
+
srlabel: string;
|
|
5
6
|
static styles: import('lit').CSSResult;
|
|
6
7
|
render(): import('lit').TemplateResult<1>;
|
|
7
8
|
}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { i as p, m, a as u, x as c, t as v } from "../performance-mixin-D7YmSeqN.mjs";
|
|
2
|
+
import { n as b } from "../property-S_Y9cb04.mjs";
|
|
3
|
+
var d = Object.defineProperty, f = Object.getOwnPropertyDescriptor, o = (i, e, t, a) => {
|
|
4
|
+
for (var r = a > 1 ? void 0 : a ? f(e, t) : e, n = i.length - 1, l; n >= 0; n--)
|
|
5
|
+
(l = i[n]) && (r = (a ? l(e, t, r) : l(r)) || r);
|
|
6
|
+
return a && r && d(e, t, r), r;
|
|
6
7
|
};
|
|
7
|
-
let
|
|
8
|
+
let s = class extends m(u) {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments), this.srlabel = "Breadcrumbs";
|
|
11
|
+
}
|
|
8
12
|
render() {
|
|
9
|
-
return
|
|
10
|
-
<nav aria-label
|
|
13
|
+
return c`
|
|
14
|
+
<nav aria-label=${this.srlabel}>
|
|
11
15
|
<ul>
|
|
12
16
|
<slot></slot>
|
|
13
17
|
</ul>
|
|
@@ -15,7 +19,7 @@ let e = class extends o(u) {
|
|
|
15
19
|
`;
|
|
16
20
|
}
|
|
17
21
|
};
|
|
18
|
-
|
|
22
|
+
s.styles = p`
|
|
19
23
|
nav {
|
|
20
24
|
max-width: 144rem;
|
|
21
25
|
margin: auto;
|
|
@@ -27,9 +31,12 @@ e.styles = m`
|
|
|
27
31
|
padding: var(--spacing-4-xs);
|
|
28
32
|
}
|
|
29
33
|
`;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
],
|
|
34
|
+
o([
|
|
35
|
+
b({ type: String })
|
|
36
|
+
], s.prototype, "srlabel", 2);
|
|
37
|
+
s = o([
|
|
38
|
+
v("o-breadcrumbs")
|
|
39
|
+
], s);
|
|
33
40
|
export {
|
|
34
|
-
|
|
41
|
+
s as OBreadcrumbs
|
|
35
42
|
};
|
|
@@ -25,6 +25,11 @@ export declare class OccitaneIconButton extends OccitaneIconButton_base {
|
|
|
25
25
|
srLabel: string;
|
|
26
26
|
url: string;
|
|
27
27
|
urlTitle: string;
|
|
28
|
+
/**
|
|
29
|
+
* Opt-in: with `showSrLabel`, omit the empty `aria-label` on the native
|
|
30
|
+
* button so its accessible name comes only from the sr-only label.
|
|
31
|
+
*/
|
|
32
|
+
noAriaLabel: boolean;
|
|
28
33
|
preventDefault: boolean;
|
|
29
34
|
private _unsubOcc?;
|
|
30
35
|
private _clearOccSubscription;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { i as p, m as d, E as a, x as l, a as v, t as y } from "../performance-mixin-D7YmSeqN.mjs";
|
|
2
2
|
import { n } from "../property-S_Y9cb04.mjs";
|
|
3
|
-
import { o as
|
|
3
|
+
import { o as u } from "../if-defined-j0wE2gL4.mjs";
|
|
4
4
|
import { r as g, o as m } from "../icons-registry.mjs";
|
|
5
5
|
import { c as f } from "../svg-utils-DOL__czZ.mjs";
|
|
6
6
|
import { f as x, i as w, s as k } from "../css-C8WrrxT-.mjs";
|
|
7
|
-
var $ = Object.defineProperty, S = Object.getOwnPropertyDescriptor, i = (t,
|
|
8
|
-
for (var
|
|
9
|
-
(
|
|
10
|
-
return c &&
|
|
7
|
+
var $ = Object.defineProperty, S = Object.getOwnPropertyDescriptor, i = (t, s, r, c) => {
|
|
8
|
+
for (var e = c > 1 ? void 0 : c ? S(s, r) : s, h = t.length - 1, b; h >= 0; h--)
|
|
9
|
+
(b = t[h]) && (e = (c ? b(s, r, e) : b(e)) || e);
|
|
10
|
+
return c && e && $(s, r, e), e;
|
|
11
11
|
};
|
|
12
12
|
const z = (t) => t.startsWith("occ-");
|
|
13
13
|
let o = class extends d(v) {
|
|
14
14
|
constructor() {
|
|
15
|
-
super(...arguments), this.bgstyle = "background-light", this.size = "medium", this.status = "empty", this.type = "button", this.strokewidth = "1", this.icon = "", this.disabled = !1, this.highlight = !1, this.pressed = void 0, this.showSrLabel = !1, this.srLabel = "", this.url = "", this.urlTitle = "", this.preventDefault = !1;
|
|
15
|
+
super(...arguments), this.bgstyle = "background-light", this.size = "medium", this.status = "empty", this.type = "button", this.strokewidth = "1", this.icon = "", this.disabled = !1, this.highlight = !1, this.pressed = void 0, this.showSrLabel = !1, this.srLabel = "", this.url = "", this.urlTitle = "", this.noAriaLabel = !1, this.preventDefault = !1;
|
|
16
16
|
}
|
|
17
17
|
_clearOccSubscription() {
|
|
18
18
|
var t;
|
|
@@ -24,8 +24,8 @@ let o = class extends d(v) {
|
|
|
24
24
|
this._clearOccSubscription();
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
-
const { svg:
|
|
28
|
-
if (
|
|
27
|
+
const { svg: s } = g(t, { size: this.size, bgstyle: this.bgstyle });
|
|
28
|
+
if (s) {
|
|
29
29
|
this._clearOccSubscription();
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
@@ -51,40 +51,40 @@ let o = class extends d(v) {
|
|
|
51
51
|
return a;
|
|
52
52
|
const t = f(this.icon, this.size, this.bgstyle);
|
|
53
53
|
if (!t) return a;
|
|
54
|
-
const
|
|
55
|
-
let
|
|
56
|
-
return this.url && this.url.length > 0 ?
|
|
54
|
+
const s = `icon-${this.icon}`, r = this.showSrLabel ? l`<span class="sr-only">${this.srLabel}</span>` : null, c = this.showSrLabel ? this.noAriaLabel ? void 0 : "" : "icon";
|
|
55
|
+
let e = l``;
|
|
56
|
+
return this.url && this.url.length > 0 ? e = l`
|
|
57
57
|
<a
|
|
58
58
|
href=${this.url}
|
|
59
|
-
aria-label=${
|
|
59
|
+
aria-label=${u(c) || a}
|
|
60
60
|
aria-describedby=${this.getAttribute("aria-describedby") || a}
|
|
61
61
|
?disabled="${this.disabled}"
|
|
62
62
|
title=${this.urlTitle || a}
|
|
63
63
|
@click=${this.handleLinkClick}
|
|
64
64
|
>
|
|
65
|
-
<span part="icon-button" class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${
|
|
65
|
+
<span part="icon-button" class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${s} ${this.highlight ? "highlight" : ""}" ?disabled="${this.disabled}">
|
|
66
66
|
${t}
|
|
67
67
|
</span>
|
|
68
68
|
${r}
|
|
69
69
|
</a>
|
|
70
|
-
` :
|
|
71
|
-
<span part="icon-button" class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${
|
|
70
|
+
` : e = this.type === "span" ? l`
|
|
71
|
+
<span part="icon-button" class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${s} ${this.highlight ? "highlight" : ""}" ?disabled="${this.disabled}">
|
|
72
72
|
${t}
|
|
73
73
|
</span>
|
|
74
74
|
` : l`
|
|
75
75
|
<button
|
|
76
76
|
type="button"
|
|
77
|
-
aria-label=${
|
|
78
|
-
aria-pressed=${
|
|
77
|
+
aria-label=${u(c)}
|
|
78
|
+
aria-pressed=${u(this.pressed === void 0 ? void 0 : String(this.pressed))}
|
|
79
79
|
aria-describedby=${this.getAttribute("aria-describedby") || a}
|
|
80
80
|
part="icon-button"
|
|
81
|
-
class="icon-button ${this.size} ${this.bgstyle} ${this.status} ${
|
|
81
|
+
class="icon-button ${this.size} ${this.bgstyle} ${this.status} ${s} ${this.highlight ? "highlight" : ""}"
|
|
82
82
|
?disabled="${this.disabled}"
|
|
83
83
|
>
|
|
84
84
|
${t}
|
|
85
85
|
${r}
|
|
86
86
|
</button>
|
|
87
|
-
`,
|
|
87
|
+
`, e;
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
90
|
o.styles = p`
|
|
@@ -390,6 +390,9 @@ i([
|
|
|
390
390
|
i([
|
|
391
391
|
n({ type: String })
|
|
392
392
|
], o.prototype, "urlTitle", 2);
|
|
393
|
+
i([
|
|
394
|
+
n({ type: Boolean, attribute: "no-aria-label" })
|
|
395
|
+
], o.prototype, "noAriaLabel", 2);
|
|
393
396
|
i([
|
|
394
397
|
n({ type: Boolean, reflect: !0, attribute: "prevent-default" })
|
|
395
398
|
], o.prototype, "preventDefault", 2);
|
package/index.mjs
CHANGED
package/loader.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import "./components/link.mjs";
|
|
|
4
4
|
import "./components/header-simplify.mjs";
|
|
5
5
|
import "./components/breadcrumb.mjs";
|
|
6
6
|
import "./components/breadcrumbs.mjs";
|
|
7
|
-
globalThis.__FLORID_KIT__ = "3.2.
|
|
7
|
+
globalThis.__FLORID_KIT__ = "3.2.16";
|
|
8
8
|
const i = {
|
|
9
9
|
"o-accordion": () => import("./components/accordion.mjs"),
|
|
10
10
|
"o-accordion-group": () => import("./components/accordion-group.mjs"),
|