@vonage/vivid 3.0.0-next.11 → 3.0.0-next.110
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 +165 -4
- package/accordion/index.js +5 -14
- package/accordion-item/index.js +34 -41
- package/action-group/index.js +37 -0
- package/avatar/index.js +61 -0
- package/badge/index.js +23 -35
- package/banner/index.js +20 -115
- package/breadcrumb/index.js +22 -19
- package/breadcrumb-item/index.js +28 -25
- package/button/index.js +29 -690
- package/calendar/index.js +70 -69
- package/calendar-event/index.js +109 -0
- package/card/index.js +112 -0
- package/checkbox/index.js +178 -0
- package/custom-elements.json +3941 -0
- package/dialog/index.js +214 -0
- package/divider/index.js +27 -0
- package/elevation/index.js +10 -16
- package/fab/index.js +98 -0
- package/focus/index.js +18 -3
- package/header/index.js +63 -0
- package/icon/index.js +9 -12
- package/index.js +68 -22
- package/layout/index.js +6 -16
- package/lib/accordion-item/accordion-item.d.ts +2 -2
- package/lib/accordion-item/index.d.ts +0 -1
- 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/{sidenav-item → action-group}/index.d.ts +1 -2
- package/lib/avatar/avatar.d.ts +15 -0
- package/lib/avatar/avatar.template.d.ts +4 -0
- package/lib/avatar/index.d.ts +2 -0
- package/lib/badge/badge.d.ts +3 -5
- package/lib/badge/index.d.ts +1 -2
- package/lib/banner/banner.d.ts +1 -1
- package/lib/banner/banner.template.d.ts +0 -2
- package/lib/breadcrumb/breadcrumb.template.d.ts +4 -0
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/lib/breadcrumb-item/index.d.ts +0 -1
- package/lib/button/button.d.ts +4 -3
- package/lib/button/index.d.ts +1 -21
- package/lib/calendar/calendar.d.ts +3 -1
- package/lib/calendar/index.d.ts +0 -1
- 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/index.d.ts +2 -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/{text → card}/index.d.ts +1 -1
- package/lib/checkbox/checkbox.d.ts +5 -0
- package/lib/checkbox/checkbox.template.d.ts +4 -0
- package/lib/checkbox/index.d.ts +2 -0
- package/lib/components.d.ts +32 -10
- package/lib/dialog/dialog.d.ts +20 -0
- package/lib/dialog/dialog.template.d.ts +4 -0
- package/lib/dialog/index.d.ts +2 -0
- package/lib/divider/divider.d.ts +3 -0
- package/lib/divider/divider.template.d.ts +4 -0
- package/lib/divider/index.d.ts +2 -0
- package/lib/elevation/elevation.d.ts +1 -0
- package/lib/elevation/index.d.ts +1 -1
- package/lib/enums.d.ts +19 -6
- package/lib/fab/fab.d.ts +13 -0
- package/lib/fab/fab.template.d.ts +4 -0
- package/lib/fab/index.d.ts +2 -0
- package/lib/focus/index.d.ts +1 -1
- package/lib/header/header.d.ts +5 -0
- package/lib/header/header.template.d.ts +4 -0
- package/lib/header/index.d.ts +2 -0
- package/lib/icon/icon.d.ts +5 -6
- package/lib/layout/index.d.ts +1 -1
- package/lib/layout/layout.d.ts +4 -4
- package/lib/listbox/index.d.ts +1 -0
- package/lib/listbox/listbox.d.ts +9 -0
- package/lib/listbox/listbox.template.d.ts +4 -0
- package/lib/menu/index.d.ts +10 -0
- package/lib/menu/menu.d.ts +10 -0
- package/lib/menu/menu.template.d.ts +3 -0
- package/lib/menu-item/index.d.ts +2 -0
- package/lib/menu-item/menu-item.d.ts +7 -0
- package/lib/menu-item/menu-item.template.d.ts +5 -0
- package/lib/nav/index.d.ts +2 -0
- package/lib/nav/nav.d.ts +3 -0
- package/lib/nav/nav.template.d.ts +4 -0
- package/lib/nav-disclosure/index.d.ts +2 -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/index.d.ts +2 -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/index.d.ts +2 -0
- package/lib/note/note.d.ts +10 -0
- package/lib/note/note.template.d.ts +4 -0
- package/lib/number-field/index.d.ts +2 -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/index.d.ts +2 -0
- package/lib/option/option.d.ts +9 -0
- package/lib/option/option.template.d.ts +4 -0
- package/lib/popup/index.d.ts +1 -3
- package/lib/popup/popup.d.ts +3 -2
- package/lib/progress/progress.d.ts +1 -1
- package/lib/progress-ring/progress-ring.d.ts +2 -1
- package/lib/radio/index.d.ts +2 -0
- package/lib/radio/radio.d.ts +4 -0
- package/lib/radio/radio.template.d.ts +4 -0
- package/lib/radio-group/index.d.ts +10 -0
- package/lib/radio-group/radio-group.d.ts +4 -0
- package/lib/radio-group/radio-group.template.d.ts +4 -0
- package/lib/side-drawer/index.d.ts +1 -1
- package/lib/side-drawer/side-drawer.d.ts +3 -2
- package/lib/slider/index.d.ts +2 -0
- package/lib/slider/slider.d.ts +4 -0
- package/lib/slider/slider.template.d.ts +4 -0
- package/lib/switch/index.d.ts +2 -0
- package/lib/switch/switch.d.ts +7 -0
- package/lib/switch/switch.template.d.ts +4 -0
- package/lib/text-anchor/text-anchor.d.ts +1 -1
- package/lib/text-area/index.d.ts +2 -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/index.d.ts +2 -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/index.d.ts +0 -1
- package/lib/tooltip/tooltip.d.ts +7 -7
- package/listbox/index.js +1086 -0
- package/menu/index.js +357 -0
- package/menu-item/index.js +90 -0
- package/nav/index.js +17 -0
- package/nav-disclosure/index.js +80 -0
- package/nav-item/index.js +44 -0
- package/note/index.js +59 -0
- package/number-field/index.js +460 -0
- package/option/index.js +75 -0
- package/package.json +62 -10
- package/popup/index.js +35 -2036
- package/progress/index.js +33 -38
- package/progress-ring/index.js +13 -13
- package/radio/index.js +52 -0
- package/radio-group/index.js +435 -0
- package/shared/affix.js +2 -8
- package/shared/anchor.js +11 -3
- 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 +6 -1
- package/shared/breadcrumb-item.js +2 -2
- package/shared/button.js +23 -0
- package/shared/button2.js +200 -0
- package/shared/calendar-event.js +19 -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/divider.js +55 -0
- package/shared/dom.js +8 -0
- package/shared/elevation.js +10 -0
- package/shared/enums.js +70 -0
- package/shared/es.object.assign.js +2 -59
- package/shared/es.promise.resolve.js +944 -0
- package/shared/es.regexp.to-string.js +58 -0
- package/shared/focus.js +11 -0
- package/shared/focus2.js +5 -0
- package/shared/form-associated.js +466 -0
- package/shared/form-elements.js +343 -0
- package/shared/icon.js +32 -1153
- package/shared/index.js +3780 -83
- package/shared/index2.js +7 -19
- package/shared/key-codes.js +97 -0
- package/shared/listbox-option.js +201 -0
- package/shared/menu-item.js +277 -0
- package/shared/numbers.js +25 -0
- package/shared/patterns/focus.d.ts +3 -0
- package/shared/patterns/form-elements/form-elements.d.ts +31 -0
- package/shared/patterns/form-elements/index.d.ts +1 -0
- package/shared/patterns/index.d.ts +2 -0
- package/shared/popup.js +1484 -0
- package/shared/radio.js +127 -0
- package/shared/ref.js +41 -0
- package/shared/slotted.js +1 -1
- package/shared/start-end.js +50 -0
- package/shared/string-trim.js +39 -0
- package/shared/text-anchor.js +2 -13
- package/shared/text-anchor.template.js +6 -5
- package/shared/utils/index.d.ts +1 -0
- package/side-drawer/index.js +38 -34
- package/slider/index.js +596 -0
- package/styles/core/all.css +86 -0
- package/styles/core/theme.css +11 -0
- package/styles/core/typography.css +80 -0
- package/styles/fonts/SpeziaCompleteVariableItalicWeb.woff2 +0 -0
- package/styles/fonts/SpeziaCompleteVariableUprightWeb.woff2 +0 -0
- package/styles/fonts/SpeziaMonoCompleteVariableWeb.woff2 +0 -0
- package/styles/fonts/spezia.css +9 -12
- package/styles/tokens/theme-dark.css +230 -0
- package/styles/tokens/theme-light.css +230 -0
- package/switch/index.js +153 -0
- package/text-anchor/index.js +8 -3
- package/text-area/index.js +288 -0
- package/text-field/index.js +129 -0
- package/tooltip/index.js +59 -43
- package/vivid.api.json +2979 -0
- package/lib/text/text.d.ts +0 -10
- 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/themes/dark.css +0 -205
- package/styles/themes/light.css +0 -205
- package/text/index.js +0 -45
package/tooltip/index.js
CHANGED
|
@@ -1,65 +1,81 @@
|
|
|
1
|
-
import '../
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import '../shared/
|
|
1
|
+
import '../shared/es.promise.resolve.js';
|
|
2
|
+
import { _ as __decorate, a as attr, b as __metadata, Y as __classPrivateFieldGet, h as html, g as getPrefix, d as designSystem } from '../shared/index.js';
|
|
3
|
+
import { l as loadComponentsModules } from '../shared/index2.js';
|
|
4
|
+
import { P as Popup } from '../shared/popup.js';
|
|
5
5
|
import { c as classNames } from '../shared/class-names.js';
|
|
6
|
-
import '../elevation/index.js';
|
|
7
|
-
import '../button/index.js';
|
|
8
|
-
import '../icon/index.js';
|
|
9
|
-
import '../shared/icon.js';
|
|
10
|
-
import '../shared/_has.js';
|
|
11
|
-
import '../shared/when.js';
|
|
12
|
-
import '../shared/index2.js';
|
|
13
|
-
import '../shared/affix.js';
|
|
14
|
-
import '../shared/apply-mixins.js';
|
|
15
|
-
import '../shared/aria-global.js';
|
|
16
6
|
import '../shared/es.object.assign.js';
|
|
7
|
+
import '../shared/key-codes.js';
|
|
17
8
|
|
|
18
|
-
var css_248z = "
|
|
19
|
-
styleInject(css_248z);
|
|
9
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Sun, 04 Dec 2022 15:37:45 GMT\n */\n.control {\n pointer-events: none;\n}\n\n.tooltip {\n width: var(--tooltip-inline-size, 240px);\n}\n.tooltip-text {\n padding: 8px 12px;\n color: var(--vvd-color-canvas-text);\n font: var(--vvd-typography-base-bold);\n}";
|
|
20
10
|
|
|
21
|
-
|
|
11
|
+
var _Tooltip_instances, _Tooltip_anchorUpdated, _Tooltip_addEventListener, _Tooltip_removeEventListener, _Tooltip_show, _Tooltip_hide;
|
|
12
|
+
class Tooltip extends Popup {
|
|
22
13
|
constructor() {
|
|
23
14
|
super(...arguments);
|
|
24
|
-
this
|
|
25
|
-
this
|
|
15
|
+
_Tooltip_instances.add(this);
|
|
16
|
+
_Tooltip_show.set(this, () => {
|
|
17
|
+
this.open = true;
|
|
18
|
+
});
|
|
19
|
+
_Tooltip_hide.set(this, () => {
|
|
20
|
+
this.open = false;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
connectedCallback() {
|
|
24
|
+
super.connectedCallback();
|
|
25
|
+
__classPrivateFieldGet(this, _Tooltip_instances, "m", _Tooltip_anchorUpdated).call(this);
|
|
26
|
+
}
|
|
27
|
+
disconnectedCallback() {
|
|
28
|
+
super.disconnectedCallback();
|
|
29
|
+
__classPrivateFieldGet(this, _Tooltip_instances, "m", _Tooltip_removeEventListener).call(this);
|
|
30
|
+
}
|
|
31
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
32
|
+
super.attributeChangedCallback(name, oldValue, newValue);
|
|
33
|
+
__classPrivateFieldGet(this, _Tooltip_instances, "m", _Tooltip_anchorUpdated).call(this);
|
|
26
34
|
}
|
|
27
|
-
|
|
28
35
|
}
|
|
36
|
+
_Tooltip_show = new WeakMap(), _Tooltip_hide = new WeakMap(), _Tooltip_instances = new WeakSet(), _Tooltip_anchorUpdated = function _Tooltip_anchorUpdated() {
|
|
37
|
+
__classPrivateFieldGet(this, _Tooltip_instances, "m", _Tooltip_removeEventListener).call(this);
|
|
38
|
+
__classPrivateFieldGet(this, _Tooltip_instances, "m", _Tooltip_addEventListener).call(this);
|
|
39
|
+
}, _Tooltip_addEventListener = function _Tooltip_addEventListener() {
|
|
40
|
+
var _a, _b, _c, _d;
|
|
41
|
+
(_a = this.anchorEl) === null || _a === void 0 ? void 0 : _a.addEventListener('mouseover', __classPrivateFieldGet(this, _Tooltip_show, "f"));
|
|
42
|
+
(_b = this.anchorEl) === null || _b === void 0 ? void 0 : _b.addEventListener('mouseout', __classPrivateFieldGet(this, _Tooltip_hide, "f"));
|
|
43
|
+
(_c = this.anchorEl) === null || _c === void 0 ? void 0 : _c.addEventListener('focusin', __classPrivateFieldGet(this, _Tooltip_show, "f"));
|
|
44
|
+
(_d = this.anchorEl) === null || _d === void 0 ? void 0 : _d.addEventListener('focusout', __classPrivateFieldGet(this, _Tooltip_hide, "f"));
|
|
45
|
+
}, _Tooltip_removeEventListener = function _Tooltip_removeEventListener() {
|
|
46
|
+
var _a, _b, _c, _d;
|
|
47
|
+
(_a = this.anchorEl) === null || _a === void 0 ? void 0 : _a.removeEventListener('mouseover', __classPrivateFieldGet(this, _Tooltip_show, "f"));
|
|
48
|
+
(_b = this.anchorEl) === null || _b === void 0 ? void 0 : _b.removeEventListener('mouseout', __classPrivateFieldGet(this, _Tooltip_hide, "f"));
|
|
49
|
+
(_c = this.anchorEl) === null || _c === void 0 ? void 0 : _c.removeEventListener('focusin', __classPrivateFieldGet(this, _Tooltip_show, "f"));
|
|
50
|
+
(_d = this.anchorEl) === null || _d === void 0 ? void 0 : _d.removeEventListener('focusout', __classPrivateFieldGet(this, _Tooltip_hide, "f"));
|
|
51
|
+
};
|
|
52
|
+
__decorate([attr, __metadata("design:type", String)], Tooltip.prototype, "text", void 0);
|
|
29
53
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
__decorate([attr, __metadata("design:type", String)], Tooltip.prototype, "corner", void 0);
|
|
39
|
-
|
|
40
|
-
__decorate([attr, __metadata("design:type", String)], Tooltip.prototype, "anchor", void 0);
|
|
41
|
-
|
|
42
|
-
let _2 = t => t,
|
|
43
|
-
_t;
|
|
44
|
-
|
|
45
|
-
const getClasses = _ => classNames('control');
|
|
46
|
-
|
|
47
|
-
const TooltipTemplate = () => html(_t || (_t = _2`
|
|
48
|
-
<vwc-popup class="${0}" arrow alternate="true"
|
|
49
|
-
corner=${0} open=${0} anchor=${0}
|
|
54
|
+
let _ = t => t,
|
|
55
|
+
_t;
|
|
56
|
+
const getClasses = ({
|
|
57
|
+
open
|
|
58
|
+
}) => classNames('control', ['open', Boolean(open)]);
|
|
59
|
+
const TooltipTemplate = () => html(_t || (_t = _`
|
|
60
|
+
<vwc-popup class="${0}" arrow alternate
|
|
61
|
+
placement=${0} open=${0} anchor=${0}
|
|
50
62
|
exportparts="vvd-theme-alternate">
|
|
51
|
-
<div class="tooltip">
|
|
63
|
+
<div class="tooltip" role="tooltip">
|
|
52
64
|
<header part="vvd-theme-alternate" class="tooltip-header">
|
|
53
65
|
<div class="tooltip-text">${0}</div>
|
|
54
66
|
</header>
|
|
55
67
|
</div>
|
|
56
|
-
</vwc-popup>`), getClasses, x => x.
|
|
68
|
+
</vwc-popup>`), getClasses, x => x.placement, x => x.open, x => x.anchor, x => x.text);
|
|
57
69
|
|
|
70
|
+
const prefix = getPrefix(import.meta.url);
|
|
58
71
|
const vividTooltip = Tooltip.compose({
|
|
59
72
|
baseName: 'tooltip',
|
|
60
73
|
template: TooltipTemplate,
|
|
61
74
|
styles: css_248z
|
|
62
75
|
});
|
|
63
|
-
|
|
76
|
+
(async () => {
|
|
77
|
+
await loadComponentsModules(['popup'], prefix);
|
|
78
|
+
designSystem.withPrefix(prefix).register(vividTooltip());
|
|
79
|
+
})();
|
|
64
80
|
|
|
65
81
|
export { vividTooltip };
|