@vonage/vivid 4.7.0 → 4.9.0
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/custom-elements.json +75 -1
- package/lib/breadcrumb/breadcrumb.d.ts +4 -1
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +5 -3
- package/package.json +1 -1
- package/shared/breadcrumb-item.cjs +162 -20
- package/shared/breadcrumb-item.js +163 -21
- package/shared/definition10.cjs +52 -68
- package/shared/definition10.js +54 -70
- package/shared/definition11.cjs +1 -1
- package/shared/definition11.js +1 -1
- package/shared/definition17.cjs +1 -1
- package/shared/definition17.js +1 -1
- package/shared/definition20.cjs +73 -54
- package/shared/definition20.js +73 -54
- package/shared/definition21.cjs +27 -12
- package/shared/definition21.js +27 -12
- package/shared/definition36.cjs +1 -1
- package/shared/definition36.js +1 -1
- package/shared/definition44.cjs +7 -0
- package/shared/definition44.js +7 -0
- package/shared/definition46.cjs +24 -9
- package/shared/definition46.js +24 -9
- package/shared/definition48.cjs +1 -1
- package/shared/definition48.js +1 -1
- package/shared/definition6.cjs +1 -1
- package/shared/definition6.js +1 -1
- package/shared/definition9.cjs +1 -19
- package/shared/definition9.js +2 -20
- package/shared/patterns/anchor.d.ts +18 -0
- package/shared/patterns/anchored.d.ts +4 -4
- package/shared/patterns/aria-global.d.ts +21 -0
- package/shared/text-anchor.cjs +84 -2
- package/shared/text-anchor.js +84 -2
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/shared/anchor.cjs +0 -90
- package/shared/anchor.js +0 -87
package/custom-elements.json
CHANGED
|
@@ -2168,6 +2168,66 @@
|
|
|
2168
2168
|
"name": ""
|
|
2169
2169
|
}
|
|
2170
2170
|
],
|
|
2171
|
+
"members": [
|
|
2172
|
+
{
|
|
2173
|
+
"kind": "method",
|
|
2174
|
+
"name": "setItemSeparator",
|
|
2175
|
+
"privacy": "private",
|
|
2176
|
+
"parameters": [
|
|
2177
|
+
{
|
|
2178
|
+
"name": "item",
|
|
2179
|
+
"type": {
|
|
2180
|
+
"text": "HTMLElement"
|
|
2181
|
+
}
|
|
2182
|
+
},
|
|
2183
|
+
{
|
|
2184
|
+
"name": "isLastNode",
|
|
2185
|
+
"type": {
|
|
2186
|
+
"text": "boolean"
|
|
2187
|
+
}
|
|
2188
|
+
}
|
|
2189
|
+
]
|
|
2190
|
+
},
|
|
2191
|
+
{
|
|
2192
|
+
"kind": "method",
|
|
2193
|
+
"name": "findChildWithHref",
|
|
2194
|
+
"privacy": "private",
|
|
2195
|
+
"return": {
|
|
2196
|
+
"type": {
|
|
2197
|
+
"text": "HTMLElement | null"
|
|
2198
|
+
}
|
|
2199
|
+
},
|
|
2200
|
+
"parameters": [
|
|
2201
|
+
{
|
|
2202
|
+
"name": "node",
|
|
2203
|
+
"type": {
|
|
2204
|
+
"text": "HTMLElement"
|
|
2205
|
+
}
|
|
2206
|
+
}
|
|
2207
|
+
],
|
|
2208
|
+
"description": "Finds href on childnodes in the light DOM or shadow DOM.\nWe look in the shadow DOM because we insert an anchor when breadcrumb-item has an href."
|
|
2209
|
+
},
|
|
2210
|
+
{
|
|
2211
|
+
"kind": "method",
|
|
2212
|
+
"name": "setAriaCurrent",
|
|
2213
|
+
"privacy": "private",
|
|
2214
|
+
"parameters": [
|
|
2215
|
+
{
|
|
2216
|
+
"name": "item",
|
|
2217
|
+
"type": {
|
|
2218
|
+
"text": "HTMLElement"
|
|
2219
|
+
}
|
|
2220
|
+
},
|
|
2221
|
+
{
|
|
2222
|
+
"name": "isLastNode",
|
|
2223
|
+
"type": {
|
|
2224
|
+
"text": "boolean"
|
|
2225
|
+
}
|
|
2226
|
+
}
|
|
2227
|
+
],
|
|
2228
|
+
"description": "Sets ARIA Current for the current node\nIf child node with an anchor tag and with href is found then set aria-current to correct value for the child node,\notherwise apply aria-current to the host element, with an href"
|
|
2229
|
+
}
|
|
2230
|
+
],
|
|
2171
2231
|
"superclass": {
|
|
2172
2232
|
"name": "FoundationElement",
|
|
2173
2233
|
"package": "@microsoft/fast-foundation"
|
|
@@ -2243,7 +2303,7 @@
|
|
|
2243
2303
|
}
|
|
2244
2304
|
],
|
|
2245
2305
|
"superclass": {
|
|
2246
|
-
"name": "
|
|
2306
|
+
"name": "FoundationElement",
|
|
2247
2307
|
"package": "@microsoft/fast-foundation"
|
|
2248
2308
|
},
|
|
2249
2309
|
"vividComponent": {
|
|
@@ -6236,6 +6296,13 @@
|
|
|
6236
6296
|
},
|
|
6237
6297
|
"description": "The `close` event fires when the dialog closes (either via user interaction or via the API). It returns the return value inside the event's details property.",
|
|
6238
6298
|
"name": "close"
|
|
6299
|
+
},
|
|
6300
|
+
{
|
|
6301
|
+
"type": {
|
|
6302
|
+
"text": "CustomEvent<undefined>"
|
|
6303
|
+
},
|
|
6304
|
+
"description": "The `cancel` event fires when the user requests to close the dialog. You can prevent the dialog from closing by calling `.preventDefault()` on the event.",
|
|
6305
|
+
"name": "cancel"
|
|
6239
6306
|
}
|
|
6240
6307
|
],
|
|
6241
6308
|
"attributes": [
|
|
@@ -13338,6 +13405,13 @@
|
|
|
13338
13405
|
},
|
|
13339
13406
|
"description": "Fired when the side drawer is opened.",
|
|
13340
13407
|
"name": "open"
|
|
13408
|
+
},
|
|
13409
|
+
{
|
|
13410
|
+
"type": {
|
|
13411
|
+
"text": "CustomEvent<undefined>"
|
|
13412
|
+
},
|
|
13413
|
+
"description": "Fired when the user requests to close the side-drawer. You can prevent the side drawer from closing by calling `.preventDefault()` on the event.",
|
|
13414
|
+
"name": "cancel"
|
|
13341
13415
|
}
|
|
13342
13416
|
],
|
|
13343
13417
|
"attributes": [
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
2
|
export declare class Breadcrumb extends FoundationElement {
|
|
3
|
+
private setItemSeparator;
|
|
4
|
+
private findChildWithHref;
|
|
5
|
+
private setAriaCurrent;
|
|
3
6
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
|
+
import { Anchor } from '../../shared/patterns/anchor';
|
|
3
|
+
export declare class BreadcrumbItem extends FoundationElement {
|
|
3
4
|
text?: string;
|
|
4
|
-
|
|
5
|
+
}
|
|
6
|
+
export interface BreadcrumbItem extends Anchor {
|
|
5
7
|
}
|
package/package.json
CHANGED
|
@@ -1,27 +1,169 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index.cjs');
|
|
4
|
-
const anchor = require('./anchor.cjs');
|
|
5
4
|
const applyMixins = require('./apply-mixins.cjs');
|
|
6
|
-
const startEnd = require('./start-end.cjs');
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @internal
|
|
18
|
-
*/
|
|
19
|
-
this.separator = true;
|
|
20
|
-
}
|
|
6
|
+
var __defProp$2 = Object.defineProperty;
|
|
7
|
+
var __decorateClass$2 = (decorators, target, key, kind) => {
|
|
8
|
+
var result = void 0 ;
|
|
9
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10
|
+
if (decorator = decorators[i])
|
|
11
|
+
result = (decorator(target, key, result) ) || result;
|
|
12
|
+
if (result) __defProp$2(target, key, result);
|
|
13
|
+
return result;
|
|
21
14
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
class ARIAGlobalStatesAndProperties {
|
|
16
|
+
}
|
|
17
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
18
|
+
__decorateClass$2([
|
|
19
|
+
index.attr({ attribute: "aria-atomic" })
|
|
20
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaAtomic");
|
|
21
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
22
|
+
__decorateClass$2([
|
|
23
|
+
index.attr({ attribute: "aria-busy" })
|
|
24
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaBusy");
|
|
25
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
26
|
+
__decorateClass$2([
|
|
27
|
+
index.attr({ attribute: "aria-controls" })
|
|
28
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaControls");
|
|
29
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
30
|
+
__decorateClass$2([
|
|
31
|
+
index.attr({ attribute: "aria-current" })
|
|
32
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaCurrent");
|
|
33
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
34
|
+
__decorateClass$2([
|
|
35
|
+
index.attr({ attribute: "aria-describedby" })
|
|
36
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaDescribedby");
|
|
37
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
38
|
+
__decorateClass$2([
|
|
39
|
+
index.attr({ attribute: "aria-details" })
|
|
40
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaDetails");
|
|
41
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
42
|
+
__decorateClass$2([
|
|
43
|
+
index.attr({ attribute: "aria-disabled" })
|
|
44
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaDisabled");
|
|
45
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
46
|
+
__decorateClass$2([
|
|
47
|
+
index.attr({ attribute: "aria-errormessage" })
|
|
48
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaErrormessage");
|
|
49
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
50
|
+
__decorateClass$2([
|
|
51
|
+
index.attr({ attribute: "aria-flowto" })
|
|
52
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaFlowto");
|
|
53
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
54
|
+
__decorateClass$2([
|
|
55
|
+
index.attr({ attribute: "aria-haspopup" })
|
|
56
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaHaspopup");
|
|
57
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
58
|
+
__decorateClass$2([
|
|
59
|
+
index.attr({ attribute: "aria-hidden" })
|
|
60
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaHidden");
|
|
61
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
62
|
+
__decorateClass$2([
|
|
63
|
+
index.attr({ attribute: "aria-invalid" })
|
|
64
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaInvalid");
|
|
65
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
66
|
+
__decorateClass$2([
|
|
67
|
+
index.attr({ attribute: "aria-keyshortcuts" })
|
|
68
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaKeyshortcuts");
|
|
69
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
70
|
+
__decorateClass$2([
|
|
71
|
+
index.attr({ attribute: "aria-label" })
|
|
72
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaLabel");
|
|
73
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
74
|
+
__decorateClass$2([
|
|
75
|
+
index.attr({ attribute: "aria-labelledby" })
|
|
76
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaLabelledby");
|
|
77
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
78
|
+
__decorateClass$2([
|
|
79
|
+
index.attr({ attribute: "aria-live" })
|
|
80
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaLive");
|
|
81
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
82
|
+
__decorateClass$2([
|
|
83
|
+
index.attr({ attribute: "aria-owns" })
|
|
84
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaOwns");
|
|
85
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
86
|
+
__decorateClass$2([
|
|
87
|
+
index.attr({ attribute: "aria-relevant" })
|
|
88
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaRelevant");
|
|
89
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
90
|
+
__decorateClass$2([
|
|
91
|
+
index.attr({ attribute: "aria-roledescription" })
|
|
92
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaRoledescription");
|
|
26
93
|
|
|
27
|
-
|
|
94
|
+
var __defProp$1 = Object.defineProperty;
|
|
95
|
+
var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
96
|
+
var result = void 0 ;
|
|
97
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
98
|
+
if (decorator = decorators[i])
|
|
99
|
+
result = (decorator(target, key, result) ) || result;
|
|
100
|
+
if (result) __defProp$1(target, key, result);
|
|
101
|
+
return result;
|
|
102
|
+
};
|
|
103
|
+
class Anchor {
|
|
104
|
+
}
|
|
105
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
106
|
+
__decorateClass$1([
|
|
107
|
+
index.attr
|
|
108
|
+
], Anchor.prototype, "download");
|
|
109
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
110
|
+
__decorateClass$1([
|
|
111
|
+
index.attr
|
|
112
|
+
], Anchor.prototype, "href");
|
|
113
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
114
|
+
__decorateClass$1([
|
|
115
|
+
index.attr
|
|
116
|
+
], Anchor.prototype, "hreflang");
|
|
117
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
118
|
+
__decorateClass$1([
|
|
119
|
+
index.attr
|
|
120
|
+
], Anchor.prototype, "ping");
|
|
121
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
122
|
+
__decorateClass$1([
|
|
123
|
+
index.attr
|
|
124
|
+
], Anchor.prototype, "referrerpolicy");
|
|
125
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
126
|
+
__decorateClass$1([
|
|
127
|
+
index.attr
|
|
128
|
+
], Anchor.prototype, "rel");
|
|
129
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
130
|
+
__decorateClass$1([
|
|
131
|
+
index.attr
|
|
132
|
+
], Anchor.prototype, "target");
|
|
133
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
134
|
+
__decorateClass$1([
|
|
135
|
+
index.attr
|
|
136
|
+
], Anchor.prototype, "type");
|
|
137
|
+
class DelegatesARIALink {
|
|
138
|
+
}
|
|
139
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
140
|
+
__decorateClass$1([
|
|
141
|
+
index.attr({ attribute: "aria-expanded" })
|
|
142
|
+
], DelegatesARIALink.prototype, "ariaExpanded");
|
|
143
|
+
applyMixins.applyMixins(DelegatesARIALink, ARIAGlobalStatesAndProperties);
|
|
144
|
+
applyMixins.applyMixins(Anchor, DelegatesARIALink);
|
|
145
|
+
|
|
146
|
+
var __defProp = Object.defineProperty;
|
|
147
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
148
|
+
var result = void 0 ;
|
|
149
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
150
|
+
if (decorator = decorators[i])
|
|
151
|
+
result = (decorator(target, key, result) ) || result;
|
|
152
|
+
if (result) __defProp(target, key, result);
|
|
153
|
+
return result;
|
|
154
|
+
};
|
|
155
|
+
class BreadcrumbItem extends index.FoundationElement {
|
|
156
|
+
constructor() {
|
|
157
|
+
super(...arguments);
|
|
158
|
+
this.separator = true;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
__decorateClass([
|
|
162
|
+
index.attr
|
|
163
|
+
], BreadcrumbItem.prototype, "text");
|
|
164
|
+
__decorateClass([
|
|
165
|
+
index.observable
|
|
166
|
+
], BreadcrumbItem.prototype, "separator");
|
|
167
|
+
applyMixins.applyMixins(BreadcrumbItem, Anchor);
|
|
168
|
+
|
|
169
|
+
exports.BreadcrumbItem = BreadcrumbItem;
|
|
@@ -1,25 +1,167 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as Anchor, D as DelegatesARIALink } from './anchor.js';
|
|
1
|
+
import { a as attr, F as FoundationElement, o as observable } from './index.js';
|
|
3
2
|
import { a as applyMixins } from './apply-mixins.js';
|
|
4
|
-
import { S as StartEnd } from './start-end.js';
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @internal
|
|
16
|
-
*/
|
|
17
|
-
this.separator = true;
|
|
18
|
-
}
|
|
4
|
+
var __defProp$2 = Object.defineProperty;
|
|
5
|
+
var __decorateClass$2 = (decorators, target, key, kind) => {
|
|
6
|
+
var result = void 0 ;
|
|
7
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8
|
+
if (decorator = decorators[i])
|
|
9
|
+
result = (decorator(target, key, result) ) || result;
|
|
10
|
+
if (result) __defProp$2(target, key, result);
|
|
11
|
+
return result;
|
|
19
12
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
class ARIAGlobalStatesAndProperties {
|
|
14
|
+
}
|
|
15
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
16
|
+
__decorateClass$2([
|
|
17
|
+
attr({ attribute: "aria-atomic" })
|
|
18
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaAtomic");
|
|
19
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
20
|
+
__decorateClass$2([
|
|
21
|
+
attr({ attribute: "aria-busy" })
|
|
22
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaBusy");
|
|
23
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
24
|
+
__decorateClass$2([
|
|
25
|
+
attr({ attribute: "aria-controls" })
|
|
26
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaControls");
|
|
27
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
28
|
+
__decorateClass$2([
|
|
29
|
+
attr({ attribute: "aria-current" })
|
|
30
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaCurrent");
|
|
31
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
32
|
+
__decorateClass$2([
|
|
33
|
+
attr({ attribute: "aria-describedby" })
|
|
34
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaDescribedby");
|
|
35
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
36
|
+
__decorateClass$2([
|
|
37
|
+
attr({ attribute: "aria-details" })
|
|
38
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaDetails");
|
|
39
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
40
|
+
__decorateClass$2([
|
|
41
|
+
attr({ attribute: "aria-disabled" })
|
|
42
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaDisabled");
|
|
43
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
44
|
+
__decorateClass$2([
|
|
45
|
+
attr({ attribute: "aria-errormessage" })
|
|
46
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaErrormessage");
|
|
47
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
48
|
+
__decorateClass$2([
|
|
49
|
+
attr({ attribute: "aria-flowto" })
|
|
50
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaFlowto");
|
|
51
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
52
|
+
__decorateClass$2([
|
|
53
|
+
attr({ attribute: "aria-haspopup" })
|
|
54
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaHaspopup");
|
|
55
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
56
|
+
__decorateClass$2([
|
|
57
|
+
attr({ attribute: "aria-hidden" })
|
|
58
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaHidden");
|
|
59
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
60
|
+
__decorateClass$2([
|
|
61
|
+
attr({ attribute: "aria-invalid" })
|
|
62
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaInvalid");
|
|
63
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
64
|
+
__decorateClass$2([
|
|
65
|
+
attr({ attribute: "aria-keyshortcuts" })
|
|
66
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaKeyshortcuts");
|
|
67
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
68
|
+
__decorateClass$2([
|
|
69
|
+
attr({ attribute: "aria-label" })
|
|
70
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaLabel");
|
|
71
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
72
|
+
__decorateClass$2([
|
|
73
|
+
attr({ attribute: "aria-labelledby" })
|
|
74
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaLabelledby");
|
|
75
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
76
|
+
__decorateClass$2([
|
|
77
|
+
attr({ attribute: "aria-live" })
|
|
78
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaLive");
|
|
79
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
80
|
+
__decorateClass$2([
|
|
81
|
+
attr({ attribute: "aria-owns" })
|
|
82
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaOwns");
|
|
83
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
84
|
+
__decorateClass$2([
|
|
85
|
+
attr({ attribute: "aria-relevant" })
|
|
86
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaRelevant");
|
|
87
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
88
|
+
__decorateClass$2([
|
|
89
|
+
attr({ attribute: "aria-roledescription" })
|
|
90
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaRoledescription");
|
|
24
91
|
|
|
25
|
-
|
|
92
|
+
var __defProp$1 = Object.defineProperty;
|
|
93
|
+
var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
94
|
+
var result = void 0 ;
|
|
95
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
96
|
+
if (decorator = decorators[i])
|
|
97
|
+
result = (decorator(target, key, result) ) || result;
|
|
98
|
+
if (result) __defProp$1(target, key, result);
|
|
99
|
+
return result;
|
|
100
|
+
};
|
|
101
|
+
class Anchor {
|
|
102
|
+
}
|
|
103
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
104
|
+
__decorateClass$1([
|
|
105
|
+
attr
|
|
106
|
+
], Anchor.prototype, "download");
|
|
107
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
108
|
+
__decorateClass$1([
|
|
109
|
+
attr
|
|
110
|
+
], Anchor.prototype, "href");
|
|
111
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
112
|
+
__decorateClass$1([
|
|
113
|
+
attr
|
|
114
|
+
], Anchor.prototype, "hreflang");
|
|
115
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
116
|
+
__decorateClass$1([
|
|
117
|
+
attr
|
|
118
|
+
], Anchor.prototype, "ping");
|
|
119
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
120
|
+
__decorateClass$1([
|
|
121
|
+
attr
|
|
122
|
+
], Anchor.prototype, "referrerpolicy");
|
|
123
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
124
|
+
__decorateClass$1([
|
|
125
|
+
attr
|
|
126
|
+
], Anchor.prototype, "rel");
|
|
127
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
128
|
+
__decorateClass$1([
|
|
129
|
+
attr
|
|
130
|
+
], Anchor.prototype, "target");
|
|
131
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
132
|
+
__decorateClass$1([
|
|
133
|
+
attr
|
|
134
|
+
], Anchor.prototype, "type");
|
|
135
|
+
class DelegatesARIALink {
|
|
136
|
+
}
|
|
137
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
138
|
+
__decorateClass$1([
|
|
139
|
+
attr({ attribute: "aria-expanded" })
|
|
140
|
+
], DelegatesARIALink.prototype, "ariaExpanded");
|
|
141
|
+
applyMixins(DelegatesARIALink, ARIAGlobalStatesAndProperties);
|
|
142
|
+
applyMixins(Anchor, DelegatesARIALink);
|
|
143
|
+
|
|
144
|
+
var __defProp = Object.defineProperty;
|
|
145
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
146
|
+
var result = void 0 ;
|
|
147
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
148
|
+
if (decorator = decorators[i])
|
|
149
|
+
result = (decorator(target, key, result) ) || result;
|
|
150
|
+
if (result) __defProp(target, key, result);
|
|
151
|
+
return result;
|
|
152
|
+
};
|
|
153
|
+
class BreadcrumbItem extends FoundationElement {
|
|
154
|
+
constructor() {
|
|
155
|
+
super(...arguments);
|
|
156
|
+
this.separator = true;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
__decorateClass([
|
|
160
|
+
attr
|
|
161
|
+
], BreadcrumbItem.prototype, "text");
|
|
162
|
+
__decorateClass([
|
|
163
|
+
observable
|
|
164
|
+
], BreadcrumbItem.prototype, "separator");
|
|
165
|
+
applyMixins(BreadcrumbItem, Anchor);
|
|
166
|
+
|
|
167
|
+
export { BreadcrumbItem as B };
|
package/shared/definition10.cjs
CHANGED
|
@@ -4,73 +4,6 @@ const index = require('./index.cjs');
|
|
|
4
4
|
const slotted = require('./slotted.cjs');
|
|
5
5
|
const breadcrumbItem = require('./breadcrumb-item.cjs');
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* A Breadcrumb Custom HTML Element.
|
|
9
|
-
* @slot - The default slot for the breadcrumb items
|
|
10
|
-
* @csspart list - The element wrapping the slotted items
|
|
11
|
-
*
|
|
12
|
-
* @public
|
|
13
|
-
*/
|
|
14
|
-
let Breadcrumb$1 = class Breadcrumb extends index.FoundationElement {
|
|
15
|
-
slottedBreadcrumbItemsChanged() {
|
|
16
|
-
if (this.$fastController.isConnected) {
|
|
17
|
-
if (this.slottedBreadcrumbItems === undefined ||
|
|
18
|
-
this.slottedBreadcrumbItems.length === 0) {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
const lastNode = this.slottedBreadcrumbItems[this.slottedBreadcrumbItems.length - 1];
|
|
22
|
-
this.slottedBreadcrumbItems.forEach((item) => {
|
|
23
|
-
const itemIsLastNode = item === lastNode;
|
|
24
|
-
this.setItemSeparator(item, itemIsLastNode);
|
|
25
|
-
this.setAriaCurrent(item, itemIsLastNode);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
setItemSeparator(item, isLastNode) {
|
|
30
|
-
if (item instanceof breadcrumbItem.BreadcrumbItem) {
|
|
31
|
-
item.separator = !isLastNode;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Finds href on childnodes in the light DOM or shadow DOM.
|
|
36
|
-
* We look in the shadow DOM because we insert an anchor when breadcrumb-item has an href.
|
|
37
|
-
*/
|
|
38
|
-
findChildWithHref(node) {
|
|
39
|
-
var _a, _b;
|
|
40
|
-
if (node.childElementCount > 0) {
|
|
41
|
-
return node.querySelector("a[href]");
|
|
42
|
-
}
|
|
43
|
-
else if ((_a = node.shadowRoot) === null || _a === void 0 ? void 0 : _a.childElementCount) {
|
|
44
|
-
return (_b = node.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector("a[href]");
|
|
45
|
-
}
|
|
46
|
-
else
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Sets ARIA Current for the current node
|
|
51
|
-
* If child node with an anchor tag and with href is found then set aria-current to correct value for the child node,
|
|
52
|
-
* otherwise apply aria-current to the host element, with an href
|
|
53
|
-
*/
|
|
54
|
-
setAriaCurrent(item, isLastNode) {
|
|
55
|
-
const childNodeWithHref = this.findChildWithHref(item);
|
|
56
|
-
if (childNodeWithHref === null &&
|
|
57
|
-
item.hasAttribute("href") &&
|
|
58
|
-
item instanceof breadcrumbItem.BreadcrumbItem) {
|
|
59
|
-
isLastNode
|
|
60
|
-
? item.setAttribute("aria-current", "page")
|
|
61
|
-
: item.removeAttribute("aria-current");
|
|
62
|
-
}
|
|
63
|
-
else if (childNodeWithHref !== null) {
|
|
64
|
-
isLastNode
|
|
65
|
-
? childNodeWithHref.setAttribute("aria-current", "page")
|
|
66
|
-
: childNodeWithHref.removeAttribute("aria-current");
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
index.__decorate([
|
|
71
|
-
index.observable
|
|
72
|
-
], Breadcrumb$1.prototype, "slottedBreadcrumbItems", void 0);
|
|
73
|
-
|
|
74
7
|
const breadcrumbTemplate = () => index.html`
|
|
75
8
|
<nav aria-label="breadcrumbs" class="base">
|
|
76
9
|
<div role="list" class="list">
|
|
@@ -86,8 +19,59 @@ const breadcrumbTemplate = () => index.html`
|
|
|
86
19
|
|
|
87
20
|
const styles = ".list{display:flex}";
|
|
88
21
|
|
|
89
|
-
|
|
22
|
+
var __defProp = Object.defineProperty;
|
|
23
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
24
|
+
var result = void 0 ;
|
|
25
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
26
|
+
if (decorator = decorators[i])
|
|
27
|
+
result = (decorator(target, key, result) ) || result;
|
|
28
|
+
if (result) __defProp(target, key, result);
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
31
|
+
class Breadcrumb extends index.FoundationElement {
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
slottedBreadcrumbItemsChanged(_, newItems) {
|
|
36
|
+
if (newItems) {
|
|
37
|
+
newItems.forEach((item, index) => {
|
|
38
|
+
const itemIsLastNode = index === newItems.length - 1;
|
|
39
|
+
this.setItemSeparator(item, itemIsLastNode);
|
|
40
|
+
this.setAriaCurrent(item, itemIsLastNode);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
setItemSeparator(item, isLastNode) {
|
|
45
|
+
if (item instanceof breadcrumbItem.BreadcrumbItem) {
|
|
46
|
+
item.separator = !isLastNode;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Finds href on childnodes in the light DOM or shadow DOM.
|
|
51
|
+
* We look in the shadow DOM because we insert an anchor when breadcrumb-item has an href.
|
|
52
|
+
*/
|
|
53
|
+
findChildWithHref(node) {
|
|
54
|
+
if (node.childElementCount > 0) {
|
|
55
|
+
return node.querySelector("a[href]");
|
|
56
|
+
} else if (node.shadowRoot) {
|
|
57
|
+
return node.shadowRoot.querySelector("a[href]");
|
|
58
|
+
} else return null;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Sets ARIA Current for the current node
|
|
62
|
+
* If child node with an anchor tag and with href is found then set aria-current to correct value for the child node,
|
|
63
|
+
* otherwise apply aria-current to the host element, with an href
|
|
64
|
+
*/
|
|
65
|
+
setAriaCurrent(item, isLastNode) {
|
|
66
|
+
const childNodeWithHref = this.findChildWithHref(item);
|
|
67
|
+
if (childNodeWithHref !== null) {
|
|
68
|
+
isLastNode ? childNodeWithHref.setAttribute("aria-current", "page") : childNodeWithHref.removeAttribute("aria-current");
|
|
69
|
+
}
|
|
70
|
+
}
|
|
90
71
|
}
|
|
72
|
+
__decorateClass([
|
|
73
|
+
index.observable
|
|
74
|
+
], Breadcrumb.prototype, "slottedBreadcrumbItems");
|
|
91
75
|
|
|
92
76
|
const breadcrumbDefinition = Breadcrumb.compose({
|
|
93
77
|
baseName: "breadcrumb",
|