@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.
Files changed (197) hide show
  1. package/accordion/index.cjs +1 -1
  2. package/accordion/index.js +1 -1
  3. package/accordion-item/index.cjs +1 -1
  4. package/accordion-item/index.js +1 -1
  5. package/alert/index.cjs +2 -2
  6. package/alert/index.js +2 -2
  7. package/audio-player/index.cjs +1 -1
  8. package/audio-player/index.js +1 -1
  9. package/banner/index.cjs +1 -1
  10. package/banner/index.js +1 -1
  11. package/breadcrumb-item/index.cjs +1 -1
  12. package/breadcrumb-item/index.js +1 -1
  13. package/button/index.cjs +1 -1
  14. package/button/index.js +1 -1
  15. package/card/index.cjs +1 -1
  16. package/card/index.js +1 -1
  17. package/checkbox/index.cjs +1 -2
  18. package/checkbox/index.js +1 -2
  19. package/combobox/index.cjs +3 -3
  20. package/combobox/index.js +3 -3
  21. package/custom-elements.json +797 -124
  22. package/date-picker/index.cjs +4 -3
  23. package/date-picker/index.js +4 -3
  24. package/date-range-picker/index.cjs +3 -2
  25. package/date-range-picker/index.js +3 -2
  26. package/dialog/index.cjs +2 -2
  27. package/dialog/index.js +2 -2
  28. package/elevation/index.cjs +1 -1
  29. package/elevation/index.js +1 -1
  30. package/fab/index.cjs +1 -1
  31. package/fab/index.js +1 -1
  32. package/file-picker/index.cjs +1 -1
  33. package/file-picker/index.js +1 -1
  34. package/focus/index.cjs +1 -1
  35. package/focus/index.js +1 -1
  36. package/header/index.cjs +1 -1
  37. package/header/index.js +1 -1
  38. package/index.cjs +21 -16
  39. package/index.js +10 -8
  40. package/lib/components.d.ts +1 -0
  41. package/lib/time-picker/definition.d.ts +3 -0
  42. package/lib/time-picker/locale.d.ts +12 -0
  43. package/lib/time-picker/time/picker.d.ts +9 -0
  44. package/lib/time-picker/time/presentationTime.d.ts +5 -0
  45. package/lib/time-picker/time/time.d.ts +15 -0
  46. package/lib/time-picker/time-picker.d.ts +16 -0
  47. package/lib/time-picker/time-picker.form-associated.d.ts +10 -0
  48. package/lib/time-picker/time-picker.template.d.ts +4 -0
  49. package/listbox/index.cjs +1 -1
  50. package/listbox/index.js +1 -1
  51. package/locales/en-GB.cjs +15 -0
  52. package/locales/en-GB.js +15 -0
  53. package/locales/en-US.cjs +15 -0
  54. package/locales/en-US.js +15 -0
  55. package/locales/ja-JP.cjs +15 -0
  56. package/locales/ja-JP.js +15 -0
  57. package/locales/zh-CN.cjs +15 -0
  58. package/locales/zh-CN.js +15 -0
  59. package/menu/index.cjs +3 -3
  60. package/menu/index.js +3 -3
  61. package/menu-item/index.cjs +1 -1
  62. package/menu-item/index.js +1 -1
  63. package/nav-disclosure/index.cjs +1 -1
  64. package/nav-disclosure/index.js +1 -1
  65. package/nav-item/index.cjs +1 -1
  66. package/nav-item/index.js +1 -1
  67. package/number-field/index.cjs +1 -1
  68. package/number-field/index.js +1 -1
  69. package/option/index.cjs +1 -1
  70. package/option/index.js +1 -1
  71. package/package.json +1 -1
  72. package/pagination/index.cjs +1 -1
  73. package/pagination/index.js +1 -1
  74. package/popup/index.cjs +3 -3
  75. package/popup/index.js +3 -3
  76. package/radio/index.cjs +1 -2
  77. package/radio/index.js +1 -2
  78. package/select/index.cjs +3 -3
  79. package/select/index.js +3 -3
  80. package/selectable-box/index.cjs +2 -2
  81. package/selectable-box/index.js +2 -2
  82. package/shared/date-picker/date-picker-base.d.ts +2 -2
  83. package/shared/definition.cjs +1 -1
  84. package/shared/definition.js +1 -1
  85. package/shared/definition11.cjs +1 -1
  86. package/shared/definition11.js +1 -1
  87. package/shared/definition14.cjs +1 -1
  88. package/shared/definition14.js +1 -1
  89. package/shared/definition15.cjs +2 -5
  90. package/shared/definition15.js +2 -5
  91. package/shared/definition16.cjs +2 -2
  92. package/shared/definition16.js +2 -2
  93. package/shared/definition18.cjs +2 -2
  94. package/shared/definition18.js +2 -2
  95. package/shared/definition19.cjs +2 -2
  96. package/shared/definition19.js +2 -2
  97. package/shared/definition20.cjs +1 -1
  98. package/shared/definition20.js +1 -1
  99. package/shared/definition23.cjs +1 -1
  100. package/shared/definition23.js +1 -1
  101. package/shared/definition24.cjs +1 -1
  102. package/shared/definition24.js +1 -1
  103. package/shared/definition25.cjs +1 -1
  104. package/shared/definition25.js +1 -1
  105. package/shared/definition28.cjs +1 -1
  106. package/shared/definition28.js +1 -1
  107. package/shared/definition29.cjs +1 -1
  108. package/shared/definition29.js +1 -1
  109. package/shared/definition30.cjs +1 -1
  110. package/shared/definition30.js +1 -1
  111. package/shared/definition31.cjs +1 -1
  112. package/shared/definition31.js +1 -1
  113. package/shared/definition35.cjs +1 -1
  114. package/shared/definition35.js +1 -1
  115. package/shared/definition4.cjs +1 -1
  116. package/shared/definition4.js +1 -1
  117. package/shared/definition40.cjs +3 -6
  118. package/shared/definition40.js +3 -6
  119. package/shared/definition41.cjs +2 -2
  120. package/shared/definition41.js +2 -2
  121. package/shared/definition42.cjs +1 -1
  122. package/shared/definition42.js +1 -1
  123. package/shared/definition44.cjs +1 -1
  124. package/shared/definition44.js +1 -1
  125. package/shared/definition45.cjs +1 -1
  126. package/shared/definition45.js +1 -1
  127. package/shared/definition46.cjs +1 -1
  128. package/shared/definition46.js +1 -1
  129. package/shared/definition48.cjs +1 -1
  130. package/shared/definition48.js +1 -1
  131. package/shared/definition5.cjs +1 -1
  132. package/shared/definition5.js +1 -1
  133. package/shared/definition51.cjs +1 -1
  134. package/shared/definition51.js +1 -1
  135. package/shared/definition52.cjs +1 -1
  136. package/shared/definition52.js +1 -1
  137. package/shared/definition53.cjs +1 -1
  138. package/shared/definition53.js +1 -1
  139. package/shared/definition54.cjs +769 -91
  140. package/shared/definition54.js +768 -90
  141. package/shared/definition55.cjs +76 -58
  142. package/shared/definition55.js +75 -57
  143. package/shared/definition56.cjs +100 -71
  144. package/shared/definition56.js +99 -70
  145. package/shared/definition57.cjs +80 -291
  146. package/shared/definition57.js +81 -292
  147. package/shared/definition58.cjs +303 -13
  148. package/shared/definition58.js +302 -13
  149. package/shared/definition59.cjs +11 -42
  150. package/shared/definition59.js +11 -41
  151. package/shared/definition60.cjs +23 -1782
  152. package/shared/definition60.js +22 -1781
  153. package/shared/definition61.cjs +1810 -0
  154. package/shared/definition61.js +1806 -0
  155. package/shared/definition9.cjs +1 -1
  156. package/shared/definition9.js +1 -1
  157. package/shared/localization/Locale.d.ts +2 -0
  158. package/shared/patterns/index.d.ts +1 -0
  159. package/shared/patterns/trapped-focus.d.ts +4 -0
  160. package/shared/presentationDate.cjs +11 -25
  161. package/shared/presentationDate.js +11 -25
  162. package/shared/trapped-focus.cjs +29 -0
  163. package/shared/trapped-focus.js +27 -0
  164. package/slider/index.cjs +1 -1
  165. package/slider/index.js +1 -1
  166. package/split-button/index.cjs +1 -1
  167. package/split-button/index.js +1 -1
  168. package/style.css +1 -1
  169. package/styles/core/all.css +1 -1
  170. package/styles/core/theme.css +1 -1
  171. package/styles/core/typography.css +1 -1
  172. package/styles/tokens/theme-dark.css +4 -4
  173. package/styles/tokens/theme-light.css +4 -4
  174. package/styles/tokens/vivid-2-compat.css +1 -1
  175. package/switch/index.cjs +1 -1
  176. package/switch/index.js +1 -1
  177. package/tab/index.cjs +1 -1
  178. package/tab/index.js +1 -1
  179. package/tabs/index.cjs +1 -1
  180. package/tabs/index.js +1 -1
  181. package/tag/index.cjs +1 -1
  182. package/tag/index.js +1 -1
  183. package/text-area/index.cjs +1 -1
  184. package/text-area/index.js +1 -1
  185. package/text-field/index.cjs +1 -1
  186. package/text-field/index.js +1 -1
  187. package/time-picker/index.cjs +38 -0
  188. package/time-picker/index.js +36 -0
  189. package/toggletip/index.cjs +4 -4
  190. package/toggletip/index.js +4 -4
  191. package/tooltip/index.cjs +4 -4
  192. package/tooltip/index.js +4 -4
  193. package/tree-item/index.cjs +2 -2
  194. package/tree-item/index.js +2 -2
  195. package/tree-view/index.cjs +1 -1
  196. package/tree-view/index.js +1 -1
  197. package/vivid.api.json +105 -0
@@ -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('./definition58.cjs');
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');
@@ -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 './definition58.js';
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;
@@ -2,3 +2,4 @@ export * from './affix';
2
2
  export * from './focus';
3
3
  export * from './form-elements';
4
4
  export * from './localized';
5
+ export * from './trapped-focus';
@@ -0,0 +1,4 @@
1
+ export declare class TrappedFocus {
2
+ }
3
+ export interface TrappedFocus extends HTMLElement {
4
+ }
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const definition$2 = require('./definition11.cjs');
4
- const definition = require('./definition60.cjs');
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 (event.key === "Tab") {
5818
- const { firstFocusableEl, lastFocusableEl } = this.#getFocusableEls();
5819
- if (event.shiftKey) {
5820
- if (this.shadowRoot.activeElement === firstFocusableEl) {
5821
- lastFocusableEl.focus();
5822
- return false;
5823
- }
5824
- } else {
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 './definition60.js';
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 (event.key === "Tab") {
5816
- const { firstFocusableEl, lastFocusableEl } = this.#getFocusableEls();
5817
- if (event.shiftKey) {
5818
- if (this.shadowRoot.activeElement === firstFocusableEl) {
5819
- lastFocusableEl.focus();
5820
- return false;
5821
- }
5822
- } else {
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/definition58.cjs');
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/definition58.js';
3
+ import '../shared/definition59.js';
4
4
  import '../shared/focus.js';
5
5
  import '../shared/direction.js';
6
6
  import '../shared/numbers.js';
@@ -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/definition58.cjs');
10
+ require('../shared/definition59.cjs');
11
11
  require('../shared/focus.cjs');
12
12
  require('../shared/affix.cjs');
13
13
  require('../shared/slotted.cjs');
@@ -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/definition58.js';
8
+ import '../shared/definition59.js';
9
9
  import '../shared/focus.js';
10
10
  import '../shared/affix.js';
11
11
  import '../shared/slotted.js';