@vonage/vivid 3.49.0 → 3.50.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.cjs +1 -1
- package/accordion/index.js +1 -1
- package/accordion-item/index.cjs +1 -1
- package/accordion-item/index.js +1 -1
- package/alert/index.cjs +2 -2
- package/alert/index.js +2 -2
- package/audio-player/index.cjs +1 -1
- package/audio-player/index.js +1 -1
- package/banner/index.cjs +1 -1
- package/banner/index.js +1 -1
- package/breadcrumb-item/index.cjs +1 -1
- package/breadcrumb-item/index.js +1 -1
- package/button/index.cjs +1 -1
- package/button/index.js +1 -1
- package/card/index.cjs +1 -1
- package/card/index.js +1 -1
- package/checkbox/index.cjs +1 -2
- package/checkbox/index.js +1 -2
- package/combobox/index.cjs +3 -3
- package/combobox/index.js +3 -3
- package/custom-elements.json +797 -124
- package/date-picker/index.cjs +4 -3
- package/date-picker/index.js +4 -3
- package/date-range-picker/index.cjs +3 -2
- package/date-range-picker/index.js +3 -2
- package/dialog/index.cjs +2 -2
- package/dialog/index.js +2 -2
- package/elevation/index.cjs +1 -1
- package/elevation/index.js +1 -1
- package/fab/index.cjs +1 -1
- package/fab/index.js +1 -1
- package/file-picker/index.cjs +1 -1
- package/file-picker/index.js +1 -1
- package/focus/index.cjs +1 -1
- package/focus/index.js +1 -1
- package/header/index.cjs +1 -1
- package/header/index.js +1 -1
- package/index.cjs +21 -16
- package/index.js +10 -8
- package/lib/components.d.ts +1 -0
- package/lib/time-picker/definition.d.ts +3 -0
- package/lib/time-picker/locale.d.ts +12 -0
- package/lib/time-picker/time/picker.d.ts +9 -0
- package/lib/time-picker/time/presentationTime.d.ts +5 -0
- package/lib/time-picker/time/time.d.ts +15 -0
- package/lib/time-picker/time-picker.d.ts +16 -0
- package/lib/time-picker/time-picker.form-associated.d.ts +10 -0
- package/lib/time-picker/time-picker.template.d.ts +4 -0
- package/listbox/index.cjs +1 -1
- package/listbox/index.js +1 -1
- package/locales/en-GB.cjs +15 -0
- package/locales/en-GB.js +15 -0
- package/locales/en-US.cjs +15 -0
- package/locales/en-US.js +15 -0
- package/locales/ja-JP.cjs +15 -0
- package/locales/ja-JP.js +15 -0
- package/locales/zh-CN.cjs +15 -0
- package/locales/zh-CN.js +15 -0
- package/menu/index.cjs +3 -3
- package/menu/index.js +3 -3
- package/menu-item/index.cjs +1 -1
- package/menu-item/index.js +1 -1
- package/nav-disclosure/index.cjs +1 -1
- package/nav-disclosure/index.js +1 -1
- package/nav-item/index.cjs +1 -1
- package/nav-item/index.js +1 -1
- package/number-field/index.cjs +1 -1
- package/number-field/index.js +1 -1
- package/option/index.cjs +1 -1
- package/option/index.js +1 -1
- package/package.json +1 -1
- package/pagination/index.cjs +1 -1
- package/pagination/index.js +1 -1
- package/popup/index.cjs +3 -3
- package/popup/index.js +3 -3
- package/radio/index.cjs +1 -2
- package/radio/index.js +1 -2
- package/select/index.cjs +3 -3
- package/select/index.js +3 -3
- package/selectable-box/index.cjs +2 -2
- package/selectable-box/index.js +2 -2
- package/shared/date-picker/date-picker-base.d.ts +2 -2
- package/shared/definition.cjs +1 -1
- package/shared/definition.js +1 -1
- package/shared/definition11.cjs +1 -1
- package/shared/definition11.js +1 -1
- package/shared/definition14.cjs +1 -1
- package/shared/definition14.js +1 -1
- package/shared/definition15.cjs +2 -5
- package/shared/definition15.js +2 -5
- package/shared/definition16.cjs +2 -2
- package/shared/definition16.js +2 -2
- package/shared/definition18.cjs +2 -2
- package/shared/definition18.js +2 -2
- package/shared/definition19.cjs +2 -2
- package/shared/definition19.js +2 -2
- package/shared/definition20.cjs +1 -1
- package/shared/definition20.js +1 -1
- package/shared/definition23.cjs +1 -1
- package/shared/definition23.js +1 -1
- package/shared/definition24.cjs +1 -1
- package/shared/definition24.js +1 -1
- package/shared/definition25.cjs +1 -1
- package/shared/definition25.js +1 -1
- package/shared/definition28.cjs +1 -1
- package/shared/definition28.js +1 -1
- package/shared/definition29.cjs +1 -1
- package/shared/definition29.js +1 -1
- package/shared/definition30.cjs +1 -1
- package/shared/definition30.js +1 -1
- package/shared/definition31.cjs +1 -1
- package/shared/definition31.js +1 -1
- package/shared/definition35.cjs +1 -1
- package/shared/definition35.js +1 -1
- package/shared/definition4.cjs +1 -1
- package/shared/definition4.js +1 -1
- package/shared/definition40.cjs +3 -6
- package/shared/definition40.js +3 -6
- package/shared/definition41.cjs +2 -2
- package/shared/definition41.js +2 -2
- package/shared/definition42.cjs +1 -1
- package/shared/definition42.js +1 -1
- package/shared/definition44.cjs +1 -1
- package/shared/definition44.js +1 -1
- package/shared/definition45.cjs +1 -1
- package/shared/definition45.js +1 -1
- package/shared/definition46.cjs +1 -1
- package/shared/definition46.js +1 -1
- package/shared/definition48.cjs +1 -1
- package/shared/definition48.js +1 -1
- package/shared/definition5.cjs +1 -1
- package/shared/definition5.js +1 -1
- package/shared/definition51.cjs +1 -1
- package/shared/definition51.js +1 -1
- package/shared/definition52.cjs +1 -1
- package/shared/definition52.js +1 -1
- package/shared/definition53.cjs +1 -1
- package/shared/definition53.js +1 -1
- package/shared/definition54.cjs +769 -91
- package/shared/definition54.js +768 -90
- package/shared/definition55.cjs +76 -58
- package/shared/definition55.js +75 -57
- package/shared/definition56.cjs +100 -71
- package/shared/definition56.js +99 -70
- package/shared/definition57.cjs +80 -291
- package/shared/definition57.js +81 -292
- package/shared/definition58.cjs +303 -13
- package/shared/definition58.js +302 -13
- package/shared/definition59.cjs +11 -42
- package/shared/definition59.js +11 -41
- package/shared/definition60.cjs +23 -1782
- package/shared/definition60.js +22 -1781
- package/shared/definition61.cjs +1810 -0
- package/shared/definition61.js +1806 -0
- package/shared/definition9.cjs +1 -1
- package/shared/definition9.js +1 -1
- package/shared/localization/Locale.d.ts +2 -0
- package/shared/patterns/index.d.ts +1 -0
- package/shared/patterns/trapped-focus.d.ts +4 -0
- package/shared/presentationDate.cjs +11 -25
- package/shared/presentationDate.js +11 -25
- package/shared/trapped-focus.cjs +29 -0
- package/shared/trapped-focus.js +27 -0
- package/slider/index.cjs +1 -1
- package/slider/index.js +1 -1
- package/split-button/index.cjs +1 -1
- package/split-button/index.js +1 -1
- package/style.css +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/switch/index.cjs +1 -1
- package/switch/index.js +1 -1
- package/tab/index.cjs +1 -1
- package/tab/index.js +1 -1
- package/tabs/index.cjs +1 -1
- package/tabs/index.js +1 -1
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/text-area/index.cjs +1 -1
- package/text-area/index.js +1 -1
- package/text-field/index.cjs +1 -1
- package/text-field/index.js +1 -1
- package/time-picker/index.cjs +38 -0
- package/time-picker/index.js +36 -0
- package/toggletip/index.cjs +4 -4
- package/toggletip/index.js +4 -4
- package/tooltip/index.cjs +4 -4
- package/tooltip/index.js +4 -4
- package/tree-item/index.cjs +2 -2
- package/tree-item/index.js +2 -2
- package/tree-view/index.cjs +1 -1
- package/tree-view/index.js +1 -1
- package/vivid.api.json +105 -0
package/shared/definition9.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const index = require('./index.cjs');
|
|
4
4
|
const definition = require('./definition26.cjs');
|
|
5
|
-
const definition$1 = require('./
|
|
5
|
+
const definition$1 = require('./definition59.cjs');
|
|
6
6
|
const breadcrumbItem = require('./breadcrumb-item.cjs');
|
|
7
7
|
const textAnchor_template = require('./text-anchor.template.cjs');
|
|
8
8
|
const icon = require('./icon.cjs');
|
package/shared/definition9.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as attr, h as html, r as registerFactory } from './index.js';
|
|
2
2
|
import { a as iconRegistries } from './definition26.js';
|
|
3
|
-
import { f as focusRegistries } from './
|
|
3
|
+
import { f as focusRegistries } from './definition59.js';
|
|
4
4
|
import { B as BreadcrumbItem$1 } from './breadcrumb-item.js';
|
|
5
5
|
import { t as textAnchorTemplate } from './text-anchor.template.js';
|
|
6
6
|
import { I as Icon } from './icon.js';
|
|
@@ -6,8 +6,10 @@ import type { DialogLocale } from '../../lib/dialog/locale';
|
|
|
6
6
|
import type { BannerLocale } from '../../lib/banner/locale';
|
|
7
7
|
import type { NumberFieldLocale } from '../../lib/number-field/locale';
|
|
8
8
|
import type { SplitButtonLocale } from '../../lib/split-button/locale';
|
|
9
|
+
import type { TimePickerLocale } from '../../lib/time-picker/locale';
|
|
9
10
|
export interface Locale {
|
|
10
11
|
datePicker: DatePickerLocale;
|
|
12
|
+
timePicker: TimePickerLocale;
|
|
11
13
|
filePicker: FilePickerLocale;
|
|
12
14
|
audioPlayer: AudioPlayerLocale;
|
|
13
15
|
alert: AlertLocale;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const definition$2 = require('./definition11.cjs');
|
|
4
|
-
const definition = require('./
|
|
4
|
+
const definition = require('./definition61.cjs');
|
|
5
5
|
const definition$1 = require('./definition53.cjs');
|
|
6
6
|
require('./affix.cjs');
|
|
7
7
|
const focus = require('./focus2.cjs');
|
|
@@ -13,6 +13,7 @@ const repeat = require('./repeat.cjs');
|
|
|
13
13
|
const when = require('./when.cjs');
|
|
14
14
|
const classNames = require('./class-names.cjs');
|
|
15
15
|
const localized = require('./localized.cjs');
|
|
16
|
+
const trappedFocus = require('./trapped-focus.cjs');
|
|
16
17
|
const formAssociated = require('./form-associated.cjs');
|
|
17
18
|
const applyMixins = require('./apply-mixins.cjs');
|
|
18
19
|
|
|
@@ -5725,16 +5726,6 @@ class DatePickerBase extends FormAssociatedDatePickerBase {
|
|
|
5725
5726
|
this.validate();
|
|
5726
5727
|
}
|
|
5727
5728
|
}
|
|
5728
|
-
#getFocusableEls() {
|
|
5729
|
-
const focusableEls = this.shadowRoot.querySelectorAll(`
|
|
5730
|
-
.dialog .button:not(:disabled),
|
|
5731
|
-
.dialog .vwc-button:not(:disabled)
|
|
5732
|
-
`);
|
|
5733
|
-
return {
|
|
5734
|
-
firstFocusableEl: focusableEls[0],
|
|
5735
|
-
lastFocusableEl: focusableEls[focusableEls.length - 1]
|
|
5736
|
-
};
|
|
5737
|
-
}
|
|
5738
5729
|
_adjustSelectedMonthToEnsureVisibilityOf(date) {
|
|
5739
5730
|
const month = monthOfDate(date);
|
|
5740
5731
|
const firstDisplayedMonth = this._selectedMonth;
|
|
@@ -5814,19 +5805,14 @@ class DatePickerBase extends FormAssociatedDatePickerBase {
|
|
|
5814
5805
|
this._closePopup();
|
|
5815
5806
|
return false;
|
|
5816
5807
|
}
|
|
5817
|
-
if (
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
|
|
5825
|
-
if (this.shadowRoot.activeElement === lastFocusableEl) {
|
|
5826
|
-
firstFocusableEl.focus();
|
|
5827
|
-
return false;
|
|
5828
|
-
}
|
|
5829
|
-
}
|
|
5808
|
+
if (this._trappedFocus(
|
|
5809
|
+
event,
|
|
5810
|
+
() => this.shadowRoot.querySelectorAll(`
|
|
5811
|
+
.dialog .button:not(:disabled),
|
|
5812
|
+
.dialog .vwc-button:not(:disabled)
|
|
5813
|
+
`)
|
|
5814
|
+
)) {
|
|
5815
|
+
return false;
|
|
5830
5816
|
}
|
|
5831
5817
|
return true;
|
|
5832
5818
|
}
|
|
@@ -6172,7 +6158,7 @@ __decorateClass([
|
|
|
6172
6158
|
__decorateClass([
|
|
6173
6159
|
index.volatile
|
|
6174
6160
|
], DatePickerBase.prototype, "_tabbableMonth", 1);
|
|
6175
|
-
applyMixins.applyMixins(DatePickerBase, localized.Localized, index$1.FormElementHelperText);
|
|
6161
|
+
applyMixins.applyMixins(DatePickerBase, localized.Localized, index$1.FormElementHelperText, trappedFocus.TrappedFocus);
|
|
6176
6162
|
|
|
6177
6163
|
const formatPresentationDate = (dateStr, locale) => {
|
|
6178
6164
|
const date = parseDateStr(dateStr);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { B as Button } from './definition11.js';
|
|
2
|
-
import { P as Popup } from './
|
|
2
|
+
import { P as Popup } from './definition61.js';
|
|
3
3
|
import { T as TextField } from './definition53.js';
|
|
4
4
|
import './affix.js';
|
|
5
5
|
import { f as focusTemplateFactory } from './focus2.js';
|
|
@@ -11,6 +11,7 @@ import { r as repeat } from './repeat.js';
|
|
|
11
11
|
import { w as when } from './when.js';
|
|
12
12
|
import { c as classNames } from './class-names.js';
|
|
13
13
|
import { L as Localized } from './localized.js';
|
|
14
|
+
import { T as TrappedFocus } from './trapped-focus.js';
|
|
14
15
|
import { F as FormAssociated } from './form-associated.js';
|
|
15
16
|
import { a as applyMixins } from './apply-mixins.js';
|
|
16
17
|
|
|
@@ -5723,16 +5724,6 @@ class DatePickerBase extends FormAssociatedDatePickerBase {
|
|
|
5723
5724
|
this.validate();
|
|
5724
5725
|
}
|
|
5725
5726
|
}
|
|
5726
|
-
#getFocusableEls() {
|
|
5727
|
-
const focusableEls = this.shadowRoot.querySelectorAll(`
|
|
5728
|
-
.dialog .button:not(:disabled),
|
|
5729
|
-
.dialog .vwc-button:not(:disabled)
|
|
5730
|
-
`);
|
|
5731
|
-
return {
|
|
5732
|
-
firstFocusableEl: focusableEls[0],
|
|
5733
|
-
lastFocusableEl: focusableEls[focusableEls.length - 1]
|
|
5734
|
-
};
|
|
5735
|
-
}
|
|
5736
5727
|
_adjustSelectedMonthToEnsureVisibilityOf(date) {
|
|
5737
5728
|
const month = monthOfDate(date);
|
|
5738
5729
|
const firstDisplayedMonth = this._selectedMonth;
|
|
@@ -5812,19 +5803,14 @@ class DatePickerBase extends FormAssociatedDatePickerBase {
|
|
|
5812
5803
|
this._closePopup();
|
|
5813
5804
|
return false;
|
|
5814
5805
|
}
|
|
5815
|
-
if (
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
if (this.shadowRoot.activeElement === lastFocusableEl) {
|
|
5824
|
-
firstFocusableEl.focus();
|
|
5825
|
-
return false;
|
|
5826
|
-
}
|
|
5827
|
-
}
|
|
5806
|
+
if (this._trappedFocus(
|
|
5807
|
+
event,
|
|
5808
|
+
() => this.shadowRoot.querySelectorAll(`
|
|
5809
|
+
.dialog .button:not(:disabled),
|
|
5810
|
+
.dialog .vwc-button:not(:disabled)
|
|
5811
|
+
`)
|
|
5812
|
+
)) {
|
|
5813
|
+
return false;
|
|
5828
5814
|
}
|
|
5829
5815
|
return true;
|
|
5830
5816
|
}
|
|
@@ -6170,7 +6156,7 @@ __decorateClass([
|
|
|
6170
6156
|
__decorateClass([
|
|
6171
6157
|
volatile
|
|
6172
6158
|
], DatePickerBase.prototype, "_tabbableMonth", 1);
|
|
6173
|
-
applyMixins(DatePickerBase, Localized, FormElementHelperText);
|
|
6159
|
+
applyMixins(DatePickerBase, Localized, FormElementHelperText, TrappedFocus);
|
|
6174
6160
|
|
|
6175
6161
|
const formatPresentationDate = (dateStr, locale) => {
|
|
6176
6162
|
const date = parseDateStr(dateStr);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
class TrappedFocus {
|
|
4
|
+
/**
|
|
5
|
+
* @returns Whether focus was trapped.
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
_trappedFocus(event, getFocusableEls) {
|
|
9
|
+
if (event.key === "Tab") {
|
|
10
|
+
const focusableEls = getFocusableEls();
|
|
11
|
+
const firstFocusableEl = focusableEls[0];
|
|
12
|
+
const lastFocusableEl = focusableEls[focusableEls.length - 1];
|
|
13
|
+
if (event.shiftKey) {
|
|
14
|
+
if (this.shadowRoot.activeElement === firstFocusableEl) {
|
|
15
|
+
lastFocusableEl.focus();
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
} else {
|
|
19
|
+
if (this.shadowRoot.activeElement === lastFocusableEl) {
|
|
20
|
+
firstFocusableEl.focus();
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
exports.TrappedFocus = TrappedFocus;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
class TrappedFocus {
|
|
2
|
+
/**
|
|
3
|
+
* @returns Whether focus was trapped.
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
_trappedFocus(event, getFocusableEls) {
|
|
7
|
+
if (event.key === "Tab") {
|
|
8
|
+
const focusableEls = getFocusableEls();
|
|
9
|
+
const firstFocusableEl = focusableEls[0];
|
|
10
|
+
const lastFocusableEl = focusableEls[focusableEls.length - 1];
|
|
11
|
+
if (event.shiftKey) {
|
|
12
|
+
if (this.shadowRoot.activeElement === firstFocusableEl) {
|
|
13
|
+
lastFocusableEl.focus();
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
} else {
|
|
17
|
+
if (this.shadowRoot.activeElement === lastFocusableEl) {
|
|
18
|
+
firstFocusableEl.focus();
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { TrappedFocus as T };
|
package/slider/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const definition = require('../shared/definition44.cjs');
|
|
4
4
|
require('../shared/index.cjs');
|
|
5
|
-
require('../shared/
|
|
5
|
+
require('../shared/definition59.cjs');
|
|
6
6
|
require('../shared/focus.cjs');
|
|
7
7
|
require('../shared/direction.cjs');
|
|
8
8
|
require('../shared/numbers.cjs');
|
package/slider/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerSlider } from '../shared/definition44.js';
|
|
2
2
|
import '../shared/index.js';
|
|
3
|
-
import '../shared/
|
|
3
|
+
import '../shared/definition59.js';
|
|
4
4
|
import '../shared/focus.js';
|
|
5
5
|
import '../shared/direction.js';
|
|
6
6
|
import '../shared/numbers.js';
|
package/split-button/index.cjs
CHANGED
|
@@ -7,7 +7,7 @@ require('../shared/icon.cjs');
|
|
|
7
7
|
require('../shared/_has.cjs');
|
|
8
8
|
require('../shared/class-names.cjs');
|
|
9
9
|
require('../shared/when.cjs');
|
|
10
|
-
require('../shared/
|
|
10
|
+
require('../shared/definition59.cjs');
|
|
11
11
|
require('../shared/focus.cjs');
|
|
12
12
|
require('../shared/affix.cjs');
|
|
13
13
|
require('../shared/slotted.cjs');
|
package/split-button/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import '../shared/icon.js';
|
|
|
5
5
|
import '../shared/_has.js';
|
|
6
6
|
import '../shared/class-names.js';
|
|
7
7
|
import '../shared/when.js';
|
|
8
|
-
import '../shared/
|
|
8
|
+
import '../shared/definition59.js';
|
|
9
9
|
import '../shared/focus.js';
|
|
10
10
|
import '../shared/affix.js';
|
|
11
11
|
import '../shared/slotted.js';
|