@vonage/vivid 4.26.0 → 4.28.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/custom-elements.json +2398 -2120
- package/lib/accordion-item/accordion-item.d.ts +1 -1
- package/lib/alert/alert.d.ts +3 -3
- package/lib/audio-player/audio-player.d.ts +2 -2
- package/lib/avatar/avatar.d.ts +393 -1
- package/lib/avatar/avatar.template.d.ts +2 -2
- package/lib/badge/badge.d.ts +1 -1
- package/lib/banner/banner.d.ts +3 -3
- package/lib/button/button.d.ts +3 -3
- package/lib/checkbox/checkbox.d.ts +7 -7
- package/lib/combobox/combobox.d.ts +8 -8
- package/lib/data-grid/data-grid-cell.d.ts +2 -2
- package/lib/date-picker/date-picker.d.ts +71 -71
- package/lib/date-picker/date-picker.template.d.ts +1 -1
- package/lib/date-range-picker/date-range-picker.d.ts +42 -42
- package/lib/date-range-picker/date-range-picker.template.d.ts +1 -1
- package/lib/date-time-picker/date-time-picker.d.ts +60 -60
- package/lib/date-time-picker/date-time-picker.template.d.ts +1 -1
- package/lib/dial-pad/dial-pad.d.ts +2 -2
- package/lib/dialog/dialog.d.ts +2 -2
- package/lib/fab/fab.d.ts +1 -1
- package/lib/file-picker/file-picker.d.ts +7 -7
- package/lib/menu/menu.d.ts +1 -1
- package/lib/menu-item/menu-item.d.ts +1 -1
- package/lib/nav-disclosure/nav-disclosure.d.ts +1 -1
- package/lib/nav-item/nav-item.d.ts +1 -1
- package/lib/note/note.d.ts +1 -1
- package/lib/number-field/number-field.d.ts +10 -10
- package/lib/option/option.d.ts +1 -1
- package/lib/pagination/pagination.d.ts +2 -2
- package/lib/radio/radio.d.ts +3 -3
- package/lib/radio-group/radio-group.d.ts +3 -3
- package/lib/range-slider/range-slider.d.ts +4 -4
- package/lib/rich-text-editor/menubar/menubar.d.ts +2 -2
- package/lib/rich-text-editor/rich-text-editor.d.ts +2 -2
- package/lib/searchable-select/locale.d.ts +1 -1
- package/lib/searchable-select/option-tag.d.ts +2 -2
- package/lib/searchable-select/searchable-select.d.ts +10 -10
- package/lib/select/select.d.ts +8 -8
- package/lib/slider/slider.d.ts +3 -3
- package/lib/split-button/split-button.d.ts +3 -3
- package/lib/switch/switch.d.ts +1 -1
- package/lib/tab/tab.d.ts +3 -3
- package/lib/tag/locale.d.ts +3 -0
- package/lib/tag/tag.d.ts +341 -4
- package/lib/text-area/text-area.d.ts +10 -10
- package/lib/text-field/text-field.d.ts +11 -11
- package/lib/time-picker/time-picker.d.ts +19 -19
- package/lib/toggletip/toggletip.d.ts +1 -1
- package/lib/tooltip/tooltip.d.ts +1 -1
- package/lib/tree-item/tree-item.d.ts +1 -1
- package/lib/video-player/video-player.d.ts +2 -2
- package/locales/de-DE.cjs +19 -2
- package/locales/de-DE.js +19 -2
- package/locales/en-GB.cjs +19 -2
- package/locales/en-GB.js +19 -2
- package/locales/en-US.cjs +19 -2
- package/locales/en-US.js +19 -2
- package/locales/ja-JP.cjs +19 -2
- package/locales/ja-JP.js +19 -2
- package/locales/zh-CN.cjs +19 -2
- package/locales/zh-CN.js +19 -2
- package/package.json +73 -45
- package/shared/calendar-picker.template.cjs +48 -22
- package/shared/calendar-picker.template.js +48 -22
- package/shared/definition17.cjs +3 -3
- package/shared/definition17.js +3 -3
- package/shared/definition18.cjs +8 -1
- package/shared/definition18.js +8 -1
- package/shared/definition19.cjs +9 -2
- package/shared/definition19.js +9 -2
- package/shared/definition2.cjs +1 -1
- package/shared/definition2.js +1 -1
- package/shared/definition20.cjs +3 -1
- package/shared/definition20.js +3 -1
- package/shared/definition28.cjs +2 -2
- package/shared/definition28.js +2 -2
- package/shared/definition30.cjs +3 -2
- package/shared/definition30.js +3 -2
- package/shared/definition31.cjs +5 -1
- package/shared/definition31.js +5 -1
- package/shared/definition36.cjs +1 -1
- package/shared/definition36.js +1 -1
- package/shared/definition4.cjs +1 -1
- package/shared/definition4.js +1 -1
- package/shared/definition41.cjs +1 -1
- package/shared/definition41.js +1 -1
- package/shared/definition44.cjs +129 -117
- package/shared/definition44.js +130 -118
- package/shared/definition45.cjs +15 -5
- package/shared/definition45.js +15 -5
- package/shared/definition49.cjs +4 -4
- package/shared/definition49.js +4 -4
- package/shared/definition54.cjs +2 -2
- package/shared/definition54.js +2 -2
- package/shared/definition56.cjs +5 -4
- package/shared/definition56.js +5 -4
- package/shared/definition57.cjs +1 -1
- package/shared/definition57.js +1 -1
- package/shared/definition58.cjs +1 -1
- package/shared/definition58.js +1 -1
- package/shared/definition59.cjs +3 -1
- package/shared/definition59.js +3 -1
- package/shared/definition6.cjs +45 -12
- package/shared/definition6.js +45 -12
- package/shared/definition64.cjs +136 -38
- package/shared/definition64.js +136 -38
- package/shared/definition67.cjs +27 -14
- package/shared/definition67.js +27 -14
- package/shared/form-associated.cjs +4 -0
- package/shared/form-associated.js +4 -0
- package/shared/localization/Locale.d.ts +2 -0
- package/shared/picker-field/mixins/calendar-picker.d.ts +1 -1
- package/shared/picker-field/mixins/calendar-picker.locale.d.ts +5 -0
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +1 -1
- package/shared/picker-field/mixins/calendar-segments/segment.d.ts +1 -0
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +1 -0
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +2 -2
- package/shared/picker-field/mixins/single-date-picker.d.ts +1 -1
- package/shared/time-selection-picker.template.cjs +71 -22
- package/shared/time-selection-picker.template.js +71 -22
- package/shared/vivid-element.cjs +1 -1
- package/shared/vivid-element.js +1 -1
- package/styles/core/all.css +5 -5
- package/styles/core/theme.css +2 -2
- package/styles/core/typography.css +4 -4
- package/styles/fonts/spezia-variable.css +15 -15
- 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/vivid.api.json +241 -211
|
@@ -28,7 +28,7 @@ export declare const MinMaxCalendarPicker: <T_5 extends AbstractConstructor<{
|
|
|
28
28
|
_hideDatesOutsideMonth: boolean;
|
|
29
29
|
_lastFocussedDate: string | null;
|
|
30
30
|
_isDateSelected(_: string): boolean;
|
|
31
|
-
_isDateAriaSelected(date: string):
|
|
31
|
+
_isDateAriaSelected(date: string): boolean;
|
|
32
32
|
_isDateInSelectedRange(_: string): boolean;
|
|
33
33
|
_isDateRangeStart(_: string): boolean;
|
|
34
34
|
_isDateRangeEnd(_: string): boolean;
|
|
@@ -839,7 +839,7 @@ export declare const MinMaxCalendarPicker: <T_5 extends AbstractConstructor<{
|
|
|
839
839
|
_hideDatesOutsideMonth: boolean;
|
|
840
840
|
_lastFocussedDate: string | null;
|
|
841
841
|
_isDateSelected(_: string): boolean;
|
|
842
|
-
_isDateAriaSelected(date: string):
|
|
842
|
+
_isDateAriaSelected(date: string): boolean;
|
|
843
843
|
_isDateInSelectedRange(_: string): boolean;
|
|
844
844
|
_isDateRangeStart(_: string): boolean;
|
|
845
845
|
_isDateRangeEnd(_: string): boolean;
|
|
@@ -27,7 +27,7 @@ export declare const SingleDatePickerMixin: <T_6 extends AbstractConstructor<{
|
|
|
27
27
|
_hideDatesOutsideMonth: boolean;
|
|
28
28
|
_lastFocussedDate: string | null;
|
|
29
29
|
_isDateSelected(_: string): boolean;
|
|
30
|
-
_isDateAriaSelected(date: string):
|
|
30
|
+
_isDateAriaSelected(date: string): boolean;
|
|
31
31
|
_isDateInSelectedRange(_: string): boolean;
|
|
32
32
|
_isDateRangeStart(_: string): boolean;
|
|
33
33
|
_isDateRangeEnd(_: string): boolean;
|
|
@@ -217,8 +217,10 @@ const shouldDisplay12hClock = (x) => x.clock === "12h";
|
|
|
217
217
|
const onPickerOptionClick = (x, column, optionValue) => {
|
|
218
218
|
emitChange(x, column.updatedValue(x, optionValue));
|
|
219
219
|
scrollToOption(x, column.id, optionValue, "start");
|
|
220
|
-
const
|
|
221
|
-
|
|
220
|
+
const currentPicker = x.shadowRoot.querySelector(`#${column.id}`)?.closest(".picker-wrapper");
|
|
221
|
+
const nextPickerWrapper = currentPicker?.nextElementSibling;
|
|
222
|
+
const nextPickerEl = nextPickerWrapper?.querySelector(
|
|
223
|
+
".picker"
|
|
222
224
|
);
|
|
223
225
|
if (nextPickerEl) {
|
|
224
226
|
nextPickerEl.focus();
|
|
@@ -243,6 +245,7 @@ const onPickerKeyDown = (x, column, event) => {
|
|
|
243
245
|
const newValue = options[newIndex].value;
|
|
244
246
|
emitChange(x, column.updatedValue(x, newValue));
|
|
245
247
|
scrollToOption(x, column.id, newValue, "nearest");
|
|
248
|
+
x._clearFocusedClasses();
|
|
246
249
|
}
|
|
247
250
|
return true;
|
|
248
251
|
};
|
|
@@ -262,6 +265,7 @@ const onBaseKeyDown = (x, event) => {
|
|
|
262
265
|
if (x.shadowRoot.activeElement !== terminalElement) {
|
|
263
266
|
pickerField_template.ignoreEventInFocusTraps(event);
|
|
264
267
|
}
|
|
268
|
+
x._applyFocusedClass();
|
|
265
269
|
}
|
|
266
270
|
return true;
|
|
267
271
|
};
|
|
@@ -269,36 +273,40 @@ const emitChange = (x, time) => {
|
|
|
269
273
|
x.$emit("change", time, { bubbles: false, composed: false });
|
|
270
274
|
};
|
|
271
275
|
const renderPicker = (column) => {
|
|
272
|
-
return vividElement.html`<
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
276
|
+
return vividElement.html`<div class="picker-wrapper">
|
|
277
|
+
<ul
|
|
278
|
+
id="${column.id}"
|
|
279
|
+
class="picker"
|
|
280
|
+
role="listbox"
|
|
281
|
+
tabindex="0"
|
|
282
|
+
aria-label="${column.getLabel}"
|
|
283
|
+
aria-activedescendant="${(x) => column.getSelectedOptionValue(x) ? `${column.id}-${column.getSelectedOptionValue(x)}` : void 0}"
|
|
284
|
+
@keydown="${(x, c) => onPickerKeyDown(x, column, c.event)}"
|
|
285
|
+
>
|
|
286
|
+
${repeat.repeat(
|
|
282
287
|
(x) => column.getOptions(x),
|
|
283
288
|
vividElement.html`<li
|
|
284
|
-
|
|
285
|
-
|
|
289
|
+
id="${(x) => `${column.id}-${x.value}`}"
|
|
290
|
+
class="${(x, c) => classNames.classNames("option", [
|
|
286
291
|
"selected",
|
|
287
292
|
column.getSelectedOptionValue(c.parent) === x.value
|
|
288
293
|
])}"
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
294
|
+
aria-selected="${(x, c) => column.getSelectedOptionValue(c.parent) === x.value}"
|
|
295
|
+
role="option"
|
|
296
|
+
@click="${(x, c) => onPickerOptionClick(c.parent, column, x.value)}"
|
|
297
|
+
>
|
|
298
|
+
${(x) => x.label}
|
|
299
|
+
</li>`
|
|
295
300
|
)}
|
|
296
|
-
|
|
301
|
+
</ul>
|
|
302
|
+
</div>`;
|
|
297
303
|
};
|
|
298
304
|
const InlineTimePickerTemplate = () => {
|
|
299
305
|
return vividElement.html`<div
|
|
300
306
|
class="time-pickers"
|
|
301
307
|
@keydown="${(x, { event }) => onBaseKeyDown(x, event)}"
|
|
308
|
+
@focusout="${(x) => x._onFocusOut()}"
|
|
309
|
+
@pointerdown="${(x) => x._onPointerDown()}"
|
|
302
310
|
>
|
|
303
311
|
${renderPicker(HoursColumn)} ${renderPicker(MinutesColumn)}
|
|
304
312
|
${when.when(shouldDisplaySecondsPicker, renderPicker(SecondsColumn))}
|
|
@@ -320,6 +328,19 @@ class InlineTimePicker extends localized.Localized(vividElement.VividElement) {
|
|
|
320
328
|
super(...arguments);
|
|
321
329
|
this.minutesStep = 1;
|
|
322
330
|
this.clock = "24h";
|
|
331
|
+
this.focusedPickerClass = "focused";
|
|
332
|
+
/**
|
|
333
|
+
* @internal
|
|
334
|
+
*/
|
|
335
|
+
this._onFocusOut = () => {
|
|
336
|
+
this._clearFocusedClasses();
|
|
337
|
+
};
|
|
338
|
+
/**
|
|
339
|
+
* @internal
|
|
340
|
+
*/
|
|
341
|
+
this._onPointerDown = () => {
|
|
342
|
+
this._clearFocusedClasses();
|
|
343
|
+
};
|
|
323
344
|
}
|
|
324
345
|
valueChanged(_, newValue) {
|
|
325
346
|
if (newValue !== void 0 && !isValidTimeStr(newValue)) {
|
|
@@ -365,6 +386,34 @@ class InlineTimePicker extends localized.Localized(vividElement.VividElement) {
|
|
|
365
386
|
".picker"
|
|
366
387
|
);
|
|
367
388
|
firstFocusableElement.focus(options);
|
|
389
|
+
this._applyFocusedClass();
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* @internal
|
|
393
|
+
* Apply 'focused' class to the wrapper element of an active picker
|
|
394
|
+
*/
|
|
395
|
+
_applyFocusedClass() {
|
|
396
|
+
const pickers = this.shadowRoot.querySelectorAll(".picker");
|
|
397
|
+
requestAnimationFrame(() => {
|
|
398
|
+
const active = this.shadowRoot.activeElement;
|
|
399
|
+
pickers.forEach((el) => {
|
|
400
|
+
if (el === active) {
|
|
401
|
+
el.parentElement?.classList.add(this.focusedPickerClass);
|
|
402
|
+
} else {
|
|
403
|
+
el.parentElement?.classList.remove(this.focusedPickerClass);
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* @internal
|
|
410
|
+
* Clear 'focused' classes from all pickers wrappers
|
|
411
|
+
*/
|
|
412
|
+
_clearFocusedClasses() {
|
|
413
|
+
const pickers = this.shadowRoot.querySelectorAll(".picker");
|
|
414
|
+
pickers.forEach((el) => {
|
|
415
|
+
el.parentElement?.classList.remove(this.focusedPickerClass);
|
|
416
|
+
});
|
|
368
417
|
}
|
|
369
418
|
}
|
|
370
419
|
__decorateClass$2([
|
|
@@ -386,7 +435,7 @@ __decorateClass$2([
|
|
|
386
435
|
vividElement.observable
|
|
387
436
|
], InlineTimePicker.prototype, "max");
|
|
388
437
|
|
|
389
|
-
const styles = ":host{display:inline-block}.time-pickers{display:flex;overflow:hidden;justify-content:center;padding:4px;block-size:calc(28px * var(--_inline-time-picker-num-options-visible) + 4px * (var(--_inline-time-picker-num-options-visible) - 1));gap:4px}.time-pickers .picker{position:relative;display:flex;overflow:hidden;flex-direction:column;padding:0;border-radius:4px;margin:0;gap:4px;inline-size:50px;list-style:none}.time-pickers .picker:hover{
|
|
438
|
+
const styles = ":host{display:inline-block}.time-pickers{display:flex;overflow:hidden;justify-content:center;padding:4px;block-size:calc(28px * var(--_inline-time-picker-num-options-visible) + 4px * (var(--_inline-time-picker-num-options-visible) - 1));gap:4px}.time-pickers .picker-wrapper{position:relative;display:flex;flex-direction:column;border-radius:4px}.time-pickers .picker-wrapper.focused{--focus-stroke-gap-color: transparent;--focus-inset: -2px;box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px))}.time-pickers .picker{position:relative;display:flex;overflow:hidden scroll;flex-direction:column;padding:0 4px;border-radius:4px;margin:0 -4px;gap:4px;inline-size:50px;list-style:none;scrollbar-width:none}.time-pickers .picker:hover{scrollbar-width:auto}.time-pickers .picker:after{display:block;flex-shrink:0;block-size:calc(28px * (var(--_inline-time-picker-num-options-visible) - 1) + 4px * (var(--_inline-time-picker-num-options-visible) - 1 - 1));content:\"\"}.time-pickers .picker:focus-visible{outline:none}.time-pickers .option{--_connotation-color-primary: var(--vvd-time-picker-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-firm: var(--vvd-time-picker-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-time-picker-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-time-picker-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-dim: var(--vvd-time-picker-accent-dim, var(--vvd-color-neutral-200));--_connotation-color-pale: var(--vvd-time-picker-accent-pale, var(--vvd-color-neutral-300))}.time-pickers .option{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.time-pickers .option:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.time-pickers .option:where(.active,:active):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.time-pickers .option:where(.selected):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.time-pickers .option:where(.selected):where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.time-pickers .option:where(.selected):where(.disabled,:disabled){--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: transparent}.time-pickers .option{display:flex;flex-shrink:0;align-items:center;justify-content:center;border-radius:4px;background-color:var(--_appearance-color-fill);block-size:28px;color:var(--_appearance-color-text);cursor:pointer;font:var(--vvd-typography-base);inline-size:50px}.time-pickers .picker-wrapper:not(.focused) .picker:focus-visible .option.selected{--focus-stroke-gap-color: transparent;box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px))}";
|
|
390
439
|
|
|
391
440
|
const inlineTimePickerDefinition = vividElement.defineVividComponent(
|
|
392
441
|
"inline-time-picker",
|
|
@@ -215,8 +215,10 @@ const shouldDisplay12hClock = (x) => x.clock === "12h";
|
|
|
215
215
|
const onPickerOptionClick = (x, column, optionValue) => {
|
|
216
216
|
emitChange(x, column.updatedValue(x, optionValue));
|
|
217
217
|
scrollToOption(x, column.id, optionValue, "start");
|
|
218
|
-
const
|
|
219
|
-
|
|
218
|
+
const currentPicker = x.shadowRoot.querySelector(`#${column.id}`)?.closest(".picker-wrapper");
|
|
219
|
+
const nextPickerWrapper = currentPicker?.nextElementSibling;
|
|
220
|
+
const nextPickerEl = nextPickerWrapper?.querySelector(
|
|
221
|
+
".picker"
|
|
220
222
|
);
|
|
221
223
|
if (nextPickerEl) {
|
|
222
224
|
nextPickerEl.focus();
|
|
@@ -241,6 +243,7 @@ const onPickerKeyDown = (x, column, event) => {
|
|
|
241
243
|
const newValue = options[newIndex].value;
|
|
242
244
|
emitChange(x, column.updatedValue(x, newValue));
|
|
243
245
|
scrollToOption(x, column.id, newValue, "nearest");
|
|
246
|
+
x._clearFocusedClasses();
|
|
244
247
|
}
|
|
245
248
|
return true;
|
|
246
249
|
};
|
|
@@ -260,6 +263,7 @@ const onBaseKeyDown = (x, event) => {
|
|
|
260
263
|
if (x.shadowRoot.activeElement !== terminalElement) {
|
|
261
264
|
ignoreEventInFocusTraps(event);
|
|
262
265
|
}
|
|
266
|
+
x._applyFocusedClass();
|
|
263
267
|
}
|
|
264
268
|
return true;
|
|
265
269
|
};
|
|
@@ -267,36 +271,40 @@ const emitChange = (x, time) => {
|
|
|
267
271
|
x.$emit("change", time, { bubbles: false, composed: false });
|
|
268
272
|
};
|
|
269
273
|
const renderPicker = (column) => {
|
|
270
|
-
return html`<
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
274
|
+
return html`<div class="picker-wrapper">
|
|
275
|
+
<ul
|
|
276
|
+
id="${column.id}"
|
|
277
|
+
class="picker"
|
|
278
|
+
role="listbox"
|
|
279
|
+
tabindex="0"
|
|
280
|
+
aria-label="${column.getLabel}"
|
|
281
|
+
aria-activedescendant="${(x) => column.getSelectedOptionValue(x) ? `${column.id}-${column.getSelectedOptionValue(x)}` : void 0}"
|
|
282
|
+
@keydown="${(x, c) => onPickerKeyDown(x, column, c.event)}"
|
|
283
|
+
>
|
|
284
|
+
${repeat(
|
|
280
285
|
(x) => column.getOptions(x),
|
|
281
286
|
html`<li
|
|
282
|
-
|
|
283
|
-
|
|
287
|
+
id="${(x) => `${column.id}-${x.value}`}"
|
|
288
|
+
class="${(x, c) => classNames("option", [
|
|
284
289
|
"selected",
|
|
285
290
|
column.getSelectedOptionValue(c.parent) === x.value
|
|
286
291
|
])}"
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
292
|
+
aria-selected="${(x, c) => column.getSelectedOptionValue(c.parent) === x.value}"
|
|
293
|
+
role="option"
|
|
294
|
+
@click="${(x, c) => onPickerOptionClick(c.parent, column, x.value)}"
|
|
295
|
+
>
|
|
296
|
+
${(x) => x.label}
|
|
297
|
+
</li>`
|
|
293
298
|
)}
|
|
294
|
-
|
|
299
|
+
</ul>
|
|
300
|
+
</div>`;
|
|
295
301
|
};
|
|
296
302
|
const InlineTimePickerTemplate = () => {
|
|
297
303
|
return html`<div
|
|
298
304
|
class="time-pickers"
|
|
299
305
|
@keydown="${(x, { event }) => onBaseKeyDown(x, event)}"
|
|
306
|
+
@focusout="${(x) => x._onFocusOut()}"
|
|
307
|
+
@pointerdown="${(x) => x._onPointerDown()}"
|
|
300
308
|
>
|
|
301
309
|
${renderPicker(HoursColumn)} ${renderPicker(MinutesColumn)}
|
|
302
310
|
${when(shouldDisplaySecondsPicker, renderPicker(SecondsColumn))}
|
|
@@ -318,6 +326,19 @@ class InlineTimePicker extends Localized(VividElement) {
|
|
|
318
326
|
super(...arguments);
|
|
319
327
|
this.minutesStep = 1;
|
|
320
328
|
this.clock = "24h";
|
|
329
|
+
this.focusedPickerClass = "focused";
|
|
330
|
+
/**
|
|
331
|
+
* @internal
|
|
332
|
+
*/
|
|
333
|
+
this._onFocusOut = () => {
|
|
334
|
+
this._clearFocusedClasses();
|
|
335
|
+
};
|
|
336
|
+
/**
|
|
337
|
+
* @internal
|
|
338
|
+
*/
|
|
339
|
+
this._onPointerDown = () => {
|
|
340
|
+
this._clearFocusedClasses();
|
|
341
|
+
};
|
|
321
342
|
}
|
|
322
343
|
valueChanged(_, newValue) {
|
|
323
344
|
if (newValue !== void 0 && !isValidTimeStr(newValue)) {
|
|
@@ -363,6 +384,34 @@ class InlineTimePicker extends Localized(VividElement) {
|
|
|
363
384
|
".picker"
|
|
364
385
|
);
|
|
365
386
|
firstFocusableElement.focus(options);
|
|
387
|
+
this._applyFocusedClass();
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* @internal
|
|
391
|
+
* Apply 'focused' class to the wrapper element of an active picker
|
|
392
|
+
*/
|
|
393
|
+
_applyFocusedClass() {
|
|
394
|
+
const pickers = this.shadowRoot.querySelectorAll(".picker");
|
|
395
|
+
requestAnimationFrame(() => {
|
|
396
|
+
const active = this.shadowRoot.activeElement;
|
|
397
|
+
pickers.forEach((el) => {
|
|
398
|
+
if (el === active) {
|
|
399
|
+
el.parentElement?.classList.add(this.focusedPickerClass);
|
|
400
|
+
} else {
|
|
401
|
+
el.parentElement?.classList.remove(this.focusedPickerClass);
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* @internal
|
|
408
|
+
* Clear 'focused' classes from all pickers wrappers
|
|
409
|
+
*/
|
|
410
|
+
_clearFocusedClasses() {
|
|
411
|
+
const pickers = this.shadowRoot.querySelectorAll(".picker");
|
|
412
|
+
pickers.forEach((el) => {
|
|
413
|
+
el.parentElement?.classList.remove(this.focusedPickerClass);
|
|
414
|
+
});
|
|
366
415
|
}
|
|
367
416
|
}
|
|
368
417
|
__decorateClass$2([
|
|
@@ -384,7 +433,7 @@ __decorateClass$2([
|
|
|
384
433
|
observable
|
|
385
434
|
], InlineTimePicker.prototype, "max");
|
|
386
435
|
|
|
387
|
-
const styles = ":host{display:inline-block}.time-pickers{display:flex;overflow:hidden;justify-content:center;padding:4px;block-size:calc(28px * var(--_inline-time-picker-num-options-visible) + 4px * (var(--_inline-time-picker-num-options-visible) - 1));gap:4px}.time-pickers .picker{position:relative;display:flex;overflow:hidden;flex-direction:column;padding:0;border-radius:4px;margin:0;gap:4px;inline-size:50px;list-style:none}.time-pickers .picker:hover{
|
|
436
|
+
const styles = ":host{display:inline-block}.time-pickers{display:flex;overflow:hidden;justify-content:center;padding:4px;block-size:calc(28px * var(--_inline-time-picker-num-options-visible) + 4px * (var(--_inline-time-picker-num-options-visible) - 1));gap:4px}.time-pickers .picker-wrapper{position:relative;display:flex;flex-direction:column;border-radius:4px}.time-pickers .picker-wrapper.focused{--focus-stroke-gap-color: transparent;--focus-inset: -2px;box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px))}.time-pickers .picker{position:relative;display:flex;overflow:hidden scroll;flex-direction:column;padding:0 4px;border-radius:4px;margin:0 -4px;gap:4px;inline-size:50px;list-style:none;scrollbar-width:none}.time-pickers .picker:hover{scrollbar-width:auto}.time-pickers .picker:after{display:block;flex-shrink:0;block-size:calc(28px * (var(--_inline-time-picker-num-options-visible) - 1) + 4px * (var(--_inline-time-picker-num-options-visible) - 1 - 1));content:\"\"}.time-pickers .picker:focus-visible{outline:none}.time-pickers .option{--_connotation-color-primary: var(--vvd-time-picker-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-firm: var(--vvd-time-picker-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-time-picker-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-time-picker-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-dim: var(--vvd-time-picker-accent-dim, var(--vvd-color-neutral-200));--_connotation-color-pale: var(--vvd-time-picker-accent-pale, var(--vvd-color-neutral-300))}.time-pickers .option{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.time-pickers .option:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.time-pickers .option:where(.active,:active):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.time-pickers .option:where(.selected):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.time-pickers .option:where(.selected):where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.time-pickers .option:where(.selected):where(.disabled,:disabled){--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: transparent}.time-pickers .option{display:flex;flex-shrink:0;align-items:center;justify-content:center;border-radius:4px;background-color:var(--_appearance-color-fill);block-size:28px;color:var(--_appearance-color-text);cursor:pointer;font:var(--vvd-typography-base);inline-size:50px}.time-pickers .picker-wrapper:not(.focused) .picker:focus-visible .option.selected{--focus-stroke-gap-color: transparent;box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px))}";
|
|
388
437
|
|
|
389
438
|
const inlineTimePickerDefinition = defineVividComponent(
|
|
390
439
|
"inline-time-picker",
|
package/shared/vivid-element.cjs
CHANGED
|
@@ -2734,7 +2734,7 @@ const ReplacedPropHandling = (Base) => {
|
|
|
2734
2734
|
|
|
2735
2735
|
class VividElement extends AriaMixin(ReplacedPropHandling(FASTElement)) {
|
|
2736
2736
|
static {
|
|
2737
|
-
this.VIVID_VERSION = "4.
|
|
2737
|
+
this.VIVID_VERSION = "4.28.0";
|
|
2738
2738
|
}
|
|
2739
2739
|
/**
|
|
2740
2740
|
* Add data-vvd-component attribute with component name globally,
|
package/shared/vivid-element.js
CHANGED
|
@@ -2732,7 +2732,7 @@ const ReplacedPropHandling = (Base) => {
|
|
|
2732
2732
|
|
|
2733
2733
|
class VividElement extends AriaMixin(ReplacedPropHandling(FASTElement)) {
|
|
2734
2734
|
static {
|
|
2735
|
-
this.VIVID_VERSION = "4.
|
|
2735
|
+
this.VIVID_VERSION = "4.28.0";
|
|
2736
2736
|
}
|
|
2737
2737
|
/**
|
|
2738
2738
|
* Add data-vvd-component attribute with component name globally,
|
package/styles/core/all.css
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Thu, 26 Jun 2025 11:10:05 GMT
|
|
4
4
|
*/
|
|
5
5
|
.vvd-root {
|
|
6
|
-
color-scheme: var(--vvd-color-scheme);
|
|
7
6
|
background-color: var(--vvd-color-canvas);
|
|
8
7
|
color: var(--vvd-color-canvas-text);
|
|
8
|
+
color-scheme: var(--vvd-color-scheme);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.vvd-scrollbar {
|
|
@@ -74,16 +74,16 @@
|
|
|
74
74
|
.vvd-root:root > body {
|
|
75
75
|
font: var(--vvd-typography-base);
|
|
76
76
|
font-feature-settings: "kern"; /* turns on kerning */
|
|
77
|
-
text-rendering: optimizeLegibility; /* emphasise on legibility when rendering, turns on ligatures and kerning */
|
|
78
77
|
-webkit-font-smoothing: antialiased; /* apply font anti-aliasing for Webkit on OSX */
|
|
79
78
|
-moz-osx-font-smoothing: grayscale; /* apply font anti-aliasing for Firefox on OSX */
|
|
79
|
+
text-rendering: optimizeLegibility; /* emphasise on legibility when rendering, turns on ligatures and kerning */
|
|
80
80
|
}
|
|
81
81
|
.vvd-root:not(:root) {
|
|
82
82
|
font: var(--vvd-typography-base);
|
|
83
83
|
font-feature-settings: "kern"; /* turns on kerning */
|
|
84
|
-
text-rendering: optimizeLegibility; /* emphasise on legibility when rendering, turns on ligatures and kerning */
|
|
85
84
|
-webkit-font-smoothing: antialiased; /* apply font anti-aliasing for Webkit on OSX */
|
|
86
85
|
-moz-osx-font-smoothing: grayscale; /* apply font anti-aliasing for Firefox on OSX */
|
|
86
|
+
text-rendering: optimizeLegibility; /* emphasise on legibility when rendering, turns on ligatures and kerning */
|
|
87
87
|
}
|
|
88
88
|
.vvd-root p,
|
|
89
89
|
.vvd-root .font-base {
|
|
@@ -185,10 +185,10 @@
|
|
|
185
185
|
}
|
|
186
186
|
.vvd-root sub,
|
|
187
187
|
.vvd-root sup {
|
|
188
|
+
position: relative;
|
|
188
189
|
font: var(--vvd-typography-base-condensed);
|
|
189
190
|
font-size: 75%;
|
|
190
191
|
line-height: 0;
|
|
191
|
-
position: relative;
|
|
192
192
|
vertical-align: baseline;
|
|
193
193
|
}
|
|
194
194
|
.vvd-root sub {
|
package/styles/core/theme.css
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Thu, 26 Jun 2025 11:10:05 GMT
|
|
4
4
|
*/
|
|
5
5
|
.vvd-root {
|
|
6
|
-
color-scheme: var(--vvd-color-scheme);
|
|
7
6
|
background-color: var(--vvd-color-canvas);
|
|
8
7
|
color: var(--vvd-color-canvas-text);
|
|
8
|
+
color-scheme: var(--vvd-color-scheme);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.vvd-scrollbar {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Thu, 26 Jun 2025 11:10:05 GMT
|
|
4
4
|
*/
|
|
5
5
|
.vvd-root:root {
|
|
6
6
|
--vvd-size-font-scale-base: 1rem;
|
|
@@ -9,16 +9,16 @@
|
|
|
9
9
|
.vvd-root:root > body {
|
|
10
10
|
font: var(--vvd-typography-base);
|
|
11
11
|
font-feature-settings: "kern"; /* turns on kerning */
|
|
12
|
-
text-rendering: optimizeLegibility; /* emphasise on legibility when rendering, turns on ligatures and kerning */
|
|
13
12
|
-webkit-font-smoothing: antialiased; /* apply font anti-aliasing for Webkit on OSX */
|
|
14
13
|
-moz-osx-font-smoothing: grayscale; /* apply font anti-aliasing for Firefox on OSX */
|
|
14
|
+
text-rendering: optimizeLegibility; /* emphasise on legibility when rendering, turns on ligatures and kerning */
|
|
15
15
|
}
|
|
16
16
|
.vvd-root:not(:root) {
|
|
17
17
|
font: var(--vvd-typography-base);
|
|
18
18
|
font-feature-settings: "kern"; /* turns on kerning */
|
|
19
|
-
text-rendering: optimizeLegibility; /* emphasise on legibility when rendering, turns on ligatures and kerning */
|
|
20
19
|
-webkit-font-smoothing: antialiased; /* apply font anti-aliasing for Webkit on OSX */
|
|
21
20
|
-moz-osx-font-smoothing: grayscale; /* apply font anti-aliasing for Firefox on OSX */
|
|
21
|
+
text-rendering: optimizeLegibility; /* emphasise on legibility when rendering, turns on ligatures and kerning */
|
|
22
22
|
}
|
|
23
23
|
.vvd-root p,
|
|
24
24
|
.vvd-root .font-base {
|
|
@@ -120,10 +120,10 @@
|
|
|
120
120
|
}
|
|
121
121
|
.vvd-root sub,
|
|
122
122
|
.vvd-root sup {
|
|
123
|
+
position: relative;
|
|
123
124
|
font: var(--vvd-typography-base-condensed);
|
|
124
125
|
font-size: 75%;
|
|
125
126
|
line-height: 0;
|
|
126
|
-
position: relative;
|
|
127
127
|
vertical-align: baseline;
|
|
128
128
|
}
|
|
129
129
|
.vvd-root sub {
|
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
@font-face {
|
|
2
|
+
font-display: block;
|
|
2
3
|
font-family: SpeziaCompleteVariableUpright;
|
|
3
4
|
font-stretch: 50% 200%;
|
|
4
5
|
font-weight: 1 1000;
|
|
5
|
-
font-display: block;
|
|
6
6
|
src: url("https://fonts.resources.vonage.com/fonts/v2/SpeziaCompleteVariableUprightWeb.woff2") format("woff2");
|
|
7
7
|
}
|
|
8
8
|
@font-face {
|
|
9
|
+
font-display: block;
|
|
9
10
|
font-family: SpeziaMonoCompleteVariable;
|
|
10
11
|
font-stretch: 50% 200%;
|
|
11
12
|
font-weight: 1 1000;
|
|
12
|
-
font-display: block;
|
|
13
13
|
src: url("https://fonts.resources.vonage.com/fonts/v2/SpeziaMonoCompleteVariableWeb.woff2") format("woff2");
|
|
14
14
|
}
|
|
15
15
|
.vvd-root {
|
|
16
16
|
--vvd-typography-headline: 500 condensed
|
|
17
17
|
calc(var(--vvd-size-font-scale-base, 16px) * 4.125) / 1.3333333333333333
|
|
18
|
-
|
|
18
|
+
speziacompletevariableupright;
|
|
19
19
|
--vvd-typography-subtitle: 500 condensed
|
|
20
20
|
calc(var(--vvd-size-font-scale-base, 16px) * 3.25) / 1.3076923076923077
|
|
21
|
-
|
|
21
|
+
speziacompletevariableupright;
|
|
22
22
|
--vvd-typography-heading-1: 500 condensed
|
|
23
23
|
calc(var(--vvd-size-font-scale-base, 16px) * 2.5) / 1.3
|
|
24
|
-
|
|
24
|
+
speziacompletevariableupright;
|
|
25
25
|
--vvd-typography-heading-2: 500 condensed
|
|
26
26
|
calc(var(--vvd-size-font-scale-base, 16px) * 2) / 1.375
|
|
27
|
-
|
|
27
|
+
speziacompletevariableupright;
|
|
28
28
|
--vvd-typography-heading-3: 500 condensed
|
|
29
29
|
calc(var(--vvd-size-font-scale-base, 16px) * 1.625) / 1.3846153846153846
|
|
30
|
-
|
|
30
|
+
speziacompletevariableupright;
|
|
31
31
|
--vvd-typography-heading-4: 500 condensed
|
|
32
32
|
calc(var(--vvd-size-font-scale-base, 16px) * 1.25) / 1.4
|
|
33
|
-
|
|
33
|
+
speziacompletevariableupright;
|
|
34
34
|
--vvd-typography-base: 400 ultra-condensed
|
|
35
35
|
calc(var(--vvd-size-font-scale-base, 16px) * 0.875) / 1.4285714285714286
|
|
36
|
-
|
|
36
|
+
speziacompletevariableupright;
|
|
37
37
|
--vvd-typography-base-bold: 600 ultra-condensed
|
|
38
38
|
calc(var(--vvd-size-font-scale-base, 16px) * 0.875) / 1.4285714285714286
|
|
39
|
-
|
|
39
|
+
speziacompletevariableupright;
|
|
40
40
|
--vvd-typography-base-code: 400 ultra-condensed
|
|
41
41
|
calc(var(--vvd-size-font-scale-base, 16px) * 0.875) / 1.4285714285714286
|
|
42
|
-
|
|
42
|
+
speziamonocompletevariable;
|
|
43
43
|
--vvd-typography-base-condensed: 400 ultra-condensed
|
|
44
44
|
calc(var(--vvd-size-font-scale-base, 16px) * 0.75) / 1.3333333333333333
|
|
45
|
-
|
|
45
|
+
speziacompletevariableupright;
|
|
46
46
|
--vvd-typography-base-condensed-bold: 600 ultra-condensed
|
|
47
47
|
calc(var(--vvd-size-font-scale-base, 16px) * 0.75) / 1.3333333333333333
|
|
48
|
-
|
|
48
|
+
speziacompletevariableupright;
|
|
49
49
|
--vvd-typography-base-extended: 400 ultra-condensed
|
|
50
50
|
calc(var(--vvd-size-font-scale-base, 16px)) / 1.5
|
|
51
|
-
|
|
51
|
+
speziacompletevariableupright;
|
|
52
52
|
--vvd-typography-base-extended-bold: 600 ultra-condensed
|
|
53
53
|
calc(var(--vvd-size-font-scale-base, 16px)) / 1.5
|
|
54
|
-
|
|
54
|
+
speziacompletevariableupright;
|
|
55
55
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Thu, 26 Jun 2025 11:10:05 GMT
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Do not edit directly
|
|
7
|
-
* Generated on
|
|
7
|
+
* Generated on Thu, 26 Jun 2025 11:10:05 GMT
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* Do not edit directly
|
|
11
|
-
* Generated on
|
|
11
|
+
* Generated on Thu, 26 Jun 2025 11:10:05 GMT
|
|
12
12
|
*/
|
|
13
13
|
/**
|
|
14
14
|
* Do not edit directly
|
|
15
|
-
* Generated on
|
|
15
|
+
* Generated on Thu, 26 Jun 2025 11:10:05 GMT
|
|
16
16
|
*/
|
|
17
17
|
@property --vvd-size-density {
|
|
18
18
|
syntax: "<integer>";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Thu, 26 Jun 2025 11:10:05 GMT
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Do not edit directly
|
|
7
|
-
* Generated on
|
|
7
|
+
* Generated on Thu, 26 Jun 2025 11:10:05 GMT
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* Do not edit directly
|
|
11
|
-
* Generated on
|
|
11
|
+
* Generated on Thu, 26 Jun 2025 11:10:05 GMT
|
|
12
12
|
*/
|
|
13
13
|
/**
|
|
14
14
|
* Do not edit directly
|
|
15
|
-
* Generated on
|
|
15
|
+
* Generated on Thu, 26 Jun 2025 11:10:05 GMT
|
|
16
16
|
*/
|
|
17
17
|
@property --vvd-size-density {
|
|
18
18
|
syntax: "<integer>";
|