@vonage/vivid 3.0.0-test.0 → 3.0.1
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 +176 -4
- package/accordion/index.js +22 -61
- package/accordion-item/index.js +16 -123
- package/action-group/index.js +5 -0
- package/avatar/index.js +11 -0
- package/badge/index.js +9 -60
- package/banner/index.js +20 -208
- package/breadcrumb/index.js +7 -96
- package/breadcrumb-item/index.js +15 -48
- package/button/index.js +19 -758
- package/calendar/index.js +5 -1519
- package/calendar-event/index.js +9 -0
- package/card/index.js +13 -0
- package/checkbox/index.js +16 -0
- package/combobox/index.js +35 -0
- package/dialog/index.js +24 -0
- package/divider/index.js +6 -0
- package/elevation/index.js +4 -30
- package/fab/index.js +22 -0
- package/focus/index.js +4 -2
- package/header/index.js +6 -0
- package/icon/index.js +8 -32
- package/index.js +76 -25
- package/layout/index.js +4 -52
- package/lib/accordion/accordion.d.ts +3 -7
- package/lib/accordion/accordion.template.d.ts +1 -2
- package/lib/accordion/definition.d.ts +1 -0
- package/lib/accordion/index.d.ts +1 -2
- package/lib/accordion-item/accordion-item.d.ts +4 -8
- package/lib/accordion-item/accordion-item.template.d.ts +4 -4
- package/lib/accordion-item/definition.d.ts +1 -0
- package/lib/accordion-item/index.d.ts +1 -3
- package/lib/action-group/action-group.d.ts +10 -0
- package/lib/{sidenav-item/sidenav-item.template.d.ts → action-group/action-group.template.d.ts} +2 -2
- package/lib/action-group/definition.d.ts +1 -0
- package/lib/action-group/index.d.ts +1 -0
- package/lib/avatar/avatar.d.ts +15 -0
- package/lib/avatar/avatar.template.d.ts +4 -0
- package/lib/avatar/definition.d.ts +1 -0
- package/lib/avatar/index.d.ts +1 -0
- package/lib/badge/badge.d.ts +4 -6
- package/lib/badge/definition.d.ts +3 -0
- package/lib/badge/index.d.ts +1 -3
- package/lib/banner/banner.d.ts +1 -1
- package/lib/banner/banner.template.d.ts +0 -2
- package/lib/banner/definition.d.ts +1 -0
- package/lib/banner/index.d.ts +1 -2
- package/lib/breadcrumb/breadcrumb.template.d.ts +4 -0
- package/lib/breadcrumb/definition.d.ts +1 -0
- package/lib/breadcrumb/index.d.ts +1 -2
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/lib/breadcrumb-item/definition.d.ts +1 -0
- package/lib/breadcrumb-item/index.d.ts +1 -3
- package/lib/button/button.d.ts +4 -3
- package/lib/button/definition.d.ts +1 -0
- package/lib/button/index.d.ts +1 -21
- package/lib/calendar/calendar.d.ts +3 -1
- package/lib/calendar/definition.d.ts +1 -0
- package/lib/calendar/index.d.ts +1 -3
- package/lib/calendar-event/calendar-event.d.ts +14 -0
- package/lib/calendar-event/calendar-event.template.d.ts +4 -0
- package/lib/calendar-event/definition.d.ts +1 -0
- package/lib/calendar-event/index.d.ts +1 -0
- package/lib/card/card.d.ts +10 -0
- package/lib/{text/text.template.d.ts → card/card.template.d.ts} +2 -2
- package/lib/card/definition.d.ts +1 -0
- package/lib/card/index.d.ts +1 -0
- package/lib/checkbox/checkbox.d.ts +5 -0
- package/lib/checkbox/checkbox.template.d.ts +4 -0
- package/lib/checkbox/definition.d.ts +1 -0
- package/lib/checkbox/index.d.ts +1 -0
- package/lib/combobox/combobox.d.ts +14 -0
- package/lib/combobox/combobox.template.d.ts +4 -0
- package/lib/combobox/definition.d.ts +3 -0
- package/lib/combobox/index.d.ts +1 -0
- package/lib/components.d.ts +44 -16
- package/lib/dialog/definition.d.ts +1 -0
- package/lib/dialog/dialog.d.ts +23 -0
- package/lib/dialog/dialog.template.d.ts +4 -0
- package/lib/dialog/index.d.ts +1 -0
- package/lib/divider/definition.d.ts +1 -0
- package/lib/divider/divider.d.ts +3 -0
- package/lib/divider/divider.template.d.ts +4 -0
- package/lib/divider/index.d.ts +1 -0
- package/lib/elevation/definition.d.ts +1 -0
- package/lib/elevation/elevation.d.ts +1 -0
- package/lib/elevation/index.d.ts +1 -2
- package/lib/enums.d.ts +20 -6
- package/lib/fab/definition.d.ts +3 -0
- package/lib/fab/fab.d.ts +13 -0
- package/lib/fab/fab.template.d.ts +4 -0
- package/lib/fab/index.d.ts +1 -0
- package/lib/focus/definition.d.ts +3 -0
- package/lib/focus/index.d.ts +1 -2
- package/lib/{sidenav-item/index.d.ts → header/definition.d.ts} +2 -2
- package/lib/header/header.d.ts +5 -0
- package/lib/header/header.template.d.ts +4 -0
- package/lib/header/index.d.ts +1 -0
- package/lib/icon/definition.d.ts +3 -0
- package/lib/icon/icon.d.ts +5 -6
- package/lib/icon/index.d.ts +1 -2
- package/lib/layout/definition.d.ts +3 -0
- package/lib/layout/index.d.ts +1 -2
- package/lib/layout/layout.d.ts +4 -4
- package/lib/listbox/definition.d.ts +3 -0
- package/lib/listbox/index.d.ts +1 -0
- package/lib/listbox/listbox.d.ts +6 -0
- package/lib/listbox/listbox.template.d.ts +4 -0
- package/lib/menu/definition.d.ts +11 -0
- package/lib/menu/index.d.ts +1 -0
- package/lib/menu/menu.d.ts +10 -0
- package/lib/menu/menu.template.d.ts +3 -0
- package/lib/menu-item/definition.d.ts +3 -0
- package/lib/menu-item/index.d.ts +1 -0
- package/lib/menu-item/menu-item.d.ts +8 -0
- package/lib/menu-item/menu-item.template.d.ts +5 -0
- package/lib/nav/definition.d.ts +3 -0
- package/lib/nav/index.d.ts +1 -0
- package/lib/nav/nav.d.ts +3 -0
- package/lib/nav/nav.template.d.ts +4 -0
- package/lib/nav-disclosure/definition.d.ts +3 -0
- package/lib/nav-disclosure/index.d.ts +1 -0
- package/lib/nav-disclosure/nav-disclosure.d.ts +10 -0
- package/lib/nav-disclosure/nav-disclosure.template.d.ts +4 -0
- package/lib/nav-item/definition.d.ts +3 -0
- package/lib/nav-item/index.d.ts +1 -0
- package/lib/{sidenav-item/sidenav-item.d.ts → nav-item/nav-item.d.ts} +2 -2
- package/lib/nav-item/nav-item.template.d.ts +4 -0
- package/lib/note/definition.d.ts +3 -0
- package/lib/note/index.d.ts +1 -0
- package/lib/note/note.d.ts +10 -0
- package/lib/note/note.template.d.ts +4 -0
- package/lib/number-field/definition.d.ts +4 -0
- package/lib/number-field/index.d.ts +1 -0
- package/lib/number-field/number-field.d.ts +14 -0
- package/lib/number-field/number-field.template.d.ts +4 -0
- package/lib/option/definition.d.ts +3 -0
- package/lib/option/index.d.ts +1 -0
- package/lib/option/option.d.ts +9 -0
- package/lib/option/option.template.d.ts +4 -0
- package/lib/popup/definition.d.ts +4 -0
- package/lib/popup/index.d.ts +1 -4
- package/lib/popup/popup.d.ts +8 -4
- package/lib/progress/definition.d.ts +3 -0
- package/lib/progress/index.d.ts +1 -2
- package/lib/progress/progress.d.ts +1 -1
- package/lib/progress-ring/definition.d.ts +3 -0
- package/lib/progress-ring/index.d.ts +1 -2
- package/lib/progress-ring/progress-ring.d.ts +2 -1
- package/lib/radio/definition.d.ts +3 -0
- package/lib/radio/index.d.ts +1 -0
- package/lib/radio/radio.d.ts +4 -0
- package/lib/radio/radio.template.d.ts +4 -0
- package/lib/radio-group/definition.d.ts +11 -0
- package/lib/radio-group/index.d.ts +1 -0
- package/lib/radio-group/radio-group.d.ts +4 -0
- package/lib/radio-group/radio-group.template.d.ts +4 -0
- package/lib/select/definition.d.ts +3 -0
- package/lib/select/index.d.ts +1 -0
- package/lib/select/select.d.ts +17 -0
- package/lib/select/select.template.d.ts +4 -0
- package/lib/side-drawer/definition.d.ts +3 -0
- package/lib/side-drawer/index.d.ts +1 -2
- package/lib/side-drawer/side-drawer.d.ts +3 -2
- package/lib/slider/definition.d.ts +3 -0
- package/lib/slider/index.d.ts +1 -0
- package/lib/slider/slider.d.ts +4 -0
- package/lib/slider/slider.template.d.ts +4 -0
- package/lib/switch/definition.d.ts +3 -0
- package/lib/switch/index.d.ts +1 -0
- package/lib/switch/switch.d.ts +7 -0
- package/lib/switch/switch.template.d.ts +4 -0
- package/lib/tab/definition.d.ts +3 -0
- package/lib/tab/index.d.ts +1 -0
- package/lib/tab/tab.d.ts +9 -0
- package/lib/tab/tab.template.d.ts +3 -0
- package/lib/tab-panel/definition.d.ts +3 -0
- package/lib/tab-panel/index.d.ts +1 -0
- package/lib/tab-panel/tab-panel.d.ts +3 -0
- package/lib/tab-panel/tab-panel.template.d.ts +2 -0
- package/lib/tabs/definition.d.ts +3 -0
- package/lib/tabs/index.d.ts +1 -0
- package/lib/tabs/tabs.d.ts +10 -0
- package/lib/tabs/tabs.template.d.ts +2 -0
- package/lib/text-anchor/definition.d.ts +3 -0
- package/lib/text-anchor/index.d.ts +1 -2
- package/lib/text-anchor/text-anchor.d.ts +1 -1
- package/lib/text-area/definition.d.ts +3 -0
- package/lib/text-area/index.d.ts +1 -0
- package/lib/text-area/text-area.d.ts +9 -0
- package/lib/text-area/text-area.template.d.ts +4 -0
- package/lib/text-field/definition.d.ts +3 -0
- package/lib/text-field/index.d.ts +1 -0
- package/lib/text-field/text-field.d.ts +14 -0
- package/lib/text-field/text-field.template.d.ts +4 -0
- package/lib/tooltip/definition.d.ts +3 -0
- package/lib/tooltip/index.d.ts +1 -3
- package/lib/tooltip/tooltip.d.ts +7 -7
- package/listbox/index.js +27 -0
- package/menu/index.js +30 -0
- package/menu-item/index.js +20 -0
- package/nav/index.js +4 -0
- package/nav-disclosure/index.js +17 -0
- package/nav-item/index.js +22 -0
- package/note/index.js +15 -0
- package/number-field/index.js +459 -0
- package/option/index.js +21 -0
- package/package.json +29 -19
- package/popup/index.js +21 -2061
- package/progress/index.js +6 -97
- package/progress-ring/index.js +6 -75
- package/radio/index.js +12 -0
- package/radio-group/index.js +11 -0
- package/select/index.js +34 -0
- package/shared/affix.js +2 -8
- package/shared/anchor.js +10 -2
- package/shared/apply-mixins.js +5 -4
- package/shared/aria-global.js +2 -86
- package/shared/aria.js +9 -0
- package/shared/base-progress.js +5 -0
- package/shared/breadcrumb-item.js +1 -1
- package/shared/button.js +200 -0
- package/shared/calendar-event.js +19 -0
- package/shared/definition.js +225 -0
- package/shared/definition10.js +99 -0
- package/shared/definition11.js +48 -0
- package/shared/definition12.js +1523 -0
- package/shared/definition13.js +111 -0
- package/shared/definition14.js +114 -0
- package/shared/definition15.js +32 -0
- package/shared/definition16.js +172 -0
- package/shared/definition17.js +727 -0
- package/shared/definition18.js +1842 -0
- package/shared/definition19.js +261 -0
- package/shared/definition2.js +150 -0
- package/shared/definition20.js +221 -0
- package/shared/definition21.js +78 -0
- package/shared/definition22.js +87 -0
- package/shared/definition23.js +58 -0
- package/shared/definition24.js +44 -0
- package/shared/definition25.js +58 -0
- package/shared/definition26.js +348 -0
- package/shared/definition27.js +363 -0
- package/shared/definition28.js +21 -0
- package/shared/definition29.js +75 -0
- package/shared/definition3.js +29 -0
- package/shared/definition30.js +31 -0
- package/shared/definition31.js +49 -0
- package/shared/definition32.js +94 -0
- package/shared/definition33.js +77 -0
- package/shared/definition34.js +45 -0
- package/shared/definition35.js +435 -0
- package/shared/definition36.js +634 -0
- package/shared/definition37.js +86 -0
- package/shared/definition38.js +592 -0
- package/shared/definition39.js +147 -0
- package/shared/definition4.js +19 -0
- package/shared/definition40.js +67 -0
- package/shared/definition41.js +32 -0
- package/shared/definition42.js +440 -0
- package/shared/definition43.js +282 -0
- package/shared/definition44.js +119 -0
- package/shared/definition45.js +77 -0
- package/shared/definition5.js +38 -0
- package/shared/definition6.js +60 -0
- package/shared/definition7.js +45 -0
- package/shared/definition8.js +113 -0
- package/shared/definition9.js +107 -0
- package/shared/design-system/index.d.ts +1 -1
- package/shared/dialog-polyfill.esm.js +858 -0
- package/shared/direction.js +20 -0
- package/shared/dom.js +8 -0
- package/shared/enums.js +70 -0
- package/shared/es.object.assign.js +2 -2
- package/shared/es.regexp.to-string.js +59 -0
- package/shared/focus.js +5 -0
- package/shared/focus2.js +11 -0
- package/shared/form-associated.js +466 -0
- package/shared/form-elements.js +127 -0
- package/shared/icon.js +538 -572
- package/shared/index.js +1664 -83
- package/shared/key-codes.js +97 -0
- package/shared/listbox.js +995 -0
- package/shared/numbers.js +34 -0
- package/shared/patterns/affix.d.ts +1 -1
- package/shared/patterns/focus.d.ts +3 -0
- package/shared/patterns/form-elements/form-elements.d.ts +43 -0
- package/shared/patterns/form-elements/index.d.ts +1 -0
- package/shared/patterns/index.d.ts +2 -0
- package/shared/radio.js +127 -0
- package/shared/ref.js +41 -0
- package/shared/select.options.js +10 -0
- package/shared/start-end.js +50 -0
- package/shared/string-trim.js +40 -0
- package/shared/strings.js +9 -0
- package/shared/text-anchor.js +2 -13
- package/shared/text-anchor.template.js +6 -5
- package/shared/text-field.js +3 -0
- package/shared/text-field2.js +225 -0
- package/shared/to-string.js +51 -0
- package/side-drawer/index.js +5 -80
- package/slider/index.js +17 -0
- package/styles/core/all.css +83 -0
- package/styles/core/theme.css +11 -0
- package/styles/core/typography.css +77 -0
- package/styles/tokens/theme-dark.css +228 -0
- package/styles/tokens/theme-light.css +228 -0
- package/switch/index.js +18 -0
- package/tab/index.js +16 -0
- package/tab-panel/index.js +4 -0
- package/tabs/index.js +24 -0
- package/text-anchor/index.js +11 -5
- package/text-area/index.js +23 -0
- package/text-field/index.js +24 -0
- package/tooltip/index.js +18 -57
- package/lib/text/index.d.ts +0 -2
- package/lib/text/text.d.ts +0 -10
- package/shared/index2.js +0 -21
- package/shared/style-inject.es.js +0 -28
- package/shared/web.dom-collections.iterator.js +0 -1479
- package/sidenav-item/index.js +0 -38
- package/styles/fonts/spezia.css +0 -23
- package/styles/themes/dark.css +0 -205
- package/styles/themes/light.css +0 -205
- package/text/index.js +0 -45
package/banner/index.js
CHANGED
|
@@ -1,212 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import '../shared/
|
|
4
|
-
import
|
|
5
|
-
import { a as applyMixins } from '../shared/apply-mixins.js';
|
|
6
|
-
import '../button/index.js';
|
|
7
|
-
import '../text-anchor/index.js';
|
|
8
|
-
import { w as when } from '../shared/when.js';
|
|
9
|
-
import { c as classNames } from '../shared/class-names.js';
|
|
1
|
+
import { r as registerBanner } from '../shared/definition8.js';
|
|
2
|
+
import '../shared/index.js';
|
|
3
|
+
import '../shared/definition9.js';
|
|
4
|
+
import '../shared/definition3.js';
|
|
10
5
|
import '../shared/icon.js';
|
|
6
|
+
import '../shared/to-string.js';
|
|
7
|
+
import '../shared/string-trim.js';
|
|
11
8
|
import '../shared/_has.js';
|
|
12
|
-
import '../
|
|
13
|
-
import '../shared/
|
|
9
|
+
import '../shared/class-names.js';
|
|
10
|
+
import '../shared/when.js';
|
|
11
|
+
import '../shared/definition4.js';
|
|
12
|
+
import '../shared/focus.js';
|
|
13
|
+
import '../shared/affix.js';
|
|
14
|
+
import '../shared/button.js';
|
|
15
|
+
import '../shared/apply-mixins.js';
|
|
16
|
+
import '../shared/form-associated.js';
|
|
17
|
+
import '../shared/key-codes.js';
|
|
14
18
|
import '../shared/aria-global.js';
|
|
15
|
-
import '../shared/
|
|
16
|
-
import '../shared/
|
|
17
|
-
import '../shared/
|
|
19
|
+
import '../shared/start-end.js';
|
|
20
|
+
import '../shared/ref.js';
|
|
21
|
+
import '../shared/focus2.js';
|
|
22
|
+
import '../shared/enums.js';
|
|
18
23
|
|
|
19
|
-
|
|
20
|
-
styleInject(css_248z);
|
|
21
|
-
|
|
22
|
-
var Connotation;
|
|
23
|
-
|
|
24
|
-
(function (Connotation) {
|
|
25
|
-
Connotation["Primary"] = "primary";
|
|
26
|
-
Connotation["CTA"] = "cta";
|
|
27
|
-
Connotation["Success"] = "success";
|
|
28
|
-
Connotation["Alert"] = "alert";
|
|
29
|
-
Connotation["Warning"] = "warning";
|
|
30
|
-
Connotation["Info"] = "info";
|
|
31
|
-
Connotation["Announcement"] = "announcement";
|
|
32
|
-
})(Connotation || (Connotation = {}));
|
|
33
|
-
|
|
34
|
-
var ConnotationDecorative;
|
|
35
|
-
|
|
36
|
-
(function (ConnotationDecorative) {
|
|
37
|
-
ConnotationDecorative["Pacific"] = "pacific";
|
|
38
|
-
})(ConnotationDecorative || (ConnotationDecorative = {}));
|
|
39
|
-
|
|
40
|
-
var Shape;
|
|
41
|
-
|
|
42
|
-
(function (Shape) {
|
|
43
|
-
Shape["Rounded"] = "rounded";
|
|
44
|
-
Shape["Pill"] = "pill";
|
|
45
|
-
Shape["Circled"] = "circled";
|
|
46
|
-
Shape["Sharp"] = "sharp";
|
|
47
|
-
})(Shape || (Shape = {}));
|
|
48
|
-
|
|
49
|
-
var Appearance;
|
|
50
|
-
|
|
51
|
-
(function (Appearance) {
|
|
52
|
-
Appearance["Text"] = "text";
|
|
53
|
-
Appearance["Filled"] = "filled";
|
|
54
|
-
Appearance["Outlined"] = "outlined";
|
|
55
|
-
Appearance["Subtle"] = "subtle";
|
|
56
|
-
Appearance["Ghost"] = "ghost";
|
|
57
|
-
})(Appearance || (Appearance = {}));
|
|
58
|
-
|
|
59
|
-
var Size;
|
|
60
|
-
|
|
61
|
-
(function (Size) {
|
|
62
|
-
Size["BaseSmall"] = "base-small";
|
|
63
|
-
Size["Base"] = "base";
|
|
64
|
-
Size["BaseLarge"] = "base-large";
|
|
65
|
-
})(Size || (Size = {}));
|
|
66
|
-
|
|
67
|
-
var Position;
|
|
68
|
-
|
|
69
|
-
(function (Position) {
|
|
70
|
-
Position["Top"] = "TOP";
|
|
71
|
-
Position["Bottom"] = "BOTTOM";
|
|
72
|
-
Position["Start"] = "START";
|
|
73
|
-
Position["Center"] = "CENTER";
|
|
74
|
-
Position["End"] = "END";
|
|
75
|
-
})(Position || (Position = {}));
|
|
76
|
-
|
|
77
|
-
var Role;
|
|
78
|
-
|
|
79
|
-
(function (Role) {
|
|
80
|
-
Role["Status"] = "status";
|
|
81
|
-
Role["Alert"] = "alert";
|
|
82
|
-
})(Role || (Role = {}));
|
|
83
|
-
|
|
84
|
-
var AriaLive;
|
|
85
|
-
|
|
86
|
-
(function (AriaLive) {
|
|
87
|
-
AriaLive["Polite"] = "polite";
|
|
88
|
-
AriaLive["Assertive"] = "assertive";
|
|
89
|
-
})(AriaLive || (AriaLive = {}));
|
|
90
|
-
|
|
91
|
-
var _Banner_handleRemoveEnd, _Banner_closeOnKeyDown;
|
|
92
|
-
const connotationIconMap = new Map([[Connotation.Info, 'info-solid'], [Connotation.Announcement, 'megaphone-solid'], [Connotation.Success, 'check-circle-solid'], [Connotation.Warning, 'warning-solid'], [Connotation.Alert, 'error-solid']]);
|
|
93
|
-
|
|
94
|
-
const defaultConnotation = (connotation = Connotation.Info) => connotationIconMap.get(connotation);
|
|
95
|
-
|
|
96
|
-
class Banner extends FoundationElement {
|
|
97
|
-
constructor() {
|
|
98
|
-
super(...arguments);
|
|
99
|
-
this.removable = false;
|
|
100
|
-
|
|
101
|
-
_Banner_handleRemoveEnd.set(this, () => {
|
|
102
|
-
this.$emit('vwc-banner:removed');
|
|
103
|
-
this.parentElement && this.parentElement.removeChild(this);
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
_Banner_closeOnKeyDown.set(this, e => {
|
|
107
|
-
if (e.key !== 'Escape' || !this.removable) {
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
this.remove();
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
get conditionedIcon() {
|
|
116
|
-
var _a;
|
|
117
|
-
|
|
118
|
-
return (_a = this.icon) !== null && _a !== void 0 ? _a : defaultConnotation(this.connotation);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
connectedCallback() {
|
|
122
|
-
super.connectedCallback();
|
|
123
|
-
this.addEventListener('keydown', __classPrivateFieldGet(this, _Banner_closeOnKeyDown, "f"));
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
disconnectedCallback() {
|
|
127
|
-
super.disconnectedCallback();
|
|
128
|
-
this.removeEventListener('keydown', __classPrivateFieldGet(this, _Banner_closeOnKeyDown, "f"));
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
remove() {
|
|
132
|
-
this.$emit('vwc-banner:removing');
|
|
133
|
-
const banner = this.shadowRoot && this.shadowRoot.querySelector('.banner');
|
|
134
|
-
|
|
135
|
-
if (banner) {
|
|
136
|
-
banner.classList.add('removing');
|
|
137
|
-
banner.addEventListener('transitionend', __classPrivateFieldGet(this, _Banner_handleRemoveEnd, "f"));
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
_Banner_handleRemoveEnd = new WeakMap(), _Banner_closeOnKeyDown = new WeakMap();
|
|
143
|
-
|
|
144
|
-
__decorate([attr({
|
|
145
|
-
attribute: 'action-href'
|
|
146
|
-
}), __metadata("design:type", Object)], Banner.prototype, "actionHref", void 0);
|
|
147
|
-
|
|
148
|
-
__decorate([attr({
|
|
149
|
-
attribute: 'action-text'
|
|
150
|
-
}), __metadata("design:type", Object)], Banner.prototype, "actionText", void 0);
|
|
151
|
-
|
|
152
|
-
__decorate([attr({
|
|
153
|
-
mode: 'boolean'
|
|
154
|
-
}), __metadata("design:type", Object)], Banner.prototype, "removable", void 0);
|
|
155
|
-
|
|
156
|
-
__decorate([attr({
|
|
157
|
-
attribute: 'aria-live'
|
|
158
|
-
}), __metadata("design:type", Object)], Banner.prototype, "ariaLive", void 0);
|
|
159
|
-
|
|
160
|
-
__decorate([attr(), __metadata("design:type", Object)], Banner.prototype, "role", void 0);
|
|
161
|
-
|
|
162
|
-
__decorate([attr(), __metadata("design:type", Object)], Banner.prototype, "text", void 0);
|
|
163
|
-
|
|
164
|
-
__decorate([attr(), __metadata("design:type", Object)], Banner.prototype, "connotation", void 0);
|
|
165
|
-
|
|
166
|
-
applyMixins(Banner, AffixIcon);
|
|
167
|
-
|
|
168
|
-
let _2 = t => t,
|
|
169
|
-
_t,
|
|
170
|
-
_t2;
|
|
171
|
-
|
|
172
|
-
const getClasses = _ => classNames('control', [`connotation-${_.connotation}`, !!_.connotation]);
|
|
173
|
-
|
|
174
|
-
function renderDismissButton() {
|
|
175
|
-
return html(_t || (_t = _2`
|
|
176
|
-
<vwc-button
|
|
177
|
-
size="base-small"
|
|
178
|
-
class="dismiss-button"
|
|
179
|
-
icon="close-line"
|
|
180
|
-
@click="${0}">
|
|
181
|
-
</vwc-button>`), x => x.remove());
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
const BannerTemplate = context => {
|
|
185
|
-
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
186
|
-
return html(_t2 || (_t2 = _2`
|
|
187
|
-
<div class="banner ${0}" tabindex="0">
|
|
188
|
-
<header class="header">
|
|
189
|
-
<div class="user-content">
|
|
190
|
-
${0}
|
|
191
|
-
<div class="banner--message"
|
|
192
|
-
role="${0}"
|
|
193
|
-
aria-live="${0}">
|
|
194
|
-
${0}
|
|
195
|
-
</div>
|
|
196
|
-
<slot class="action-items" name="actionItems"></slot>
|
|
197
|
-
</div>
|
|
198
|
-
|
|
199
|
-
${0}
|
|
200
|
-
</header>
|
|
201
|
-
</div>
|
|
202
|
-
`), getClasses, x => affixIconTemplate(x.conditionedIcon), x => x.role ? x.role : 'status', x => x.ariaLive ? x.ariaLive : 'polite', x => x.text, when(x => x.removable, renderDismissButton()));
|
|
203
|
-
};
|
|
204
|
-
|
|
205
|
-
const vividBanner = Banner.compose({
|
|
206
|
-
baseName: 'banner',
|
|
207
|
-
template: BannerTemplate,
|
|
208
|
-
styles: css_248z
|
|
209
|
-
});
|
|
210
|
-
designSystem.register(vividBanner());
|
|
211
|
-
|
|
212
|
-
export { vividBanner };
|
|
24
|
+
registerBanner();
|
package/breadcrumb/index.js
CHANGED
|
@@ -1,100 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { r as registerBreadcrumb } from '../shared/definition10.js';
|
|
2
|
+
import '../shared/index.js';
|
|
3
|
+
import '../shared/slotted.js';
|
|
4
|
+
import '../shared/breadcrumb-item.js';
|
|
5
5
|
import '../shared/anchor.js';
|
|
6
6
|
import '../shared/apply-mixins.js';
|
|
7
7
|
import '../shared/aria-global.js';
|
|
8
|
+
import '../shared/start-end.js';
|
|
9
|
+
import '../shared/ref.js';
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
* The template for the {@link @microsoft/fast-foundation#Breadcrumb} component.
|
|
11
|
-
* @public
|
|
12
|
-
*/
|
|
13
|
-
const breadcrumbTemplate = (context, definition) => html `
|
|
14
|
-
<template role="navigation">
|
|
15
|
-
<div role="list" class="list" part="list">
|
|
16
|
-
<slot
|
|
17
|
-
${slotted({ property: "slottedBreadcrumbItems", filter: elements() })}
|
|
18
|
-
></slot>
|
|
19
|
-
</div>
|
|
20
|
-
</template>
|
|
21
|
-
`;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* A Breadcrumb Custom HTML Element.
|
|
25
|
-
*
|
|
26
|
-
* @public
|
|
27
|
-
*/
|
|
28
|
-
class Breadcrumb$1 extends FoundationElement {
|
|
29
|
-
slottedBreadcrumbItemsChanged() {
|
|
30
|
-
if (this.$fastController.isConnected) {
|
|
31
|
-
if (this.slottedBreadcrumbItems === undefined ||
|
|
32
|
-
this.slottedBreadcrumbItems.length === 0) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
const lastNode = this.slottedBreadcrumbItems[this.slottedBreadcrumbItems.length - 1];
|
|
36
|
-
this.slottedBreadcrumbItems.forEach((item) => {
|
|
37
|
-
const itemIsLastNode = item === lastNode;
|
|
38
|
-
this.setItemSeparator(item, itemIsLastNode);
|
|
39
|
-
this.setAriaCurrent(item, itemIsLastNode);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
setItemSeparator(item, isLastNode) {
|
|
44
|
-
if (item instanceof BreadcrumbItem) {
|
|
45
|
-
item.separator = !isLastNode;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Finds href on childnodes in the light DOM or shadow DOM.
|
|
50
|
-
* We look in the shadow DOM because we insert an anchor when breadcrumb-item has an href.
|
|
51
|
-
*/
|
|
52
|
-
findChildWithHref(node) {
|
|
53
|
-
var _a, _b;
|
|
54
|
-
if (node.childElementCount > 0) {
|
|
55
|
-
return node.querySelector("a[href]");
|
|
56
|
-
}
|
|
57
|
-
else if ((_a = node.shadowRoot) === null || _a === void 0 ? void 0 : _a.childElementCount) {
|
|
58
|
-
return (_b = node.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector("a[href]");
|
|
59
|
-
}
|
|
60
|
-
else
|
|
61
|
-
return null;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Sets ARIA Current for the current node
|
|
65
|
-
* If child node with an anchor tag and with href is found then set aria-current to correct value for the child node,
|
|
66
|
-
* otherwise apply aria-current to the host element, with an href
|
|
67
|
-
*/
|
|
68
|
-
setAriaCurrent(item, isLastNode) {
|
|
69
|
-
const childNodeWithHref = this.findChildWithHref(item);
|
|
70
|
-
if (childNodeWithHref === null &&
|
|
71
|
-
item.hasAttribute("href") &&
|
|
72
|
-
item instanceof BreadcrumbItem) {
|
|
73
|
-
isLastNode
|
|
74
|
-
? item.setAttribute("aria-current", "page")
|
|
75
|
-
: item.removeAttribute("aria-current");
|
|
76
|
-
}
|
|
77
|
-
else if (childNodeWithHref !== null) {
|
|
78
|
-
isLastNode
|
|
79
|
-
? childNodeWithHref.setAttribute("aria-current", "page")
|
|
80
|
-
: childNodeWithHref.removeAttribute("aria-current");
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
__decorate([
|
|
85
|
-
observable
|
|
86
|
-
], Breadcrumb$1.prototype, "slottedBreadcrumbItems", void 0);
|
|
87
|
-
|
|
88
|
-
var css_248z = ".list {\n display: flex;\n}";
|
|
89
|
-
styleInject(css_248z);
|
|
90
|
-
|
|
91
|
-
class Breadcrumb extends Breadcrumb$1 {}
|
|
92
|
-
|
|
93
|
-
const vividBreadcrumb = Breadcrumb.compose({
|
|
94
|
-
baseName: 'breadcrumb',
|
|
95
|
-
template: breadcrumbTemplate,
|
|
96
|
-
styles: css_248z
|
|
97
|
-
});
|
|
98
|
-
designSystem.register(vividBreadcrumb());
|
|
99
|
-
|
|
100
|
-
export { vividBreadcrumb };
|
|
11
|
+
registerBreadcrumb();
|
package/breadcrumb-item/index.js
CHANGED
|
@@ -1,55 +1,22 @@
|
|
|
1
|
-
import '../
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { B as BreadcrumbItem$1 } from '../shared/breadcrumb-item.js';
|
|
5
|
-
import { t as textAnchorTemplate } from '../shared/text-anchor.template.js';
|
|
6
|
-
import { w as when } from '../shared/when.js';
|
|
7
|
-
import { c as classNames } from '../shared/class-names.js';
|
|
1
|
+
import { r as registerBreadcrumbItem } from '../shared/definition11.js';
|
|
2
|
+
import '../shared/index.js';
|
|
3
|
+
import '../shared/definition3.js';
|
|
8
4
|
import '../shared/icon.js';
|
|
9
|
-
import '../shared/
|
|
5
|
+
import '../shared/to-string.js';
|
|
6
|
+
import '../shared/string-trim.js';
|
|
10
7
|
import '../shared/_has.js';
|
|
8
|
+
import '../shared/class-names.js';
|
|
9
|
+
import '../shared/when.js';
|
|
10
|
+
import '../shared/definition4.js';
|
|
11
|
+
import '../shared/focus.js';
|
|
12
|
+
import '../shared/breadcrumb-item.js';
|
|
11
13
|
import '../shared/anchor.js';
|
|
12
14
|
import '../shared/apply-mixins.js';
|
|
13
15
|
import '../shared/aria-global.js';
|
|
16
|
+
import '../shared/start-end.js';
|
|
17
|
+
import '../shared/ref.js';
|
|
18
|
+
import '../shared/text-anchor.template.js';
|
|
14
19
|
import '../shared/affix.js';
|
|
20
|
+
import '../shared/focus2.js';
|
|
15
21
|
|
|
16
|
-
|
|
17
|
-
styleInject(css_248z);
|
|
18
|
-
|
|
19
|
-
class BreadcrumbItem extends BreadcrumbItem$1 {
|
|
20
|
-
constructor() {
|
|
21
|
-
super();
|
|
22
|
-
this.text = '';
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
__decorate([attr({
|
|
28
|
-
mode: 'fromView'
|
|
29
|
-
}), __metadata("design:type", String)], BreadcrumbItem.prototype, "text", void 0);
|
|
30
|
-
|
|
31
|
-
let _2 = t => t,
|
|
32
|
-
_t,
|
|
33
|
-
_t2,
|
|
34
|
-
_t3,
|
|
35
|
-
_t4;
|
|
36
|
-
|
|
37
|
-
const getClasses = _ => classNames('control', 'breadcrumb-item');
|
|
38
|
-
|
|
39
|
-
const BreadcrumbItemTemplate = (context, definition) => html(_t || (_t = _2`
|
|
40
|
-
<div roll="listitem" part="listitem" class="${0}">
|
|
41
|
-
${0}
|
|
42
|
-
|
|
43
|
-
${0}
|
|
44
|
-
|
|
45
|
-
${0}
|
|
46
|
-
</div>`), getClasses, when(x => x.text && !x.href, html(_t2 || (_t2 = _2`${0}`), x => x.text)), when(x => x.text && x.href && x.href.length > 0, html(_t3 || (_t3 = _2`${0}`), textAnchorTemplate(context))), when(x => x.separator, html(_t4 || (_t4 = _2`<vwc-icon type="chevron-right-line"></vwc-icon>`))));
|
|
47
|
-
|
|
48
|
-
const vividBreadcrumbItem = BreadcrumbItem.compose({
|
|
49
|
-
baseName: 'breadcrumb-item',
|
|
50
|
-
template: BreadcrumbItemTemplate,
|
|
51
|
-
styles: css_248z
|
|
52
|
-
});
|
|
53
|
-
designSystem.register(vividBreadcrumbItem());
|
|
54
|
-
|
|
55
|
-
export { vividBreadcrumbItem };
|
|
22
|
+
registerBreadcrumbItem();
|