@vonage/vivid 3.5.0 → 3.7.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/README.md +31 -14
- package/banner/index.js +2 -0
- package/breadcrumb/index.js +1 -1
- package/breadcrumb-item/index.js +1 -1
- package/button/index.js +2 -0
- package/calendar/index.js +1 -1
- package/calendar-event/index.js +1 -1
- package/card/index.js +2 -2
- package/checkbox/index.js +1 -1
- package/combobox/index.js +6 -4
- package/custom-elements.json +302 -0
- package/data-grid/index.js +1 -1
- package/dialog/index.js +4 -2
- package/divider/index.js +1 -1
- package/elevation/index.js +1 -1
- package/fab/index.js +1 -1
- package/header/index.js +2 -2
- package/index.js +26 -26
- package/layout/index.js +1 -1
- package/lib/accordion-item/accordion-item.d.ts +3 -0
- package/lib/action-group/action-group.d.ts +2 -0
- package/lib/button/button.d.ts +1 -0
- package/lib/button/button.template.d.ts +1 -1
- package/lib/select/select.d.ts +2 -3
- package/listbox/index.js +2 -2
- package/menu/index.js +6 -4
- package/menu-item/index.js +1 -1
- package/nav/index.js +1 -1
- package/nav-disclosure/index.js +1 -1
- package/nav-item/index.js +1 -1
- package/note/index.js +1 -1
- package/number-field/index.js +4 -2
- package/option/index.js +1 -1
- package/package.json +1 -1
- package/popup/index.js +4 -2
- package/progress/index.js +1 -1
- package/progress-ring/index.js +1 -1
- package/select/index.js +5 -3
- package/shared/definition.js +1 -1
- package/shared/definition10.js +69 -91
- package/shared/definition11.js +91 -40
- package/shared/definition12.js +31 -755
- package/shared/definition13.js +754 -93
- package/shared/definition14.js +100 -103
- package/shared/definition15.js +106 -24
- package/shared/definition16.js +24 -164
- package/shared/definition17.js +108 -663
- package/shared/definition18.js +667 -1533
- package/shared/definition19.js +1545 -223
- package/shared/definition2.js +8 -7
- package/shared/definition20.js +183 -964
- package/shared/definition21.js +1037 -222
- package/shared/definition22.js +226 -67
- package/shared/definition23.js +68 -77
- package/shared/definition24.js +76 -47
- package/shared/definition25.js +46 -32
- package/shared/definition26.js +35 -49
- package/shared/definition27.js +48 -344
- package/shared/definition28.js +273 -282
- package/shared/definition29.js +356 -14
- package/shared/definition30.js +13 -67
- package/shared/definition31.js +65 -21
- package/shared/definition32.js +21 -39
- package/shared/definition33.js +31 -432
- package/shared/definition34.js +432 -76
- package/shared/definition35.js +76 -59
- package/shared/definition36.js +3 -3
- package/shared/definition37.js +1 -1
- package/shared/definition38.js +7 -6
- package/shared/definition39.js +1 -1
- package/shared/definition4.js +1 -1
- package/shared/definition41.js +1 -1
- package/shared/definition42.js +1 -1
- package/shared/definition44.js +1 -1
- package/shared/definition45.js +1 -1
- package/shared/definition47.js +2 -2
- package/shared/definition48.js +1 -1
- package/shared/definition5.js +10 -3
- package/shared/definition6.js +1 -1
- package/shared/definition7.js +1 -1
- package/shared/definition8.js +1 -1
- package/shared/definition9.js +14 -4
- package/shared/form-elements.js +1 -1
- package/shared/icon.js +1 -1
- package/shared/listbox.js +1 -1
- package/shared/patterns/form-elements/form-elements.d.ts +2 -2
- package/shared/text-field.js +1 -1
- 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/tooltip/index.js +4 -2
package/lib/button/button.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ViewTemplate } from '@microsoft/fast-element';
|
|
2
2
|
import type { ElementDefinitionContext, FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
3
3
|
import type { Button } from './button';
|
|
4
4
|
export declare const buttonTemplate: (context: ElementDefinitionContext, definition: FoundationElementDefinition) => ViewTemplate<Button>;
|
package/lib/select/select.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Select as FoundationSelect } from '@microsoft/fast-foundation';
|
|
2
2
|
import type { Popup } from '../popup/popup';
|
|
3
|
-
import { FormElement } from '../../shared/patterns';
|
|
4
|
-
import { AffixIcon } from '../../shared/patterns';
|
|
3
|
+
import { AffixIconWithTrailing, FormElement } from '../../shared/patterns';
|
|
5
4
|
import type { Appearance, Shape } from '../enums';
|
|
6
5
|
export declare type SelectAppearance = Extract<Appearance, Appearance.Outlined | Appearance.Ghost>;
|
|
7
6
|
export declare type SelectShape = Extract<Shape, Shape.Rounded | Shape.Pill>;
|
|
@@ -13,5 +12,5 @@ export declare class Select extends FoundationSelect {
|
|
|
13
12
|
connectedCallback(): void;
|
|
14
13
|
get displayValue(): string;
|
|
15
14
|
}
|
|
16
|
-
export interface Select extends
|
|
15
|
+
export interface Select extends AffixIconWithTrailing, FormElement {
|
|
17
16
|
}
|
package/listbox/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as registerListbox } from '../shared/
|
|
1
|
+
import { r as registerListbox } from '../shared/definition27.js';
|
|
2
2
|
import '../shared/index.js';
|
|
3
3
|
import '../shared/definition4.js';
|
|
4
4
|
import '../shared/focus.js';
|
|
5
|
-
import '../shared/
|
|
5
|
+
import '../shared/definition20.js';
|
|
6
6
|
import '../shared/definition3.js';
|
|
7
7
|
import '../shared/icon.js';
|
|
8
8
|
import '../shared/to-string.js';
|
package/menu/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerMenu } from '../shared/
|
|
1
|
+
import { r as registerMenu } from '../shared/definition28.js';
|
|
2
2
|
import '../shared/index.js';
|
|
3
|
-
import '../shared/
|
|
3
|
+
import '../shared/definition19.js';
|
|
4
4
|
import '../shared/definition9.js';
|
|
5
5
|
import '../shared/definition3.js';
|
|
6
6
|
import '../shared/icon.js';
|
|
@@ -11,6 +11,8 @@ import '../shared/class-names.js';
|
|
|
11
11
|
import '../shared/when.js';
|
|
12
12
|
import '../shared/definition4.js';
|
|
13
13
|
import '../shared/focus.js';
|
|
14
|
+
import '../shared/definition10.js';
|
|
15
|
+
import '../shared/base-progress.js';
|
|
14
16
|
import '../shared/affix.js';
|
|
15
17
|
import '../shared/button.js';
|
|
16
18
|
import '../shared/apply-mixins.js';
|
|
@@ -20,9 +22,9 @@ import '../shared/aria-global.js';
|
|
|
20
22
|
import '../shared/start-end.js';
|
|
21
23
|
import '../shared/ref.js';
|
|
22
24
|
import '../shared/focus2.js';
|
|
23
|
-
import '../shared/
|
|
25
|
+
import '../shared/definition16.js';
|
|
24
26
|
import '../shared/es.object.assign.js';
|
|
25
|
-
import '../shared/
|
|
27
|
+
import '../shared/definition29.js';
|
|
26
28
|
import '../shared/direction.js';
|
|
27
29
|
import '../shared/dom.js';
|
|
28
30
|
import '../shared/slotted.js';
|
package/menu-item/index.js
CHANGED
package/nav/index.js
CHANGED
package/nav-disclosure/index.js
CHANGED
package/nav-item/index.js
CHANGED
package/note/index.js
CHANGED
package/number-field/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerNumberField } from '../shared/
|
|
1
|
+
import { r as registerNumberField } from '../shared/definition34.js';
|
|
2
2
|
import '../shared/index.js';
|
|
3
3
|
import '../shared/definition9.js';
|
|
4
4
|
import '../shared/definition3.js';
|
|
@@ -10,6 +10,8 @@ import '../shared/class-names.js';
|
|
|
10
10
|
import '../shared/when.js';
|
|
11
11
|
import '../shared/definition4.js';
|
|
12
12
|
import '../shared/focus.js';
|
|
13
|
+
import '../shared/definition10.js';
|
|
14
|
+
import '../shared/base-progress.js';
|
|
13
15
|
import '../shared/affix.js';
|
|
14
16
|
import '../shared/button.js';
|
|
15
17
|
import '../shared/apply-mixins.js';
|
|
@@ -19,7 +21,7 @@ import '../shared/aria-global.js';
|
|
|
19
21
|
import '../shared/start-end.js';
|
|
20
22
|
import '../shared/ref.js';
|
|
21
23
|
import '../shared/focus2.js';
|
|
22
|
-
import '../shared/
|
|
24
|
+
import '../shared/definition23.js';
|
|
23
25
|
import '../shared/aria.js';
|
|
24
26
|
import '../shared/form-elements.js';
|
|
25
27
|
import '../shared/text-field2.js';
|
package/option/index.js
CHANGED
package/package.json
CHANGED
package/popup/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerPopup } from '../shared/
|
|
1
|
+
import { r as registerPopup } from '../shared/definition19.js';
|
|
2
2
|
import '../shared/index.js';
|
|
3
3
|
import '../shared/definition9.js';
|
|
4
4
|
import '../shared/definition3.js';
|
|
@@ -10,6 +10,8 @@ import '../shared/class-names.js';
|
|
|
10
10
|
import '../shared/when.js';
|
|
11
11
|
import '../shared/definition4.js';
|
|
12
12
|
import '../shared/focus.js';
|
|
13
|
+
import '../shared/definition10.js';
|
|
14
|
+
import '../shared/base-progress.js';
|
|
13
15
|
import '../shared/affix.js';
|
|
14
16
|
import '../shared/button.js';
|
|
15
17
|
import '../shared/apply-mixins.js';
|
|
@@ -19,7 +21,7 @@ import '../shared/aria-global.js';
|
|
|
19
21
|
import '../shared/start-end.js';
|
|
20
22
|
import '../shared/ref.js';
|
|
21
23
|
import '../shared/focus2.js';
|
|
22
|
-
import '../shared/
|
|
24
|
+
import '../shared/definition16.js';
|
|
23
25
|
import '../shared/es.object.assign.js';
|
|
24
26
|
|
|
25
27
|
registerPopup();
|
package/progress/index.js
CHANGED
package/progress-ring/index.js
CHANGED
package/select/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { r as registerSelect } from '../shared/definition38.js';
|
|
|
2
2
|
import '../shared/index.js';
|
|
3
3
|
import '../shared/definition4.js';
|
|
4
4
|
import '../shared/focus.js';
|
|
5
|
-
import '../shared/
|
|
5
|
+
import '../shared/definition19.js';
|
|
6
6
|
import '../shared/definition9.js';
|
|
7
7
|
import '../shared/definition3.js';
|
|
8
8
|
import '../shared/icon.js';
|
|
@@ -11,6 +11,8 @@ import '../shared/string-trim.js';
|
|
|
11
11
|
import '../shared/_has.js';
|
|
12
12
|
import '../shared/class-names.js';
|
|
13
13
|
import '../shared/when.js';
|
|
14
|
+
import '../shared/definition10.js';
|
|
15
|
+
import '../shared/base-progress.js';
|
|
14
16
|
import '../shared/affix.js';
|
|
15
17
|
import '../shared/button.js';
|
|
16
18
|
import '../shared/apply-mixins.js';
|
|
@@ -20,9 +22,9 @@ import '../shared/aria-global.js';
|
|
|
20
22
|
import '../shared/start-end.js';
|
|
21
23
|
import '../shared/ref.js';
|
|
22
24
|
import '../shared/focus2.js';
|
|
23
|
-
import '../shared/
|
|
25
|
+
import '../shared/definition16.js';
|
|
24
26
|
import '../shared/es.object.assign.js';
|
|
25
|
-
import '../shared/
|
|
27
|
+
import '../shared/definition20.js';
|
|
26
28
|
import '../shared/dom.js';
|
|
27
29
|
import '../shared/form-elements.js';
|
|
28
30
|
import '../shared/listbox.js';
|
package/shared/definition.js
CHANGED
|
@@ -186,7 +186,7 @@ __decorate([
|
|
|
186
186
|
observable
|
|
187
187
|
], Accordion$1.prototype, "accordionItems", void 0);
|
|
188
188
|
|
|
189
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on Mon,
|
|
189
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Mon, 03 Apr 2023 14:02:24 GMT\n */\n.base {\n display: flex;\n box-sizing: border-box;\n flex-direction: column;\n}\n\n::slotted(:not(:only-of-type)) {\n border-bottom: 1px solid var(--vvd-color-neutral-200);\n}";
|
|
190
190
|
|
|
191
191
|
class Accordion extends Accordion$1 {
|
|
192
192
|
constructor() {
|
package/shared/definition10.js
CHANGED
|
@@ -1,99 +1,77 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { _ as __decorate, a as attr, b as __metadata, h as html, r as registerFactory } from './index.js';
|
|
2
|
+
import { B as BaseProgress } from './base-progress.js';
|
|
3
|
+
import { w as when } from './when.js';
|
|
4
|
+
import { c as classNames } from './class-names.js';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
* A Breadcrumb Custom HTML Element.
|
|
7
|
-
* @slot - The default slot for the breadcrumb items
|
|
8
|
-
* @csspart list - The element wrapping the slotted items
|
|
9
|
-
*
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
class Breadcrumb$1 extends FoundationElement {
|
|
13
|
-
slottedBreadcrumbItemsChanged() {
|
|
14
|
-
if (this.$fastController.isConnected) {
|
|
15
|
-
if (this.slottedBreadcrumbItems === undefined ||
|
|
16
|
-
this.slottedBreadcrumbItems.length === 0) {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
const lastNode = this.slottedBreadcrumbItems[this.slottedBreadcrumbItems.length - 1];
|
|
20
|
-
this.slottedBreadcrumbItems.forEach((item) => {
|
|
21
|
-
const itemIsLastNode = item === lastNode;
|
|
22
|
-
this.setItemSeparator(item, itemIsLastNode);
|
|
23
|
-
this.setAriaCurrent(item, itemIsLastNode);
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
setItemSeparator(item, isLastNode) {
|
|
28
|
-
if (item instanceof BreadcrumbItem) {
|
|
29
|
-
item.separator = !isLastNode;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Finds href on childnodes in the light DOM or shadow DOM.
|
|
34
|
-
* We look in the shadow DOM because we insert an anchor when breadcrumb-item has an href.
|
|
35
|
-
*/
|
|
36
|
-
findChildWithHref(node) {
|
|
37
|
-
var _a, _b;
|
|
38
|
-
if (node.childElementCount > 0) {
|
|
39
|
-
return node.querySelector("a[href]");
|
|
40
|
-
}
|
|
41
|
-
else if ((_a = node.shadowRoot) === null || _a === void 0 ? void 0 : _a.childElementCount) {
|
|
42
|
-
return (_b = node.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector("a[href]");
|
|
43
|
-
}
|
|
44
|
-
else
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Sets ARIA Current for the current node
|
|
49
|
-
* If child node with an anchor tag and with href is found then set aria-current to correct value for the child node,
|
|
50
|
-
* otherwise apply aria-current to the host element, with an href
|
|
51
|
-
*/
|
|
52
|
-
setAriaCurrent(item, isLastNode) {
|
|
53
|
-
const childNodeWithHref = this.findChildWithHref(item);
|
|
54
|
-
if (childNodeWithHref === null &&
|
|
55
|
-
item.hasAttribute("href") &&
|
|
56
|
-
item instanceof BreadcrumbItem) {
|
|
57
|
-
isLastNode
|
|
58
|
-
? item.setAttribute("aria-current", "page")
|
|
59
|
-
: item.removeAttribute("aria-current");
|
|
60
|
-
}
|
|
61
|
-
else if (childNodeWithHref !== null) {
|
|
62
|
-
isLastNode
|
|
63
|
-
? childNodeWithHref.setAttribute("aria-current", "page")
|
|
64
|
-
: childNodeWithHref.removeAttribute("aria-current");
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
__decorate([
|
|
69
|
-
observable
|
|
70
|
-
], Breadcrumb$1.prototype, "slottedBreadcrumbItems", void 0);
|
|
6
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Mon, 03 Apr 2023 14:02:24 GMT\n */\n.base {\n align-items: center;\n block-size: var(--_size);\n color: var(--_appearance-color-text);\n inline-size: var(--_size);\n outline: none;\n}\n.base.connotation-cta {\n --_connotation-color-primary: var(--vvd-color-cta-500);\n}\n.base.connotation-alert {\n --_connotation-color-primary: var(--vvd-color-alert-500);\n}\n.base.connotation-success {\n --_connotation-color-primary: var(--vvd-color-success-500);\n}\n.base:not(.connotation-cta, .connotation-alert, .connotation-success) {\n --_connotation-color-primary: var(--vvd-color-canvas-text);\n}\n.base {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(:disabled, .disabled) {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base.size--5 {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 20));\n}\n.base.size--4 {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n.base.size--3 {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 12));\n}\n.base.size--2 {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8));\n}\n.base.size--1 {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 4));\n}\n.base.size-1 {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 4));\n}\n.base.size-2 {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 8));\n}\n.base.size-3 {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 12));\n}\n.base.size-4 {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 16));\n}\n.base.size-5 {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 20));\n}\n.base:not(.size--5, .size--4, .size--3, .size--2, .size--1, .size-1, .size-2, .size-3, .size-4, .size-5) {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)));\n}\n\n.progress {\n width: 100%;\n height: 100%;\n}\n\n.background {\n fill: none;\n stroke: transparent;\n stroke-width: 1px;\n}\n\n.determinate {\n fill: none;\n stroke: currentColor;\n stroke-linecap: round;\n stroke-width: 1px;\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n transition: all 0.2s ease-in-out;\n}\n\n.indeterminate-indicator-1 {\n animation: spin-infinite 2s linear infinite;\n fill: none;\n stroke: currentColor;\n stroke-linecap: round;\n stroke-width: 1px;\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n transition: all 0.2s ease-in-out;\n}\n\n.base.paused .indeterminate-indicator-1 {\n animation-play-state: paused;\n}\n\n@keyframes spin-infinite {\n 0% {\n stroke-dasharray: 0.01px 43.97px;\n transform: rotate(0deg);\n }\n 50% {\n stroke-dasharray: 21.99px 21.99px;\n transform: rotate(450deg);\n }\n 100% {\n stroke-dasharray: 0.01px 43.97px;\n transform: rotate(1080deg);\n }\n}";
|
|
71
7
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
8
|
+
class ProgressRing extends BaseProgress {}
|
|
9
|
+
__decorate([attr, __metadata("design:type", String)], ProgressRing.prototype, "connotation", void 0);
|
|
10
|
+
__decorate([attr, __metadata("design:type", Number)], ProgressRing.prototype, "size", void 0);
|
|
11
|
+
|
|
12
|
+
let _2 = t => t,
|
|
13
|
+
_t,
|
|
14
|
+
_t2,
|
|
15
|
+
_t3;
|
|
16
|
+
const getClasses = ({
|
|
17
|
+
connotation,
|
|
18
|
+
size,
|
|
19
|
+
paused
|
|
20
|
+
}) => classNames('base', ['disabled', !!paused], [`connotation-${connotation}`, !!connotation], [`size-${size}`, !!size]);
|
|
21
|
+
const progressSegments = 44;
|
|
22
|
+
const ProgressRingTemplate = _ => html(_t || (_t = _2`
|
|
23
|
+
<div
|
|
24
|
+
role="progressbar"
|
|
25
|
+
aria-valuenow="${0}"
|
|
26
|
+
aria-valuemin="${0}"
|
|
27
|
+
aria-valuemax="${0}"
|
|
28
|
+
class="${0} ${0}"
|
|
29
|
+
>
|
|
30
|
+
${0}
|
|
78
31
|
${0}
|
|
79
|
-
></slot>
|
|
80
32
|
</div>
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
33
|
+
`), x => x.value, x => x.min, x => x.max, x => x.paused ? 'paused' : '', getClasses, when(x => typeof x.value === 'number', html(_t2 || (_t2 = _2`
|
|
34
|
+
<svg
|
|
35
|
+
class="progress"
|
|
36
|
+
viewBox="0 0 16 16"
|
|
37
|
+
>
|
|
38
|
+
<circle
|
|
39
|
+
class="background"
|
|
40
|
+
cx="8px"
|
|
41
|
+
cy="8px"
|
|
42
|
+
r="7px"
|
|
43
|
+
></circle>
|
|
44
|
+
<circle
|
|
45
|
+
class="determinate"
|
|
46
|
+
style="stroke-dasharray: ${0}px ${0}px"
|
|
47
|
+
cx="8px"
|
|
48
|
+
cy="8px"
|
|
49
|
+
r="7px"
|
|
50
|
+
></circle>
|
|
51
|
+
</svg>
|
|
52
|
+
`), x => progressSegments * x.percentComplete / 100, progressSegments)), when(x => typeof x.value !== 'number', html(_t3 || (_t3 = _2`
|
|
53
|
+
<svg class="progress" viewBox="0 0 16 16">
|
|
54
|
+
<circle
|
|
55
|
+
class="background"
|
|
56
|
+
cx="8px"
|
|
57
|
+
cy="8px"
|
|
58
|
+
r="7px"
|
|
59
|
+
></circle>
|
|
60
|
+
<circle
|
|
61
|
+
class="indeterminate-indicator-1"
|
|
62
|
+
cx="8px"
|
|
63
|
+
cy="8px"
|
|
64
|
+
r="7px"
|
|
65
|
+
></circle>
|
|
66
|
+
</svg>
|
|
67
|
+
`))));
|
|
90
68
|
|
|
91
|
-
const
|
|
92
|
-
baseName: '
|
|
93
|
-
template:
|
|
69
|
+
const progressRingDefinition = ProgressRing.compose({
|
|
70
|
+
baseName: 'progress-ring',
|
|
71
|
+
template: ProgressRingTemplate,
|
|
94
72
|
styles: css_248z
|
|
95
73
|
});
|
|
96
|
-
const
|
|
97
|
-
const
|
|
74
|
+
const progressRingRegistries = [progressRingDefinition()];
|
|
75
|
+
const registerProgressRing = registerFactory(progressRingRegistries);
|
|
98
76
|
|
|
99
|
-
export {
|
|
77
|
+
export { ProgressRing as P, progressRingDefinition as a, progressRingRegistries as p, registerProgressRing as r };
|
package/shared/definition11.js
CHANGED
|
@@ -1,48 +1,99 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { B as BreadcrumbItem$1 } from './breadcrumb-item.js';
|
|
5
|
-
import { t as textAnchorTemplate } from './text-anchor.template.js';
|
|
6
|
-
import { I as Icon } from './icon.js';
|
|
7
|
-
import { w as when } from './when.js';
|
|
8
|
-
import { c as classNames } from './class-names.js';
|
|
1
|
+
import { F as FoundationElement, _ as __decorate, o as observable, h as html, r as registerFactory } from './index.js';
|
|
2
|
+
import { s as slotted, e as elements } from './slotted.js';
|
|
3
|
+
import { B as BreadcrumbItem } from './breadcrumb-item.js';
|
|
9
4
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
/**
|
|
6
|
+
* A Breadcrumb Custom HTML Element.
|
|
7
|
+
* @slot - The default slot for the breadcrumb items
|
|
8
|
+
* @csspart list - The element wrapping the slotted items
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
class Breadcrumb$1 extends FoundationElement {
|
|
13
|
+
slottedBreadcrumbItemsChanged() {
|
|
14
|
+
if (this.$fastController.isConnected) {
|
|
15
|
+
if (this.slottedBreadcrumbItems === undefined ||
|
|
16
|
+
this.slottedBreadcrumbItems.length === 0) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const lastNode = this.slottedBreadcrumbItems[this.slottedBreadcrumbItems.length - 1];
|
|
20
|
+
this.slottedBreadcrumbItems.forEach((item) => {
|
|
21
|
+
const itemIsLastNode = item === lastNode;
|
|
22
|
+
this.setItemSeparator(item, itemIsLastNode);
|
|
23
|
+
this.setAriaCurrent(item, itemIsLastNode);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
setItemSeparator(item, isLastNode) {
|
|
28
|
+
if (item instanceof BreadcrumbItem) {
|
|
29
|
+
item.separator = !isLastNode;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Finds href on childnodes in the light DOM or shadow DOM.
|
|
34
|
+
* We look in the shadow DOM because we insert an anchor when breadcrumb-item has an href.
|
|
35
|
+
*/
|
|
36
|
+
findChildWithHref(node) {
|
|
37
|
+
var _a, _b;
|
|
38
|
+
if (node.childElementCount > 0) {
|
|
39
|
+
return node.querySelector("a[href]");
|
|
40
|
+
}
|
|
41
|
+
else if ((_a = node.shadowRoot) === null || _a === void 0 ? void 0 : _a.childElementCount) {
|
|
42
|
+
return (_b = node.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector("a[href]");
|
|
43
|
+
}
|
|
44
|
+
else
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Sets ARIA Current for the current node
|
|
49
|
+
* If child node with an anchor tag and with href is found then set aria-current to correct value for the child node,
|
|
50
|
+
* otherwise apply aria-current to the host element, with an href
|
|
51
|
+
*/
|
|
52
|
+
setAriaCurrent(item, isLastNode) {
|
|
53
|
+
const childNodeWithHref = this.findChildWithHref(item);
|
|
54
|
+
if (childNodeWithHref === null &&
|
|
55
|
+
item.hasAttribute("href") &&
|
|
56
|
+
item instanceof BreadcrumbItem) {
|
|
57
|
+
isLastNode
|
|
58
|
+
? item.setAttribute("aria-current", "page")
|
|
59
|
+
: item.removeAttribute("aria-current");
|
|
60
|
+
}
|
|
61
|
+
else if (childNodeWithHref !== null) {
|
|
62
|
+
isLastNode
|
|
63
|
+
? childNodeWithHref.setAttribute("aria-current", "page")
|
|
64
|
+
: childNodeWithHref.removeAttribute("aria-current");
|
|
65
|
+
}
|
|
66
|
+
}
|
|
16
67
|
}
|
|
17
|
-
__decorate([
|
|
68
|
+
__decorate([
|
|
69
|
+
observable
|
|
70
|
+
], Breadcrumb$1.prototype, "slottedBreadcrumbItems", void 0);
|
|
18
71
|
|
|
19
|
-
let
|
|
20
|
-
_t
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
72
|
+
let _ = t => t,
|
|
73
|
+
_t;
|
|
74
|
+
const breadcrumbTemplate = () => html(_t || (_t = _`
|
|
75
|
+
<nav aria-label="breadcrumbs" class="base">
|
|
76
|
+
<div role="list" class="list">
|
|
77
|
+
<slot
|
|
78
|
+
${0}
|
|
79
|
+
></slot>
|
|
80
|
+
</div>
|
|
81
|
+
</nav>
|
|
82
|
+
`), slotted({
|
|
83
|
+
property: 'slottedBreadcrumbItems',
|
|
84
|
+
filter: elements()
|
|
85
|
+
}));
|
|
30
86
|
|
|
31
|
-
|
|
87
|
+
var css_248z = ".list {\n display: flex;\n}";
|
|
32
88
|
|
|
33
|
-
|
|
34
|
-
</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`<${0} class="separator" name="chevron-right-solid"></${0}>`), iconTag, iconTag)));
|
|
35
|
-
};
|
|
89
|
+
class Breadcrumb extends Breadcrumb$1 {}
|
|
36
90
|
|
|
37
|
-
const
|
|
38
|
-
baseName: 'breadcrumb
|
|
39
|
-
template:
|
|
40
|
-
styles: css_248z
|
|
41
|
-
shadowOptions: {
|
|
42
|
-
delegatesFocus: true
|
|
43
|
-
}
|
|
91
|
+
const breadcrumbDefinition = Breadcrumb.compose({
|
|
92
|
+
baseName: 'breadcrumb',
|
|
93
|
+
template: breadcrumbTemplate,
|
|
94
|
+
styles: css_248z
|
|
44
95
|
});
|
|
45
|
-
const
|
|
46
|
-
const
|
|
96
|
+
const breadcrumbRegistries = [breadcrumbDefinition()];
|
|
97
|
+
const registerBreadcrumb = registerFactory(breadcrumbRegistries);
|
|
47
98
|
|
|
48
|
-
export {
|
|
99
|
+
export { breadcrumbRegistries as a, breadcrumbDefinition as b, registerBreadcrumb as r };
|