@vonage/vivid 3.10.0 → 3.12.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/accordion/index.js +1 -0
- package/breadcrumb/index.js +1 -0
- package/card/index.js +1 -0
- package/combobox/index.js +1 -0
- package/custom-elements.json +297 -327
- package/data-grid/index.js +2 -1
- package/dialog/index.js +1 -0
- package/index.js +3 -2
- package/lib/enums.d.ts +10 -9
- package/lib/layout/layout.d.ts +2 -0
- package/lib/pagination/definition.d.ts +3 -0
- package/lib/pagination/index.d.ts +1 -0
- package/lib/pagination/pagination.d.ts +18 -0
- package/lib/pagination/pagination.template.d.ts +4 -0
- package/lib/popup/popup.d.ts +2 -2
- package/lib/tooltip/tooltip.d.ts +10 -5
- package/listbox/index.js +1 -0
- package/menu/index.js +1 -0
- package/package.json +1 -1
- package/pagination/index.js +329 -0
- package/radio-group/index.js +2 -1
- package/select/index.js +1 -0
- package/shared/children.js +1 -1
- package/shared/definition.js +3 -2
- package/shared/definition10.js +1 -1
- package/shared/definition11.js +1 -1
- package/shared/definition12.js +8 -8
- package/shared/definition13.js +2 -1
- package/shared/definition14.js +1 -1
- package/shared/definition15.js +1 -1
- package/shared/definition16.js +1 -1
- package/shared/definition17.js +1 -1
- package/shared/definition18.js +1 -1
- package/shared/definition19.js +1 -1
- package/shared/definition2.js +1 -1
- package/shared/definition20.js +5 -17
- package/shared/definition21.js +1 -1
- package/shared/definition22.js +4 -3
- package/shared/definition23.js +2 -2
- package/shared/definition24.js +1 -1
- package/shared/definition25.js +1 -1
- package/shared/definition26.js +1 -1
- package/shared/definition27.js +7 -3
- package/shared/definition28.js +1 -1
- package/shared/definition30.js +10 -4
- package/shared/definition32.js +1 -1
- package/shared/definition33.js +1 -1
- package/shared/definition34.js +1 -1
- package/shared/definition35.js +1 -1
- package/shared/definition36.js +1 -1
- package/shared/definition37.js +1 -1
- package/shared/definition38.js +3 -2
- package/shared/definition39.js +1 -1
- package/shared/definition4.js +1 -1
- package/shared/definition40.js +1 -1
- package/shared/definition42.js +1 -1
- package/shared/definition43.js +1 -1
- package/shared/definition45.js +1 -1
- package/shared/definition46.js +1 -1
- package/shared/definition48.js +1 -1
- package/shared/definition5.js +1 -1
- package/shared/definition50.js +34 -26
- package/shared/definition51.js +3 -2
- package/shared/definition6.js +1 -1
- package/shared/definition7.js +5 -4
- package/shared/definition9.js +1 -1
- package/shared/enums.js +10 -9
- package/shared/form-elements.js +1 -1
- package/shared/index.js +1 -1
- package/shared/node-observation.js +74 -0
- package/shared/patterns/form-elements/form-elements.d.ts +4 -4
- package/shared/slotted.js +3 -73
- 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/tabs/index.js +1 -0
- package/tree-item/index.js +1 -0
- package/tree-view/index.js +1 -0
- package/vivid.api.json +37 -16
package/data-grid/index.js
CHANGED
|
@@ -2,8 +2,9 @@ import { r as registerDataGrid } from '../shared/definition22.js';
|
|
|
2
2
|
import '../shared/index.js';
|
|
3
3
|
import '../shared/key-codes.js';
|
|
4
4
|
import '../shared/repeat.js';
|
|
5
|
-
import '../shared/
|
|
5
|
+
import '../shared/node-observation.js';
|
|
6
6
|
import '../shared/children.js';
|
|
7
|
+
import '../shared/slotted.js';
|
|
7
8
|
import '../shared/focus2.js';
|
|
8
9
|
import '../shared/focus.js';
|
|
9
10
|
|
package/dialog/index.js
CHANGED
package/index.js
CHANGED
|
@@ -49,10 +49,11 @@ export { r as registerTreeView, t as treeViewDefinition, a as treeViewRegistries
|
|
|
49
49
|
export { r as registerTreeItem, t as treeItemDefinition, a as treeItemRegistries } from './shared/definition51.js';
|
|
50
50
|
export { r as registerTag, t as tagDefinition } from './shared/definition46.js';
|
|
51
51
|
export { r as registerTagGroup, t as tagGroupDefinition, a as tagGroupRegistries } from './shared/definition47.js';
|
|
52
|
-
export { A as Appearance, c as AriaLive, C as Connotation,
|
|
53
|
-
export {
|
|
52
|
+
export { A as Appearance, c as AriaLive, C as Connotation, b as ConnotationDecorative, L as LayoutSize, P as Position, R as Role, S as Shape, a as Size } from './shared/enums.js';
|
|
53
|
+
export { a9 as designSystem, r as registerFactory } from './shared/index.js';
|
|
54
54
|
import './shared/key-codes.js';
|
|
55
55
|
import './shared/numbers.js';
|
|
56
|
+
import './shared/node-observation.js';
|
|
56
57
|
import './shared/slotted.js';
|
|
57
58
|
import './shared/class-names.js';
|
|
58
59
|
import './shared/definition4.js';
|
package/lib/enums.d.ts
CHANGED
|
@@ -22,20 +22,21 @@ export declare enum Appearance {
|
|
|
22
22
|
Duotone = "duotone",
|
|
23
23
|
Fieldset = "fieldset",
|
|
24
24
|
Subtle = "subtle",
|
|
25
|
-
Ghost = "ghost"
|
|
25
|
+
Ghost = "ghost",
|
|
26
|
+
Listitem = "listitem"
|
|
26
27
|
}
|
|
27
28
|
export declare enum Size {
|
|
28
|
-
UltraCondensed = "
|
|
29
|
-
SuperCondensed = "
|
|
30
|
-
ExtraCondensed = "
|
|
31
|
-
SemiCondensed = "
|
|
29
|
+
UltraCondensed = "ultra-condensed",
|
|
30
|
+
SuperCondensed = "super-condensed",
|
|
31
|
+
ExtraCondensed = "extra-condensed",
|
|
32
|
+
SemiCondensed = "semi-condensed",
|
|
32
33
|
Condensed = "condensed",
|
|
33
34
|
Normal = "normal",
|
|
34
|
-
SemiExpanded = "
|
|
35
|
+
SemiExpanded = "semi-expanded",
|
|
35
36
|
Expanded = "expanded",
|
|
36
|
-
ExtraExpanded = "
|
|
37
|
-
SuperExpanded = "
|
|
38
|
-
UltraExpanded = "
|
|
37
|
+
ExtraExpanded = "extra-expanded",
|
|
38
|
+
SuperExpanded = "super-expanded",
|
|
39
|
+
UltraExpanded = "ultra-expanded"
|
|
39
40
|
}
|
|
40
41
|
export declare enum LayoutSize {
|
|
41
42
|
Small = "small",
|
package/lib/layout/layout.d.ts
CHANGED
|
@@ -6,10 +6,12 @@ export declare enum AUTO_SIZING {
|
|
|
6
6
|
}
|
|
7
7
|
export declare type Gutters = Extract<LayoutSize, LayoutSize.Small | LayoutSize.Medium | LayoutSize.Large>;
|
|
8
8
|
export declare type ColumnSpacing = Extract<LayoutSize, LayoutSize.Small | LayoutSize.Medium | LayoutSize.Large>;
|
|
9
|
+
export declare type RowSpacing = Extract<LayoutSize, LayoutSize.Small | LayoutSize.Medium | LayoutSize.Large>;
|
|
9
10
|
export declare type ColumnBasis = Extract<LayoutSize, LayoutSize.Small | LayoutSize.Medium | LayoutSize.Large> | 'block';
|
|
10
11
|
export declare class Layout extends FoundationElement {
|
|
11
12
|
gutters?: Gutters;
|
|
12
13
|
columnBasis?: ColumnBasis;
|
|
13
14
|
columnSpacing?: ColumnSpacing;
|
|
15
|
+
rowSpacing?: RowSpacing;
|
|
14
16
|
autoSizing?: AUTO_SIZING;
|
|
15
17
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
2
|
+
export declare const paginationDefinition: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<FoundationElementDefinition, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
|
|
3
|
+
export declare const registerPagination: (prefix?: string) => import("@microsoft/fast-foundation").DesignSystem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
|
+
import type { Size } from '../enums';
|
|
3
|
+
import type { Button } from '../button/button';
|
|
4
|
+
export declare type PaginationSize = Extract<Size, Size.SuperCondensed | Size.Condensed | Size.Normal>;
|
|
5
|
+
export declare class Pagination extends FoundationElement {
|
|
6
|
+
size?: PaginationSize;
|
|
7
|
+
paginationButtons?: Button[];
|
|
8
|
+
prevButton?: Button;
|
|
9
|
+
nextButton?: Button;
|
|
10
|
+
navIcons: boolean;
|
|
11
|
+
get pagesList(): (number | "...")[];
|
|
12
|
+
total: number;
|
|
13
|
+
selectedIndex: number | undefined;
|
|
14
|
+
constructor();
|
|
15
|
+
totalChanged(_: number, newValue: number): void;
|
|
16
|
+
selectedIndexChanged(oldValue: number, newValue: number): void;
|
|
17
|
+
paginationButtonsChanged(_: Button[] | undefined, newValue: Button[]): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ViewTemplate } from '@microsoft/fast-element';
|
|
2
|
+
import type { ElementDefinitionContext, FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
3
|
+
import type { Pagination } from './pagination';
|
|
4
|
+
export declare const PaginationTemplate: (context: ElementDefinitionContext, definition: FoundationElementDefinition) => ViewTemplate<Pagination>;
|
package/lib/popup/popup.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { FoundationElement } from '@microsoft/fast-foundation';
|
|
|
2
2
|
import type { Placement, Strategy } from '@floating-ui/dom';
|
|
3
3
|
export declare class Popup extends FoundationElement {
|
|
4
4
|
#private;
|
|
5
|
-
protected anchorEl: Element | null | undefined;
|
|
6
5
|
popupEl: HTMLElement;
|
|
7
6
|
arrowEl: HTMLElement;
|
|
8
7
|
open: boolean;
|
|
@@ -12,10 +11,11 @@ export declare class Popup extends FoundationElement {
|
|
|
12
11
|
alternate: boolean;
|
|
13
12
|
placement?: Placement;
|
|
14
13
|
strategy?: Strategy;
|
|
15
|
-
anchor
|
|
14
|
+
anchor?: string | HTMLElement;
|
|
16
15
|
disconnectedCallback(): void;
|
|
17
16
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
18
17
|
updatePosition(): Promise<void>;
|
|
18
|
+
get anchorEl(): HTMLElement | null;
|
|
19
19
|
show(): void;
|
|
20
20
|
hide(): void;
|
|
21
21
|
}
|
package/lib/tooltip/tooltip.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
|
+
import type { Placement } from '@floating-ui/dom';
|
|
3
|
+
declare type anchorType = string | HTMLElement;
|
|
4
|
+
export declare class Tooltip extends FoundationElement {
|
|
3
5
|
#private;
|
|
4
6
|
text?: string;
|
|
5
|
-
|
|
7
|
+
placement?: Placement;
|
|
8
|
+
open: boolean;
|
|
9
|
+
anchor?: anchorType;
|
|
10
|
+
anchorChanged(_: anchorType, newValue: anchorType): void;
|
|
6
11
|
disconnectedCallback(): void;
|
|
7
|
-
|
|
8
|
-
openChanged(oldValue: boolean, newValue: boolean): void;
|
|
12
|
+
openChanged(_: boolean, newValue: boolean): void;
|
|
9
13
|
}
|
|
14
|
+
export {};
|
package/listbox/index.js
CHANGED
package/menu/index.js
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
import { B as Button, b as buttonRegistries } from '../shared/definition7.js';
|
|
2
|
+
import { g as global$1, l as fails$2, k as functionUncurryThis, G as _export, F as FoundationElement, _ as __decorate, a as attr, b as __metadata, o as observable, V as volatile, a7 as addToUnscopables$1, a8 as arrayIncludes, w as wellKnownSymbol$2, M as isObject$1, c as classofRaw, T as requireObjectCoercible$1, h as html, r as registerFactory } from '../shared/index.js';
|
|
3
|
+
import { t as toString$2 } from '../shared/to-string.js';
|
|
4
|
+
import { w as whitespaces$1, s as stringTrim } from '../shared/string-trim.js';
|
|
5
|
+
import '../shared/es.regexp.to-string.js';
|
|
6
|
+
import { a as Size } from '../shared/enums.js';
|
|
7
|
+
import { e as elements } from '../shared/node-observation.js';
|
|
8
|
+
import { r as ref } from '../shared/ref.js';
|
|
9
|
+
import { r as repeat } from '../shared/repeat.js';
|
|
10
|
+
import { c as children } from '../shared/children.js';
|
|
11
|
+
import { c as classNames } from '../shared/class-names.js';
|
|
12
|
+
import { w as when } from '../shared/when.js';
|
|
13
|
+
import '../shared/definition3.js';
|
|
14
|
+
import '../shared/icon.js';
|
|
15
|
+
import '../shared/_has.js';
|
|
16
|
+
import '../shared/definition4.js';
|
|
17
|
+
import '../shared/focus.js';
|
|
18
|
+
import '../shared/definition9.js';
|
|
19
|
+
import '../shared/base-progress.js';
|
|
20
|
+
import '../shared/affix.js';
|
|
21
|
+
import '../shared/button.js';
|
|
22
|
+
import '../shared/apply-mixins.js';
|
|
23
|
+
import '../shared/form-associated.js';
|
|
24
|
+
import '../shared/key-codes.js';
|
|
25
|
+
import '../shared/aria-global.js';
|
|
26
|
+
import '../shared/start-end.js';
|
|
27
|
+
import '../shared/focus2.js';
|
|
28
|
+
|
|
29
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Sun, 14 May 2023 08:16:54 GMT\n */\n.control {\n display: inline-flex;\n justify-content: space-between;\n}\n\n.buttons-wrapper {\n display: flex;\n column-gap: 4px;\n}\n\n.dots {\n align-self: center;\n text-align: center;\n}\n.dots:not(.size-super-condensed) {\n font: var(--vvd-typography-base-bold);\n}\n.dots.size-super-condensed {\n font: var(--vvd-typography-base-condensed-bold);\n inline-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n.dots.size-condensed {\n inline-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8));\n}\n.dots.size-normal {\n inline-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)));\n}";
|
|
30
|
+
|
|
31
|
+
var global = global$1;
|
|
32
|
+
var fails$1 = fails$2;
|
|
33
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
34
|
+
var toString$1 = toString$2;
|
|
35
|
+
var trim = stringTrim.trim;
|
|
36
|
+
var whitespaces = whitespaces$1;
|
|
37
|
+
|
|
38
|
+
var $parseInt$1 = global.parseInt;
|
|
39
|
+
var Symbol = global.Symbol;
|
|
40
|
+
var ITERATOR = Symbol && Symbol.iterator;
|
|
41
|
+
var hex = /^[+-]?0x/i;
|
|
42
|
+
var exec = uncurryThis$1(hex.exec);
|
|
43
|
+
var FORCED = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
|
|
44
|
+
// MS Edge 18- broken with boxed symbols
|
|
45
|
+
|| (ITERATOR && !fails$1(function () { $parseInt$1(Object(ITERATOR)); }));
|
|
46
|
+
|
|
47
|
+
// `parseInt` method
|
|
48
|
+
// https://tc39.es/ecma262/#sec-parseint-string-radix
|
|
49
|
+
var numberParseInt = FORCED ? function parseInt(string, radix) {
|
|
50
|
+
var S = trim(toString$1(string));
|
|
51
|
+
return $parseInt$1(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));
|
|
52
|
+
} : $parseInt$1;
|
|
53
|
+
|
|
54
|
+
var $$2 = _export;
|
|
55
|
+
var $parseInt = numberParseInt;
|
|
56
|
+
|
|
57
|
+
// `parseInt` method
|
|
58
|
+
// https://tc39.es/ecma262/#sec-parseint-string-radix
|
|
59
|
+
$$2({ global: true, forced: parseInt != $parseInt }, {
|
|
60
|
+
parseInt: $parseInt
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
const MAX_DIGITS_AND_PLACEHOLDERS = 7;
|
|
64
|
+
const totalConverter = {
|
|
65
|
+
fromView: value => parseInt(value, 10),
|
|
66
|
+
toView: value => value.toString()
|
|
67
|
+
};
|
|
68
|
+
class Pagination extends FoundationElement {
|
|
69
|
+
constructor() {
|
|
70
|
+
super();
|
|
71
|
+
this.navIcons = false;
|
|
72
|
+
this.total = 0;
|
|
73
|
+
this.selectedIndex = 0;
|
|
74
|
+
this.addEventListener('tabpressed', e => {
|
|
75
|
+
const {
|
|
76
|
+
value: currentLabel,
|
|
77
|
+
shiftKey
|
|
78
|
+
} = e.detail;
|
|
79
|
+
const index = this.paginationButtons.findIndex(button => Number(button.label) === currentLabel);
|
|
80
|
+
const focusDirection = shiftKey ? -1 : 1;
|
|
81
|
+
const newIndex = index + focusDirection;
|
|
82
|
+
if (newIndex < 0) {
|
|
83
|
+
return this.prevButton.focus();
|
|
84
|
+
}
|
|
85
|
+
if (newIndex > this.paginationButtons.length - 1) {
|
|
86
|
+
return this.nextButton.focus();
|
|
87
|
+
}
|
|
88
|
+
this.paginationButtons && this.paginationButtons[index + focusDirection].focus();
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
get pagesList() {
|
|
92
|
+
return new Array(this.total < MAX_DIGITS_AND_PLACEHOLDERS ? this.total : MAX_DIGITS_AND_PLACEHOLDERS).fill(0).map((_, i, arr) => {
|
|
93
|
+
if (i === 0) return 1;
|
|
94
|
+
if (i === arr.length - 1) return this.total;
|
|
95
|
+
if (this.selectedIndex !== undefined && this.total > MAX_DIGITS_AND_PLACEHOLDERS) {
|
|
96
|
+
if (this.selectedIndex < 4) {
|
|
97
|
+
if (i === MAX_DIGITS_AND_PLACEHOLDERS - 2) return '...';
|
|
98
|
+
}
|
|
99
|
+
if (this.selectedIndex >= 4 && this.selectedIndex <= this.total - 5) {
|
|
100
|
+
if (i > 1 && i < MAX_DIGITS_AND_PLACEHOLDERS - 2) return this.selectedIndex + (i - 2);
|
|
101
|
+
if (i === 1 || i === MAX_DIGITS_AND_PLACEHOLDERS - 2) return '...';
|
|
102
|
+
}
|
|
103
|
+
if (this.selectedIndex > this.total - 5) {
|
|
104
|
+
if (i > 1) return this.total - (6 - i);
|
|
105
|
+
if (i === 1) return '...';
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return i + 1;
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
totalChanged(_, newValue) {
|
|
112
|
+
if (newValue < 0) {
|
|
113
|
+
this.total = 0;
|
|
114
|
+
}
|
|
115
|
+
this.selectedIndex = 0;
|
|
116
|
+
}
|
|
117
|
+
selectedIndexChanged(oldValue, newValue) {
|
|
118
|
+
if (oldValue === undefined) return;
|
|
119
|
+
this.$emit('pagination-change', {
|
|
120
|
+
selectedIndex: newValue,
|
|
121
|
+
total: this.total,
|
|
122
|
+
oldIndex: oldValue
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
paginationButtonsChanged(_, newValue) {
|
|
126
|
+
newValue.forEach(button => {
|
|
127
|
+
button.shadowRoot.querySelector('button').classList.add('icon-only');
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
__decorate([attr, __metadata("design:type", String)], Pagination.prototype, "size", void 0);
|
|
132
|
+
__decorate([observable, __metadata("design:type", Array)], Pagination.prototype, "paginationButtons", void 0);
|
|
133
|
+
__decorate([observable, __metadata("design:type", Function)], Pagination.prototype, "prevButton", void 0);
|
|
134
|
+
__decorate([observable, __metadata("design:type", Function)], Pagination.prototype, "nextButton", void 0);
|
|
135
|
+
__decorate([attr({
|
|
136
|
+
attribute: 'nav-icons',
|
|
137
|
+
mode: 'boolean'
|
|
138
|
+
}), __metadata("design:type", Object)], Pagination.prototype, "navIcons", void 0);
|
|
139
|
+
__decorate([volatile, __metadata("design:type", Object), __metadata("design:paramtypes", [])], Pagination.prototype, "pagesList", null);
|
|
140
|
+
__decorate([attr({
|
|
141
|
+
mode: 'reflect',
|
|
142
|
+
converter: totalConverter
|
|
143
|
+
}), __metadata("design:type", Number)], Pagination.prototype, "total", void 0);
|
|
144
|
+
__decorate([attr({
|
|
145
|
+
mode: 'reflect',
|
|
146
|
+
converter: totalConverter,
|
|
147
|
+
attribute: 'selected-index'
|
|
148
|
+
}), __metadata("design:type", Object)], Pagination.prototype, "selectedIndex", void 0);
|
|
149
|
+
|
|
150
|
+
var $$1 = _export;
|
|
151
|
+
var $includes = arrayIncludes.includes;
|
|
152
|
+
var fails = fails$2;
|
|
153
|
+
var addToUnscopables = addToUnscopables$1;
|
|
154
|
+
|
|
155
|
+
// FF99+ bug
|
|
156
|
+
var BROKEN_ON_SPARSE = fails(function () {
|
|
157
|
+
return !Array(1).includes();
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
// `Array.prototype.includes` method
|
|
161
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
162
|
+
$$1({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
|
|
163
|
+
includes: function includes(el /* , fromIndex = 0 */) {
|
|
164
|
+
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
169
|
+
addToUnscopables('includes');
|
|
170
|
+
|
|
171
|
+
var isObject = isObject$1;
|
|
172
|
+
var classof = classofRaw;
|
|
173
|
+
var wellKnownSymbol$1 = wellKnownSymbol$2;
|
|
174
|
+
|
|
175
|
+
var MATCH$1 = wellKnownSymbol$1('match');
|
|
176
|
+
|
|
177
|
+
// `IsRegExp` abstract operation
|
|
178
|
+
// https://tc39.es/ecma262/#sec-isregexp
|
|
179
|
+
var isRegexp = function (it) {
|
|
180
|
+
var isRegExp;
|
|
181
|
+
return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
var isRegExp = isRegexp;
|
|
185
|
+
|
|
186
|
+
var $TypeError = TypeError;
|
|
187
|
+
|
|
188
|
+
var notARegexp = function (it) {
|
|
189
|
+
if (isRegExp(it)) {
|
|
190
|
+
throw $TypeError("The method doesn't accept regular expressions");
|
|
191
|
+
} return it;
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
var wellKnownSymbol = wellKnownSymbol$2;
|
|
195
|
+
|
|
196
|
+
var MATCH = wellKnownSymbol('match');
|
|
197
|
+
|
|
198
|
+
var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
199
|
+
var regexp = /./;
|
|
200
|
+
try {
|
|
201
|
+
'/./'[METHOD_NAME](regexp);
|
|
202
|
+
} catch (error1) {
|
|
203
|
+
try {
|
|
204
|
+
regexp[MATCH] = false;
|
|
205
|
+
return '/./'[METHOD_NAME](regexp);
|
|
206
|
+
} catch (error2) { /* empty */ }
|
|
207
|
+
} return false;
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
var $ = _export;
|
|
211
|
+
var uncurryThis = functionUncurryThis;
|
|
212
|
+
var notARegExp = notARegexp;
|
|
213
|
+
var requireObjectCoercible = requireObjectCoercible$1;
|
|
214
|
+
var toString = toString$2;
|
|
215
|
+
var correctIsRegExpLogic = correctIsRegexpLogic;
|
|
216
|
+
|
|
217
|
+
var stringIndexOf = uncurryThis(''.indexOf);
|
|
218
|
+
|
|
219
|
+
// `String.prototype.includes` method
|
|
220
|
+
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
|
221
|
+
$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
|
|
222
|
+
includes: function includes(searchString /* , position = 0 */) {
|
|
223
|
+
return !!~stringIndexOf(
|
|
224
|
+
toString(requireObjectCoercible(this)),
|
|
225
|
+
toString(notARegExp(searchString)),
|
|
226
|
+
arguments.length > 1 ? arguments[1] : undefined
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
let _2 = t => t,
|
|
232
|
+
_t,
|
|
233
|
+
_t2,
|
|
234
|
+
_t3,
|
|
235
|
+
_t4;
|
|
236
|
+
const ALLOWED_SIZES = [Size.SuperCondensed, Size.Condensed, Size.Normal];
|
|
237
|
+
const handleSelection = (value, {
|
|
238
|
+
parent: x
|
|
239
|
+
}) => {
|
|
240
|
+
return x.selectedIndex = Number(value) - 1;
|
|
241
|
+
};
|
|
242
|
+
const handleKeyDown = (value, {
|
|
243
|
+
event,
|
|
244
|
+
parent
|
|
245
|
+
}) => {
|
|
246
|
+
if (event.key === ' ' || event.key === 'Enter') {
|
|
247
|
+
handleSelection(value, {
|
|
248
|
+
parent
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
if (event.key === 'Tab') {
|
|
252
|
+
event.target.dispatchEvent(new CustomEvent('tabpressed', {
|
|
253
|
+
detail: {
|
|
254
|
+
value,
|
|
255
|
+
shiftKey: event.shiftKey
|
|
256
|
+
},
|
|
257
|
+
bubbles: true,
|
|
258
|
+
composed: true
|
|
259
|
+
}));
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
const getClasses = _ => classNames('control');
|
|
263
|
+
function getButtonAppearance(value, {
|
|
264
|
+
parent
|
|
265
|
+
}) {
|
|
266
|
+
return parent.selectedIndex === Number(value) - 1 ? 'filled' : 'ghost';
|
|
267
|
+
}
|
|
268
|
+
const paginationButtonRenderer = buttonTag => html(_t || (_t = _2`
|
|
269
|
+
${0}
|
|
270
|
+
${0}`), when(value => value !== '...', html(_t2 || (_t2 = _2`
|
|
271
|
+
<${0} class="vwc-pagination-button"
|
|
272
|
+
label="${0}"
|
|
273
|
+
appearance="${0}"
|
|
274
|
+
size="${0}"
|
|
275
|
+
tabindex="0"
|
|
276
|
+
aria-pressed="${0}"
|
|
277
|
+
@click="${0}"
|
|
278
|
+
@keydown="${0}"
|
|
279
|
+
</${0}>
|
|
280
|
+
`), buttonTag, value => value, getButtonAppearance, (_, {
|
|
281
|
+
parent: x
|
|
282
|
+
}) => getPaginationSize(x), (value, {
|
|
283
|
+
parent
|
|
284
|
+
}) => parent.selectedIndex === Number(value) - 1, handleSelection, handleKeyDown, buttonTag)), when(value => value === '...', html(_t3 || (_t3 = _2`<div class="dots size-${0}">...</div>`), getPaginationSize)));
|
|
285
|
+
const getPaginationSize = x => {
|
|
286
|
+
if (!x.size || !ALLOWED_SIZES.includes(x.size)) {
|
|
287
|
+
return Size.SuperCondensed;
|
|
288
|
+
}
|
|
289
|
+
return x.size;
|
|
290
|
+
};
|
|
291
|
+
const PaginationTemplate = context => {
|
|
292
|
+
const buttonTag = context.tagFor(Button);
|
|
293
|
+
const paginationButtonTemplate = paginationButtonRenderer(buttonTag);
|
|
294
|
+
return html(_t4 || (_t4 = _2`
|
|
295
|
+
<div class="${0}">
|
|
296
|
+
<${0} class="prev-button" ${0}
|
|
297
|
+
label="${0}"
|
|
298
|
+
icon="${0}"
|
|
299
|
+
size="${0}"
|
|
300
|
+
?disabled="${0}"
|
|
301
|
+
@click="${0}"
|
|
302
|
+
></${0}>
|
|
303
|
+
<div id="buttons-wrapper" class="buttons-wrapper" ${0}>
|
|
304
|
+
${0}
|
|
305
|
+
</div>
|
|
306
|
+
<${0} class="next-button" ${0}
|
|
307
|
+
label="${0}"
|
|
308
|
+
icon="${0}"
|
|
309
|
+
size="${0}"
|
|
310
|
+
?disabled="${0}"
|
|
311
|
+
@click="${0}"
|
|
312
|
+
></${0}>
|
|
313
|
+
</div>`), getClasses, buttonTag, ref('prevButton'), x => !x.navIcons ? 'Previous' : null, x => x.navIcons ? 'chevron-left-line' : null, getPaginationSize, x => x.total === 0 || x.selectedIndex === 0, x => x.selectedIndex !== undefined && x.selectedIndex--, buttonTag, children({
|
|
314
|
+
property: 'paginationButtons',
|
|
315
|
+
filter: elements(buttonTag)
|
|
316
|
+
}), repeat(x => x.pagesList, paginationButtonTemplate, {
|
|
317
|
+
positioning: true
|
|
318
|
+
}), buttonTag, ref('nextButton'), x => !x.navIcons ? 'Next' : null, x => x.navIcons ? 'chevron-right-line' : null, getPaginationSize, x => x.total === 0 || x.selectedIndex === x.total - 1, x => x.selectedIndex !== undefined && x.selectedIndex++, buttonTag);
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
const paginationDefinition = Pagination.compose({
|
|
322
|
+
baseName: 'pagination',
|
|
323
|
+
template: PaginationTemplate,
|
|
324
|
+
styles: css_248z
|
|
325
|
+
});
|
|
326
|
+
const paginationRegistries = [paginationDefinition(), buttonRegistries];
|
|
327
|
+
const registerPagination = registerFactory(paginationRegistries);
|
|
328
|
+
|
|
329
|
+
registerPagination();
|
package/radio-group/index.js
CHANGED
|
@@ -5,8 +5,9 @@ import '../shared/key-codes.js';
|
|
|
5
5
|
import '../shared/aria.js';
|
|
6
6
|
import '../shared/radio.js';
|
|
7
7
|
import '../shared/form-associated.js';
|
|
8
|
-
import '../shared/
|
|
8
|
+
import '../shared/node-observation.js';
|
|
9
9
|
import '../shared/aria2.js';
|
|
10
|
+
import '../shared/slotted.js';
|
|
10
11
|
import '../shared/when.js';
|
|
11
12
|
|
|
12
13
|
registerRadioGroup();
|
package/select/index.js
CHANGED
package/shared/children.js
CHANGED
package/shared/definition.js
CHANGED
|
@@ -2,7 +2,8 @@ import { F as FoundationElement, _ as __decorate, a as attr, o as observable, h
|
|
|
2
2
|
import { A as AccordionItem, a as accordionItemRegistries } from './definition2.js';
|
|
3
3
|
import { k as keyEnd, a as keyHome, b as keyArrowDown, c as keyArrowUp } from './key-codes.js';
|
|
4
4
|
import { w as wrapInBounds } from './numbers.js';
|
|
5
|
-
import {
|
|
5
|
+
import { e as elements } from './node-observation.js';
|
|
6
|
+
import { s as slotted } from './slotted.js';
|
|
6
7
|
import { c as classNames } from './class-names.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
@@ -186,7 +187,7 @@ __decorate([
|
|
|
186
187
|
observable
|
|
187
188
|
], Accordion$1.prototype, "accordionItems", void 0);
|
|
188
189
|
|
|
189
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
190
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Sun, 14 May 2023 08:16:54 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
191
|
|
|
191
192
|
class Accordion extends Accordion$1 {
|
|
192
193
|
constructor() {
|
package/shared/definition10.js
CHANGED
|
@@ -4,7 +4,7 @@ import { I as Icon } from './icon.js';
|
|
|
4
4
|
import { w as when } from './when.js';
|
|
5
5
|
import { c as classNames } from './class-names.js';
|
|
6
6
|
|
|
7
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
7
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Sun, 14 May 2023 08:16:54 GMT\n */\n.base {\n display: inline-flex;\n overflow: hidden;\n align-items: center;\n justify-content: center;\n background-color: var(--_appearance-color-fill);\n block-size: var(--_size);\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_appearance-color-text);\n inline-size: var(--_size);\n vertical-align: middle;\n}\n.base.connotation-cta {\n --_connotation-color-primary: var(--vvd-color-cta-500);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-firm: var(--vvd-color-cta-600);\n --_connotation-color-fierce: var(--vvd-color-cta-700);\n --_connotation-color-pale: var(--vvd-color-cta-300);\n}\n.base:not(.connotation-cta) {\n --_connotation-color-primary: var(--vvd-color-canvas-text);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-firm: var(--vvd-color-canvas-text);\n --_connotation-color-fierce: var(--vvd-color-neutral-700);\n --_connotation-color-pale: var(--vvd-color-neutral-300);\n}\n.base {\n --_appearance-color-text: var(--_connotation-color-primary-text);\n --_appearance-color-fill: var(--_connotation-color-primary);\n --_appearance-color-outline: transparent;\n}\n.base.appearance-outlined {\n --_appearance-color-text: var(--_connotation-color-firm);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: var(--_connotation-color-firm);\n}\n.base.appearance-duotone {\n --_appearance-color-text: var(--_connotation-color-fierce);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: var(--_connotation-color-pale);\n}\n.base.size-condensed {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8));\n}\n.base.size-condensed .initials {\n font: var(--vvd-typography-base-condensed-bold);\n}\n.base.size-condensed .icon {\n font-size: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)) / 2);\n line-height: 1;\n}\n.base.size-expanded {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 8));\n}\n.base.size-expanded .initials {\n font: var(--vvd-typography-heading-4);\n}\n.base.size-expanded .icon {\n font-size: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 8)) / 2);\n line-height: 1;\n}\n.base:not(.size-condensed, .size-expanded) {\n --_size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)));\n}\n.base:not(.size-condensed, .size-expanded) .initials {\n font: var(--vvd-typography-base-extended-bold);\n}\n.base:not(.size-condensed, .size-expanded) .icon {\n font-size: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) / 2);\n line-height: 1;\n}\n.base:not(.shape-pill) {\n border-radius: 6px;\n}\n.base.shape-pill {\n border-radius: 50%;\n}\n.base .initials {\n text-transform: uppercase;\n}\n.base ::slotted(*) {\n block-size: 100%;\n inline-size: 100%;\n object-fit: cover;\n}";
|
|
8
8
|
|
|
9
9
|
class Avatar extends FoundationElement {}
|
|
10
10
|
__decorate([attr, __metadata("design:type", String)], Avatar.prototype, "connotation", void 0);
|
package/shared/definition11.js
CHANGED
|
@@ -12,7 +12,7 @@ __decorate([attr, __metadata("design:type", String)], Badge.prototype, "appearan
|
|
|
12
12
|
__decorate([attr, __metadata("design:type", String)], Badge.prototype, "text", void 0);
|
|
13
13
|
applyMixins(Badge, AffixIconWithTrailing);
|
|
14
14
|
|
|
15
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
15
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Sun, 14 May 2023 08:16:54 GMT\n */\n.base {\n --_badge-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 20));\n display: inline-flex;\n box-sizing: border-box;\n align-items: center;\n background-color: var(--_appearance-color-fill);\n block-size: var(--_badge-block-size);\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_appearance-color-text);\n column-gap: 8px;\n font: var(--vvd-typography-base-condensed-bold);\n max-inline-size: 100%;\n padding-inline: 8px;\n vertical-align: middle;\n}\n.base.connotation-cta {\n --_connotation-color-primary: var(--vvd-color-cta-500);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-intermediate: var(--vvd-color-cta-500);\n --_connotation-color-soft: var(--vvd-color-cta-100);\n --_connotation-color-contrast: var(--vvd-color-cta-800);\n --_connotation-color-pale: var(--vvd-color-cta-300);\n --_connotation-color-fierce: var(--vvd-color-cta-700);\n}\n.base.connotation-success {\n --_connotation-color-primary: var(--vvd-color-success-500);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-intermediate: var(--vvd-color-success-500);\n --_connotation-color-soft: var(--vvd-color-success-100);\n --_connotation-color-contrast: var(--vvd-color-success-800);\n --_connotation-color-pale: var(--vvd-color-success-300);\n --_connotation-color-fierce: var(--vvd-color-success-700);\n}\n.base.connotation-alert {\n --_connotation-color-primary: var(--vvd-color-alert-500);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-intermediate: var(--vvd-color-alert-500);\n --_connotation-color-soft: var(--vvd-color-alert-100);\n --_connotation-color-contrast: var(--vvd-color-alert-800);\n --_connotation-color-pale: var(--vvd-color-alert-300);\n --_connotation-color-fierce: var(--vvd-color-alert-700);\n}\n.base.connotation-warning {\n --_connotation-color-primary: var(--vvd-color-warning-300);\n --_connotation-color-primary-text: var(--vvd-color-canvas-text);\n --_connotation-color-intermediate: var(--vvd-color-warning-300);\n --_connotation-color-soft: var(--vvd-color-warning-100);\n --_connotation-color-contrast: var(--vvd-color-warning-800);\n --_connotation-color-pale: var(--vvd-color-warning-300);\n --_connotation-color-fierce: var(--vvd-color-warning-700);\n}\n.base.connotation-information {\n --_connotation-color-primary: var(--vvd-color-information-500);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-intermediate: var(--vvd-color-information-500);\n --_connotation-color-soft: var(--vvd-color-information-100);\n --_connotation-color-contrast: var(--vvd-color-information-800);\n --_connotation-color-pale: var(--vvd-color-information-300);\n --_connotation-color-fierce: var(--vvd-color-information-700);\n}\n.base:not(.connotation-cta, .connotation-success, .connotation-alert, .connotation-warning, .connotation-information) {\n --_connotation-color-primary: var(--vvd-color-canvas-text);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-intermediate: var(--vvd-color-neutral-500);\n --_connotation-color-soft: var(--vvd-color-neutral-100);\n --_connotation-color-contrast: var(--vvd-color-neutral-800);\n --_connotation-color-pale: var(--vvd-color-neutral-300);\n --_connotation-color-fierce: var(--vvd-color-neutral-700);\n}\n.base {\n --_appearance-color-text: var(--_connotation-color-primary-text);\n --_appearance-color-fill: var(--_connotation-color-primary);\n --_appearance-color-outline: transparent;\n}\n.base.appearance-duotone {\n --_appearance-color-text: var(--_connotation-color-fierce);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: var(--_connotation-color-pale);\n}\n.base.appearance-subtle {\n --_appearance-color-text: var(--_connotation-color-contrast);\n --_appearance-color-fill: var(--_connotation-color-soft);\n --_appearance-color-outline: transparent;\n}\n.base.icon-only {\n contain: size;\n padding-inline: 0;\n place-content: center;\n}\n@supports (aspect-ratio: 1) {\n .base.icon-only {\n aspect-ratio: 1;\n }\n}\n@supports not (aspect-ratio: 1) {\n .base.icon-only {\n inline-size: var(--_badge-block-size);\n }\n}\n\n.text {\n overflow: hidden;\n max-inline-size: 100%;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Shape */\n.base:not(.shape-pill) {\n border-radius: 4px;\n}\n\n.base.shape-pill {\n border-radius: 14px;\n}\n\n/* Icon */\n.icon {\n font-size: calc(var(--_badge-block-size) / 1.6667);\n line-height: 1;\n}\n.icon-trailing .icon {\n order: 1;\n}";
|
|
16
16
|
|
|
17
17
|
let _ = t => t,
|
|
18
18
|
_t,
|