@vonage/vivid 3.32.0 → 3.34.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 (218) hide show
  1. package/accordion/index.js +5 -5
  2. package/accordion-item/index.js +4 -4
  3. package/action-group/index.js +1 -1
  4. package/alert/index.js +6 -6
  5. package/avatar/index.js +2 -2
  6. package/badge/index.js +2 -2
  7. package/banner/index.js +5 -5
  8. package/breadcrumb/index.js +1 -1
  9. package/breadcrumb-item/index.js +3 -3
  10. package/button/index.js +4 -4
  11. package/calendar/index.js +1 -1
  12. package/calendar-event/index.js +1 -1
  13. package/card/index.js +3 -3
  14. package/checkbox/index.js +5 -3
  15. package/combobox/index.js +8 -8
  16. package/custom-elements.json +246 -16
  17. package/data-grid/index.js +2 -2
  18. package/date-picker/index.js +9 -9
  19. package/dialog/index.js +6 -6
  20. package/divider/index.js +1 -1
  21. package/elevation/index.js +1 -1
  22. package/empty-state/index.js +2 -2
  23. package/fab/index.js +4 -4
  24. package/file-picker/index.js +5 -5
  25. package/focus/index.js +1 -1
  26. package/header/index.js +2 -2
  27. package/icon/index.js +1 -1
  28. package/index.js +59 -59
  29. package/layout/index.js +1 -1
  30. package/lib/calendar/calendar.d.ts +1 -1
  31. package/lib/date-picker/calendar/dateStr.d.ts +1 -0
  32. package/lib/date-picker/calendar/month.d.ts +1 -0
  33. package/lib/date-picker/calendar/year.d.ts +2 -0
  34. package/lib/date-picker/date-picker.d.ts +2 -0
  35. package/lib/icon/icon.d.ts +0 -1
  36. package/lib/listbox/listbox.d.ts +9 -1
  37. package/lib/text-field/text-field.d.ts +1 -0
  38. package/listbox/index.js +20 -16
  39. package/locales/en-GB.js +48 -14
  40. package/locales/en-US.js +48 -14
  41. package/locales/ja-JP.js +48 -14
  42. package/locales/zh-CN.js +48 -14
  43. package/menu/index.js +8 -8
  44. package/menu-item/index.js +4 -4
  45. package/nav/index.js +1 -1
  46. package/nav-disclosure/index.js +3 -3
  47. package/nav-item/index.js +3 -3
  48. package/note/index.js +2 -3
  49. package/number-field/index.js +6 -6
  50. package/option/index.js +3 -3
  51. package/package.json +2 -16
  52. package/pagination/index.js +5 -5
  53. package/popup/index.js +6 -6
  54. package/progress/index.js +1 -1
  55. package/progress-ring/index.js +1 -1
  56. package/radio/index.js +2 -2
  57. package/radio-group/index.js +1 -1
  58. package/select/index.js +8 -8
  59. package/shared/affix.js +25 -9
  60. package/shared/apply-mixins.js +1 -1
  61. package/shared/breadcrumb-item.js +5 -5
  62. package/shared/button.js +13 -13
  63. package/shared/calendar-event.js +36 -16
  64. package/shared/definition.js +133 -194
  65. package/shared/definition10.js +225 -40
  66. package/shared/definition11.js +36 -32
  67. package/shared/definition12.js +763 -98
  68. package/shared/definition13.js +125 -89
  69. package/shared/definition14.js +207 -27
  70. package/shared/definition15.js +710 -731
  71. package/shared/definition16.js +1289 -47
  72. package/shared/definition17.js +6113 -93
  73. package/shared/definition18.js +242 -164
  74. package/shared/definition19.js +47 -692
  75. package/shared/definition2.js +199 -117
  76. package/shared/definition20.js +59 -1671
  77. package/shared/definition21.js +95 -255
  78. package/shared/definition22.js +2218 -1167
  79. package/shared/definition23.js +61 -5784
  80. package/shared/definition24.js +28 -117
  81. package/shared/definition25.js +52 -66
  82. package/shared/definition26.js +391 -214
  83. package/shared/definition27.js +441 -34
  84. package/shared/definition28.js +85 -73
  85. package/shared/definition29.js +21 -2283
  86. package/shared/definition3.js +61 -24
  87. package/shared/definition30.js +13 -49
  88. package/shared/definition31.js +54 -39
  89. package/shared/definition32.js +413 -375
  90. package/shared/definition33.js +223 -304
  91. package/shared/definition34.js +197 -13
  92. package/shared/definition35.js +88 -73
  93. package/shared/definition36.js +75 -25
  94. package/shared/definition37.js +434 -34
  95. package/shared/definition38.js +32 -432
  96. package/shared/definition39.js +677 -187
  97. package/shared/definition4.js +157 -12
  98. package/shared/definition40.js +95 -48
  99. package/shared/definition41.js +577 -31
  100. package/shared/definition42.js +126 -424
  101. package/shared/definition43.js +114 -618
  102. package/shared/definition44.js +24 -80
  103. package/shared/definition45.js +71 -543
  104. package/shared/definition46.js +499 -92
  105. package/shared/definition47.js +19 -133
  106. package/shared/definition48.js +129 -52
  107. package/shared/definition49.js +281 -17
  108. package/shared/definition5.js +71 -36
  109. package/shared/definition50.js +153 -484
  110. package/shared/definition51.js +131 -98
  111. package/shared/definition52.js +131 -16
  112. package/shared/definition53.js +80 -264
  113. package/shared/definition54.js +293 -118
  114. package/shared/definition55.js +12 -117
  115. package/shared/definition56.js +39 -68
  116. package/shared/definition57.js +166 -288
  117. package/shared/definition6.js +56 -111
  118. package/shared/definition7.js +120 -195
  119. package/shared/definition8.js +58 -23
  120. package/shared/definition9.js +92 -66
  121. package/shared/focus.js +2 -1
  122. package/shared/focus2.js +1 -1
  123. package/shared/form-associated.js +2 -2
  124. package/shared/icon.js +48 -27
  125. package/shared/index.js +7 -27
  126. package/shared/index2.js +108 -80
  127. package/shared/key-codes.js +1 -1
  128. package/shared/listbox.js +88 -11
  129. package/shared/patterns/form-elements/form-elements.d.ts +4 -4
  130. package/shared/radio.js +23 -7
  131. package/shared/repeat.js +1 -1
  132. package/shared/text-anchor.js +21 -4
  133. package/shared/text-anchor.template.js +37 -40
  134. package/shared/text-field.js +2 -2
  135. package/shared/text-field2.js +15 -15
  136. package/shared/tree-item.js +12 -12
  137. package/side-drawer/index.js +1 -1
  138. package/slider/index.js +2 -2
  139. package/split-button/index.js +3 -3
  140. package/style.css +6097 -0
  141. package/styles/core/all.css +1 -1
  142. package/styles/core/theme.css +1 -1
  143. package/styles/core/typography.css +1 -1
  144. package/styles/tokens/theme-dark.css +4 -4
  145. package/styles/tokens/theme-light.css +4 -4
  146. package/styles/tokens/vivid-2-compat.css +1 -1
  147. package/switch/index.js +3 -3
  148. package/tab/index.js +3 -3
  149. package/tab-panel/index.js +1 -1
  150. package/tabs/index.js +5 -5
  151. package/tag/index.js +3 -3
  152. package/tag-group/index.js +1 -1
  153. package/text-anchor/index.js +1 -1
  154. package/text-area/index.js +3 -3
  155. package/text-field/index.js +3 -3
  156. package/toggletip/index.js +7 -7
  157. package/tooltip/index.js +7 -7
  158. package/tree-item/index.js +3 -3
  159. package/tree-view/index.js +1 -1
  160. package/lib/accordion/index.d.ts +0 -1
  161. package/lib/accordion-item/index.d.ts +0 -1
  162. package/lib/action-group/index.d.ts +0 -1
  163. package/lib/alert/index.d.ts +0 -1
  164. package/lib/avatar/index.d.ts +0 -1
  165. package/lib/badge/index.d.ts +0 -1
  166. package/lib/banner/index.d.ts +0 -1
  167. package/lib/breadcrumb/index.d.ts +0 -1
  168. package/lib/breadcrumb-item/index.d.ts +0 -1
  169. package/lib/button/index.d.ts +0 -1
  170. package/lib/calendar/index.d.ts +0 -1
  171. package/lib/calendar-event/index.d.ts +0 -1
  172. package/lib/card/index.d.ts +0 -1
  173. package/lib/checkbox/index.d.ts +0 -1
  174. package/lib/combobox/index.d.ts +0 -1
  175. package/lib/data-grid/index.d.ts +0 -1
  176. package/lib/date-picker/index.d.ts +0 -1
  177. package/lib/dialog/index.d.ts +0 -1
  178. package/lib/divider/index.d.ts +0 -1
  179. package/lib/elevation/index.d.ts +0 -1
  180. package/lib/empty-state/index.d.ts +0 -1
  181. package/lib/fab/index.d.ts +0 -1
  182. package/lib/file-picker/index.d.ts +0 -1
  183. package/lib/focus/index.d.ts +0 -1
  184. package/lib/header/index.d.ts +0 -1
  185. package/lib/icon/index.d.ts +0 -1
  186. package/lib/layout/index.d.ts +0 -1
  187. package/lib/listbox/index.d.ts +0 -1
  188. package/lib/menu/index.d.ts +0 -1
  189. package/lib/menu-item/index.d.ts +0 -1
  190. package/lib/nav/index.d.ts +0 -1
  191. package/lib/nav-disclosure/index.d.ts +0 -1
  192. package/lib/nav-item/index.d.ts +0 -1
  193. package/lib/note/index.d.ts +0 -1
  194. package/lib/number-field/index.d.ts +0 -1
  195. package/lib/option/index.d.ts +0 -1
  196. package/lib/pagination/index.d.ts +0 -1
  197. package/lib/popup/index.d.ts +0 -1
  198. package/lib/progress/index.d.ts +0 -1
  199. package/lib/progress-ring/index.d.ts +0 -1
  200. package/lib/radio/index.d.ts +0 -1
  201. package/lib/radio-group/index.d.ts +0 -1
  202. package/lib/select/index.d.ts +0 -1
  203. package/lib/side-drawer/index.d.ts +0 -1
  204. package/lib/slider/index.d.ts +0 -1
  205. package/lib/split-button/index.d.ts +0 -1
  206. package/lib/switch/index.d.ts +0 -1
  207. package/lib/tab/index.d.ts +0 -1
  208. package/lib/tab-panel/index.d.ts +0 -1
  209. package/lib/tabs/index.d.ts +0 -1
  210. package/lib/tag/index.d.ts +0 -1
  211. package/lib/tag-group/index.d.ts +0 -1
  212. package/lib/text-anchor/index.d.ts +0 -1
  213. package/lib/text-area/index.d.ts +0 -1
  214. package/lib/text-field/index.d.ts +0 -1
  215. package/lib/toggletip/index.d.ts +0 -1
  216. package/lib/tooltip/index.d.ts +0 -1
  217. package/lib/tree-item/index.d.ts +0 -1
  218. package/lib/tree-view/index.d.ts +0 -1
@@ -1,763 +1,742 @@
1
- import { F as FoundationElement, d as __classPrivateFieldGet, _ as __decorate, a as attr, b as __metadata, h as html, r as registerFactory } from './index.js';
2
- import { C as CalendarEvent } from './calendar-event.js';
3
- import { b as _has, _ as _curry1, a as _curry2 } from './_has.js';
4
- import { r as repeat } from './repeat.js';
5
-
6
- /**
7
- * Tests whether or not an object is an array.
8
- *
9
- * @private
10
- * @param {*} val The object to test.
11
- * @return {Boolean} `true` if `val` is an array, `false` otherwise.
12
- * @example
13
- *
14
- * _isArray([]); //=> true
15
- * _isArray(null); //=> false
16
- * _isArray({}); //=> false
17
- */
18
- var _isArray = Array.isArray || function _isArray(val) {
19
- return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';
20
- };
21
-
22
- function _isString(x) {
23
- return Object.prototype.toString.call(x) === '[object String]';
1
+ import { D as DOM, O as Observable, _ as __decorate, a as attr, o as observable, h as html, r as registerFactory } from './index.js';
2
+ import { a as iconRegistries } from './definition24.js';
3
+ import { P as Popup, p as popupRegistries } from './definition57.js';
4
+ import { f as focusRegistries } from './definition55.js';
5
+ import { a as listboxOptionRegistries } from './definition33.js';
6
+ import { s as styles$1 } from './text-field.js';
7
+ import { A as AffixIcon, a as affixIconTemplateFactory } from './affix.js';
8
+ import { f as formElements } from './index2.js';
9
+ import { b as Listbox, D as DelegatesARIAListbox, a as Listbox$1 } from './listbox.js';
10
+ import { S as StartEnd } from './start-end.js';
11
+ import { S as SelectPosition } from './select.options.js';
12
+ import { a as applyMixins } from './apply-mixins.js';
13
+ import { F as FormAssociated } from './form-associated.js';
14
+ import { l as limit } from './numbers.js';
15
+ import { u as uniqueId } from './strings.js';
16
+ import { f as focusTemplateFactory } from './focus2.js';
17
+ import { r as ref } from './ref.js';
18
+ import { s as slotted } from './slotted.js';
19
+ import { w as when } from './when.js';
20
+ import { c as classNames } from './class-names.js';
21
+
22
+ class _Combobox extends Listbox {
24
23
  }
25
-
26
- var toString = Object.prototype.toString;
27
-
28
- var _isArguments =
29
- /*#__PURE__*/
30
- function () {
31
- return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) {
32
- return toString.call(x) === '[object Arguments]';
33
- } : function _isArguments(x) {
34
- return _has('callee', x);
35
- };
36
- }();
37
-
38
- var hasEnumBug = !
39
- /*#__PURE__*/
40
- {
41
- toString: null
42
- }.propertyIsEnumerable('toString');
43
- var nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; // Safari bug
44
-
45
- var hasArgsEnumBug =
46
- /*#__PURE__*/
47
- function () {
48
-
49
- return arguments.propertyIsEnumerable('length');
50
- }();
51
-
52
- var contains = function contains(list, item) {
53
- var idx = 0;
54
-
55
- while (idx < list.length) {
56
- if (list[idx] === item) {
57
- return true;
58
- }
59
-
60
- idx += 1;
61
- }
62
-
63
- return false;
64
- };
65
24
  /**
66
- * Returns a list containing the names of all the enumerable own properties of
67
- * the supplied object.
68
- * Note that the order of the output array is not guaranteed to be consistent
69
- * across different JS platforms.
70
- *
71
- * @func
72
- * @memberOf R
73
- * @since v0.1.0
74
- * @category Object
75
- * @sig {k: v} -> [k]
76
- * @param {Object} obj The object to extract properties from
77
- * @return {Array} An array of the object's own properties.
78
- * @see R.keysIn, R.values, R.toPairs
79
- * @example
25
+ * A form-associated base class for the {@link (Combobox:class)} component.
80
26
  *
81
- * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']
27
+ * @internal
82
28
  */
83
-
84
-
85
- var keys = typeof Object.keys === 'function' && !hasArgsEnumBug ?
86
- /*#__PURE__*/
87
- _curry1(function keys(obj) {
88
- return Object(obj) !== obj ? [] : Object.keys(obj);
89
- }) :
90
- /*#__PURE__*/
91
- _curry1(function keys(obj) {
92
- if (Object(obj) !== obj) {
93
- return [];
94
- }
95
-
96
- var prop, nIdx;
97
- var ks = [];
98
-
99
- var checkArgsLength = hasArgsEnumBug && _isArguments(obj);
100
-
101
- for (prop in obj) {
102
- if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {
103
- ks[ks.length] = prop;
104
- }
105
- }
106
-
107
- if (hasEnumBug) {
108
- nIdx = nonEnumerableProps.length - 1;
109
-
110
- while (nIdx >= 0) {
111
- prop = nonEnumerableProps[nIdx];
112
-
113
- if (_has(prop, obj) && !contains(ks, prop)) {
114
- ks[ks.length] = prop;
115
- }
116
-
117
- nIdx -= 1;
29
+ class FormAssociatedCombobox extends FormAssociated(_Combobox) {
30
+ constructor() {
31
+ super(...arguments);
32
+ this.proxy = document.createElement("input");
118
33
  }
119
- }
120
-
121
- return ks;
122
- });
34
+ }
123
35
 
124
36
  /**
125
- * Gives a single-word string description of the (native) type of a value,
126
- * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not
127
- * attempt to distinguish user Object types any further, reporting them all as
128
- * 'Object'.
129
- *
130
- * @func
131
- * @memberOf R
132
- * @since v0.8.0
133
- * @category Type
134
- * @sig (* -> {*}) -> String
135
- * @param {*} val The value to test
136
- * @return {String}
137
- * @example
138
- *
139
- * R.type({}); //=> "Object"
140
- * R.type(1); //=> "Number"
141
- * R.type(false); //=> "Boolean"
142
- * R.type('s'); //=> "String"
143
- * R.type(null); //=> "Null"
144
- * R.type([]); //=> "Array"
145
- * R.type(/[A-z]/); //=> "RegExp"
146
- * R.type(() => {}); //=> "Function"
147
- * R.type(undefined); //=> "Undefined"
37
+ * Autocomplete values for combobox.
38
+ * @public
148
39
  */
149
-
150
- var type =
151
- /*#__PURE__*/
152
- _curry1(function type(val) {
153
- return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);
154
- });
40
+ const ComboboxAutocomplete = {
41
+ inline: "inline",
42
+ list: "list",
43
+ both: "both",
44
+ none: "none",
45
+ };
155
46
 
156
47
  /**
157
- * A function that returns the `!` of its argument. It will return `true` when
158
- * passed false-y value, and `false` when passed a truth-y one.
48
+ * A Combobox Custom HTML Element.
49
+ * Implements the {@link https://w3c.github.io/aria-practices/#combobox | ARIA combobox }.
159
50
  *
160
- * @func
161
- * @memberOf R
162
- * @since v0.1.0
163
- * @category Logic
164
- * @sig * -> Boolean
165
- * @param {*} a any value
166
- * @return {Boolean} the logical inverse of passed argument.
167
- * @see R.complement
168
- * @example
51
+ * @slot start - Content which can be provided before the input
52
+ * @slot end - Content which can be provided after the input
53
+ * @slot control - Used to replace the input element representing the combobox
54
+ * @slot indicator - The visual indicator representing the expanded state
55
+ * @slot - The default slot for the options
56
+ * @csspart control - The wrapper element containing the input area, including start and end
57
+ * @csspart selected-value - The input element representing the selected value
58
+ * @csspart indicator - The element wrapping the indicator slot
59
+ * @csspart listbox - The wrapper for the listbox slotted options
60
+ * @fires change - Fires a custom 'change' event when the value updates
169
61
  *
170
- * R.not(true); //=> false
171
- * R.not(false); //=> true
172
- * R.not(0); //=> true
173
- * R.not(1); //=> false
62
+ * @public
174
63
  */
175
-
176
- var not =
177
- /*#__PURE__*/
178
- _curry1(function not(a) {
179
- return !a;
180
- });
181
-
182
- var not$1 = not;
183
-
184
- function _arrayFromIterator(iter) {
185
- var list = [];
186
- var next;
187
-
188
- while (!(next = iter.next()).done) {
189
- list.push(next.value);
190
- }
191
-
192
- return list;
193
- }
194
-
195
- function _includesWith(pred, x, list) {
196
- var idx = 0;
197
- var len = list.length;
198
-
199
- while (idx < len) {
200
- if (pred(x, list[idx])) {
201
- return true;
64
+ let Combobox$1 = class Combobox extends FormAssociatedCombobox {
65
+ constructor() {
66
+ super(...arguments);
67
+ /**
68
+ * The internal value property.
69
+ *
70
+ * @internal
71
+ */
72
+ this._value = "";
73
+ /**
74
+ * The collection of currently filtered options.
75
+ *
76
+ * @public
77
+ */
78
+ this.filteredOptions = [];
79
+ /**
80
+ * The current filter value.
81
+ *
82
+ * @internal
83
+ */
84
+ this.filter = "";
85
+ /**
86
+ * The initial state of the position attribute.
87
+ *
88
+ * @internal
89
+ */
90
+ this.forcedPosition = false;
91
+ /**
92
+ * The unique id for the internal listbox element.
93
+ *
94
+ * @internal
95
+ */
96
+ this.listboxId = uniqueId("listbox-");
97
+ /**
98
+ * The max height for the listbox when opened.
99
+ *
100
+ * @internal
101
+ */
102
+ this.maxHeight = 0;
103
+ /**
104
+ * The open attribute.
105
+ *
106
+ * @public
107
+ * @remarks
108
+ * HTML Attribute: open
109
+ */
110
+ this.open = false;
202
111
  }
203
-
204
- idx += 1;
205
- }
206
-
207
- return false;
208
- }
209
-
210
- function _functionName(f) {
211
- // String(x => x) evaluates to "x => x", so the pattern may not match.
212
- var match = String(f).match(/^function (\w*)/);
213
- return match == null ? '' : match[1];
214
- }
215
-
216
- // Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
217
- function _objectIs(a, b) {
218
- // SameValue algorithm
219
- if (a === b) {
220
- // Steps 1-5, 7-10
221
- // Steps 6.b-6.e: +0 != -0
222
- return a !== 0 || 1 / a === 1 / b;
223
- } else {
224
- // Step 6.a: NaN == NaN
225
- return a !== a && b !== b;
226
- }
227
- }
228
-
229
- var _objectIs$1 = typeof Object.is === 'function' ? Object.is : _objectIs;
230
-
231
- /**
232
- * private _uniqContentEquals function.
233
- * That function is checking equality of 2 iterator contents with 2 assumptions
234
- * - iterators lengths are the same
235
- * - iterators values are unique
236
- *
237
- * false-positive result will be returned for comparison of, e.g.
238
- * - [1,2,3] and [1,2,3,4]
239
- * - [1,1,1] and [1,2,3]
240
- * */
241
-
242
- function _uniqContentEquals(aIterator, bIterator, stackA, stackB) {
243
- var a = _arrayFromIterator(aIterator);
244
-
245
- var b = _arrayFromIterator(bIterator);
246
-
247
- function eq(_a, _b) {
248
- return _equals(_a, _b, stackA.slice(), stackB.slice());
249
- } // if *a* array contains any element that is not included in *b*
250
-
251
-
252
- return !_includesWith(function (b, aItem) {
253
- return !_includesWith(eq, aItem, b);
254
- }, b, a);
255
- }
256
-
257
- function _equals(a, b, stackA, stackB) {
258
- if (_objectIs$1(a, b)) {
259
- return true;
260
- }
261
-
262
- var typeA = type(a);
263
-
264
- if (typeA !== type(b)) {
265
- return false;
266
- }
267
-
268
- if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') {
269
- return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a);
270
- }
271
-
272
- if (typeof a.equals === 'function' || typeof b.equals === 'function') {
273
- return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a);
274
- }
275
-
276
- switch (typeA) {
277
- case 'Arguments':
278
- case 'Array':
279
- case 'Object':
280
- if (typeof a.constructor === 'function' && _functionName(a.constructor) === 'Promise') {
281
- return a === b;
282
- }
283
-
284
- break;
285
-
286
- case 'Boolean':
287
- case 'Number':
288
- case 'String':
289
- if (!(typeof a === typeof b && _objectIs$1(a.valueOf(), b.valueOf()))) {
290
- return false;
291
- }
292
-
293
- break;
294
-
295
- case 'Date':
296
- if (!_objectIs$1(a.valueOf(), b.valueOf())) {
297
- return false;
298
- }
299
-
300
- break;
301
-
302
- case 'Error':
303
- return a.name === b.name && a.message === b.message;
304
-
305
- case 'RegExp':
306
- if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) {
307
- return false;
308
- }
309
-
310
- break;
311
- }
312
-
313
- var idx = stackA.length - 1;
314
-
315
- while (idx >= 0) {
316
- if (stackA[idx] === a) {
317
- return stackB[idx] === b;
112
+ /**
113
+ * Reset the element to its first selectable option when its parent form is reset.
114
+ *
115
+ * @internal
116
+ */
117
+ formResetCallback() {
118
+ super.formResetCallback();
119
+ this.setDefaultSelectedOption();
120
+ this.updateValue();
318
121
  }
319
-
320
- idx -= 1;
321
- }
322
-
323
- switch (typeA) {
324
- case 'Map':
325
- if (a.size !== b.size) {
326
- return false;
327
- }
328
-
329
- return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b]));
330
-
331
- case 'Set':
332
- if (a.size !== b.size) {
333
- return false;
334
- }
335
-
336
- return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b]));
337
-
338
- case 'Arguments':
339
- case 'Array':
340
- case 'Object':
341
- case 'Boolean':
342
- case 'Number':
343
- case 'String':
344
- case 'Date':
345
- case 'Error':
346
- case 'RegExp':
347
- case 'Int8Array':
348
- case 'Uint8Array':
349
- case 'Uint8ClampedArray':
350
- case 'Int16Array':
351
- case 'Uint16Array':
352
- case 'Int32Array':
353
- case 'Uint32Array':
354
- case 'Float32Array':
355
- case 'Float64Array':
356
- case 'ArrayBuffer':
357
- break;
358
-
359
- default:
360
- // Values of other types are only equal if identical.
361
- return false;
362
- }
363
-
364
- var keysA = keys(a);
365
-
366
- if (keysA.length !== keys(b).length) {
367
- return false;
368
- }
369
-
370
- var extendedStackA = stackA.concat([a]);
371
- var extendedStackB = stackB.concat([b]);
372
- idx = keysA.length - 1;
373
-
374
- while (idx >= 0) {
375
- var key = keysA[idx];
376
-
377
- if (!(_has(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) {
378
- return false;
122
+ /** {@inheritDoc (FormAssociated:interface).validate} */
123
+ validate() {
124
+ super.validate(this.control);
379
125
  }
380
-
381
- idx -= 1;
382
- }
383
-
384
- return true;
385
- }
386
-
387
- /**
388
- * Returns `true` if its arguments are equivalent, `false` otherwise. Handles
389
- * cyclical data structures.
390
- *
391
- * Dispatches symmetrically to the `equals` methods of both arguments, if
392
- * present.
393
- *
394
- * @func
395
- * @memberOf R
396
- * @since v0.15.0
397
- * @category Relation
398
- * @sig a -> b -> Boolean
399
- * @param {*} a
400
- * @param {*} b
401
- * @return {Boolean}
402
- * @example
403
- *
404
- * R.equals(1, 1); //=> true
405
- * R.equals(1, '1'); //=> false
406
- * R.equals([1, 2, 3], [1, 2, 3]); //=> true
407
- *
408
- * const a = {}; a.v = a;
409
- * const b = {}; b.v = b;
410
- * R.equals(a, b); //=> true
411
- */
412
-
413
- var equals =
414
- /*#__PURE__*/
415
- _curry2(function equals(a, b) {
416
- return _equals(a, b, [], []);
417
- });
418
-
419
- function _isObject(x) {
420
- return Object.prototype.toString.call(x) === '[object Object]';
421
- }
422
-
423
- /**
424
- * Tests whether or not an object is a typed array.
425
- *
426
- * @private
427
- * @param {*} val The object to test.
428
- * @return {Boolean} `true` if `val` is a typed array, `false` otherwise.
429
- * @example
430
- *
431
- * _isTypedArray(new Uint8Array([])); //=> true
432
- * _isTypedArray(new Float32Array([])); //=> true
433
- * _isTypedArray([]); //=> false
434
- * _isTypedArray(null); //=> false
435
- * _isTypedArray({}); //=> false
436
- */
437
- function _isTypedArray(val) {
438
- var type = Object.prototype.toString.call(val);
439
- return type === '[object Uint8ClampedArray]' || type === '[object Int8Array]' || type === '[object Uint8Array]' || type === '[object Int16Array]' || type === '[object Uint16Array]' || type === '[object Int32Array]' || type === '[object Uint32Array]' || type === '[object Float32Array]' || type === '[object Float64Array]' || type === '[object BigInt64Array]' || type === '[object BigUint64Array]';
440
- }
441
-
442
- /**
443
- * Returns the empty value of its argument's type. Ramda defines the empty
444
- * value of Array (`[]`), Object (`{}`), String (`''`),
445
- * TypedArray (`Uint8Array []`, `Float32Array []`, etc), and Arguments. Other
446
- * types are supported if they define `<Type>.empty`,
447
- * `<Type>.prototype.empty` or implement the
448
- * [FantasyLand Monoid spec](https://github.com/fantasyland/fantasy-land#monoid).
449
- *
450
- * Dispatches to the `empty` method of the first argument, if present.
451
- *
452
- * @func
453
- * @memberOf R
454
- * @since v0.3.0
455
- * @category Function
456
- * @sig a -> a
457
- * @param {*} x
458
- * @return {*}
459
- * @example
460
- *
461
- * R.empty(Just(42)); //=> Nothing()
462
- * R.empty([1, 2, 3]); //=> []
463
- * R.empty('unicorns'); //=> ''
464
- * R.empty({x: 1, y: 2}); //=> {}
465
- * R.empty(Uint8Array.from('123')); //=> Uint8Array []
466
- */
467
-
468
- var empty =
469
- /*#__PURE__*/
470
- _curry1(function empty(x) {
471
- return x != null && typeof x['fantasy-land/empty'] === 'function' ? x['fantasy-land/empty']() : x != null && x.constructor != null && typeof x.constructor['fantasy-land/empty'] === 'function' ? x.constructor['fantasy-land/empty']() : x != null && typeof x.empty === 'function' ? x.empty() : x != null && x.constructor != null && typeof x.constructor.empty === 'function' ? x.constructor.empty() : _isArray(x) ? [] : _isString(x) ? '' : _isObject(x) ? {} : _isArguments(x) ? function () {
472
- return arguments;
473
- }() : _isTypedArray(x) ? x.constructor.from('') : void 0 // else
474
- ;
475
- });
476
-
477
- /**
478
- * Returns `true` if the given value is its type's empty value; `false`
479
- * otherwise.
480
- *
481
- * @func
482
- * @memberOf R
483
- * @since v0.1.0
484
- * @category Logic
485
- * @sig a -> Boolean
486
- * @param {*} x
487
- * @return {Boolean}
488
- * @see R.empty
489
- * @example
490
- *
491
- * R.isEmpty([1, 2, 3]); //=> false
492
- * R.isEmpty([]); //=> true
493
- * R.isEmpty(''); //=> true
494
- * R.isEmpty(null); //=> false
495
- * R.isEmpty({}); //=> true
496
- * R.isEmpty({length: 0}); //=> false
497
- * R.isEmpty(Uint8Array.from('')); //=> true
498
- */
499
-
500
- var isEmpty =
501
- /*#__PURE__*/
502
- _curry1(function isEmpty(x) {
503
- return x != null && equals(x, empty(x));
504
- });
505
-
506
- var isEmpty$1 = isEmpty;
507
-
508
- var css_248z = "/**\n * Do not edit directly\n * Generated on Tue, 22 Aug 2023 13:37:39 GMT\n */\nol {\n padding: 0;\n margin: 0;\n list-style: none;\n}\n\n[role=grid i] {\n position: relative;\n z-index: 0;\n display: grid;\n margin: auto;\n grid-template-areas: \". column-headers\" \"row-headers calendar\";\n grid-template-columns: min-content auto;\n inline-size: max(100%, 500px);\n min-inline-size: 880px;\n}\n\n.row-headers {\n display: grid;\n grid-area: row-headers;\n grid-template-rows: repeat(24, 1fr);\n margin-inline-end: 2px;\n}\n.row-headers > [role=rowheader i] {\n display: flex;\n align-items: flex-end;\n justify-content: flex-end;\n}\n.row-headers > [role=rowheader i] > time {\n font: var(--vvd-typography-base-condensed);\n font-size: small;\n line-height: 1;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n.calendar-row {\n display: contents;\n}\n\n.calendar-grid-presentation {\n display: grid;\n overflow: hidden;\n background: var(--vvd-color-surface-2dp);\n border-radius: 6px;\n counter-reset: listing;\n filter: var(--vvd-shadow-surface-2dp);\n gap: 1px;\n grid-area: calendar;\n grid-auto-flow: column;\n grid-template: repeat(24, 1fr)/repeat(7, 1fr);\n}\n\n.hours {\n display: contents;\n}\n.hours > [role=listitem i] {\n position: relative;\n grid-column: 1/8;\n grid-row: var(--row);\n min-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 8));\n pointer-events: none;\n}\n.hours > [role=listitem i]:not(:first-child)::after {\n position: absolute;\n border-block-end: var(--vvd-color-neutral-100) 1px solid;\n content: \"\";\n inline-size: 100%;\n margin-block-start: -1px;\n}\n.hours > [role=listitem i]:nth-child(24n+1) {\n --row: 1;\n}\n.hours > [role=listitem i]:nth-child(24n+2) {\n --row: 2;\n}\n.hours > [role=listitem i]:nth-child(24n+3) {\n --row: 3;\n}\n.hours > [role=listitem i]:nth-child(24n+4) {\n --row: 4;\n}\n.hours > [role=listitem i]:nth-child(24n+5) {\n --row: 5;\n}\n.hours > [role=listitem i]:nth-child(24n+6) {\n --row: 6;\n}\n.hours > [role=listitem i]:nth-child(24n+7) {\n --row: 7;\n}\n.hours > [role=listitem i]:nth-child(24n+8) {\n --row: 8;\n}\n.hours > [role=listitem i]:nth-child(24n+9) {\n --row: 9;\n}\n.hours > [role=listitem i]:nth-child(24n+10) {\n --row: 10;\n}\n.hours > [role=listitem i]:nth-child(24n+11) {\n --row: 11;\n}\n.hours > [role=listitem i]:nth-child(24n+12) {\n --row: 12;\n}\n.hours > [role=listitem i]:nth-child(24n+13) {\n --row: 13;\n}\n.hours > [role=listitem i]:nth-child(24n+14) {\n --row: 14;\n}\n.hours > [role=listitem i]:nth-child(24n+15) {\n --row: 15;\n}\n.hours > [role=listitem i]:nth-child(24n+16) {\n --row: 16;\n}\n.hours > [role=listitem i]:nth-child(24n+17) {\n --row: 17;\n}\n.hours > [role=listitem i]:nth-child(24n+18) {\n --row: 18;\n}\n.hours > [role=listitem i]:nth-child(24n+19) {\n --row: 19;\n}\n.hours > [role=listitem i]:nth-child(24n+20) {\n --row: 20;\n}\n.hours > [role=listitem i]:nth-child(24n+21) {\n --row: 21;\n}\n.hours > [role=listitem i]:nth-child(24n+22) {\n --row: 22;\n}\n.hours > [role=listitem i]:nth-child(24n+23) {\n --row: 23;\n}\n.hours > [role=listitem i]:nth-child(24n+24) {\n --row: 24;\n}\n\n[role=gridcell i] {\n display: grid;\n gap: 1px;\n grid-auto-flow: column;\n}\n\n[role=gridcell i],\n[role=columnheader i],\n[role=columnheader i] [role=button i] {\n position: relative;\n}\n[role=gridcell i]::before,\n[role=columnheader i]::before,\n[role=columnheader i] [role=button i]::before {\n position: absolute;\n z-index: -1;\n background-color: var(--vvd-color-information-400);\n content: \"\";\n}\n@supports (inset: 0) {\n [role=gridcell i]::before,\n [role=columnheader i]::before,\n [role=columnheader i] [role=button i]::before {\n inset: 0;\n }\n}\n@supports not (inset: 0) {\n [role=gridcell i]::before,\n [role=columnheader i]::before,\n [role=columnheader i] [role=button i]::before {\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n}\n[role=gridcell i]:focus,\n[role=columnheader i]:focus,\n[role=columnheader i] [role=button i]:focus {\n outline: none;\n}\n[role=gridcell i]:not(:focus-visible)::before,\n[role=columnheader i]:not(:focus-visible)::before,\n[role=columnheader i] [role=button i]:not(:focus-visible)::before {\n display: none;\n}\n\n.columns {\n display: contents;\n}\n.columns > [role=gridcell i] {\n position: relative;\n grid-column: var(--column);\n grid-row: 1/25;\n}\n.columns > [role=gridcell i]:nth-child(1) {\n --column: 1;\n}\n.columns > [role=gridcell i]:nth-child(2) {\n --column: 2;\n}\n.columns > [role=gridcell i]:nth-child(3) {\n --column: 3;\n}\n.columns > [role=gridcell i]:nth-child(4) {\n --column: 4;\n}\n.columns > [role=gridcell i]:nth-child(5) {\n --column: 5;\n}\n.columns > [role=gridcell i]:nth-child(6) {\n --column: 6;\n}\n.columns > [role=gridcell i]:nth-child(7) {\n --column: 7;\n}\n.columns > [role=gridcell i]:not(:first-child)::after {\n position: absolute;\n block-size: 100%;\n border-inline-end: var(--vvd-color-neutral-100) 1px solid;\n content: \"\";\n margin-inline-start: -1px;\n}\n\n.column-headers {\n display: grid;\n grid-area: column-headers;\n grid-template-columns: repeat(7, 1fr);\n}\n.column-headers [role=columnheader i] h2 {\n display: grid;\n align-items: baseline;\n margin: 0;\n font: var(--vvd-typography-heading-4);\n grid-template-columns: 1fr auto 1fr;\n}\n.column-headers [role=columnheader i] h2 > em {\n font: inherit;\n inline-size: min-content;\n}\n@supports (inset: 0) {\n .column-headers [role=columnheader i] h2 > em {\n inset-inline-start: 0;\n }\n}\n@supports not (inset: 0) {\n .column-headers [role=columnheader i] h2 > em {\n left: 0;\n }\n}\n.column-headers [role=columnheader i] h2 > small {\n font: var(--vvd-typography-base-condensed);\n text-transform: uppercase;\n}";
509
-
510
- const ARROW_UP = 'ArrowUp';
511
- const ARROW_RIGHT = 'ArrowRight';
512
- const ARROW_DOWN = 'ArrowDown';
513
- const ARROW_LEFT = 'ArrowLeft';
514
- function isCellOrHeader(el) {
515
- return el instanceof HTMLElement && (el.matches('[role="gridcell"i]') || el.matches('[role="columnheader"i]'));
516
- }
517
- const getCellOrHeader = f => f.matches('[role="columnheader"i]') ? '[role="gridcell"i]' : '[role="columnheader"i]';
518
- function getNextFocusableGridElement(key, activeElement) {
519
- if (activeElement.parentNode instanceof HTMLElement) {
520
- switch (key) {
521
- case ARROW_RIGHT:
522
- return activeElement.nextElementSibling || activeElement.parentNode.firstElementChild;
523
- case ARROW_LEFT:
524
- return activeElement.previousElementSibling || activeElement.parentNode.lastElementChild;
525
- case ARROW_UP:
526
- case ARROW_DOWN:
527
- {
528
- const {
529
- children
530
- } = activeElement.parentNode;
531
- const i = Array.from(children).indexOf(activeElement);
532
- return this.shadowRoot.querySelector(`${getCellOrHeader(activeElement)}:nth-child(${i + 1})`);
126
+ get isAutocompleteInline() {
127
+ return (this.autocomplete === ComboboxAutocomplete.inline || this.isAutocompleteBoth);
128
+ }
129
+ get isAutocompleteList() {
130
+ return this.autocomplete === ComboboxAutocomplete.list || this.isAutocompleteBoth;
131
+ }
132
+ get isAutocompleteBoth() {
133
+ return this.autocomplete === ComboboxAutocomplete.both;
134
+ }
135
+ /**
136
+ * Sets focus and synchronize ARIA attributes when the open property changes.
137
+ *
138
+ * @param prev - the previous open value
139
+ * @param next - the current open value
140
+ *
141
+ * @internal
142
+ */
143
+ openChanged() {
144
+ if (this.open) {
145
+ this.ariaControls = this.listboxId;
146
+ this.ariaExpanded = "true";
147
+ this.setPositioning();
148
+ this.focusAndScrollOptionIntoView();
149
+ // focus is directed to the element when `open` is changed programmatically
150
+ DOM.queueUpdate(() => this.focus());
151
+ return;
533
152
  }
153
+ this.ariaControls = "";
154
+ this.ariaExpanded = "false";
534
155
  }
535
- }
536
- }
537
- function getHeaderDescendantGridCell(key, activeElement) {
538
- if (key !== ARROW_DOWN) {
539
- return;
540
- }
541
- const header = activeElement.closest('[role="columnheader"i]');
542
- const columnHeaders = this.shadowRoot.querySelectorAll('[role="columnheader"i]');
543
- const i = Array.from(columnHeaders).indexOf(header);
544
- return this.shadowRoot.querySelector(`[role="gridcell"i]:nth-child(${i + 1})`);
545
- }
546
-
547
- function getDay(el) {
548
- const cellOrHeader = el.closest('[role="gridcell"i], [role="columnheader"i]');
549
- if (cellOrHeader) {
550
- const {
551
- parentElement
552
- } = cellOrHeader;
553
- if (parentElement) {
554
- return parentElement.children && Array.from(parentElement.children).indexOf(cellOrHeader);
156
+ /**
157
+ * The list of options.
158
+ *
159
+ * @public
160
+ * @remarks
161
+ * Overrides `Listbox.options`.
162
+ */
163
+ get options() {
164
+ Observable.track(this, "options");
165
+ return this.filteredOptions.length ? this.filteredOptions : this._options;
555
166
  }
556
- }
557
- }
558
- function getHour(e, el, hours) {
559
- const rowHeaderOrCell = el.closest('[role="rowheader"], [role="gridcell"i]');
560
- if (rowHeaderOrCell) {
561
- const DOMRect = rowHeaderOrCell.getBoundingClientRect();
562
- const offsetY = e.clientY - DOMRect.y;
563
- const hourHeight = DOMRect.height / hours;
564
- const hour = offsetY / hourHeight;
565
- return Math.round((hour + Number.EPSILON) * 100) / 100;
566
- }
167
+ set options(value) {
168
+ this._options = value;
169
+ Observable.notify(this, "options");
170
+ }
171
+ /**
172
+ * Updates the placeholder on the proxy element.
173
+ * @internal
174
+ */
175
+ placeholderChanged() {
176
+ if (this.proxy instanceof HTMLInputElement) {
177
+ this.proxy.placeholder = this.placeholder;
178
+ }
179
+ }
180
+ positionChanged(prev, next) {
181
+ this.positionAttribute = next;
182
+ this.setPositioning();
183
+ }
184
+ /**
185
+ * The value property.
186
+ *
187
+ * @public
188
+ */
189
+ get value() {
190
+ Observable.track(this, "value");
191
+ return this._value;
192
+ }
193
+ set value(next) {
194
+ var _a, _b, _c;
195
+ const prev = `${this._value}`;
196
+ if (this.$fastController.isConnected && this.options) {
197
+ const selectedIndex = this.options.findIndex(el => el.text.toLowerCase() === next.toLowerCase());
198
+ const prevSelectedValue = (_a = this.options[this.selectedIndex]) === null || _a === void 0 ? void 0 : _a.text;
199
+ const nextSelectedValue = (_b = this.options[selectedIndex]) === null || _b === void 0 ? void 0 : _b.text;
200
+ this.selectedIndex =
201
+ prevSelectedValue !== nextSelectedValue
202
+ ? selectedIndex
203
+ : this.selectedIndex;
204
+ next = ((_c = this.firstSelectedOption) === null || _c === void 0 ? void 0 : _c.text) || next;
205
+ }
206
+ if (prev !== next) {
207
+ this._value = next;
208
+ super.valueChanged(prev, next);
209
+ Observable.notify(this, "value");
210
+ }
211
+ }
212
+ /**
213
+ * Handle opening and closing the listbox when the combobox is clicked.
214
+ *
215
+ * @param e - the mouse event
216
+ * @internal
217
+ */
218
+ clickHandler(e) {
219
+ if (this.disabled) {
220
+ return;
221
+ }
222
+ if (this.open) {
223
+ const captured = e.target.closest(`option,[role=option]`);
224
+ if (!captured || captured.disabled) {
225
+ return;
226
+ }
227
+ this.selectedOptions = [captured];
228
+ this.control.value = captured.text;
229
+ this.clearSelectionRange();
230
+ this.updateValue(true);
231
+ }
232
+ this.open = !this.open;
233
+ if (this.open) {
234
+ this.control.focus();
235
+ }
236
+ return true;
237
+ }
238
+ connectedCallback() {
239
+ super.connectedCallback();
240
+ this.forcedPosition = !!this.positionAttribute;
241
+ if (this.value) {
242
+ this.initialValue = this.value;
243
+ }
244
+ }
245
+ /**
246
+ * Synchronize the `aria-disabled` property when the `disabled` property changes.
247
+ *
248
+ * @param prev - The previous disabled value
249
+ * @param next - The next disabled value
250
+ *
251
+ * @internal
252
+ */
253
+ disabledChanged(prev, next) {
254
+ if (super.disabledChanged) {
255
+ super.disabledChanged(prev, next);
256
+ }
257
+ this.ariaDisabled = this.disabled ? "true" : "false";
258
+ }
259
+ /**
260
+ * Filter available options by text value.
261
+ *
262
+ * @public
263
+ */
264
+ filterOptions() {
265
+ if (!this.autocomplete || this.autocomplete === ComboboxAutocomplete.none) {
266
+ this.filter = "";
267
+ }
268
+ const filter = this.filter.toLowerCase();
269
+ this.filteredOptions = this._options.filter(o => o.text.toLowerCase().startsWith(this.filter.toLowerCase()));
270
+ if (this.isAutocompleteList) {
271
+ if (!this.filteredOptions.length && !filter) {
272
+ this.filteredOptions = this._options;
273
+ }
274
+ this._options.forEach(o => {
275
+ o.hidden = !this.filteredOptions.includes(o);
276
+ });
277
+ }
278
+ }
279
+ /**
280
+ * Focus the control and scroll the first selected option into view.
281
+ *
282
+ * @internal
283
+ * @remarks
284
+ * Overrides: `Listbox.focusAndScrollOptionIntoView`
285
+ */
286
+ focusAndScrollOptionIntoView() {
287
+ if (this.contains(document.activeElement)) {
288
+ this.control.focus();
289
+ if (this.firstSelectedOption) {
290
+ requestAnimationFrame(() => {
291
+ var _a;
292
+ (_a = this.firstSelectedOption) === null || _a === void 0 ? void 0 : _a.scrollIntoView({ block: "nearest" });
293
+ });
294
+ }
295
+ }
296
+ }
297
+ /**
298
+ * Handle focus state when the element or its children lose focus.
299
+ *
300
+ * @param e - The focus event
301
+ * @internal
302
+ */
303
+ focusoutHandler(e) {
304
+ this.syncValue();
305
+ if (!this.open) {
306
+ return true;
307
+ }
308
+ const focusTarget = e.relatedTarget;
309
+ if (this.isSameNode(focusTarget)) {
310
+ this.focus();
311
+ return;
312
+ }
313
+ if (!this.options || !this.options.includes(focusTarget)) {
314
+ this.open = false;
315
+ }
316
+ }
317
+ /**
318
+ * Handle content changes on the control input.
319
+ *
320
+ * @param e - the input event
321
+ * @internal
322
+ */
323
+ inputHandler(e) {
324
+ this.filter = this.control.value;
325
+ this.filterOptions();
326
+ if (!this.isAutocompleteInline) {
327
+ this.selectedIndex = this.options
328
+ .map(option => option.text)
329
+ .indexOf(this.control.value);
330
+ }
331
+ if (e.inputType.includes("deleteContent") || !this.filter.length) {
332
+ return true;
333
+ }
334
+ if (this.isAutocompleteList && !this.open) {
335
+ this.open = true;
336
+ }
337
+ if (this.isAutocompleteInline) {
338
+ if (this.filteredOptions.length) {
339
+ this.selectedOptions = [this.filteredOptions[0]];
340
+ this.selectedIndex = this.options.indexOf(this.firstSelectedOption);
341
+ this.setInlineSelection();
342
+ }
343
+ else {
344
+ this.selectedIndex = -1;
345
+ }
346
+ }
347
+ return;
348
+ }
349
+ /**
350
+ * Handle keydown actions for listbox navigation.
351
+ *
352
+ * @param e - the keyboard event
353
+ * @internal
354
+ */
355
+ keydownHandler(e) {
356
+ const key = e.key;
357
+ if (e.ctrlKey || e.shiftKey) {
358
+ return true;
359
+ }
360
+ switch (key) {
361
+ case "Enter": {
362
+ this.syncValue();
363
+ if (this.isAutocompleteInline) {
364
+ this.filter = this.value;
365
+ }
366
+ this.open = false;
367
+ this.clearSelectionRange();
368
+ break;
369
+ }
370
+ case "Escape": {
371
+ if (!this.isAutocompleteInline) {
372
+ this.selectedIndex = -1;
373
+ }
374
+ if (this.open) {
375
+ this.open = false;
376
+ break;
377
+ }
378
+ this.value = "";
379
+ this.control.value = "";
380
+ this.filter = "";
381
+ this.filterOptions();
382
+ break;
383
+ }
384
+ case "Tab": {
385
+ this.setInputToSelection();
386
+ if (!this.open) {
387
+ return true;
388
+ }
389
+ e.preventDefault();
390
+ this.open = false;
391
+ break;
392
+ }
393
+ case "ArrowUp":
394
+ case "ArrowDown": {
395
+ this.filterOptions();
396
+ if (!this.open) {
397
+ this.open = true;
398
+ break;
399
+ }
400
+ if (this.filteredOptions.length > 0) {
401
+ super.keydownHandler(e);
402
+ }
403
+ if (this.isAutocompleteInline) {
404
+ this.setInlineSelection();
405
+ }
406
+ break;
407
+ }
408
+ default: {
409
+ return true;
410
+ }
411
+ }
412
+ }
413
+ /**
414
+ * Handle keyup actions for value input and text field manipulations.
415
+ *
416
+ * @param e - the keyboard event
417
+ * @internal
418
+ */
419
+ keyupHandler(e) {
420
+ const key = e.key;
421
+ switch (key) {
422
+ case "ArrowLeft":
423
+ case "ArrowRight":
424
+ case "Backspace":
425
+ case "Delete":
426
+ case "Home":
427
+ case "End": {
428
+ this.filter = this.control.value;
429
+ this.selectedIndex = -1;
430
+ this.filterOptions();
431
+ break;
432
+ }
433
+ }
434
+ }
435
+ /**
436
+ * Ensure that the selectedIndex is within the current allowable filtered range.
437
+ *
438
+ * @param prev - the previous selected index value
439
+ * @param next - the current selected index value
440
+ *
441
+ * @internal
442
+ */
443
+ selectedIndexChanged(prev, next) {
444
+ if (this.$fastController.isConnected) {
445
+ next = limit(-1, this.options.length - 1, next);
446
+ // we only want to call the super method when the selectedIndex is in range
447
+ if (next !== this.selectedIndex) {
448
+ this.selectedIndex = next;
449
+ return;
450
+ }
451
+ super.selectedIndexChanged(prev, next);
452
+ }
453
+ }
454
+ /**
455
+ * Move focus to the previous selectable option.
456
+ *
457
+ * @internal
458
+ * @remarks
459
+ * Overrides `Listbox.selectPreviousOption`
460
+ */
461
+ selectPreviousOption() {
462
+ if (!this.disabled && this.selectedIndex >= 0) {
463
+ this.selectedIndex = this.selectedIndex - 1;
464
+ }
465
+ }
466
+ /**
467
+ * Set the default selected options at initialization or reset.
468
+ *
469
+ * @internal
470
+ * @remarks
471
+ * Overrides `Listbox.setDefaultSelectedOption`
472
+ */
473
+ setDefaultSelectedOption() {
474
+ if (this.$fastController.isConnected && this.options) {
475
+ const selectedIndex = this.options.findIndex(el => el.getAttribute("selected") !== null || el.selected);
476
+ this.selectedIndex = selectedIndex;
477
+ if (!this.dirtyValue && this.firstSelectedOption) {
478
+ this.value = this.firstSelectedOption.text;
479
+ }
480
+ this.setSelectedOptions();
481
+ }
482
+ }
483
+ /**
484
+ * Focus and set the content of the control based on the first selected option.
485
+ *
486
+ * @internal
487
+ */
488
+ setInputToSelection() {
489
+ if (this.firstSelectedOption) {
490
+ this.control.value = this.firstSelectedOption.text;
491
+ this.control.focus();
492
+ }
493
+ }
494
+ /**
495
+ * Focus, set and select the content of the control based on the first selected option.
496
+ *
497
+ * @internal
498
+ */
499
+ setInlineSelection() {
500
+ if (this.firstSelectedOption) {
501
+ this.setInputToSelection();
502
+ this.control.setSelectionRange(this.filter.length, this.control.value.length, "backward");
503
+ }
504
+ }
505
+ /**
506
+ * Determines if a value update should involve emitting a change event, then updates the value.
507
+ *
508
+ * @internal
509
+ */
510
+ syncValue() {
511
+ var _a;
512
+ const newValue = this.selectedIndex > -1 ? (_a = this.firstSelectedOption) === null || _a === void 0 ? void 0 : _a.text : this.control.value;
513
+ this.updateValue(this.value !== newValue);
514
+ }
515
+ /**
516
+ * Calculate and apply listbox positioning based on available viewport space.
517
+ *
518
+ * @param force - direction to force the listbox to display
519
+ * @public
520
+ */
521
+ setPositioning() {
522
+ const currentBox = this.getBoundingClientRect();
523
+ const viewportHeight = window.innerHeight;
524
+ const availableBottom = viewportHeight - currentBox.bottom;
525
+ this.position = this.forcedPosition
526
+ ? this.positionAttribute
527
+ : currentBox.top > availableBottom
528
+ ? SelectPosition.above
529
+ : SelectPosition.below;
530
+ this.positionAttribute = this.forcedPosition
531
+ ? this.positionAttribute
532
+ : this.position;
533
+ this.maxHeight =
534
+ this.position === SelectPosition.above ? ~~currentBox.top : ~~availableBottom;
535
+ }
536
+ /**
537
+ * Ensure that the entire list of options is used when setting the selected property.
538
+ *
539
+ * @param prev - the previous list of selected options
540
+ * @param next - the current list of selected options
541
+ *
542
+ * @internal
543
+ * @remarks
544
+ * Overrides: `Listbox.selectedOptionsChanged`
545
+ */
546
+ selectedOptionsChanged(prev, next) {
547
+ if (this.$fastController.isConnected) {
548
+ this._options.forEach(o => {
549
+ o.selected = next.includes(o);
550
+ });
551
+ }
552
+ }
553
+ /**
554
+ * Synchronize the form-associated proxy and update the value property of the element.
555
+ *
556
+ * @param prev - the previous collection of slotted option elements
557
+ * @param next - the next collection of slotted option elements
558
+ *
559
+ * @internal
560
+ */
561
+ slottedOptionsChanged(prev, next) {
562
+ super.slottedOptionsChanged(prev, next);
563
+ this.updateValue();
564
+ }
565
+ /**
566
+ * Sets the value and to match the first selected option.
567
+ *
568
+ * @param shouldEmit - if true, the change event will be emitted
569
+ *
570
+ * @internal
571
+ */
572
+ updateValue(shouldEmit) {
573
+ var _a;
574
+ if (this.$fastController.isConnected) {
575
+ this.value = ((_a = this.firstSelectedOption) === null || _a === void 0 ? void 0 : _a.text) || this.control.value;
576
+ this.control.value = this.value;
577
+ }
578
+ if (shouldEmit) {
579
+ this.$emit("change");
580
+ }
581
+ }
582
+ /**
583
+ * @internal
584
+ */
585
+ clearSelectionRange() {
586
+ const controlValueLength = this.control.value.length;
587
+ this.control.setSelectionRange(controlValueLength, controlValueLength);
588
+ }
589
+ };
590
+ __decorate([
591
+ attr({ attribute: "autocomplete", mode: "fromView" })
592
+ ], Combobox$1.prototype, "autocomplete", void 0);
593
+ __decorate([
594
+ observable
595
+ ], Combobox$1.prototype, "maxHeight", void 0);
596
+ __decorate([
597
+ attr({ attribute: "open", mode: "boolean" })
598
+ ], Combobox$1.prototype, "open", void 0);
599
+ __decorate([
600
+ attr
601
+ ], Combobox$1.prototype, "placeholder", void 0);
602
+ __decorate([
603
+ attr({ attribute: "position" })
604
+ ], Combobox$1.prototype, "positionAttribute", void 0);
605
+ __decorate([
606
+ observable
607
+ ], Combobox$1.prototype, "position", void 0);
608
+ /**
609
+ * Includes ARIA states and properties relating to the ARIA combobox role.
610
+ *
611
+ * @public
612
+ */
613
+ class DelegatesARIACombobox {
567
614
  }
568
- const getEventContext = function (e) {
569
- if (!(e instanceof KeyboardEvent || e instanceof MouseEvent)) {
570
- throw new Error('Invalid event. Event must be instance of KeyboardEvent or MouseEvent');
571
- }
572
- const [el] = e.composedPath();
573
- if (!(el && el instanceof HTMLElement && this.shadowRoot.contains(el))) {
574
- throw new Error('Invalid event. Event must contain a target object which is a direct descendant of calendar');
575
- }
576
- const day = getDay(el);
577
- let hour;
578
- if (e instanceof MouseEvent) {
579
- hour = getHour(e, el, this._hours);
580
- }
581
- const context = Object.assign(Object.assign({}, day != undefined && {
582
- day
583
- }), hour != undefined && {
584
- hour
585
- });
586
- return not$1(isEmpty$1(context)) ? context : null;
615
+ __decorate([
616
+ observable
617
+ ], DelegatesARIACombobox.prototype, "ariaAutoComplete", void 0);
618
+ __decorate([
619
+ observable
620
+ ], DelegatesARIACombobox.prototype, "ariaControls", void 0);
621
+ applyMixins(DelegatesARIACombobox, DelegatesARIAListbox);
622
+ applyMixins(Combobox$1, StartEnd, DelegatesARIACombobox);
623
+
624
+ const styles = "/**\n * Do not edit directly\n * Generated on Mon, 04 Sep 2023 12:44:18 GMT\n */\n:host {\n position: relative;\n}\n\n.control {\n display: flex;\n padding-inline-end: 44px;\n}\n\n.icon {\n inset-inline-end: 16px;\n inset-inline-start: unset;\n}\n:not(.disabled) .icon {\n cursor: pointer;\n}\n.disabled .icon {\n cursor: not-allowed;\n}\n\n.listbox {\n padding: 4px;\n background-color: var(--_appearance-color-fill);\n border-radius: 6px;\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n contain: paint;\n}\n.listbox {\n /* @cssprop [--vvd-combobox-accent-backdrop=var(--vvd-color-canvas)] */\n --_connotation-color-backdrop: var(--vvd-combobox-accent-backdrop, var(--vvd-color-canvas));\n /* @cssprop [--vvd-combobox-accent-intermediate=var(--vvd-color-neutral-500)] */\n --_connotation-color-intermediate: var(--vvd-combobox-accent-intermediate, var(--vvd-color-neutral-500));\n /* @cssprop [--vvd-combobox-accent-primary=var(--vvd-color-canvas-text)] */\n --_connotation-color-primary: var(--vvd-combobox-accent-primary, var(--vvd-color-canvas-text));\n /* @cssprop [--vvd-combobox-accent-soft=var(--vvd-color-neutral-100)] */\n --_connotation-color-soft: var(--vvd-combobox-accent-soft, var(--vvd-color-neutral-100));\n}\n.listbox {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--_connotation-color-backdrop);\n --_appearance-color-outline: var(--_connotation-color-intermediate);\n}\n.listbox.appearance-ghost {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.listbox:where(:disabled, .disabled) {\n --_appearance-color-text: var(--vvd-color-neutral-300);\n --_appearance-color-fill: var(--vvd-color-neutral-100);\n --_appearance-color-outline: var(--vvd-color-neutral-300);\n}\n.listbox:where(:disabled, .disabled).appearance-ghost {\n --_appearance-color-text: var(--vvd-color-neutral-300);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n\n::part(popup-base) {\n inline-size: 100%;\n}";
625
+
626
+ var __defProp = Object.defineProperty;
627
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
628
+ var __decorateClass = (decorators, target, key, kind) => {
629
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
630
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
631
+ if (decorator = decorators[i])
632
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
633
+ if (kind && result)
634
+ __defProp(target, key, result);
635
+ return result;
587
636
  };
588
-
589
- var _Calendar_instances, _Calendar_activeCalendarEvent_get;
590
- class Calendar extends FoundationElement {
591
- constructor() {
592
- super(...arguments);
593
- _Calendar_instances.add(this);
594
- this.hour12 = false;
595
- this._hours = 24;
596
- this._days = 7;
597
- this.hoursAsDatetime = Array.from({
598
- length: this._hours - 1
599
- }).fill(new Date(new Date().setHours(0, 0, 0))).map((d, i) => new Date(d.setHours(++i)));
600
- this._generateDaysArr = dateArr => {
601
- if (dateArr.length == this._days) {
602
- return dateArr;
603
- }
604
- const lastDate = new Date(dateArr[dateArr.length - 1]);
605
- lastDate.setDate(lastDate.getDate() + 1);
606
- return this._generateDaysArr([...dateArr, lastDate]);
607
- };
608
- this.getEventContext = getEventContext;
609
- }
610
- getCalendarEventContainingCell(calendarEvent) {
611
- const slotName = calendarEvent.getAttribute('slot');
612
- const gridCell = this.shadowRoot.querySelector(`slot[name="${slotName}"i]`);
613
- return gridCell.parentElement;
614
- }
615
- arrowKeysInteractions(key) {
616
- const {
617
- activeElement
618
- } = this.shadowRoot;
619
- let focusNext;
620
- if (isCellOrHeader(activeElement)) {
621
- focusNext = getNextFocusableGridElement.call(this, key, activeElement);
622
- } else if (__classPrivateFieldGet(this, _Calendar_instances, "a", _Calendar_activeCalendarEvent_get)) {
623
- focusNext = this.getCalendarEventContainingCell(__classPrivateFieldGet(this, _Calendar_instances, "a", _Calendar_activeCalendarEvent_get));
624
- } else if (activeElement === null || activeElement === void 0 ? void 0 : activeElement.matches('em[role="button"i]')) {
625
- focusNext = getHeaderDescendantGridCell.call(this, key, activeElement);
626
- } else {
627
- focusNext = this.shadowRoot.querySelector('[role="columnheader"i]');
628
- }
629
- this.activateElement(focusNext);
630
- }
631
- activateElement(el) {
632
- const onBlur = ({
633
- target
634
- }) => target.setAttribute('tabindex', '-1');
635
- el === null || el === void 0 ? void 0 : el.addEventListener('blur', onBlur, {
636
- once: true
637
- });
638
- el === null || el === void 0 ? void 0 : el.setAttribute('tabindex', '0');
639
- el === null || el === void 0 ? void 0 : el.focus();
640
- }
641
- onKeydown({
642
- key
643
- }) {
644
- const isArrow = [ARROW_UP, ARROW_RIGHT, ARROW_DOWN, ARROW_LEFT].some(predefinedKey => predefinedKey == key);
645
- if (isArrow) {
646
- this.arrowKeysInteractions(key);
647
- }
648
- return !isArrow;
637
+ let Combobox = class extends Combobox$1 {
638
+ connectedCallback() {
639
+ super.connectedCallback();
640
+ this._popup.anchor = this._anchor;
649
641
  }
650
- }
651
- _Calendar_instances = new WeakSet(), _Calendar_activeCalendarEvent_get = function _Calendar_activeCalendarEvent_get() {
652
- const {
653
- activeElement
654
- } = document;
655
- return activeElement instanceof CalendarEvent ? activeElement : null;
656
642
  };
657
- __decorate([attr, __metadata("design:type", Object)], Calendar.prototype, "datetime", void 0);
658
- __decorate([attr({
659
- attribute: 'start-day'
660
- }), __metadata("design:type", String)], Calendar.prototype, "startDay", void 0);
661
- __decorate([attr, __metadata("design:type", Object)], Calendar.prototype, "locales", void 0);
662
- __decorate([attr({
663
- mode: 'boolean'
664
- }), __metadata("design:type", Object)], Calendar.prototype, "hour12", void 0);
665
-
666
- function getValidDateString(date) {
667
- const twoDigit = num => `0${num}`.slice(-2);
668
- return `${date.getFullYear()}-${twoDigit(date.getMonth() + 1)}-${twoDigit(date.getDate())}`;
669
- }
670
- const weekdaysMap = new Map([['sunday', 0], ['monday', 1]]);
671
- function getFirstDateOfTheWeek(date = new Date(), startDay) {
672
- date = new Date(date);
673
- let num = weekdaysMap.get(startDay);
674
- num !== null && num !== void 0 ? num : num = 1;
675
- const day = date.getDate() - (date.getDay() + 7 - num) % 7;
676
- return new Date(date.setDate(day));
643
+ __decorateClass([
644
+ attr
645
+ ], Combobox.prototype, "placement", 2);
646
+ Combobox = __decorateClass([
647
+ formElements
648
+ ], Combobox);
649
+ applyMixins(Combobox, AffixIcon);
650
+
651
+ function renderLabel() {
652
+ return html`
653
+ <label for="control" class="label">
654
+ ${(x) => x.label}
655
+ </label>`;
677
656
  }
678
-
679
- const HoursTemplate = () => {
657
+ const getStateClasses = ({
658
+ disabled,
659
+ placeholder,
660
+ label
661
+ }) => classNames(
662
+ "base",
663
+ ["disabled", disabled],
664
+ ["placeholder", Boolean(placeholder)],
665
+ ["no-label", !label]
666
+ );
667
+ function renderInput(context) {
668
+ const affixIconTemplate = affixIconTemplateFactory(context);
669
+ const focusTemplate = focusTemplateFactory(context);
680
670
  return html`
681
- <div class="row-headers" role="presentation">
682
- ${repeat(x => x.hoursAsDatetime, html`<span role="rowheader">
683
- <time datetime="${(x, c) => new Intl.DateTimeFormat(c.parent.locales, {
684
- hour: 'numeric',
685
- minute: 'numeric',
686
- hour12: false
687
- }).format(x)}">
688
- ${(x, c) => new Intl.DateTimeFormat(c.parent.locales, {
689
- hour: 'numeric',
690
- hour12: c.parent.hour12
691
- }).format(x)}
692
- </time>
693
- </span>`)}
694
- </div>`;
695
- };
696
- const DaysTemplate = () => {
671
+ <div class="${getStateClasses}" ${ref("_anchor")}>
672
+ ${when((x) => x.label, renderLabel())}
673
+ <div class="fieldset">
674
+ <input
675
+ id="control"
676
+ class="control"
677
+ aria-activedescendant="${(x) => x.open ? x.ariaActiveDescendant : null}"
678
+ aria-autocomplete="${(x) => x.ariaAutoComplete}"
679
+ aria-controls="${(x) => x.ariaControls}"
680
+ aria-disabled="${(x) => x.ariaDisabled}"
681
+ aria-expanded="${(x) => x.ariaExpanded}"
682
+ aria-haspopup="listbox"
683
+ placeholder="${(x) => x.placeholder}"
684
+ role="combobox"
685
+ type="text"
686
+ ?disabled="${(x) => x.disabled}"
687
+ :value="${(x) => x.value}"
688
+ @input="${(x, c) => x.inputHandler(c.event)}"
689
+ @keyup="${(x, c) => x.keyupHandler(c.event)}"
690
+ ${ref("control")}
691
+ />
692
+ ${() => affixIconTemplate("chevron-down-line")}
693
+ ${() => focusTemplate}
694
+ </div>
695
+ </div>`;
696
+ }
697
+ const comboboxTemplate = (context) => {
698
+ const popupTag = context.tagFor(Popup);
697
699
  return html`
698
- <div class="column-headers" role="row">
699
- ${repeat(x => x._generateDaysArr([getFirstDateOfTheWeek(x.datetime, x.startDay)]), html`
700
- <div role="columnheader" tabindex="-1">
701
- <time datetime=${x => getValidDateString(x)}>
702
- <h2>
703
- <!-- TODO add to column aria-labelledby or describedby to count
704
- events and related day e.g. "3 events, Sunday, March 8" -->
705
- <em tabindex="0" role="button" aria-label=${(x, c) => new Intl.DateTimeFormat(c.parent.locales, {
706
- weekday: 'long',
707
- month: 'long',
708
- day: 'numeric'
709
- }).format(x)}>
710
- ${(x, c) => new Intl.DateTimeFormat(c.parent.locales, {
711
- day: '2-digit'
712
- }).format(x)}
713
- </em>
714
- <small aria-hidden="true">
715
- ${(x, c) => new Intl.DateTimeFormat(c.parent.locales, {
716
- weekday: 'short'
717
- }).format(x)}
718
- </small>
719
- </h2>
720
- </time>
721
- </div>`)}
722
- </div>`;
700
+ <template
701
+ aria-disabled="${(x) => x.ariaDisabled}"
702
+ autocomplete="${(x) => x.autocomplete}"
703
+ tabindex="${(x) => !x.disabled ? "0" : null}"
704
+ @click="${(x, c) => x.clickHandler(c.event)}"
705
+ @focusout="${(x, c) => x.focusoutHandler(c.event)}"
706
+ @keydown="${(x, c) => x.keydownHandler(c.event)}"
707
+ >
708
+ ${() => renderInput(context)}
709
+ <${popupTag} class="popup"
710
+ ?open="${(x) => x.open}"
711
+ placement="${(x) => x.placement}"
712
+ strategy="absolute"
713
+ ${ref("_popup")}>
714
+ <div id="${(x) => x.listboxId}"
715
+ class="listbox"
716
+ role="listbox"
717
+ ?disabled="${(x) => x.disabled}"
718
+ ${ref("listbox")}>
719
+ <slot ${slotted({
720
+ filter: Listbox$1.slottedOptionFilter,
721
+ flatten: true,
722
+ property: "slottedOptions"
723
+ })}>
724
+ </slot>
725
+ </div>
726
+ </${popupTag}>
727
+ </template>
728
+ `;
723
729
  };
724
- const ColumnTemplate = html`
725
- <div role="gridcell" tabindex="-1">
726
- <slot name="day-${(_, c) => c.index}"></slot>
727
- </div>
728
- `;
729
- const CalendarTemplate = () => html`
730
- <div role="grid" @keydown=${(x, c) => x.onKeydown(c.event)}>
731
- ${DaysTemplate}
732
- <div role="row" class="calendar-row">
733
- ${HoursTemplate}
734
- <div class="calendar-grid-presentation" role="presentation">
735
- <div class="hours" role="list">
736
- ${repeat(x => Array.from({
737
- length: x.hoursAsDatetime.length + 1
738
- }), html`
739
- <div role="listitem"></div>`)}
740
- </div>
741
- <div class="columns" role="presentation">
742
- ${repeat(x => Array.from(Array(x._days)), ColumnTemplate, {
743
- positioning: true
744
- })}
745
- </div>
746
- <slot></slot>
747
- </div>
748
- </div>
749
- </div>
750
- `;
751
730
 
752
- const calendarDefinition = Calendar.compose({
753
- baseName: 'calendar',
754
- template: CalendarTemplate,
755
- styles: css_248z,
731
+ const combobox = Combobox.compose({
732
+ baseName: "combobox",
733
+ template: comboboxTemplate,
734
+ styles: [styles$1, styles],
756
735
  shadowOptions: {
757
736
  delegatesFocus: true
758
737
  }
759
- });
760
- const calendarRegistries = [calendarDefinition()];
761
- const registerCalendar = registerFactory(calendarRegistries);
738
+ })();
739
+ const comboboxRegistries = [combobox, ...iconRegistries, ...popupRegistries, ...focusRegistries, ...listboxOptionRegistries];
740
+ const registerCombobox = registerFactory(comboboxRegistries);
762
741
 
763
- export { calendarRegistries as a, calendarDefinition as c, registerCalendar as r };
742
+ export { comboboxRegistries as a, combobox as c, registerCombobox as r };