@florid-kit/components 3.2.18 → 3.2.20
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/aria.d.ts +1 -1
- package/components/breadcrumb.mjs +14 -14
- package/components/link.d.ts +5 -0
- package/components/link.mjs +61 -42
- package/index.mjs +1 -1
- package/loader.mjs +1 -1
- package/package.json +1 -1
package/aria.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export type ARIAAttribute = ARIAPropertyToAttribute<ARIAProperty>;
|
|
|
15
15
|
/**
|
|
16
16
|
* Accessibility Object Model aria attributes.
|
|
17
17
|
*/
|
|
18
|
-
export declare const ARIA_ATTRIBUTES: ("aria-label" | "aria-modal" | "aria-hidden" | "aria-expanded" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-current" | "aria-description" | "aria-disabled" | "aria-
|
|
18
|
+
export declare const ARIA_ATTRIBUTES: ("aria-label" | "aria-modal" | "aria-hidden" | "aria-haspopup" | "aria-expanded" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-current" | "aria-description" | "aria-disabled" | "aria-invalid" | "aria-keyshortcuts" | "aria-level" | "aria-live" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext")[];
|
|
19
19
|
/**
|
|
20
20
|
* Checks if an attribute is one of the AOM aria attributes.
|
|
21
21
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { i as p, m as h, a as v, x as
|
|
2
|
-
import { n as
|
|
3
|
-
import { f as
|
|
4
|
-
var
|
|
1
|
+
import { i as p, m as h, a as v, E as m, x as c, t as u } from "../performance-mixin-D7YmSeqN.mjs";
|
|
2
|
+
import { n as f } from "../property-S_Y9cb04.mjs";
|
|
3
|
+
import { f as y, s as d } from "../css-C8WrrxT-.mjs";
|
|
4
|
+
var b = Object.defineProperty, g = Object.getOwnPropertyDescriptor, n = (r, o, s, i) => {
|
|
5
5
|
for (var e = i > 1 ? void 0 : i ? g(o, s) : o, a = r.length - 1, l; a >= 0; a--)
|
|
6
6
|
(l = r[a]) && (e = (i ? l(o, s, e) : l(e)) || e);
|
|
7
|
-
return i && e &&
|
|
7
|
+
return i && e && b(o, s, e), e;
|
|
8
8
|
};
|
|
9
9
|
let t = class extends h(v) {
|
|
10
10
|
constructor() {
|
|
@@ -14,13 +14,13 @@ let t = class extends h(v) {
|
|
|
14
14
|
(!this.href || this.href === "#") && r.preventDefault();
|
|
15
15
|
}
|
|
16
16
|
render() {
|
|
17
|
-
return this.active ?
|
|
17
|
+
return this.active ? c`
|
|
18
18
|
<li>
|
|
19
19
|
<p>
|
|
20
|
-
|
|
20
|
+
${this.srlabel ? c`<span class="sr-only">${this.srlabel}</span>` : m}
|
|
21
21
|
<slot></slot>
|
|
22
22
|
</p>
|
|
23
|
-
</li> ` :
|
|
23
|
+
</li> ` : c`
|
|
24
24
|
<li>
|
|
25
25
|
<a
|
|
26
26
|
href="${this.href}"
|
|
@@ -68,7 +68,7 @@ t.styles = p`
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
a:focus-visible {
|
|
71
|
-
${
|
|
71
|
+
${y};
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
:host(.a--tabfocus) {
|
|
@@ -76,20 +76,20 @@ t.styles = p`
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
.sr-only {
|
|
79
|
-
${
|
|
79
|
+
${d}
|
|
80
80
|
}
|
|
81
81
|
`;
|
|
82
82
|
n([
|
|
83
|
-
|
|
83
|
+
f({ type: String })
|
|
84
84
|
], t.prototype, "href", 2);
|
|
85
85
|
n([
|
|
86
|
-
|
|
86
|
+
f({ type: Boolean, reflect: !0 })
|
|
87
87
|
], t.prototype, "active", 2);
|
|
88
88
|
n([
|
|
89
|
-
|
|
89
|
+
f({ type: String })
|
|
90
90
|
], t.prototype, "srlabel", 2);
|
|
91
91
|
t = n([
|
|
92
|
-
|
|
92
|
+
u("o-breadcrumb")
|
|
93
93
|
], t);
|
|
94
94
|
export {
|
|
95
95
|
t as OBreadcrumb
|
package/components/link.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ declare const OccitaneLink_base: import('../behaviors/mixin.js').MixinReturn<typ
|
|
|
11
11
|
export declare class OccitaneLink extends OccitaneLink_base {
|
|
12
12
|
static styles: import('lit').CSSResult;
|
|
13
13
|
href: string;
|
|
14
|
+
dataHref: string;
|
|
14
15
|
target: "_blank" | "_parent" | "_self" | "_top" | "";
|
|
15
16
|
template: Template;
|
|
16
17
|
inverse: Inverse;
|
|
@@ -19,7 +20,11 @@ export declare class OccitaneLink extends OccitaneLink_base {
|
|
|
19
20
|
startIcon: startIcon;
|
|
20
21
|
iconSize: IconLogicalSize;
|
|
21
22
|
disabled: Disabled;
|
|
23
|
+
ariaControlsValue: string | null;
|
|
24
|
+
ariaHasPopupValue: string | null;
|
|
25
|
+
roleValue: string | null;
|
|
22
26
|
private _handleClick;
|
|
27
|
+
private _handleKeydown;
|
|
23
28
|
render(): import('lit').TemplateResult<1>;
|
|
24
29
|
}
|
|
25
30
|
export {};
|
package/components/link.mjs
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
import { i as
|
|
1
|
+
import { i as f, m as d, a as u, x as a, t as v } from "../performance-mixin-D7YmSeqN.mjs";
|
|
2
2
|
import { n } from "../property-S_Y9cb04.mjs";
|
|
3
|
-
import { o as
|
|
4
|
-
import { f as
|
|
3
|
+
import { o as l } from "../if-defined-j0wE2gL4.mjs";
|
|
4
|
+
import { f as y } from "../css-C8WrrxT-.mjs";
|
|
5
5
|
import "./icon-button.mjs";
|
|
6
|
-
var
|
|
7
|
-
for (var
|
|
8
|
-
(
|
|
9
|
-
return
|
|
6
|
+
var g = Object.defineProperty, m = Object.getOwnPropertyDescriptor, e = (r, o, c, s) => {
|
|
7
|
+
for (var i = s > 1 ? void 0 : s ? m(o, c) : o, p = r.length - 1, h; p >= 0; p--)
|
|
8
|
+
(h = r[p]) && (i = (s ? h(o, c, i) : h(i)) || i);
|
|
9
|
+
return s && i && g(o, c, i), i;
|
|
10
10
|
};
|
|
11
|
-
let
|
|
11
|
+
let t = class extends d(u) {
|
|
12
12
|
constructor() {
|
|
13
|
-
super(...arguments), this.href = "", this.target = "", this.template = "standard", this.inverse = !1, this.endIcon = !1, this.reverseEndIcon = !1, this.startIcon = !1, this.iconSize = "xsmall", this.disabled = !1;
|
|
13
|
+
super(...arguments), this.href = "", this.dataHref = "", this.target = "", this.template = "standard", this.inverse = !1, this.endIcon = !1, this.reverseEndIcon = !1, this.startIcon = !1, this.iconSize = "xsmall", this.disabled = !1, this.ariaControlsValue = null, this.ariaHasPopupValue = null, this.roleValue = null;
|
|
14
14
|
}
|
|
15
|
-
_handleClick(
|
|
16
|
-
(!this.href || this.href === "#") &&
|
|
15
|
+
_handleClick(r) {
|
|
16
|
+
(!this.href || this.href === "#") && r.preventDefault();
|
|
17
|
+
}
|
|
18
|
+
_handleKeydown(r) {
|
|
19
|
+
r.key === " " && (r.preventDefault(), r.currentTarget.click());
|
|
17
20
|
}
|
|
18
21
|
render() {
|
|
19
|
-
const
|
|
20
|
-
${this.startIcon ?
|
|
22
|
+
const r = !!this.href, o = a`
|
|
23
|
+
${this.startIcon ? a`
|
|
21
24
|
<o-icon-button
|
|
22
25
|
class="link-start-icon"
|
|
23
26
|
icon="occ-chevron-left"
|
|
@@ -27,7 +30,7 @@ let e = class extends f(d) {
|
|
|
27
30
|
type="span"
|
|
28
31
|
></o-icon-button>
|
|
29
32
|
` : null}
|
|
30
|
-
${this.endIcon && this.reverseEndIcon ?
|
|
33
|
+
${this.endIcon && this.reverseEndIcon ? a`
|
|
31
34
|
<o-icon-button
|
|
32
35
|
class="link-end-icon"
|
|
33
36
|
icon="occ-chevron-left"
|
|
@@ -38,7 +41,7 @@ let e = class extends f(d) {
|
|
|
38
41
|
></o-icon-button>
|
|
39
42
|
` : null}
|
|
40
43
|
<span class="link-text"><slot></slot></span>
|
|
41
|
-
${this.endIcon && !this.reverseEndIcon ?
|
|
44
|
+
${this.endIcon && !this.reverseEndIcon ? a`
|
|
42
45
|
<o-icon-button
|
|
43
46
|
class="link-end-icon"
|
|
44
47
|
icon="occ-chevron-right"
|
|
@@ -49,19 +52,23 @@ let e = class extends f(d) {
|
|
|
49
52
|
></o-icon-button>
|
|
50
53
|
` : null}
|
|
51
54
|
`;
|
|
52
|
-
return
|
|
55
|
+
return r ? a`
|
|
53
56
|
<a
|
|
54
57
|
class="link-wrapper"
|
|
55
|
-
href="${this.href}"
|
|
56
|
-
target="${
|
|
58
|
+
href="${this.href === "#" && this.dataHref ? `${this.dataHref}#` : this.href || this.dataHref}"
|
|
59
|
+
target="${l(this.target || void 0)}"
|
|
60
|
+
role="${l(this.roleValue ?? void 0)}"
|
|
61
|
+
aria-controls="${l(this.ariaControlsValue ?? void 0)}"
|
|
62
|
+
aria-haspopup="${l(this.ariaHasPopupValue ?? void 0)}"
|
|
57
63
|
@click="${this._handleClick}"
|
|
64
|
+
@keydown="${this._handleKeydown}"
|
|
58
65
|
>
|
|
59
66
|
${o}
|
|
60
67
|
</a>
|
|
61
|
-
` :
|
|
68
|
+
` : a`<span class="link-wrapper">${o}</span>`;
|
|
62
69
|
}
|
|
63
70
|
};
|
|
64
|
-
|
|
71
|
+
t.styles = f`
|
|
65
72
|
:host {
|
|
66
73
|
cursor: pointer;
|
|
67
74
|
/* The host is not the focus target: only the inner <a> is. Without
|
|
@@ -135,7 +142,7 @@ e.styles = h`
|
|
|
135
142
|
}
|
|
136
143
|
|
|
137
144
|
.link-wrapper:focus-visible {
|
|
138
|
-
${
|
|
145
|
+
${y};
|
|
139
146
|
}
|
|
140
147
|
|
|
141
148
|
.link-text {
|
|
@@ -167,36 +174,48 @@ e.styles = h`
|
|
|
167
174
|
}
|
|
168
175
|
}
|
|
169
176
|
`;
|
|
170
|
-
|
|
177
|
+
e([
|
|
171
178
|
n({ type: String })
|
|
172
|
-
],
|
|
173
|
-
|
|
179
|
+
], t.prototype, "href", 2);
|
|
180
|
+
e([
|
|
181
|
+
n({ type: String, attribute: "data-href" })
|
|
182
|
+
], t.prototype, "dataHref", 2);
|
|
183
|
+
e([
|
|
174
184
|
n({ type: String })
|
|
175
|
-
],
|
|
176
|
-
|
|
185
|
+
], t.prototype, "target", 2);
|
|
186
|
+
e([
|
|
177
187
|
n({ type: String, reflect: !0 })
|
|
178
|
-
],
|
|
179
|
-
|
|
188
|
+
], t.prototype, "template", 2);
|
|
189
|
+
e([
|
|
180
190
|
n({ type: Boolean, reflect: !0 })
|
|
181
|
-
],
|
|
182
|
-
|
|
191
|
+
], t.prototype, "inverse", 2);
|
|
192
|
+
e([
|
|
183
193
|
n({ type: Boolean, reflect: !0 })
|
|
184
|
-
],
|
|
185
|
-
|
|
194
|
+
], t.prototype, "endIcon", 2);
|
|
195
|
+
e([
|
|
186
196
|
n({ type: Boolean, reflect: !0 })
|
|
187
|
-
],
|
|
188
|
-
|
|
197
|
+
], t.prototype, "reverseEndIcon", 2);
|
|
198
|
+
e([
|
|
189
199
|
n({ type: Boolean, reflect: !0 })
|
|
190
|
-
],
|
|
191
|
-
|
|
200
|
+
], t.prototype, "startIcon", 2);
|
|
201
|
+
e([
|
|
192
202
|
n({ type: String })
|
|
193
|
-
],
|
|
194
|
-
|
|
203
|
+
], t.prototype, "iconSize", 2);
|
|
204
|
+
e([
|
|
195
205
|
n({ type: Boolean, reflect: !0 })
|
|
196
|
-
],
|
|
197
|
-
e
|
|
206
|
+
], t.prototype, "disabled", 2);
|
|
207
|
+
e([
|
|
208
|
+
n({ type: String, attribute: "aria-controls" })
|
|
209
|
+
], t.prototype, "ariaControlsValue", 2);
|
|
210
|
+
e([
|
|
211
|
+
n({ type: String, attribute: "aria-haspopup" })
|
|
212
|
+
], t.prototype, "ariaHasPopupValue", 2);
|
|
213
|
+
e([
|
|
214
|
+
n({ type: String, attribute: "role" })
|
|
215
|
+
], t.prototype, "roleValue", 2);
|
|
216
|
+
t = e([
|
|
198
217
|
v("o-link")
|
|
199
|
-
],
|
|
218
|
+
], t);
|
|
200
219
|
export {
|
|
201
|
-
|
|
220
|
+
t as OccitaneLink
|
|
202
221
|
};
|
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.20";
|
|
8
8
|
const i = {
|
|
9
9
|
"o-accordion": () => import("./components/accordion.mjs"),
|
|
10
10
|
"o-accordion-group": () => import("./components/accordion-group.mjs"),
|