@vonage/vivid 4.14.1 → 4.14.2
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/custom-elements.json +22 -174
- package/lib/divider/divider.d.ts +1 -1
- package/lib/divider/divider.template.d.ts +1 -1
- package/package.json +1 -1
- package/shared/affix.js +1 -1
- package/shared/definition.js +1 -1
- package/shared/definition11.js +1 -1
- package/shared/definition16.cjs +1 -2
- package/shared/definition16.js +2 -3
- package/shared/definition17.cjs +9 -7
- package/shared/definition17.js +9 -7
- package/shared/definition22.cjs +2 -1
- package/shared/definition22.js +2 -1
- package/shared/definition24.js +1 -1
- package/shared/definition27.cjs +1 -1
- package/shared/definition27.js +1 -1
- package/shared/definition29.js +1 -1
- package/shared/definition30.js +1 -1
- package/shared/definition31.js +1 -1
- package/shared/definition33.js +1 -1
- package/shared/definition34.cjs +88 -19
- package/shared/definition34.js +72 -3
- package/shared/definition35.cjs +2 -201
- package/shared/definition35.js +4 -201
- package/shared/definition4.js +1 -1
- package/shared/definition42.cjs +3 -3
- package/shared/definition42.js +3 -3
- package/shared/definition43.cjs +9 -9
- package/shared/definition43.js +5 -5
- package/shared/definition47.js +1 -1
- package/shared/definition50.js +1 -1
- package/shared/definition51.cjs +39 -17
- package/shared/definition51.js +24 -2
- package/shared/definition53.js +1 -1
- package/shared/definition59.js +1 -1
- package/shared/definition7.js +1 -1
- package/shared/definition8.js +1 -1
- package/shared/foundation-element.cjs +1417 -0
- package/shared/foundation-element.js +1414 -0
- package/shared/key-codes2.cjs +0 -1469
- package/shared/key-codes2.js +1 -1464
- package/shared/listbox.cjs +3 -3
- package/shared/listbox.js +1 -1
- package/shared/option.cjs +205 -0
- package/shared/option.js +202 -0
- package/shared/start-end.cjs +52 -0
- package/shared/start-end.js +50 -0
- package/shared/text-anchor.js +1 -1
- package/shared/text-field2.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/styles/tokens/vivid-2-compat.css +1 -1
- package/lib/listbox/definition.d.ts +0 -2
- package/lib/listbox/listbox.d.ts +0 -14
- package/lib/listbox/listbox.template.d.ts +0 -2
- package/listbox/index.cjs +0 -54
- package/listbox/index.js +0 -52
- package/shared/aria-global2.cjs +0 -75
- package/shared/aria-global2.js +0 -73
- package/shared/listbox2.cjs +0 -1267
- package/shared/listbox2.js +0 -1264
- package/shared/strings2.cjs +0 -37
- package/shared/strings2.js +0 -33
package/shared/definition47.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as iconDefinition } from './definition27.js';
|
|
2
2
|
import { V as VividElement, a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
3
3
|
import { a as applyMixins } from './apply-mixins.js';
|
|
4
|
-
import {
|
|
4
|
+
import { b as AffixIcon, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
5
5
|
import { L as Localized } from './localized.js';
|
|
6
6
|
import { r as ref } from './ref.js';
|
|
7
7
|
import { c as classNames } from './class-names.js';
|
package/shared/definition50.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as iconDefinition } from './definition27.js';
|
|
2
2
|
import { V as VividElement, a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
3
3
|
import { a as applyMixins } from './apply-mixins.js';
|
|
4
|
-
import {
|
|
4
|
+
import { A as AffixIconWithTrailing, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
5
5
|
import { L as Localized } from './localized.js';
|
|
6
6
|
import { c as classNames } from './class-names.js';
|
|
7
7
|
|
package/shared/definition51.cjs
CHANGED
|
@@ -4,16 +4,38 @@ const definition = require('./definition50.cjs');
|
|
|
4
4
|
const definition$1 = require('./definition49.cjs');
|
|
5
5
|
const vividElement = require('./vivid-element.cjs');
|
|
6
6
|
const keyCodes$1 = require('./key-codes.cjs');
|
|
7
|
-
const
|
|
7
|
+
const foundationElement = require('./foundation-element.cjs');
|
|
8
|
+
const startEnd = require('./start-end.cjs');
|
|
8
9
|
const applyMixins = require('./apply-mixins2.cjs');
|
|
9
|
-
const
|
|
10
|
-
const strings
|
|
10
|
+
const keyCodes = require('./key-codes2.cjs');
|
|
11
|
+
const strings = require('./strings.cjs');
|
|
11
12
|
const numbers = require('./numbers.cjs');
|
|
12
13
|
const ref = require('./ref.cjs');
|
|
13
14
|
const slotted = require('./slotted.cjs');
|
|
14
15
|
const when = require('./when.cjs');
|
|
15
16
|
const classNames = require('./class-names.cjs');
|
|
16
17
|
|
|
18
|
+
/**
|
|
19
|
+
* This method keeps a given value within the bounds of a min and max value. If the value
|
|
20
|
+
* is larger than the max, the minimum value will be returned. If the value is smaller than the minimum,
|
|
21
|
+
* the maximum will be returned. Otherwise, the value is returned un-changed.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Ensures that a value is between a min and max value. If value is lower than min, min will be returned.
|
|
25
|
+
* If value is greater than max, max will be returned.
|
|
26
|
+
*/
|
|
27
|
+
function limit(min, max, value) {
|
|
28
|
+
return Math.min(Math.max(value, min), max);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
let uniqueIdCounter = 0;
|
|
32
|
+
/**
|
|
33
|
+
* Generates a unique ID based on incrementing a counter.
|
|
34
|
+
*/
|
|
35
|
+
function uniqueId(prefix = "") {
|
|
36
|
+
return `${prefix}${uniqueIdCounter++}`;
|
|
37
|
+
}
|
|
38
|
+
|
|
17
39
|
/**
|
|
18
40
|
* The orientation of the {@link @microsoft/fast-foundation#(Tabs:class)} component
|
|
19
41
|
* @public
|
|
@@ -38,7 +60,7 @@ const TabsOrientation = {
|
|
|
38
60
|
*
|
|
39
61
|
* @public
|
|
40
62
|
*/
|
|
41
|
-
let Tabs$1 = class Tabs extends
|
|
63
|
+
let Tabs$1 = class Tabs extends foundationElement.FoundationElement {
|
|
42
64
|
constructor() {
|
|
43
65
|
super(...arguments);
|
|
44
66
|
/**
|
|
@@ -278,13 +300,13 @@ let Tabs$1 = class Tabs extends keyCodes.FoundationElement {
|
|
|
278
300
|
getTabIds() {
|
|
279
301
|
return this.tabs.map((tab) => {
|
|
280
302
|
var _a;
|
|
281
|
-
return (_a = tab.getAttribute("id")) !== null && _a !== void 0 ? _a : `tab-${
|
|
303
|
+
return (_a = tab.getAttribute("id")) !== null && _a !== void 0 ? _a : `tab-${uniqueId()}`;
|
|
282
304
|
});
|
|
283
305
|
}
|
|
284
306
|
getTabPanelIds() {
|
|
285
307
|
return this.tabpanels.map((tabPanel) => {
|
|
286
308
|
var _a;
|
|
287
|
-
return (_a = tabPanel.getAttribute("id")) !== null && _a !== void 0 ? _a : `panel-${
|
|
309
|
+
return (_a = tabPanel.getAttribute("id")) !== null && _a !== void 0 ? _a : `panel-${uniqueId()}`;
|
|
288
310
|
});
|
|
289
311
|
}
|
|
290
312
|
setComponent() {
|
|
@@ -341,7 +363,7 @@ let Tabs$1 = class Tabs extends keyCodes.FoundationElement {
|
|
|
341
363
|
adjust(adjustment) {
|
|
342
364
|
const focusableTabs = this.tabs.filter(t => this.isFocusableElement(t));
|
|
343
365
|
const currentActiveTabIndex = focusableTabs.indexOf(this.activetab);
|
|
344
|
-
const nextTabIndex =
|
|
366
|
+
const nextTabIndex = limit(0, focusableTabs.length - 1, currentActiveTabIndex + adjustment);
|
|
345
367
|
// the index of the next focusable tab within the context of all available tabs
|
|
346
368
|
const nextIndex = this.tabs.indexOf(focusableTabs[nextTabIndex]);
|
|
347
369
|
if (nextIndex > -1) {
|
|
@@ -361,28 +383,28 @@ let Tabs$1 = class Tabs extends keyCodes.FoundationElement {
|
|
|
361
383
|
this.activeTabIndex = this.getActiveIndex();
|
|
362
384
|
}
|
|
363
385
|
};
|
|
364
|
-
|
|
386
|
+
foundationElement.__decorate([
|
|
365
387
|
vividElement.attr
|
|
366
388
|
], Tabs$1.prototype, "orientation", void 0);
|
|
367
|
-
|
|
389
|
+
foundationElement.__decorate([
|
|
368
390
|
vividElement.attr
|
|
369
391
|
], Tabs$1.prototype, "activeid", void 0);
|
|
370
|
-
|
|
392
|
+
foundationElement.__decorate([
|
|
371
393
|
vividElement.observable
|
|
372
394
|
], Tabs$1.prototype, "tabs", void 0);
|
|
373
|
-
|
|
395
|
+
foundationElement.__decorate([
|
|
374
396
|
vividElement.observable
|
|
375
397
|
], Tabs$1.prototype, "tabpanels", void 0);
|
|
376
|
-
|
|
398
|
+
foundationElement.__decorate([
|
|
377
399
|
vividElement.attr({ mode: "boolean" })
|
|
378
400
|
], Tabs$1.prototype, "activeindicator", void 0);
|
|
379
|
-
|
|
401
|
+
foundationElement.__decorate([
|
|
380
402
|
vividElement.observable
|
|
381
403
|
], Tabs$1.prototype, "activeIndicatorRef", void 0);
|
|
382
|
-
|
|
404
|
+
foundationElement.__decorate([
|
|
383
405
|
vividElement.observable
|
|
384
406
|
], Tabs$1.prototype, "showActiveIndicator", void 0);
|
|
385
|
-
applyMixins.applyMixins(Tabs$1,
|
|
407
|
+
applyMixins.applyMixins(Tabs$1, startEnd.StartEnd);
|
|
386
408
|
|
|
387
409
|
const styles = ":host{display:block}.base{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base.connotation-cta{--_connotation-color-firm: var(--vvd-tabs-cta-firm, var(--vvd-color-cta-600))}.base:not(.connotation-cta){--_connotation-color-firm: var(--vvd-tabs-accent-firm, var(--vvd-color-canvas-text))}.base{--_tabs-tablist-gutter: 8px;--_tabs-active-indicator-stroke-width: 2px;display:grid;box-sizing:border-box}.base.orientation-vertical{overflow:hidden;block-size:inherit;grid-template-columns:auto 1fr;grid-template-rows:1fr}.base:not(.orientation-vertical){grid-template-columns:1fr;grid-template-rows:auto 1fr;max-block-size:100%}.base.layout-stretch .scroll-shadow{flex:1}.base:not(.orientation-vertical) .scroll-shadow{position:relative;overflow:hidden;isolation:isolate}.base:not(.orientation-vertical) .scroll-shadow.start-scroll:before,.base:not(.orientation-vertical) .scroll-shadow.start-scroll:after,.base:not(.orientation-vertical) .scroll-shadow.end-scroll:before,.base:not(.orientation-vertical) .scroll-shadow.end-scroll:after{position:absolute;content:\"\";inline-size:10px;inset-block:0;opacity:0;transition:opacity .1s}.base:not(.orientation-vertical) .scroll-shadow.start-scroll:before{z-index:1;box-shadow:inset 7px 1px 5px -3px var(--vvd-color-neutral-950);inset-inline-start:0;opacity:.2}.base:not(.orientation-vertical) .scroll-shadow.end-scroll:after{box-shadow:inset -7px 1px 5px -3px var(--vvd-color-neutral-950);inset-inline-end:0;opacity:.2}.tabs{display:flex;overflow:hidden}.base.orientation-vertical .tabs{flex-direction:column;box-shadow:1px 0 0 0 var(--vvd-color-neutral-300)}.base.orientation-horizontal .tabs{flex-direction:row;border-bottom:1px solid var(--vvd-color-neutral-300)}.tablist{position:relative;display:grid;box-sizing:border-box;color:var(--_appearance-color-text)}.base.layout-stretch .tablist{--_tab-justify-content: center;--_tabs-tablist-column: 1fr}.tablist .base:not(.layout-stretch){--_tabs-tablist-column: auto}.base.orientation-vertical .tablist{padding:var(--_tabs-tablist-gutter);grid-row:1/2;grid-template-columns:auto 1fr;grid-template-rows:auto;inline-size:100%;place-self:flex-start end;row-gap:var(--_tabs-tablist-gutter)}.base:not(.orientation-vertical) .tablist{justify-content:flex-start;column-gap:var(--_tabs-tablist-gutter);grid-auto-flow:column;grid-template-rows:auto auto;inline-size:100%;padding-inline:var(--_tabs-tablist-gutter)}.base.has-action-items.orientation-vertical .tablist{padding-block-end:0}.base.has-action-items:not(.orientation-vertical) .tablist{padding-inline-end:0}.tablist-wrapper{--scrollbar-track-color: transparent;--scrollbar-thumb-color: color-mix(in srgb, var(--vvd-color-neutral-950), transparent 70%)}.tablist-wrapper{scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.tablist-wrapper ::-webkit-scrollbar{width:4px}.tablist-wrapper ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.tablist-wrapper ::-webkit-scrollbar-thumb{border:0;border-radius:4px;background-color:var(--scrollbar-thumb-color)}.base:not(.orientation-vertical) .tablist-wrapper{overflow:auto hidden;align-self:end;inline-size:100%}.base.orientation-vertical .tablist-wrapper{overflow:hidden auto;block-size:100%}.tablist-wrapper::-webkit-scrollbar{display:none}slot[name=action-items]{display:flex}.base.has-action-items.orientation-horizontal slot[name=action-items]{align-items:center;margin-inline:var(--_tabs-tablist-gutter)}.base.has-action-items.orientation-vertical slot[name=action-items]{margin-block:var(--_tabs-tablist-gutter)}.tabpanel{box-sizing:border-box;block-size:100%;min-block-size:0;min-inline-size:0}.base.scroll .tabpanel{overflow-y:auto;--scrollbar-track-color: transparent;--scrollbar-thumb-color: color-mix(in srgb, var(--vvd-color-neutral-950), transparent 70%)}.base.scroll .tabpanel{scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.base.scroll .tabpanel ::-webkit-scrollbar{width:4px}.base.scroll .tabpanel ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.base.scroll .tabpanel ::-webkit-scrollbar-thumb{border:0;border-radius:4px;background-color:var(--scrollbar-thumb-color)}.base.gutters-small .tabpanel{padding:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2)) - (1px*(24 + 4*clamp(-1,var(--vvd-size-density, 0),2))))}.active-indicator{background:currentColor;margin-inline-start:calc(var(--_tabs-tablist-gutter) * -1)}.base.orientation-vertical .active-indicator{align-self:center;border-radius:2px;block-size:80%;grid-area:1/1/auto/auto;inline-size:var(--_tabs-active-indicator-stroke-width)}.base:not(.orientation-vertical) .active-indicator{position:absolute;z-index:1;border-radius:2px;block-size:var(--_tabs-active-indicator-stroke-width);grid-column:1/auto;inline-size:calc(var(--_tabs-active-tab-inline-size));inset-block-end:0;inset-inline-start:8px}.activeIndicatorTransition{transition:transform .2s ease-out 0s,inline-size .2s ease-out 0s}";
|
|
388
410
|
|
|
@@ -610,12 +632,12 @@ class Tabs extends vividElement.VividElement {
|
|
|
610
632
|
}
|
|
611
633
|
getTabIds() {
|
|
612
634
|
return this.tabs.map((tab) => {
|
|
613
|
-
return tab.getAttribute("id") ?? `tab-${strings
|
|
635
|
+
return tab.getAttribute("id") ?? `tab-${strings.uniqueId()}`;
|
|
614
636
|
});
|
|
615
637
|
}
|
|
616
638
|
getTabPanelIds() {
|
|
617
639
|
return this.tabpanels.map((tabPanel) => {
|
|
618
|
-
return tabPanel.getAttribute("id") ?? `panel-${strings
|
|
640
|
+
return tabPanel.getAttribute("id") ?? `panel-${strings.uniqueId()}`;
|
|
619
641
|
});
|
|
620
642
|
}
|
|
621
643
|
setComponent() {
|
package/shared/definition51.js
CHANGED
|
@@ -2,9 +2,10 @@ import { t as tabDefinition } from './definition50.js';
|
|
|
2
2
|
import { t as tabPanelDefinition } from './definition49.js';
|
|
3
3
|
import { a as attr, o as observable, V as VividElement, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
4
4
|
import { i as keyArrowRight$1, h as keyArrowLeft$1, f as keyArrowDown$1, e as keyArrowUp$1, d as keyEnd$1, g as keyHome$1 } from './key-codes.js';
|
|
5
|
-
import { _ as __decorate,
|
|
5
|
+
import { _ as __decorate, F as FoundationElement } from './foundation-element.js';
|
|
6
|
+
import { S as StartEnd } from './start-end.js';
|
|
6
7
|
import { a as applyMixins } from './apply-mixins2.js';
|
|
7
|
-
import {
|
|
8
|
+
import { a as keyArrowRight, b as keyArrowLeft, c as keyArrowDown, d as keyArrowUp, e as keyEnd, f as keyHome } from './key-codes2.js';
|
|
8
9
|
import { u as uniqueId$1 } from './strings.js';
|
|
9
10
|
import { l as limit$1 } from './numbers.js';
|
|
10
11
|
import { r as ref } from './ref.js';
|
|
@@ -12,6 +13,27 @@ import { s as slotted } from './slotted.js';
|
|
|
12
13
|
import { w as when } from './when.js';
|
|
13
14
|
import { c as classNames } from './class-names.js';
|
|
14
15
|
|
|
16
|
+
/**
|
|
17
|
+
* This method keeps a given value within the bounds of a min and max value. If the value
|
|
18
|
+
* is larger than the max, the minimum value will be returned. If the value is smaller than the minimum,
|
|
19
|
+
* the maximum will be returned. Otherwise, the value is returned un-changed.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Ensures that a value is between a min and max value. If value is lower than min, min will be returned.
|
|
23
|
+
* If value is greater than max, max will be returned.
|
|
24
|
+
*/
|
|
25
|
+
function limit(min, max, value) {
|
|
26
|
+
return Math.min(Math.max(value, min), max);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
let uniqueIdCounter = 0;
|
|
30
|
+
/**
|
|
31
|
+
* Generates a unique ID based on incrementing a counter.
|
|
32
|
+
*/
|
|
33
|
+
function uniqueId(prefix = "") {
|
|
34
|
+
return `${prefix}${uniqueIdCounter++}`;
|
|
35
|
+
}
|
|
36
|
+
|
|
15
37
|
/**
|
|
16
38
|
* The orientation of the {@link @microsoft/fast-foundation#(Tabs:class)} component
|
|
17
39
|
* @public
|
package/shared/definition53.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { I as Icon, i as iconDefinition } from './definition27.js';
|
|
2
2
|
import { V as VividElement, a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
3
3
|
import { a as applyMixins } from './apply-mixins.js';
|
|
4
|
-
import {
|
|
4
|
+
import { b as AffixIcon, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
5
5
|
import { w as when } from './when.js';
|
|
6
6
|
import { c as classNames } from './class-names.js';
|
|
7
7
|
|
package/shared/definition59.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { I as Icon, i as iconDefinition } from './definition27.js';
|
|
2
2
|
import { V as VividElement, a as attr, o as observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
3
3
|
import { a as applyMixins } from './apply-mixins.js';
|
|
4
|
-
import {
|
|
4
|
+
import { b as AffixIcon, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
5
5
|
import { i as isHTMLElement } from './dom.js';
|
|
6
6
|
import { e as elements, s as slotted } from './slotted.js';
|
|
7
7
|
import { c as children } from './children.js';
|
package/shared/definition7.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { V as VividElement, a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
2
2
|
import { i as iconDefinition } from './definition27.js';
|
|
3
|
-
import {
|
|
3
|
+
import { A as AffixIconWithTrailing, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
4
4
|
import { a as applyMixins } from './apply-mixins.js';
|
|
5
5
|
import { w as when } from './when.js';
|
|
6
6
|
import { c as classNames } from './class-names.js';
|
package/shared/definition8.js
CHANGED
|
@@ -3,7 +3,7 @@ import { i as iconDefinition } from './definition27.js';
|
|
|
3
3
|
import { V as VividElement, a as attr, o as observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
4
4
|
import { a as applyMixins } from './apply-mixins.js';
|
|
5
5
|
import { C as Connotation } from './enums.js';
|
|
6
|
-
import {
|
|
6
|
+
import { b as AffixIcon, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
7
7
|
import { L as Localized } from './localized.js';
|
|
8
8
|
import { s as slotted } from './slotted.js';
|
|
9
9
|
import { w as when } from './when.js';
|