@vonage/vivid 2.26.0 → 3.0.0-next.2
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/README.md +7 -0
- package/badge/index.js +55 -0
- package/breadcrumb-item/index.js +48 -0
- package/button/index.js +752 -0
- package/elevation/index.js +38 -0
- package/focus/index.js +3 -0
- package/icon/index.js +5 -0
- package/index.d.ts +1 -0
- package/index.js +16 -63
- package/layout/index.js +53 -0
- package/lib/badge/badge.d.ts +17 -0
- package/lib/badge/badge.template.d.ts +4 -0
- package/lib/badge/index.d.ts +3 -0
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +5 -0
- package/lib/breadcrumb-item/breadcrumb-item.template.d.ts +5 -0
- package/lib/breadcrumb-item/index.d.ts +2 -0
- package/lib/button/button.d.ts +17 -0
- package/lib/button/button.template.d.ts +4 -0
- package/lib/button/index.d.ts +21 -0
- package/lib/components.d.ts +7 -0
- package/lib/elevation/elevation.d.ts +4 -0
- package/lib/elevation/elevation.template.d.ts +4 -0
- package/lib/elevation/index.d.ts +2 -0
- package/lib/enums.d.ts +44 -0
- package/lib/focus/focus.d.ts +3 -0
- package/lib/focus/focus.template.d.ts +4 -0
- package/lib/focus/index.d.ts +2 -0
- package/lib/icon/icon.d.ts +13 -0
- package/lib/icon/icon.placeholder.d.ts +1 -0
- package/lib/icon/icon.template.d.ts +4 -0
- package/lib/icon/index.d.ts +2 -0
- package/lib/layout/index.d.ts +2 -0
- package/lib/layout/layout.d.ts +16 -0
- package/lib/layout/layout.template.d.ts +4 -0
- package/lib/sidenav-item/index.d.ts +3 -0
- package/lib/sidenav-item/sidenav-item.d.ts +7 -0
- package/lib/sidenav-item/sidenav-item.template.d.ts +4 -0
- package/lib/text-anchor/index.d.ts +2 -0
- package/lib/text-anchor/text-anchor.d.ts +4 -0
- package/lib/text-anchor/text-anchor.template.d.ts +4 -0
- package/package.json +10 -317
- package/shared/affix.js +44 -0
- package/shared/anchor.js +78 -0
- package/shared/apply-mixins.js +22 -0
- package/shared/aria-global.js +156 -0
- package/shared/class-names.js +15 -0
- package/shared/design-system/index.d.ts +3 -0
- package/shared/index.js +1500 -0
- package/shared/index2.js +4911 -0
- package/shared/index3.js +21 -0
- package/shared/patterns/affix.d.ts +10 -0
- package/shared/patterns/index.d.ts +1 -0
- package/shared/style-inject.es.js +28 -0
- package/shared/text-anchor.template.js +59 -0
- package/shared/web.dom-collections.iterator.js +1479 -0
- package/sidenav-item/index.js +79 -0
- package/styles/fonts/spezia.css +23 -0
- package/styles/themes/dark.css +193 -0
- package/styles/themes/light.css +193 -0
- package/text-anchor/index.js +15 -0
package/package.json
CHANGED
|
@@ -1,321 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vonage/vivid",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
9
|
-
"sideEffects": false,
|
|
10
|
-
"keywords": [
|
|
11
|
-
"Vivid",
|
|
12
|
-
"Components",
|
|
13
|
-
"All"
|
|
14
|
-
],
|
|
15
|
-
"license": "ISC",
|
|
3
|
+
"version": "3.0.0-next.2",
|
|
4
|
+
"main": "./index.umd.js",
|
|
5
|
+
"module": "./index.esm.js",
|
|
6
|
+
"typings": "./index.d.ts",
|
|
16
7
|
"dependencies": {
|
|
17
|
-
"@
|
|
18
|
-
"@
|
|
19
|
-
"@
|
|
20
|
-
"
|
|
21
|
-
"@vonage/vwc-audio": "2.26.0",
|
|
22
|
-
"@vonage/vwc-button-toggle-group": "2.26.0",
|
|
23
|
-
"@vonage/vwc-card": "2.26.0",
|
|
24
|
-
"@vonage/vwc-checkbox": "2.26.0",
|
|
25
|
-
"@vonage/vwc-circular-progress": "2.26.0",
|
|
26
|
-
"@vonage/vwc-datepicker": "2.26.0",
|
|
27
|
-
"@vonage/vwc-dialog": "2.26.0",
|
|
28
|
-
"@vonage/vwc-dropdown": "2.26.0",
|
|
29
|
-
"@vonage/vwc-elevation": "2.26.0",
|
|
30
|
-
"@vonage/vwc-fab": "2.26.0",
|
|
31
|
-
"@vonage/vwc-file-picker": "2.26.0",
|
|
32
|
-
"@vonage/vwc-formfield": "2.26.0",
|
|
33
|
-
"@vonage/vwc-helper-message": "2.26.0",
|
|
34
|
-
"@vonage/vwc-icon-button": "2.26.0",
|
|
35
|
-
"@vonage/vwc-icon": "2.26.0",
|
|
36
|
-
"@vonage/vwc-keypad": "2.26.0",
|
|
37
|
-
"@vonage/vwc-layout": "2.26.0",
|
|
38
|
-
"@vonage/vwc-linear-progress": "2.26.0",
|
|
39
|
-
"@vonage/vwc-menu": "2.26.0",
|
|
40
|
-
"@vonage/vwc-note": "2.26.0",
|
|
41
|
-
"@vonage/vwc-pagination": "2.26.0",
|
|
42
|
-
"@vonage/vwc-radio": "2.26.0",
|
|
43
|
-
"@vonage/vwc-slider": "2.26.0",
|
|
44
|
-
"@vonage/vwc-snackbar": "2.26.0",
|
|
45
|
-
"@vonage/vwc-surface": "2.26.0",
|
|
46
|
-
"@vonage/vwc-switch": "2.26.0",
|
|
47
|
-
"@vonage/vwc-textarea": "2.26.0",
|
|
48
|
-
"@vonage/vwc-theme-switch": "2.26.0",
|
|
49
|
-
"@vonage/vwc-top-app-bar": "2.26.0",
|
|
50
|
-
"@vonage/vwc-accordion": "2.26.0",
|
|
51
|
-
"@vonage/vwc-badge": "2.26.0",
|
|
52
|
-
"@vonage/vwc-drawer": "2.26.0",
|
|
53
|
-
"@vonage/vwc-empty-state": "2.26.0",
|
|
54
|
-
"@vonage/vwc-popup": "2.26.0",
|
|
55
|
-
"@vonage/vwc-select": "2.26.0",
|
|
56
|
-
"@vonage/vwc-side-drawer": "2.26.0",
|
|
57
|
-
"@vonage/vwc-tags": "2.26.0",
|
|
58
|
-
"@vonage/vwc-text": "2.26.0",
|
|
59
|
-
"@vonage/vwc-tooltip": "2.26.0",
|
|
60
|
-
"@vonage/vwc-banner": "2.26.0",
|
|
61
|
-
"@vonage/vwc-button": "2.26.0",
|
|
62
|
-
"@vonage/vwc-expansion-panel": "2.26.0",
|
|
63
|
-
"@vonage/vwc-media-controller": "2.26.0",
|
|
64
|
-
"@vonage/vwc-carousel": "2.26.0",
|
|
65
|
-
"@vonage/vwc-tab-bar": "2.26.0",
|
|
66
|
-
"@vonage/vwc-data-grid": "2.26.0",
|
|
67
|
-
"@vonage/vwc-textfield": "2.26.0",
|
|
68
|
-
"@vonage/vwc-calendar": "2.26.0",
|
|
69
|
-
"@vonage/vwc-list": "2.26.0",
|
|
70
|
-
"@vonage/vvd-core": "2.26.0",
|
|
71
|
-
"@vonage/vvd-context": "2.26.0"
|
|
8
|
+
"@microsoft/fast-element": "^1.7.0",
|
|
9
|
+
"@microsoft/fast-foundation": "^2.33.3",
|
|
10
|
+
"@microsoft/fast-web-utilities": "^5.1.0",
|
|
11
|
+
"ramda": "^0.27.2"
|
|
72
12
|
},
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
{
|
|
76
|
-
"component_name": "vwc-icon-button-toggle",
|
|
77
|
-
"export_name": "VWCIconButtonToggle"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"component_name": "vwc-notched-outline",
|
|
81
|
-
"export_name": "VWCNotchedOutline"
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
"component_name": "vwc-scheme-select",
|
|
85
|
-
"export_name": "VWCSchemeSelect"
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
"component_name": "vwc-top-app-bar-fixed",
|
|
89
|
-
"export_name": "VWCTopAppBarFixed"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"component_name": "vwc-audio",
|
|
93
|
-
"export_name": "VWCAudio"
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"component_name": "vwc-button-toggle-group",
|
|
97
|
-
"export_name": "VWCButtonToggleGroup"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"component_name": "vwc-card",
|
|
101
|
-
"export_name": "VWCCard"
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"component_name": "vwc-checkbox",
|
|
105
|
-
"export_name": "VWCCheckbox"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"component_name": "vwc-circular-progress",
|
|
109
|
-
"export_name": "VWCCircularProgress"
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"component_name": "vwc-datepicker",
|
|
113
|
-
"export_name": "VWCDatepicker"
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
"component_name": "vwc-dialog",
|
|
117
|
-
"export_name": "VWCDialog"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"component_name": "vwc-dropdown",
|
|
121
|
-
"export_name": "VWCDropdown"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"component_name": "vwc-elevation",
|
|
125
|
-
"export_name": "VWCElevation"
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
"component_name": "vwc-fab",
|
|
129
|
-
"export_name": "VWCFab"
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
"component_name": "vwc-file-picker",
|
|
133
|
-
"export_name": "VWCFilePicker"
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
"component_name": "vwc-formfield",
|
|
137
|
-
"export_name": "VWCFormfield"
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
"component_name": "vwc-helper-message",
|
|
141
|
-
"export_name": "VWCHelperMessage"
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
"component_name": "vwc-icon-button",
|
|
145
|
-
"export_name": "VWCIconButton"
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"component_name": "vwc-icon",
|
|
149
|
-
"export_name": "VWCIcon"
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
"component_name": "vwc-keypad",
|
|
153
|
-
"export_name": "VWCKeypad"
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
"component_name": "vwc-layout",
|
|
157
|
-
"export_name": "VWCLayout"
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"component_name": "vwc-linear-progress",
|
|
161
|
-
"export_name": "VWCLinearProgress"
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
"component_name": "vwc-menu",
|
|
165
|
-
"export_name": "VWCMenu"
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
"component_name": "vwc-note",
|
|
169
|
-
"export_name": "VWCNote"
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
"component_name": "vwc-pagination",
|
|
173
|
-
"export_name": "VWCPagination"
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
"component_name": "vwc-radio",
|
|
177
|
-
"export_name": "VWCRadio"
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
"component_name": "vwc-slider",
|
|
181
|
-
"export_name": "VWCSlider"
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
"component_name": "vwc-snackbar",
|
|
185
|
-
"export_name": "VWCSnackbar"
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
"component_name": "vwc-surface",
|
|
189
|
-
"export_name": "VWCSurface"
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
"component_name": "vwc-switch",
|
|
193
|
-
"export_name": "VWCSwitch"
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
"component_name": "vwc-textarea",
|
|
197
|
-
"export_name": "VWCTextarea"
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
"component_name": "vwc-theme-switch",
|
|
201
|
-
"export_name": "VWCThemeSwitch"
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
"component_name": "vwc-top-app-bar",
|
|
205
|
-
"export_name": "VWCTopAppBar"
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
"component_name": "vwc-accordion",
|
|
209
|
-
"export_name": "VWCAccordion"
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
"component_name": "vwc-badge",
|
|
213
|
-
"export_name": "VWCBadge"
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
"component_name": "vwc-drawer",
|
|
217
|
-
"export_name": "VWCDrawer"
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
"component_name": "vwc-empty-state",
|
|
221
|
-
"export_name": "VWCEmptyState"
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
"component_name": "vwc-popup",
|
|
225
|
-
"export_name": "VWCPopup"
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
"component_name": "vwc-select",
|
|
229
|
-
"export_name": "VWCSelect"
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
"component_name": "vwc-side-drawer",
|
|
233
|
-
"export_name": "VWCSideDrawer"
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
"component_name": "vwc-tag",
|
|
237
|
-
"export_name": "VWCTag"
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
"component_name": "vwc-text",
|
|
241
|
-
"export_name": "VWCText"
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
"component_name": "vwc-tooltip",
|
|
245
|
-
"export_name": "VWCTooltip"
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
"component_name": "vwc-banner",
|
|
249
|
-
"export_name": "VWCBanner"
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
"component_name": "vwc-button",
|
|
253
|
-
"export_name": "VWCButton"
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
"component_name": "vwc-expansion-panel",
|
|
257
|
-
"export_name": "VWCExpansionPanel"
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
"component_name": "vwc-media-controller",
|
|
261
|
-
"export_name": "VWCMediaController"
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
"component_name": "vwc-scrub-bar",
|
|
265
|
-
"export_name": "VWCScrubBar"
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
"component_name": "vwc-carousel-item",
|
|
269
|
-
"export_name": "VWCCarouselItem"
|
|
270
|
-
},
|
|
271
|
-
{
|
|
272
|
-
"component_name": "vwc-carousel",
|
|
273
|
-
"export_name": "VWCCarousel"
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
"component_name": "vwc-tab-bar",
|
|
277
|
-
"export_name": "VWCTabBar"
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
"component_name": "vwc-tab",
|
|
281
|
-
"export_name": "VWCTab"
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
"component_name": "vwc-data-grid",
|
|
285
|
-
"export_name": "VWCDataGrid"
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
"component_name": "vwc-textfield",
|
|
289
|
-
"export_name": "VWCTextfield"
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
"component_name": "vwc-calendar-event",
|
|
293
|
-
"export_name": "VWCCalendarEvent"
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
"component_name": "vwc-calendar",
|
|
297
|
-
"export_name": "VWCCalendar"
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
"component_name": "vwc-check-list-item",
|
|
301
|
-
"export_name": "VWCCheckListItem"
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
"component_name": "vwc-list-expansion-panel",
|
|
305
|
-
"export_name": "VWCListExpansionPanel"
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
"component_name": "vwc-list-item",
|
|
309
|
-
"export_name": "VWCListItem"
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
"component_name": "vwc-list",
|
|
313
|
-
"export_name": "VWCList"
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
"component_name": "vwc-radio-list-item",
|
|
317
|
-
"export_name": "VWCRadioListItem"
|
|
318
|
-
}
|
|
319
|
-
]
|
|
320
|
-
}
|
|
321
|
-
}
|
|
13
|
+
"peerDependencies": {}
|
|
14
|
+
}
|
package/shared/affix.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import './web.dom-collections.iterator.js';
|
|
2
|
+
import { _ as __decorate, a as attr, b as __metadata, h as html } from './index2.js';
|
|
3
|
+
import { I as Icon } from './index.js';
|
|
4
|
+
import { c as classNames } from './class-names.js';
|
|
5
|
+
|
|
6
|
+
let _ = t => t,
|
|
7
|
+
_t,
|
|
8
|
+
_t2,
|
|
9
|
+
_t3,
|
|
10
|
+
_t4;
|
|
11
|
+
class Prefix {}
|
|
12
|
+
|
|
13
|
+
__decorate([attr, __metadata("design:type", String)], Prefix.prototype, "icon", void 0);
|
|
14
|
+
|
|
15
|
+
class PrefixOrSuffix extends Prefix {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.iconTrailing = false;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
__decorate([attr({
|
|
24
|
+
mode: 'boolean',
|
|
25
|
+
attribute: 'icon-trailing'
|
|
26
|
+
}), __metadata("design:type", Object)], PrefixOrSuffix.prototype, "iconTrailing", void 0);
|
|
27
|
+
|
|
28
|
+
const prefixTemplate = context => {
|
|
29
|
+
const iconTag = context.tagFor(Icon);
|
|
30
|
+
const iconTemplate = html(_t || (_t = _`<span class="icon"><${0} :type="${0}"></${0}></span>`), iconTag, x => x.icon, iconTag);
|
|
31
|
+
return html(_t2 || (_t2 = _`${0}`), x => x.icon ? iconTemplate : '');
|
|
32
|
+
};
|
|
33
|
+
const prefixOrSuffixTemplate = context => {
|
|
34
|
+
const iconTag = context.tagFor(Icon);
|
|
35
|
+
|
|
36
|
+
const classes = ({
|
|
37
|
+
iconTrailing
|
|
38
|
+
}) => classNames('icon', ['icon-trailing', iconTrailing]);
|
|
39
|
+
|
|
40
|
+
const iconTemplate = html(_t3 || (_t3 = _`<span class="${0}"><${0} :type="${0}"></${0}></span>`), classes, iconTag, x => x.icon, iconTag);
|
|
41
|
+
return html(_t4 || (_t4 = _`${0}`), x => x.icon ? iconTemplate : '');
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export { PrefixOrSuffix as P, Prefix as a, prefixTemplate as b, prefixOrSuffixTemplate as p };
|
package/shared/anchor.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { F as FoundationElement, _ as __decorate, a as attr, o as observable } from './index2.js';
|
|
2
|
+
import { a as applyMixins } from './apply-mixins.js';
|
|
3
|
+
import { A as ARIAGlobalStatesAndProperties, S as StartEnd } from './aria-global.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* An Anchor Custom HTML Element.
|
|
7
|
+
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element }.
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
class Anchor extends FoundationElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
/**
|
|
15
|
+
* Overrides the focus call for where delegatesFocus is unsupported.
|
|
16
|
+
* This check works for Chrome, Edge Chromium, FireFox, and Safari
|
|
17
|
+
* Relevant PR on the Firefox browser: https://phabricator.services.mozilla.com/D123858
|
|
18
|
+
*/
|
|
19
|
+
this.handleUnsupportedDelegatesFocus = () => {
|
|
20
|
+
var _a;
|
|
21
|
+
// Check to see if delegatesFocus is supported
|
|
22
|
+
if (window.ShadowRoot &&
|
|
23
|
+
!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus") && ((_a = this.$fastController.definition.shadowOptions) === null || _a === void 0 ? void 0 : _a.delegatesFocus)) {
|
|
24
|
+
this.focus = () => {
|
|
25
|
+
this.control.focus();
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
connectedCallback() {
|
|
34
|
+
super.connectedCallback();
|
|
35
|
+
this.handleUnsupportedDelegatesFocus();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
__decorate([
|
|
39
|
+
attr
|
|
40
|
+
], Anchor.prototype, "download", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
attr
|
|
43
|
+
], Anchor.prototype, "href", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
attr
|
|
46
|
+
], Anchor.prototype, "hreflang", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
attr
|
|
49
|
+
], Anchor.prototype, "ping", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
attr
|
|
52
|
+
], Anchor.prototype, "referrerpolicy", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
attr
|
|
55
|
+
], Anchor.prototype, "rel", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
attr
|
|
58
|
+
], Anchor.prototype, "target", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
attr
|
|
61
|
+
], Anchor.prototype, "type", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
observable
|
|
64
|
+
], Anchor.prototype, "defaultSlottedContent", void 0);
|
|
65
|
+
/**
|
|
66
|
+
* Includes ARIA states and properties relating to the ARIA link role
|
|
67
|
+
*
|
|
68
|
+
* @public
|
|
69
|
+
*/
|
|
70
|
+
class DelegatesARIALink {
|
|
71
|
+
}
|
|
72
|
+
__decorate([
|
|
73
|
+
attr({ attribute: "aria-expanded", mode: "fromView" })
|
|
74
|
+
], DelegatesARIALink.prototype, "ariaExpanded", void 0);
|
|
75
|
+
applyMixins(DelegatesARIALink, ARIAGlobalStatesAndProperties);
|
|
76
|
+
applyMixins(Anchor, StartEnd, DelegatesARIALink);
|
|
77
|
+
|
|
78
|
+
export { Anchor as A };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Apply mixins to a constructor.
|
|
3
|
+
* Sourced from {@link https://www.typescriptlang.org/docs/handbook/mixins.html | TypeScript Documentation }.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
function applyMixins(derivedCtor, ...baseCtors) {
|
|
7
|
+
baseCtors.forEach(baseCtor => {
|
|
8
|
+
Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {
|
|
9
|
+
if (name !== "constructor") {
|
|
10
|
+
Object.defineProperty(derivedCtor.prototype, name,
|
|
11
|
+
/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */
|
|
12
|
+
Object.getOwnPropertyDescriptor(baseCtor.prototype, name));
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
if (baseCtor.attributes) {
|
|
16
|
+
const existing = derivedCtor.attributes || [];
|
|
17
|
+
derivedCtor.attributes = existing.concat(baseCtor.attributes);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { applyMixins as a };
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { A as AttachedBehaviorHTMLDirective, h as html, _ as __decorate, a as attr } from './index2.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The runtime behavior for template references.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
class RefBehavior {
|
|
8
|
+
/**
|
|
9
|
+
* Creates an instance of RefBehavior.
|
|
10
|
+
* @param target - The element to reference.
|
|
11
|
+
* @param propertyName - The name of the property to assign the reference to.
|
|
12
|
+
*/
|
|
13
|
+
constructor(target, propertyName) {
|
|
14
|
+
this.target = target;
|
|
15
|
+
this.propertyName = propertyName;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Bind this behavior to the source.
|
|
19
|
+
* @param source - The source to bind to.
|
|
20
|
+
* @param context - The execution context that the binding is operating within.
|
|
21
|
+
*/
|
|
22
|
+
bind(source) {
|
|
23
|
+
source[this.propertyName] = this.target;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Unbinds this behavior from the source.
|
|
27
|
+
* @param source - The source to unbind from.
|
|
28
|
+
*/
|
|
29
|
+
/* eslint-disable-next-line @typescript-eslint/no-empty-function */
|
|
30
|
+
unbind() { }
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A directive that observes the updates a property with a reference to the element.
|
|
34
|
+
* @param propertyName - The name of the property to assign the reference to.
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
function ref(propertyName) {
|
|
38
|
+
return new AttachedBehaviorHTMLDirective("fast-ref", RefBehavior, propertyName);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* A mixin class implementing start and end elements.
|
|
43
|
+
* These are generally used to decorate text elements with icons or other visual indicators.
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
class StartEnd {
|
|
47
|
+
handleStartContentChange() {
|
|
48
|
+
this.startContainer.classList.toggle("start", this.start.assignedNodes().length > 0);
|
|
49
|
+
}
|
|
50
|
+
handleEndContentChange() {
|
|
51
|
+
this.endContainer.classList.toggle("end", this.end.assignedNodes().length > 0);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The template for the end element.
|
|
56
|
+
* For use with {@link StartEnd}
|
|
57
|
+
*
|
|
58
|
+
* @public
|
|
59
|
+
* @deprecated - use endSlotTemplate
|
|
60
|
+
*/
|
|
61
|
+
html `
|
|
62
|
+
<span part="end" ${ref("endContainer")}>
|
|
63
|
+
<slot
|
|
64
|
+
name="end"
|
|
65
|
+
${ref("end")}
|
|
66
|
+
@slotchange="${x => x.handleEndContentChange()}"
|
|
67
|
+
></slot>
|
|
68
|
+
</span>
|
|
69
|
+
`;
|
|
70
|
+
/**
|
|
71
|
+
* The template for the start element.
|
|
72
|
+
* For use with {@link StartEnd}
|
|
73
|
+
*
|
|
74
|
+
* @public
|
|
75
|
+
* @deprecated - use startSlotTemplate
|
|
76
|
+
*/
|
|
77
|
+
html `
|
|
78
|
+
<span part="start" ${ref("startContainer")}>
|
|
79
|
+
<slot
|
|
80
|
+
name="start"
|
|
81
|
+
${ref("start")}
|
|
82
|
+
@slotchange="${x => x.handleStartContentChange()}"
|
|
83
|
+
></slot>
|
|
84
|
+
</span>
|
|
85
|
+
`;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Some states and properties are applicable to all host language elements regardless of whether a role is applied.
|
|
89
|
+
* The following global states and properties are supported by all roles and by all base markup elements.
|
|
90
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#global_states}
|
|
91
|
+
*
|
|
92
|
+
* This is intended to be used as a mixin. Be sure you extend FASTElement.
|
|
93
|
+
*
|
|
94
|
+
* @public
|
|
95
|
+
*/
|
|
96
|
+
class ARIAGlobalStatesAndProperties {
|
|
97
|
+
}
|
|
98
|
+
__decorate([
|
|
99
|
+
attr({ attribute: "aria-atomic", mode: "fromView" })
|
|
100
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaAtomic", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
attr({ attribute: "aria-busy", mode: "fromView" })
|
|
103
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaBusy", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
attr({ attribute: "aria-controls", mode: "fromView" })
|
|
106
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaControls", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
attr({ attribute: "aria-current", mode: "fromView" })
|
|
109
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaCurrent", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
attr({ attribute: "aria-describedby", mode: "fromView" })
|
|
112
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaDescribedby", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
attr({ attribute: "aria-details", mode: "fromView" })
|
|
115
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaDetails", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
attr({ attribute: "aria-disabled", mode: "fromView" })
|
|
118
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaDisabled", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
attr({ attribute: "aria-errormessage", mode: "fromView" })
|
|
121
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaErrormessage", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
attr({ attribute: "aria-flowto", mode: "fromView" })
|
|
124
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaFlowto", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
attr({ attribute: "aria-haspopup", mode: "fromView" })
|
|
127
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaHaspopup", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
attr({ attribute: "aria-hidden", mode: "fromView" })
|
|
130
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaHidden", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
attr({ attribute: "aria-invalid", mode: "fromView" })
|
|
133
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaInvalid", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
attr({ attribute: "aria-keyshortcuts", mode: "fromView" })
|
|
136
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaKeyshortcuts", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
attr({ attribute: "aria-label", mode: "fromView" })
|
|
139
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaLabel", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
attr({ attribute: "aria-labelledby", mode: "fromView" })
|
|
142
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaLabelledby", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
attr({ attribute: "aria-live", mode: "fromView" })
|
|
145
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaLive", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
attr({ attribute: "aria-owns", mode: "fromView" })
|
|
148
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaOwns", void 0);
|
|
149
|
+
__decorate([
|
|
150
|
+
attr({ attribute: "aria-relevant", mode: "fromView" })
|
|
151
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaRelevant", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
attr({ attribute: "aria-roledescription", mode: "fromView" })
|
|
154
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaRoledescription", void 0);
|
|
155
|
+
|
|
156
|
+
export { ARIAGlobalStatesAndProperties as A, StartEnd as S, ref as r };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
function classNames(...args) {
|
|
2
|
+
return args.reduce((accum, value) => {
|
|
3
|
+
const leadingChar = accum.length ? " " : "";
|
|
4
|
+
const normalizedValue = Array.isArray(value) && value[1]
|
|
5
|
+
? classNames.call(null, value[0])
|
|
6
|
+
: typeof value === "function"
|
|
7
|
+
? value()
|
|
8
|
+
: typeof value === "string"
|
|
9
|
+
? value
|
|
10
|
+
: "";
|
|
11
|
+
return !normalizedValue.length ? accum : accum + leadingChar + normalizedValue;
|
|
12
|
+
}, "");
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { classNames as c };
|