@vonage/vivid 3.0.0-next.2 → 3.0.0-next.5
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/accordion/index.js +61 -0
- package/accordion-item/index.js +125 -0
- package/badge/index.js +19 -10
- package/banner/index.js +212 -0
- package/breadcrumb/index.js +100 -0
- package/breadcrumb-item/index.js +15 -8
- package/button/index.js +24 -15
- package/calendar/index.js +1521 -0
- package/elevation/index.js +5 -12
- package/focus/index.js +2 -2
- package/icon/index.js +33 -4
- package/index.d.ts +1 -0
- package/index.js +21 -5
- package/layout/index.js +1 -1
- package/lib/accordion/accordion.d.ts +9 -0
- package/lib/accordion/accordion.template.d.ts +4 -0
- package/lib/accordion/index.d.ts +2 -0
- package/lib/accordion-item/accordion-item.d.ts +13 -0
- package/lib/accordion-item/accordion-item.template.d.ts +4 -0
- package/lib/accordion-item/index.d.ts +3 -0
- package/lib/badge/badge.d.ts +3 -3
- package/lib/banner/banner.d.ts +20 -0
- package/lib/banner/banner.template.d.ts +6 -0
- package/lib/banner/index.d.ts +2 -0
- package/lib/breadcrumb/breadcrumb.d.ts +3 -0
- package/lib/breadcrumb/index.d.ts +2 -0
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +3 -3
- package/lib/breadcrumb-item/breadcrumb-item.template.d.ts +0 -1
- package/lib/breadcrumb-item/index.d.ts +1 -0
- package/lib/button/button.d.ts +3 -3
- package/lib/calendar/calendar.d.ts +11 -0
- package/lib/calendar/calendar.template.d.ts +4 -0
- package/lib/calendar/helpers/calendar.date-functions.d.ts +2 -0
- package/lib/calendar/helpers/calendar.event-context.d.ts +6 -0
- package/lib/calendar/helpers/calendar.keyboard-interactions.d.ts +9 -0
- package/lib/calendar/index.d.ts +3 -0
- package/lib/components.d.ts +9 -0
- package/lib/elevation/elevation.d.ts +1 -1
- package/lib/enums.d.ts +3 -2
- package/lib/icon/icon.d.ts +1 -3
- package/lib/popup/index.d.ts +4 -0
- package/lib/popup/popup.d.ts +29 -0
- package/lib/popup/popup.template.d.ts +4 -0
- package/lib/progress/index.d.ts +2 -0
- package/lib/progress/progress.d.ts +9 -0
- package/lib/progress/progress.template.d.ts +5 -0
- package/lib/progress-ring/index.d.ts +2 -0
- package/lib/progress-ring/progress-ring.d.ts +6 -0
- package/lib/progress-ring/progress-ring.template.d.ts +4 -0
- package/lib/side-drawer/index.d.ts +2 -0
- package/lib/side-drawer/side-drawer.d.ts +12 -0
- package/lib/side-drawer/side-drawer.template.d.ts +4 -0
- package/lib/sidenav-item/sidenav-item.d.ts +4 -5
- package/lib/text/index.d.ts +2 -0
- package/lib/text/text.d.ts +10 -0
- package/lib/text/text.template.d.ts +4 -0
- package/lib/text-anchor/text-anchor.d.ts +3 -0
- package/lib/tooltip/index.d.ts +3 -0
- package/lib/tooltip/tooltip.d.ts +10 -0
- package/lib/tooltip/tooltip.template.d.ts +4 -0
- package/package.json +9 -5
- package/popup/index.js +2087 -0
- package/progress/index.js +98 -0
- package/progress-ring/index.js +76 -0
- package/shared/_has.js +58 -0
- package/shared/affix.js +10 -25
- package/shared/anchor.js +3 -3
- package/shared/aria-global.js +20 -20
- package/shared/base-progress.js +65 -0
- package/shared/breadcrumb-item.js +25 -0
- package/shared/es.object.assign.js +68 -0
- package/shared/icon.js +1393 -0
- package/shared/index.js +4918 -1427
- package/shared/index2.js +15 -4905
- package/shared/patterns/affix.d.ts +3 -4
- package/shared/slotted.js +119 -0
- package/shared/text-anchor.js +21 -0
- package/shared/text-anchor.template.js +14 -19
- package/shared/web.dom-collections.iterator.js +639 -639
- package/shared/when.js +15 -0
- package/side-drawer/index.js +103 -0
- package/sidenav-item/index.js +15 -56
- package/styles/themes/dark.css +4 -4
- package/styles/themes/light.css +4 -4
- package/text/index.js +45 -0
- package/text-anchor/index.js +6 -2
- package/tooltip/index.js +73 -0
- package/shared/index3.js +0 -21
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { ViewTemplate } from '@microsoft/fast-element';
|
|
2
2
|
import type { ElementDefinitionContext } from '@microsoft/fast-foundation';
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class AffixIcon {
|
|
4
4
|
icon?: string;
|
|
5
5
|
}
|
|
6
|
-
export declare class
|
|
6
|
+
export declare class AffixIconWithTrailing extends AffixIcon {
|
|
7
7
|
iconTrailing: boolean;
|
|
8
8
|
}
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const prefixOrSuffixTemplate: (context: ElementDefinitionContext) => ViewTemplate<PrefixOrSuffix>;
|
|
9
|
+
export declare const affixIconTemplateFactory: (context: ElementDefinitionContext) => (icon?: string) => ViewTemplate<AffixIcon> | null;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { O as Observable, e as emptyArray, A as AttachedBehaviorHTMLDirective } from './index.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Creates a function that can be used to filter a Node array, selecting only elements.
|
|
5
|
+
* @param selector - An optional selector to restrict the filter to.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
function elements(selector) {
|
|
9
|
+
if (selector) {
|
|
10
|
+
return function (value, index, array) {
|
|
11
|
+
return value.nodeType === 1 && value.matches(selector);
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
return function (value, index, array) {
|
|
15
|
+
return value.nodeType === 1;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A base class for node observation.
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
class NodeObservationBehavior {
|
|
23
|
+
/**
|
|
24
|
+
* Creates an instance of NodeObservationBehavior.
|
|
25
|
+
* @param target - The target to assign the nodes property on.
|
|
26
|
+
* @param options - The options to use in configuring node observation.
|
|
27
|
+
*/
|
|
28
|
+
constructor(target, options) {
|
|
29
|
+
this.target = target;
|
|
30
|
+
this.options = options;
|
|
31
|
+
this.source = null;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Bind this behavior to the source.
|
|
35
|
+
* @param source - The source to bind to.
|
|
36
|
+
* @param context - The execution context that the binding is operating within.
|
|
37
|
+
*/
|
|
38
|
+
bind(source) {
|
|
39
|
+
const name = this.options.property;
|
|
40
|
+
this.shouldUpdate = Observable.getAccessors(source).some((x) => x.name === name);
|
|
41
|
+
this.source = source;
|
|
42
|
+
this.updateTarget(this.computeNodes());
|
|
43
|
+
if (this.shouldUpdate) {
|
|
44
|
+
this.observe();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Unbinds this behavior from the source.
|
|
49
|
+
* @param source - The source to unbind from.
|
|
50
|
+
*/
|
|
51
|
+
unbind() {
|
|
52
|
+
this.updateTarget(emptyArray);
|
|
53
|
+
this.source = null;
|
|
54
|
+
if (this.shouldUpdate) {
|
|
55
|
+
this.disconnect();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/** @internal */
|
|
59
|
+
handleEvent() {
|
|
60
|
+
this.updateTarget(this.computeNodes());
|
|
61
|
+
}
|
|
62
|
+
computeNodes() {
|
|
63
|
+
let nodes = this.getNodes();
|
|
64
|
+
if (this.options.filter !== void 0) {
|
|
65
|
+
nodes = nodes.filter(this.options.filter);
|
|
66
|
+
}
|
|
67
|
+
return nodes;
|
|
68
|
+
}
|
|
69
|
+
updateTarget(value) {
|
|
70
|
+
this.source[this.options.property] = value;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The runtime behavior for slotted node observation.
|
|
76
|
+
* @public
|
|
77
|
+
*/
|
|
78
|
+
class SlottedBehavior extends NodeObservationBehavior {
|
|
79
|
+
/**
|
|
80
|
+
* Creates an instance of SlottedBehavior.
|
|
81
|
+
* @param target - The slot element target to observe.
|
|
82
|
+
* @param options - The options to use when observing the slot.
|
|
83
|
+
*/
|
|
84
|
+
constructor(target, options) {
|
|
85
|
+
super(target, options);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Begins observation of the nodes.
|
|
89
|
+
*/
|
|
90
|
+
observe() {
|
|
91
|
+
this.target.addEventListener("slotchange", this);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Disconnects observation of the nodes.
|
|
95
|
+
*/
|
|
96
|
+
disconnect() {
|
|
97
|
+
this.target.removeEventListener("slotchange", this);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Retrieves the nodes that should be assigned to the target.
|
|
101
|
+
*/
|
|
102
|
+
getNodes() {
|
|
103
|
+
return this.target.assignedNodes(this.options);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* A directive that observes the `assignedNodes()` of a slot and updates a property
|
|
108
|
+
* whenever they change.
|
|
109
|
+
* @param propertyOrOptions - The options used to configure slotted node observation.
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
function slotted(propertyOrOptions) {
|
|
113
|
+
if (typeof propertyOrOptions === "string") {
|
|
114
|
+
propertyOrOptions = { property: propertyOrOptions };
|
|
115
|
+
}
|
|
116
|
+
return new AttachedBehaviorHTMLDirective("fast-slotted", SlottedBehavior, propertyOrOptions);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export { elements as e, slotted as s };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import './web.dom-collections.iterator.js';
|
|
2
|
+
import { _ as __decorate, a as attr, b as __metadata } from './index.js';
|
|
3
|
+
import { b as AffixIcon } from './affix.js';
|
|
4
|
+
import { A as Anchor } from './anchor.js';
|
|
5
|
+
import { a as applyMixins } from './apply-mixins.js';
|
|
6
|
+
|
|
7
|
+
class TextAnchor extends Anchor {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.text = '';
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
__decorate([attr({
|
|
16
|
+
mode: 'fromView'
|
|
17
|
+
}), __metadata("design:type", Object)], TextAnchor.prototype, "text", void 0);
|
|
18
|
+
|
|
19
|
+
applyMixins(TextAnchor, AffixIcon);
|
|
20
|
+
|
|
21
|
+
export { TextAnchor as T };
|
|
@@ -1,26 +1,19 @@
|
|
|
1
|
-
import './
|
|
2
|
-
import {
|
|
3
|
-
import { A as Anchor } from './anchor.js';
|
|
1
|
+
import { a as affixIconTemplateFactory } from './affix.js';
|
|
2
|
+
import { h as html } from './index.js';
|
|
4
3
|
import { r as ref } from './aria-global.js';
|
|
5
4
|
import { c as classNames } from './class-names.js';
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
constructor() {
|
|
9
|
-
super(...arguments);
|
|
10
|
-
this.text = '';
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
__decorate([attr, __metadata("design:type", Object)], TextAnchor.prototype, "text", void 0);
|
|
16
|
-
|
|
17
|
-
let _2 = t => t,
|
|
6
|
+
let _ = t => t,
|
|
18
7
|
_t;
|
|
19
8
|
|
|
20
|
-
const getClasses =
|
|
9
|
+
const getClasses = ({
|
|
10
|
+
text,
|
|
11
|
+
icon
|
|
12
|
+
}) => classNames('control', ['icon-only', !text && !!icon]);
|
|
21
13
|
|
|
22
|
-
const textAnchorTemplate =
|
|
23
|
-
|
|
14
|
+
const textAnchorTemplate = context => {
|
|
15
|
+
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
16
|
+
return html(_t || (_t = _`<a
|
|
24
17
|
class="${0}"
|
|
25
18
|
download="${0}"
|
|
26
19
|
href="${0}"
|
|
@@ -53,7 +46,9 @@ const textAnchorTemplate = () => html(_t || (_t = _2`
|
|
|
53
46
|
${0}
|
|
54
47
|
>
|
|
55
48
|
${0}
|
|
49
|
+
${0}
|
|
56
50
|
</a>
|
|
57
|
-
`), getClasses, x => x.download, x => x.href, x => x.hreflang, x => x.ping, x => x.referrerpolicy, x => x.rel, x => x.target, x => x.type, x => x.ariaAtomic, x => x.ariaBusy, x => x.ariaControls, x => x.ariaCurrent, x => x.ariaDescribedby, x => x.ariaDetails, x => x.ariaDisabled, x => x.ariaErrormessage, x => x.ariaExpanded, x => x.ariaFlowto, x => x.ariaHaspopup, x => x.ariaHidden, x => x.ariaInvalid, x => x.ariaKeyshortcuts, x => x.ariaLabel, x => x.ariaLabelledby, x => x.ariaLive, x => x.ariaOwns, x => x.ariaRelevant, x => x.ariaRoledescription, ref('control'), x => x.text);
|
|
51
|
+
`), getClasses, x => x.download, x => x.href, x => x.hreflang, x => x.ping, x => x.referrerpolicy, x => x.rel, x => x.target, x => x.type, x => x.ariaAtomic, x => x.ariaBusy, x => x.ariaControls, x => x.ariaCurrent, x => x.ariaDescribedby, x => x.ariaDetails, x => x.ariaDisabled, x => x.ariaErrormessage, x => x.ariaExpanded, x => x.ariaFlowto, x => x.ariaHaspopup, x => x.ariaHidden, x => x.ariaInvalid, x => x.ariaKeyshortcuts, x => x.ariaLabel, x => x.ariaLabelledby, x => x.ariaLive, x => x.ariaOwns, x => x.ariaRelevant, x => x.ariaRoledescription, ref('control'), x => affixIconTemplate(x.icon), x => x.text);
|
|
52
|
+
};
|
|
58
53
|
|
|
59
|
-
export {
|
|
54
|
+
export { textAnchorTemplate as t };
|