@vonage/vivid 4.17.0 → 4.18.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 +3903 -3860
- package/date-time-picker/index.cjs +5 -0
- package/date-time-picker/index.js +3 -0
- package/dial-pad/index.cjs +1 -1
- package/dial-pad/index.js +1 -1
- package/dialog/index.cjs +1 -1
- package/dialog/index.js +1 -1
- package/divider/index.cjs +1 -1
- package/divider/index.js +1 -1
- package/elevation/index.cjs +1 -1
- package/elevation/index.js +1 -1
- package/empty-state/index.cjs +1 -1
- package/empty-state/index.js +1 -1
- package/fab/index.cjs +1 -1
- package/fab/index.js +1 -1
- package/file-picker/index.cjs +1 -1
- package/file-picker/index.js +1 -1
- package/header/index.cjs +1 -1
- package/header/index.js +1 -1
- package/icon/index.cjs +1 -1
- package/icon/index.js +1 -1
- package/index.cjs +136 -133
- package/index.js +45 -44
- package/layout/index.cjs +1 -1
- package/layout/index.js +1 -1
- package/lib/action-group/action-group.d.ts +449 -3
- package/lib/banner/banner.d.ts +449 -3
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +449 -1
- package/lib/checkbox/checkbox.d.ts +449 -4
- package/lib/components.d.ts +1 -0
- package/lib/date-picker/date-picker.d.ts +2182 -4
- package/lib/date-picker/date-picker.template.d.ts +2 -0
- package/lib/date-range-picker/date-range-picker.d.ts +1110 -4
- package/lib/date-range-picker/date-range-picker.template.d.ts +2 -0
- package/lib/date-time-picker/date-time-picker.d.ts +2175 -0
- package/lib/date-time-picker/date-time-picker.template.d.ts +2 -0
- package/lib/date-time-picker/definition.d.ts +1 -0
- package/lib/date-time-picker/locale.d.ts +9 -0
- package/lib/dialog/dialog.d.ts +449 -2
- package/lib/divider/divider.d.ts +448 -1
- package/lib/menu/menu.d.ts +446 -1
- package/lib/nav-disclosure/nav-disclosure.d.ts +449 -2
- package/lib/number-field/number-field.d.ts +450 -3
- package/lib/option/option.d.ts +1 -11
- package/lib/progress/progress.d.ts +449 -2
- package/lib/progress-ring/progress-ring.d.ts +449 -2
- package/lib/rich-text-editor/facades/vivid-prose-mirror.facade.d.ts +1 -0
- package/lib/rich-text-editor/rich-text-editor.d.ts +7 -4
- package/lib/select/select.d.ts +1 -5
- package/lib/selectable-box/selectable-box.d.ts +449 -2
- package/lib/slider/slider.d.ts +449 -3
- package/lib/split-button/split-button.d.ts +449 -3
- package/lib/switch/switch.d.ts +449 -2
- package/lib/tag-group/tag-group.d.ts +449 -2
- package/lib/text-anchor/text-anchor.d.ts +449 -1
- package/lib/text-area/text-area.d.ts +450 -3
- package/lib/text-field/text-field.d.ts +450 -7
- package/lib/time-picker/locale.d.ts +0 -2
- package/lib/time-picker/time-picker.d.ts +1053 -9
- package/lib/time-picker/time-picker.template.d.ts +2 -1
- package/locales/de-DE.cjs +29 -5
- package/locales/de-DE.js +29 -5
- package/locales/en-GB.cjs +29 -5
- package/locales/en-GB.js +29 -5
- package/locales/en-US.cjs +29 -5
- package/locales/en-US.js +29 -5
- package/locales/ja-JP.cjs +29 -5
- package/locales/ja-JP.js +29 -5
- package/locales/zh-CN.cjs +29 -5
- package/locales/zh-CN.js +29 -5
- package/menu/index.cjs +1 -1
- package/menu/index.js +1 -1
- package/menu-item/index.cjs +1 -1
- package/menu-item/index.js +1 -1
- package/nav/index.cjs +1 -1
- package/nav/index.js +1 -1
- package/nav-disclosure/index.cjs +1 -1
- package/nav-disclosure/index.js +1 -1
- package/nav-item/index.cjs +1 -1
- package/nav-item/index.js +1 -1
- package/note/index.cjs +1 -1
- package/note/index.js +1 -1
- package/number-field/index.cjs +1 -1
- package/number-field/index.js +1 -1
- package/option/index.cjs +1 -1
- package/option/index.js +1 -1
- package/package.json +1 -1
- package/pagination/index.cjs +1 -1
- package/pagination/index.js +1 -1
- package/popup/index.cjs +1 -1
- package/popup/index.js +1 -1
- package/progress/index.cjs +1 -1
- package/progress/index.js +1 -1
- package/progress-ring/index.cjs +1 -1
- package/progress-ring/index.js +1 -1
- package/radio/index.cjs +1 -1
- package/radio/index.js +1 -1
- package/radio-group/index.cjs +1 -1
- package/radio-group/index.js +1 -1
- package/range-slider/index.cjs +1 -1
- package/range-slider/index.js +1 -1
- package/rich-text-editor/index.cjs +1 -1
- package/rich-text-editor/index.js +1 -1
- package/searchable-select/index.cjs +1 -1
- package/searchable-select/index.js +1 -1
- package/select/index.cjs +1 -1
- package/select/index.js +1 -1
- package/selectable-box/index.cjs +1 -1
- package/selectable-box/index.js +1 -1
- package/shared/Reflector.cjs +71 -0
- package/shared/Reflector.js +69 -0
- package/shared/affix.cjs +1 -1
- package/shared/affix.js +1 -1
- package/shared/anchor.cjs +0 -10
- package/shared/anchor.js +0 -10
- package/shared/aria/delegates-aria.d.ts +454 -0
- package/shared/base-progress.js +1 -1
- package/shared/breadcrumb-item.cjs +2 -1
- package/shared/breadcrumb-item.js +2 -1
- package/shared/button.cjs +2 -13
- package/shared/button.js +2 -13
- package/shared/{presentationDate.cjs → calendar-picker.template.cjs} +730 -900
- package/shared/{presentationDate.js → calendar-picker.template.js} +672 -845
- package/shared/datetime/dateTimeStr.d.ts +6 -0
- package/shared/datetime/presentationDate.d.ts +4 -0
- package/shared/{date-picker/calendar → datetime}/presentationDateRange.d.ts +3 -3
- package/shared/datetime/presentationDateTime.d.ts +4 -0
- package/{lib/time-picker/time → shared/datetime}/time.d.ts +1 -0
- package/shared/definition.cjs +1 -1
- package/shared/definition.js +1 -1
- package/shared/definition11.cjs +8 -11
- package/shared/definition11.js +8 -11
- package/shared/definition14.cjs +2 -2
- package/shared/definition14.js +2 -2
- package/shared/definition15.cjs +3 -10
- package/shared/definition15.js +3 -10
- package/shared/definition16.cjs +29 -33
- package/shared/definition16.js +29 -33
- package/shared/definition17.cjs +1 -1
- package/shared/definition17.js +1 -1
- package/shared/definition18.cjs +56 -91
- package/shared/definition18.js +56 -91
- package/shared/definition19.cjs +68 -32
- package/shared/definition19.js +58 -22
- package/shared/definition20.cjs +253 -220
- package/shared/definition20.js +254 -220
- package/shared/definition21.cjs +200 -286
- package/shared/definition21.js +198 -284
- package/shared/definition22.cjs +302 -31
- package/shared/definition22.js +301 -30
- package/shared/definition23.cjs +37 -58
- package/shared/definition23.js +36 -57
- package/shared/definition24.cjs +50 -70
- package/shared/definition24.js +49 -69
- package/shared/definition25.cjs +75 -2475
- package/shared/definition25.js +74 -2475
- package/shared/definition26.cjs +2480 -50
- package/shared/definition26.js +2479 -48
- package/shared/definition27.cjs +53 -271
- package/shared/definition27.js +52 -269
- package/shared/definition28.cjs +271 -48
- package/shared/definition28.js +269 -47
- package/shared/definition29.cjs +37 -764
- package/shared/definition29.js +36 -758
- package/shared/definition3.cjs +2 -9
- package/shared/definition3.js +2 -9
- package/shared/definition30.cjs +739 -57
- package/shared/definition30.js +733 -56
- package/shared/definition31.cjs +93 -22
- package/shared/definition31.js +92 -21
- package/shared/definition32.cjs +28 -10
- package/shared/definition32.js +27 -9
- package/shared/definition33.cjs +10 -52
- package/shared/definition33.js +9 -51
- package/shared/definition34.cjs +30 -411
- package/shared/definition34.js +30 -412
- package/shared/definition35.cjs +422 -52
- package/shared/definition35.js +423 -53
- package/shared/definition36.cjs +53 -216
- package/shared/definition36.js +53 -215
- package/shared/definition37.cjs +201 -71
- package/shared/definition37.js +200 -70
- package/shared/definition38.cjs +53 -48
- package/shared/definition38.js +51 -46
- package/shared/definition39.cjs +57 -263
- package/shared/definition39.js +56 -262
- package/shared/definition4.cjs +2 -2
- package/shared/definition4.js +2 -2
- package/shared/definition40.cjs +220 -148
- package/shared/definition40.js +220 -148
- package/shared/definition41.cjs +143 -567
- package/shared/definition41.js +143 -568
- package/shared/definition42.cjs +596 -12573
- package/shared/definition42.js +596 -12573
- package/shared/definition43.cjs +13489 -1058
- package/shared/definition43.js +13489 -1059
- package/shared/definition44.cjs +936 -698
- package/shared/definition44.js +937 -698
- package/shared/definition45.cjs +850 -105
- package/shared/definition45.js +850 -104
- package/shared/definition46.cjs +110 -90
- package/shared/definition46.js +108 -88
- package/shared/definition47.cjs +88 -464
- package/shared/definition47.js +87 -463
- package/shared/definition48.cjs +457 -111
- package/shared/definition48.js +456 -110
- package/shared/definition49.cjs +103 -109
- package/shared/definition49.js +102 -108
- package/shared/definition5.cjs +3 -3
- package/shared/definition5.js +3 -3
- package/shared/definition50.cjs +136 -14
- package/shared/definition50.js +135 -13
- package/shared/definition51.cjs +16 -115
- package/shared/definition51.js +15 -114
- package/shared/definition52.cjs +79 -486
- package/shared/definition52.js +78 -485
- package/shared/definition53.cjs +503 -24
- package/shared/definition53.js +502 -23
- package/shared/definition54.cjs +23 -137
- package/shared/definition54.js +22 -136
- package/shared/definition55.cjs +96 -241
- package/shared/definition55.js +95 -241
- package/shared/definition56.cjs +261 -61
- package/shared/definition56.js +260 -60
- package/shared/definition57.cjs +419 -788
- package/shared/definition57.js +420 -789
- package/shared/definition58.cjs +27 -144
- package/shared/definition58.js +27 -143
- package/shared/definition59.cjs +83 -54
- package/shared/definition59.js +82 -53
- package/shared/definition6.cjs +1 -1
- package/shared/definition6.js +1 -1
- package/shared/definition60.cjs +80 -165
- package/shared/definition60.js +79 -163
- package/shared/definition61.cjs +143 -230
- package/shared/definition61.js +141 -229
- package/shared/definition62.cjs +233 -69344
- package/shared/definition62.js +232 -69343
- package/shared/definition63.cjs +69381 -28
- package/shared/definition63.js +69379 -26
- package/shared/definition64.cjs +28 -2168
- package/shared/definition64.js +27 -2166
- package/shared/definition65.cjs +2195 -0
- package/shared/definition65.js +2190 -0
- package/shared/definition7.cjs +1 -1
- package/shared/definition7.js +1 -1
- package/shared/definition8.cjs +3 -9
- package/shared/definition8.js +3 -9
- package/shared/definition9.cjs +1 -1
- package/shared/definition9.js +1 -1
- package/shared/delegates-aria.cjs +69 -0
- package/shared/delegates-aria.js +67 -0
- package/shared/form-associated.js +1 -1
- package/shared/form-elements.cjs +1 -1
- package/shared/form-elements.js +1 -1
- package/shared/foundation/anchor/anchor.d.ts +0 -8
- package/shared/foundation/button/button.d.ts +449 -7
- package/shared/foundation/listbox/listbox.d.ts +0 -9
- package/shared/listbox.cjs +4 -30
- package/shared/listbox.js +4 -30
- package/shared/localization/Locale.d.ts +6 -2
- package/shared/option.cjs +1 -38
- package/shared/option.js +1 -38
- package/shared/picker-field/locale.d.ts +4 -0
- package/shared/picker-field/mixins/calendar-picker.d.ts +558 -0
- package/shared/{date-picker/locale.d.ts → picker-field/mixins/calendar-picker.locale.d.ts} +1 -3
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +555 -0
- package/shared/picker-field/mixins/calendar-segments/calendarGrid.d.ts +17 -0
- package/shared/{date-picker/calendar → picker-field/mixins/calendar-segments}/monthPickerGrid.d.ts +3 -3
- package/{lib/time-picker → shared/picker-field/mixins}/inline-time-picker/columns.d.ts +1 -1
- package/{lib/time-picker → shared/picker-field/mixins}/inline-time-picker/inline-time-picker.d.ts +2 -2
- package/{lib/time-picker/time/picker.d.ts → shared/picker-field/mixins/inline-time-picker/picker-option.d.ts} +1 -1
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +1110 -0
- package/shared/picker-field/mixins/single-date-picker.d.ts +1626 -0
- package/shared/picker-field/mixins/single-value-picker.d.ts +518 -0
- package/shared/picker-field/mixins/time-selection-picker.d.ts +1053 -0
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +1050 -0
- package/shared/picker-field/picker-field.d.ts +11 -0
- package/shared/picker-field/picker-field.form-associated.d.ts +11 -0
- package/shared/picker-field/picker-field.template.d.ts +7 -0
- package/shared/picker-field.template.cjs +315 -0
- package/shared/picker-field.template.js +310 -0
- package/shared/single-date-picker.cjs +46 -0
- package/shared/single-date-picker.js +44 -0
- package/shared/single-value-picker.cjs +77 -0
- package/shared/single-value-picker.js +75 -0
- package/shared/slider.template.cjs +3 -3
- package/shared/slider.template.js +3 -3
- package/shared/text-anchor.cjs +2 -1
- package/shared/text-anchor.js +2 -1
- package/shared/text-anchor.template.cjs +3 -5
- package/shared/text-anchor.template.js +3 -5
- package/shared/text-field.cjs +2 -555
- package/shared/text-field.js +2 -554
- package/shared/time-selection-picker.template.cjs +776 -0
- package/shared/time-selection-picker.template.js +767 -0
- package/shared/vivid-element.cjs +1 -1
- package/shared/vivid-element.js +1 -1
- package/side-drawer/index.cjs +1 -1
- package/side-drawer/index.js +1 -1
- package/slider/index.cjs +1 -1
- package/slider/index.js +1 -1
- package/split-button/index.cjs +1 -1
- package/split-button/index.js +1 -1
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/switch/index.cjs +1 -1
- package/switch/index.js +1 -1
- package/tab/index.cjs +1 -1
- package/tab/index.js +1 -1
- package/tab-panel/index.cjs +1 -1
- package/tab-panel/index.js +1 -1
- package/tabs/index.cjs +1 -1
- package/tabs/index.js +1 -1
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/tag-group/index.cjs +1 -1
- package/tag-group/index.js +1 -1
- package/text-anchor/index.cjs +1 -1
- package/text-anchor/index.js +1 -1
- package/text-area/index.cjs +1 -1
- package/text-area/index.js +1 -1
- package/text-field/index.cjs +1 -1
- package/text-field/index.js +1 -1
- package/time-picker/index.cjs +1 -1
- package/time-picker/index.js +1 -1
- package/toggletip/index.cjs +1 -1
- package/toggletip/index.js +1 -1
- package/tooltip/index.cjs +1 -1
- package/tooltip/index.js +1 -1
- package/tree-item/index.cjs +1 -1
- package/tree-item/index.js +1 -1
- package/tree-view/index.cjs +1 -1
- package/tree-view/index.js +1 -1
- package/video-player/index.cjs +1 -1
- package/video-player/index.js +1 -1
- package/vivid.api.json +105 -1152
- package/lib/time-picker/time-picker.form-associated.d.ts +0 -11
- package/shared/aria-global.cjs +0 -93
- package/shared/aria-global.js +0 -91
- package/shared/date-picker/calendar/calendarGrid.d.ts +0 -17
- package/shared/date-picker/calendar/presentationDate.d.ts +0 -4
- package/shared/date-picker/date-picker-base.d.ts +0 -21
- package/shared/date-picker/date-picker-base.form-associated.d.ts +0 -11
- package/shared/date-picker/date-picker-base.template.d.ts +0 -3
- package/shared/foundation/patterns/aria-global.d.ts +0 -21
- package/shared/foundation/patterns/index.d.ts +0 -1
- package/shared/text-field2.cjs +0 -5
- package/shared/text-field2.js +0 -3
- package/shared/trapped-focus.cjs +0 -35
- package/shared/trapped-focus.js +0 -33
- /package/shared/{date-picker/calendar → datetime}/dateRange.d.ts +0 -0
- /package/shared/{date-picker/calendar → datetime}/dateStr.d.ts +0 -0
- /package/shared/{date-picker/calendar → datetime}/month.d.ts +0 -0
- /package/{lib/time-picker/time → shared/datetime}/presentationTime.d.ts +0 -0
- /package/shared/{date-picker/calendar → datetime}/year.d.ts +0 -0
- /package/shared/{date-picker/calendar → picker-field/mixins/calendar-segments}/segment.d.ts +0 -0
- /package/{lib/time-picker → shared/picker-field/mixins}/inline-time-picker/definition.d.ts +0 -0
- /package/{lib/time-picker → shared/picker-field/mixins}/inline-time-picker/inline-time-picker.template.d.ts +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type TimeStr } from './time';
|
|
2
|
+
import { type DateStr } from './dateStr';
|
|
3
|
+
export type DateTimeStr = string;
|
|
4
|
+
export declare const extractDatePart: (dateTimeStr: DateTimeStr | '') => DateStr | '';
|
|
5
|
+
export declare const extractTimePart: (dateTimeStr: DateTimeStr | '') => TimeStr | '';
|
|
6
|
+
export declare const isValidDateTimeStr: (string: string) => boolean;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CalendarPickerLocale } from '../picker-field/mixins/calendar-picker.locale';
|
|
2
|
+
import { type DateStr } from './dateStr';
|
|
3
|
+
export declare const formatPresentationDate: (dateStr: DateStr, locale: CalendarPickerLocale) => string;
|
|
4
|
+
export declare const parsePresentationDate: (presentationDate: string, locale: CalendarPickerLocale) => DateStr;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CalendarPickerLocale } from '../picker-field/mixins/calendar-picker.locale';
|
|
2
2
|
import type { DateRange } from './dateRange';
|
|
3
3
|
export declare const formatRange: (from: string, to: string) => string;
|
|
4
|
-
export declare const formatPresentationDateRange: (dateRange: DateRange, locale:
|
|
5
|
-
export declare const parsePresentationDateRange: (presentationDateRange: string, locale:
|
|
4
|
+
export declare const formatPresentationDateRange: (dateRange: DateRange, locale: CalendarPickerLocale) => string;
|
|
5
|
+
export declare const parsePresentationDateRange: (presentationDateRange: string, locale: CalendarPickerLocale) => DateRange;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CalendarPickerLocale } from '../picker-field/mixins/calendar-picker.locale';
|
|
2
|
+
import type { DateTimeStr } from './dateTimeStr';
|
|
3
|
+
export declare const formatPresentationDateTime: (dateTimeStr: DateTimeStr, locale: CalendarPickerLocale, includeSeconds: boolean, use12HourClock: boolean) => string;
|
|
4
|
+
export declare const parsePresentationDateTime: (presentationDateTime: string, locale: CalendarPickerLocale, use12HourClock: boolean) => DateTimeStr;
|
|
@@ -11,5 +11,6 @@ interface ParsedTimeStr {
|
|
|
11
11
|
}
|
|
12
12
|
export declare const formatTimePart: (part: number) => string;
|
|
13
13
|
export declare const parseTimeStr: (timeStr: TimeStr) => ParsedTimeStr;
|
|
14
|
+
export declare const compareTimeStr: (a: TimeStr, b: TimeStr) => number;
|
|
14
15
|
export declare const hoursAs12hClock: (hour: number) => number;
|
|
15
16
|
export {};
|
package/shared/definition.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const vividElement = require('./vivid-element.cjs');
|
|
4
|
-
const definition = require('./
|
|
4
|
+
const definition = require('./definition28.cjs');
|
|
5
5
|
const affix = require('./affix.cjs');
|
|
6
6
|
const applyMixins = require('./apply-mixins.cjs');
|
|
7
7
|
const ref = require('./ref.cjs');
|
package/shared/definition.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { V as VividElement, a as attr, n as nullableNumberConverter, h as html, d as createRegisterFunction, f as defineVividComponent } from './vivid-element.js';
|
|
2
|
-
import { i as iconDefinition } from './
|
|
2
|
+
import { i as iconDefinition } from './definition28.js';
|
|
3
3
|
import { A as AffixIconWithTrailing, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
4
4
|
import { a as applyMixins } from './apply-mixins.js';
|
|
5
5
|
import { r as ref } from './ref.js';
|
package/shared/definition11.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const definition = require('./
|
|
4
|
-
const definition$1 = require('./
|
|
3
|
+
const definition = require('./definition28.cjs');
|
|
4
|
+
const definition$1 = require('./definition38.cjs');
|
|
5
5
|
const vividElement = require('./vivid-element.cjs');
|
|
6
6
|
const affix = require('./affix.cjs');
|
|
7
7
|
const button = require('./button.cjs');
|
|
@@ -190,18 +190,17 @@ function renderButtonContent(context) {
|
|
|
190
190
|
aria-atomic="${(x) => x.ariaAtomic}"
|
|
191
191
|
aria-busy="${(x) => x.ariaBusy}"
|
|
192
192
|
aria-current="${(x) => x.ariaCurrent}"
|
|
193
|
-
aria-details="${(x) => x.ariaDetails}"
|
|
194
193
|
aria-disabled="${(x) => x.ariaDisabled}"
|
|
195
194
|
aria-expanded="${(x) => x.ariaExpanded}"
|
|
196
|
-
aria-haspopup="${(x) => x.
|
|
195
|
+
aria-haspopup="${(x) => x.ariaHasPopup}"
|
|
197
196
|
aria-hidden="${(x) => x.ariaHidden}"
|
|
198
197
|
aria-invalid="${(x) => x.ariaInvalid}"
|
|
199
|
-
aria-keyshortcuts="${(x) => x.
|
|
198
|
+
aria-keyshortcuts="${(x) => x.ariaKeyShortcuts}"
|
|
200
199
|
aria-label="${(x) => x.ariaLabel}"
|
|
201
200
|
aria-live="${(x) => x.ariaLive}"
|
|
202
201
|
aria-pressed="${(x) => x.ariaPressed}"
|
|
203
202
|
aria-relevant="${(x) => x.ariaRelevant}"
|
|
204
|
-
aria-roledescription="${(x) => x.
|
|
203
|
+
aria-roledescription="${(x) => x.ariaRoleDescription}"
|
|
205
204
|
title="${(x) => x.title}"
|
|
206
205
|
${ref.ref("control")}
|
|
207
206
|
>
|
|
@@ -222,18 +221,16 @@ function renderAnchorContent(context) {
|
|
|
222
221
|
aria-atomic="${(x) => x.ariaAtomic}"
|
|
223
222
|
aria-busy="${(x) => x.ariaBusy}"
|
|
224
223
|
aria-current="${(x) => x.ariaCurrent}"
|
|
225
|
-
aria-details="${(x) => x.ariaDetails}"
|
|
226
224
|
aria-disabled="${(x) => x.ariaDisabled}"
|
|
227
|
-
aria-errormessage="${(x) => x.ariaErrormessage}"
|
|
228
225
|
aria-expanded="${(x) => x.ariaExpanded}"
|
|
229
|
-
aria-haspopup="${(x) => x.
|
|
226
|
+
aria-haspopup="${(x) => x.ariaHasPopup}"
|
|
230
227
|
aria-hidden="${(x) => x.ariaHidden}"
|
|
231
228
|
aria-invalid="${(x) => x.ariaInvalid}"
|
|
232
|
-
aria-keyshortcuts="${(x) => x.
|
|
229
|
+
aria-keyshortcuts="${(x) => x.ariaKeyShortcuts}"
|
|
233
230
|
aria-label="${(x) => x.ariaLabel}"
|
|
234
231
|
aria-live="${(x) => x.ariaLive}"
|
|
235
232
|
aria-relevant="${(x) => x.ariaRelevant}"
|
|
236
|
-
aria-roledescription="${(x) => x.
|
|
233
|
+
aria-roledescription="${(x) => x.ariaRoleDescription}"
|
|
237
234
|
${ref.ref("control")}
|
|
238
235
|
>
|
|
239
236
|
${buttonContent(context)}
|
package/shared/definition11.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as Icon, i as iconDefinition } from './
|
|
2
|
-
import { P as ProgressRing, p as progressRingDefinition } from './
|
|
1
|
+
import { I as Icon, i as iconDefinition } from './definition28.js';
|
|
2
|
+
import { P as ProgressRing, p as progressRingDefinition } from './definition38.js';
|
|
3
3
|
import { a as attr, h as html, d as createRegisterFunction, f as defineVividComponent } from './vivid-element.js';
|
|
4
4
|
import { A as AffixIconWithTrailing, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
5
5
|
import { V as VividFoundationButton } from './button.js';
|
|
@@ -188,18 +188,17 @@ function renderButtonContent(context) {
|
|
|
188
188
|
aria-atomic="${(x) => x.ariaAtomic}"
|
|
189
189
|
aria-busy="${(x) => x.ariaBusy}"
|
|
190
190
|
aria-current="${(x) => x.ariaCurrent}"
|
|
191
|
-
aria-details="${(x) => x.ariaDetails}"
|
|
192
191
|
aria-disabled="${(x) => x.ariaDisabled}"
|
|
193
192
|
aria-expanded="${(x) => x.ariaExpanded}"
|
|
194
|
-
aria-haspopup="${(x) => x.
|
|
193
|
+
aria-haspopup="${(x) => x.ariaHasPopup}"
|
|
195
194
|
aria-hidden="${(x) => x.ariaHidden}"
|
|
196
195
|
aria-invalid="${(x) => x.ariaInvalid}"
|
|
197
|
-
aria-keyshortcuts="${(x) => x.
|
|
196
|
+
aria-keyshortcuts="${(x) => x.ariaKeyShortcuts}"
|
|
198
197
|
aria-label="${(x) => x.ariaLabel}"
|
|
199
198
|
aria-live="${(x) => x.ariaLive}"
|
|
200
199
|
aria-pressed="${(x) => x.ariaPressed}"
|
|
201
200
|
aria-relevant="${(x) => x.ariaRelevant}"
|
|
202
|
-
aria-roledescription="${(x) => x.
|
|
201
|
+
aria-roledescription="${(x) => x.ariaRoleDescription}"
|
|
203
202
|
title="${(x) => x.title}"
|
|
204
203
|
${ref("control")}
|
|
205
204
|
>
|
|
@@ -220,18 +219,16 @@ function renderAnchorContent(context) {
|
|
|
220
219
|
aria-atomic="${(x) => x.ariaAtomic}"
|
|
221
220
|
aria-busy="${(x) => x.ariaBusy}"
|
|
222
221
|
aria-current="${(x) => x.ariaCurrent}"
|
|
223
|
-
aria-details="${(x) => x.ariaDetails}"
|
|
224
222
|
aria-disabled="${(x) => x.ariaDisabled}"
|
|
225
|
-
aria-errormessage="${(x) => x.ariaErrormessage}"
|
|
226
223
|
aria-expanded="${(x) => x.ariaExpanded}"
|
|
227
|
-
aria-haspopup="${(x) => x.
|
|
224
|
+
aria-haspopup="${(x) => x.ariaHasPopup}"
|
|
228
225
|
aria-hidden="${(x) => x.ariaHidden}"
|
|
229
226
|
aria-invalid="${(x) => x.ariaInvalid}"
|
|
230
|
-
aria-keyshortcuts="${(x) => x.
|
|
227
|
+
aria-keyshortcuts="${(x) => x.ariaKeyShortcuts}"
|
|
231
228
|
aria-label="${(x) => x.ariaLabel}"
|
|
232
229
|
aria-live="${(x) => x.ariaLive}"
|
|
233
230
|
aria-relevant="${(x) => x.ariaRelevant}"
|
|
234
|
-
aria-roledescription="${(x) => x.
|
|
231
|
+
aria-roledescription="${(x) => x.ariaRoleDescription}"
|
|
235
232
|
${ref("control")}
|
|
236
233
|
>
|
|
237
234
|
${buttonContent(context)}
|
package/shared/definition14.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const definition$1 = require('./
|
|
4
|
-
const definition = require('./
|
|
3
|
+
const definition$1 = require('./definition28.cjs');
|
|
4
|
+
const definition = require('./definition64.cjs');
|
|
5
5
|
const vividElement = require('./vivid-element.cjs');
|
|
6
6
|
const enums = require('./enums.cjs');
|
|
7
7
|
const when = require('./when.cjs');
|
package/shared/definition14.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as Icon, i as iconDefinition } from './
|
|
2
|
-
import { E as Elevation, e as elevationDefinition } from './
|
|
1
|
+
import { I as Icon, i as iconDefinition } from './definition28.js';
|
|
2
|
+
import { E as Elevation, e as elevationDefinition } from './definition64.js';
|
|
3
3
|
import { V as VividElement, a as attr, o as observable, h as html, d as createRegisterFunction, f as defineVividComponent } from './vivid-element.js';
|
|
4
4
|
import { A as Appearance } from './enums.js';
|
|
5
5
|
import { w as when } from './when.js';
|
package/shared/definition15.cjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const definition = require('./
|
|
3
|
+
const definition = require('./definition28.cjs');
|
|
4
4
|
const vividElement = require('./vivid-element.cjs');
|
|
5
5
|
const applyMixinsWithObservables = require('./applyMixinsWithObservables.cjs');
|
|
6
|
+
const delegatesAria = require('./delegates-aria.cjs');
|
|
6
7
|
const formAssociated = require('./form-associated.cjs');
|
|
7
8
|
const formElements = require('./form-elements.cjs');
|
|
8
9
|
const classNames = require('./class-names.cjs');
|
|
@@ -31,12 +32,10 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
31
32
|
return result;
|
|
32
33
|
};
|
|
33
34
|
const keySpace = " ";
|
|
34
|
-
exports.Checkbox = class Checkbox extends FormAssociatedCheckbox {
|
|
35
|
+
exports.Checkbox = class Checkbox extends delegatesAria.DelegatesAria(FormAssociatedCheckbox) {
|
|
35
36
|
constructor() {
|
|
36
37
|
super();
|
|
37
|
-
this.ariaLabel = null;
|
|
38
38
|
this.tabindex = null;
|
|
39
|
-
this.ariaChecked = null;
|
|
40
39
|
/**
|
|
41
40
|
* The element's value to be included in form submission when checked.
|
|
42
41
|
* Default to "on" to reach parity with input[type="checkbox"]
|
|
@@ -110,18 +109,12 @@ exports.Checkbox = class Checkbox extends FormAssociatedCheckbox {
|
|
|
110
109
|
}
|
|
111
110
|
}
|
|
112
111
|
};
|
|
113
|
-
__decorateClass([
|
|
114
|
-
vividElement.attr({ attribute: "aria-label" })
|
|
115
|
-
], exports.Checkbox.prototype, "ariaLabel", 2);
|
|
116
112
|
__decorateClass([
|
|
117
113
|
vividElement.attr({ attribute: "tabindex" })
|
|
118
114
|
], exports.Checkbox.prototype, "tabindex", 2);
|
|
119
115
|
__decorateClass([
|
|
120
116
|
vividElement.attr
|
|
121
117
|
], exports.Checkbox.prototype, "connotation", 2);
|
|
122
|
-
__decorateClass([
|
|
123
|
-
vividElement.attr({ attribute: "aria-checked" })
|
|
124
|
-
], exports.Checkbox.prototype, "ariaChecked", 2);
|
|
125
118
|
__decorateClass([
|
|
126
119
|
vividElement.attr({ attribute: "readonly", mode: "boolean" })
|
|
127
120
|
], exports.Checkbox.prototype, "readOnly", 2);
|
package/shared/definition15.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { I as Icon, i as iconDefinition } from './
|
|
1
|
+
import { I as Icon, i as iconDefinition } from './definition28.js';
|
|
2
2
|
import { V as VividElement, a as attr, o as observable, h as html, d as createRegisterFunction, f as defineVividComponent } from './vivid-element.js';
|
|
3
3
|
import { a as applyMixinsWithObservables } from './applyMixinsWithObservables.js';
|
|
4
|
+
import { D as DelegatesAria } from './delegates-aria.js';
|
|
4
5
|
import { C as CheckableFormAssociated } from './form-associated.js';
|
|
5
6
|
import { e as errorText, f as formElements, F as FormElementSuccessText, a as FormElementHelperText, g as getFeedbackTemplate } from './form-elements.js';
|
|
6
7
|
import { c as classNames } from './class-names.js';
|
|
@@ -29,12 +30,10 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
29
30
|
return result;
|
|
30
31
|
};
|
|
31
32
|
const keySpace = " ";
|
|
32
|
-
let Checkbox = class extends FormAssociatedCheckbox {
|
|
33
|
+
let Checkbox = class extends DelegatesAria(FormAssociatedCheckbox) {
|
|
33
34
|
constructor() {
|
|
34
35
|
super();
|
|
35
|
-
this.ariaLabel = null;
|
|
36
36
|
this.tabindex = null;
|
|
37
|
-
this.ariaChecked = null;
|
|
38
37
|
/**
|
|
39
38
|
* The element's value to be included in form submission when checked.
|
|
40
39
|
* Default to "on" to reach parity with input[type="checkbox"]
|
|
@@ -108,18 +107,12 @@ let Checkbox = class extends FormAssociatedCheckbox {
|
|
|
108
107
|
}
|
|
109
108
|
}
|
|
110
109
|
};
|
|
111
|
-
__decorateClass([
|
|
112
|
-
attr({ attribute: "aria-label" })
|
|
113
|
-
], Checkbox.prototype, "ariaLabel", 2);
|
|
114
110
|
__decorateClass([
|
|
115
111
|
attr({ attribute: "tabindex" })
|
|
116
112
|
], Checkbox.prototype, "tabindex", 2);
|
|
117
113
|
__decorateClass([
|
|
118
114
|
attr
|
|
119
115
|
], Checkbox.prototype, "connotation", 2);
|
|
120
|
-
__decorateClass([
|
|
121
|
-
attr({ attribute: "aria-checked" })
|
|
122
|
-
], Checkbox.prototype, "ariaChecked", 2);
|
|
123
116
|
__decorateClass([
|
|
124
117
|
attr({ attribute: "readonly", mode: "boolean" })
|
|
125
118
|
], Checkbox.prototype, "readOnly", 2);
|
package/shared/definition16.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const definition$2 = require('./
|
|
4
|
-
const definition = require('./
|
|
5
|
-
const definition$3 = require('./
|
|
6
|
-
const textField = require('./text-
|
|
3
|
+
const definition$2 = require('./definition28.cjs');
|
|
4
|
+
const definition = require('./definition65.cjs');
|
|
5
|
+
const definition$3 = require('./definition36.cjs');
|
|
6
|
+
const textField = require('./text-field.cjs');
|
|
7
7
|
const vividElement = require('./vivid-element.cjs');
|
|
8
8
|
const applyMixinsWithObservables = require('./applyMixinsWithObservables.cjs');
|
|
9
9
|
const listbox = require('./listbox.cjs');
|
|
@@ -19,7 +19,7 @@ const slotted = require('./slotted.cjs');
|
|
|
19
19
|
const classNames = require('./class-names.cjs');
|
|
20
20
|
const when = require('./when.cjs');
|
|
21
21
|
|
|
22
|
-
const styles = ".chevron{display:flex;flex-shrink:0;font:var(--vvd-typography-base-extended);transform:rotate(0);transition:transform .2s}:host([aria-expanded=true]) .chevron,:host([open]) .chevron{transform:rotate(180deg)}:host{position:relative;display:inline-flex;flex-direction:column;gap:4px}.base{--_text-field-gutter-end: 8px}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--_connotation-color-intermediate)}.base.appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--_connotation-color-fierce)}.base:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)).appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.base:where(.disabled,:disabled){--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.base:where(.disabled,:disabled).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.readonly):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: var(--vvd-color-neutral-400)}.base:where(.readonly):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-600);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.error):where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: var(--vvd-color-alert-500)}.base:where(.error):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: transparent}.base:where(.success):where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: var(--vvd-color-success-500)}.base:where(.success):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: transparent}.base:not(.shape-pill) .base{border-radius:var(--_text-field-border-radius)}.base.shape-pill .base{border-radius:var(--_text-field-pill-border-radius)}.base slot[name=icon]{position:absolute;z-index:1;display:inline-block;color:var(--_low-ink-color);font-size:var(--_text-field-icon-size);inset-block-start:50%;inset-inline-start:var(--_text-field-gutter-start);line-height:1;pointer-events:none;transform:translateY(-50%)}.base.has-meta{padding-inline-end:16px}.control{text-overflow:ellipsis;white-space:nowrap}.fieldset .leading-items-wrapper{position:relative;display:flex;flex-shrink:0;align-items:center;gap:8px;padding-inline-end:16px}
|
|
22
|
+
const styles = ".chevron{display:flex;flex-shrink:0;font:var(--vvd-typography-base-extended);transform:rotate(0);transition:transform .2s}:host([aria-expanded=true]) .chevron,:host([open]) .chevron{transform:rotate(180deg)}:not(.disabled) .chevron{cursor:pointer}.disabled .chevron{color:var(--_low-ink-color);cursor:not-allowed}:host{position:relative;display:inline-flex;flex-direction:column;gap:4px;--_low-ink-color: var(--vvd-color-neutral-600)}:host([disabled]){--_low-ink-color: var(--vvd-color-neutral-400);cursor:not-allowed}.base{--_text-field-gutter-end: 8px}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--_connotation-color-intermediate)}.base.appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--_connotation-color-fierce)}.base:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)).appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.base:where(.disabled,:disabled){--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.base:where(.disabled,:disabled).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.readonly):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: var(--vvd-color-neutral-400)}.base:where(.readonly):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-600);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.error):where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: var(--vvd-color-alert-500)}.base:where(.error):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: transparent}.base:where(.success):where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: var(--vvd-color-success-500)}.base:where(.success):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: transparent}.base:not(.shape-pill) .base{border-radius:var(--_text-field-border-radius)}.base.shape-pill .base{border-radius:var(--_text-field-pill-border-radius)}.base slot[name=icon]{position:absolute;z-index:1;display:inline-block;color:var(--_low-ink-color);font-size:var(--_text-field-icon-size);inset-block-start:50%;inset-inline-start:var(--_text-field-gutter-start);line-height:1;pointer-events:none;transform:translateY(-50%)}.base.has-meta{padding-inline-end:16px}.control{text-overflow:ellipsis;white-space:nowrap}.fieldset .leading-items-wrapper{position:relative;display:flex;flex-shrink:0;align-items:center;gap:8px;padding-inline-end:16px}.listbox{display:flex;max-height:var(--combobox-height, 408px);flex-direction:column;padding:4px;border-radius:8px;contain:paint;gap:2px;overflow-y:auto}::part(popup-base){inline-size:max-content;min-inline-size:var(--_combobox-fixed-width, 100%)}@supports selector(:has(*)){.fieldset:has(.control:focus-within):after{--focus-stroke-gap-color: transparent;box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px))}}@supports not selector(:has(*)){.fieldset:focus-within:after{box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px));--focus-stroke-gap-color: transparent;position:absolute;z-index:1;display:block;border-radius:inherit;content:\"\";inset:0;pointer-events:none}}";
|
|
23
23
|
|
|
24
24
|
class _Combobox extends listbox.Listbox {
|
|
25
25
|
}
|
|
@@ -102,7 +102,7 @@ exports.Combobox = class Combobox extends FormAssociatedCombobox {
|
|
|
102
102
|
return this.autocomplete === ComboboxAutocomplete.both;
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
|
-
* Sets focus
|
|
105
|
+
* Sets focus when the open property changes.
|
|
106
106
|
*
|
|
107
107
|
* @param prev - the previous open value
|
|
108
108
|
* @param next - the current open value
|
|
@@ -111,14 +111,10 @@ exports.Combobox = class Combobox extends FormAssociatedCombobox {
|
|
|
111
111
|
*/
|
|
112
112
|
openChanged() {
|
|
113
113
|
if (this.open) {
|
|
114
|
-
this.ariaControls = this.listboxId;
|
|
115
|
-
this.ariaExpanded = "true";
|
|
116
114
|
this.focusAndScrollOptionIntoView();
|
|
117
115
|
vividElement.DOM.queueUpdate(() => this.focus());
|
|
118
116
|
return;
|
|
119
117
|
}
|
|
120
|
-
this.ariaControls = "";
|
|
121
|
-
this.ariaExpanded = "false";
|
|
122
118
|
}
|
|
123
119
|
/**
|
|
124
120
|
* The list of options.
|
|
@@ -181,14 +177,14 @@ exports.Combobox = class Combobox extends FormAssociatedCombobox {
|
|
|
181
177
|
return;
|
|
182
178
|
}
|
|
183
179
|
if (this.open) {
|
|
184
|
-
const
|
|
180
|
+
const capturedOption = e.target.closest(
|
|
185
181
|
`option,[role=option]`
|
|
186
182
|
);
|
|
187
|
-
if (!
|
|
183
|
+
if (!capturedOption || capturedOption.disabled) {
|
|
188
184
|
return;
|
|
189
185
|
}
|
|
190
|
-
this.selectedOptions = [
|
|
191
|
-
this.control.value =
|
|
186
|
+
this.selectedOptions = [capturedOption];
|
|
187
|
+
this.control.value = capturedOption.text;
|
|
192
188
|
this.clearSelectionRange();
|
|
193
189
|
this.updateValue(true);
|
|
194
190
|
}
|
|
@@ -198,6 +194,17 @@ exports.Combobox = class Combobox extends FormAssociatedCombobox {
|
|
|
198
194
|
}
|
|
199
195
|
return true;
|
|
200
196
|
}
|
|
197
|
+
/**
|
|
198
|
+
* Handle closing the listbox when the combobox is open and the chevron icon is clicked.
|
|
199
|
+
*
|
|
200
|
+
* @param e - the mouse event
|
|
201
|
+
* @internal
|
|
202
|
+
*/
|
|
203
|
+
_chevronIconClickHandler(e) {
|
|
204
|
+
if (!this.open) return;
|
|
205
|
+
e.stopPropagation();
|
|
206
|
+
this.open = false;
|
|
207
|
+
}
|
|
201
208
|
connectedCallback() {
|
|
202
209
|
super.connectedCallback();
|
|
203
210
|
if (this.value) {
|
|
@@ -205,20 +212,6 @@ exports.Combobox = class Combobox extends FormAssociatedCombobox {
|
|
|
205
212
|
}
|
|
206
213
|
this._popup.anchor = this._anchor;
|
|
207
214
|
}
|
|
208
|
-
/**
|
|
209
|
-
* Synchronize the `aria-disabled` property when the `disabled` property changes.
|
|
210
|
-
*
|
|
211
|
-
* @param prev - The previous disabled value
|
|
212
|
-
* @param next - The next disabled value
|
|
213
|
-
*
|
|
214
|
-
* @internal
|
|
215
|
-
*/
|
|
216
|
-
disabledChanged(prev, next) {
|
|
217
|
-
if (super.disabledChanged) {
|
|
218
|
-
super.disabledChanged(prev, next);
|
|
219
|
-
}
|
|
220
|
-
this.ariaDisabled = this.disabled ? "true" : "false";
|
|
221
|
-
}
|
|
222
215
|
/**
|
|
223
216
|
* Filter available options by text value.
|
|
224
217
|
*
|
|
@@ -599,10 +592,9 @@ function renderInput(context) {
|
|
|
599
592
|
id="control"
|
|
600
593
|
autocomplete="off"
|
|
601
594
|
class="control"
|
|
602
|
-
aria-activedescendant="${(x) => x.open ? x.
|
|
595
|
+
aria-activedescendant="${(x) => x.open ? x._activeDescendant : null}"
|
|
603
596
|
aria-autocomplete="${(x) => x.autocomplete}"
|
|
604
597
|
aria-controls="${(x) => x.listboxId}"
|
|
605
|
-
aria-disabled="${(x) => x.ariaDisabled}"
|
|
606
598
|
aria-expanded="${(x) => x.open}"
|
|
607
599
|
aria-haspopup="listbox"
|
|
608
600
|
placeholder="${(x) => x.placeholder}"
|
|
@@ -616,7 +608,11 @@ function renderInput(context) {
|
|
|
616
608
|
</div>
|
|
617
609
|
<div class="leading-items-wrapper">
|
|
618
610
|
<slot name="meta" ${slotted.slotted("metaSlottedContent")}></slot>
|
|
619
|
-
|
|
611
|
+
<div
|
|
612
|
+
@click="${(x, c) => x._chevronIconClickHandler(c.event)}"
|
|
613
|
+
>
|
|
614
|
+
${chevronTemplate}
|
|
615
|
+
</div>
|
|
620
616
|
</div>
|
|
621
617
|
</div>
|
|
622
618
|
</div>`;
|
|
@@ -625,8 +621,6 @@ const comboboxTemplate = (context) => {
|
|
|
625
621
|
const popupTag = context.tagFor(definition.Popup);
|
|
626
622
|
return vividElement.html`
|
|
627
623
|
<template
|
|
628
|
-
aria-disabled="${(x) => x.ariaDisabled}"
|
|
629
|
-
autocomplete="${(x) => x.autocomplete}"
|
|
630
624
|
tabindex="${(x) => !x.disabled ? "0" : null}"
|
|
631
625
|
@click="${(x, c) => x.clickHandler(c.event)}"
|
|
632
626
|
@focusout="${(x, c) => x.focusoutHandler(c.event)}"
|
|
@@ -635,6 +629,7 @@ const comboboxTemplate = (context) => {
|
|
|
635
629
|
return x.keydownHandler(event);
|
|
636
630
|
}}"
|
|
637
631
|
>
|
|
632
|
+
<div class="control-wrapper">
|
|
638
633
|
${() => renderInput(context)}
|
|
639
634
|
<${popupTag} class="popup"
|
|
640
635
|
style="${setFixedDropdownVarWidth}"
|
|
@@ -655,6 +650,7 @@ const comboboxTemplate = (context) => {
|
|
|
655
650
|
</slot>
|
|
656
651
|
</div>
|
|
657
652
|
</${popupTag}>
|
|
653
|
+
</div>
|
|
658
654
|
<div class="feedback-wrapper" @click="${(_, c) => c.event.stopPropagation()}">
|
|
659
655
|
${formElements.getFeedbackTemplate(context)}
|
|
660
656
|
</div>
|
package/shared/definition16.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as iconDefinition } from './
|
|
2
|
-
import { P as Popup, p as popupDefinition } from './
|
|
3
|
-
import { l as listboxOptionDefinition } from './
|
|
4
|
-
import { s as styles$1 } from './text-
|
|
1
|
+
import { i as iconDefinition } from './definition28.js';
|
|
2
|
+
import { P as Popup, p as popupDefinition } from './definition65.js';
|
|
3
|
+
import { l as listboxOptionDefinition } from './definition36.js';
|
|
4
|
+
import { s as styles$1 } from './text-field.js';
|
|
5
5
|
import { D as DOM, O as Observable, a as attr, o as observable, h as html, d as createRegisterFunction, f as defineVividComponent } from './vivid-element.js';
|
|
6
6
|
import { a as applyMixinsWithObservables } from './applyMixinsWithObservables.js';
|
|
7
7
|
import { L as Listbox } from './listbox.js';
|
|
@@ -17,7 +17,7 @@ import { s as slotted } from './slotted.js';
|
|
|
17
17
|
import { c as classNames } from './class-names.js';
|
|
18
18
|
import { w as when } from './when.js';
|
|
19
19
|
|
|
20
|
-
const styles = ".chevron{display:flex;flex-shrink:0;font:var(--vvd-typography-base-extended);transform:rotate(0);transition:transform .2s}:host([aria-expanded=true]) .chevron,:host([open]) .chevron{transform:rotate(180deg)}:host{position:relative;display:inline-flex;flex-direction:column;gap:4px}.base{--_text-field-gutter-end: 8px}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--_connotation-color-intermediate)}.base.appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--_connotation-color-fierce)}.base:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)).appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.base:where(.disabled,:disabled){--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.base:where(.disabled,:disabled).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.readonly):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: var(--vvd-color-neutral-400)}.base:where(.readonly):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-600);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.error):where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: var(--vvd-color-alert-500)}.base:where(.error):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: transparent}.base:where(.success):where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: var(--vvd-color-success-500)}.base:where(.success):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: transparent}.base:not(.shape-pill) .base{border-radius:var(--_text-field-border-radius)}.base.shape-pill .base{border-radius:var(--_text-field-pill-border-radius)}.base slot[name=icon]{position:absolute;z-index:1;display:inline-block;color:var(--_low-ink-color);font-size:var(--_text-field-icon-size);inset-block-start:50%;inset-inline-start:var(--_text-field-gutter-start);line-height:1;pointer-events:none;transform:translateY(-50%)}.base.has-meta{padding-inline-end:16px}.control{text-overflow:ellipsis;white-space:nowrap}.fieldset .leading-items-wrapper{position:relative;display:flex;flex-shrink:0;align-items:center;gap:8px;padding-inline-end:16px}
|
|
20
|
+
const styles = ".chevron{display:flex;flex-shrink:0;font:var(--vvd-typography-base-extended);transform:rotate(0);transition:transform .2s}:host([aria-expanded=true]) .chevron,:host([open]) .chevron{transform:rotate(180deg)}:not(.disabled) .chevron{cursor:pointer}.disabled .chevron{color:var(--_low-ink-color);cursor:not-allowed}:host{position:relative;display:inline-flex;flex-direction:column;gap:4px;--_low-ink-color: var(--vvd-color-neutral-600)}:host([disabled]){--_low-ink-color: var(--vvd-color-neutral-400);cursor:not-allowed}.base{--_text-field-gutter-end: 8px}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--_connotation-color-intermediate)}.base.appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--_connotation-color-fierce)}.base:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)).appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.base:where(.disabled,:disabled){--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.base:where(.disabled,:disabled).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.readonly):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: var(--vvd-color-neutral-400)}.base:where(.readonly):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-600);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.error):where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: var(--vvd-color-alert-500)}.base:where(.error):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: transparent}.base:where(.success):where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: var(--vvd-color-success-500)}.base:where(.success):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: transparent}.base:not(.shape-pill) .base{border-radius:var(--_text-field-border-radius)}.base.shape-pill .base{border-radius:var(--_text-field-pill-border-radius)}.base slot[name=icon]{position:absolute;z-index:1;display:inline-block;color:var(--_low-ink-color);font-size:var(--_text-field-icon-size);inset-block-start:50%;inset-inline-start:var(--_text-field-gutter-start);line-height:1;pointer-events:none;transform:translateY(-50%)}.base.has-meta{padding-inline-end:16px}.control{text-overflow:ellipsis;white-space:nowrap}.fieldset .leading-items-wrapper{position:relative;display:flex;flex-shrink:0;align-items:center;gap:8px;padding-inline-end:16px}.listbox{display:flex;max-height:var(--combobox-height, 408px);flex-direction:column;padding:4px;border-radius:8px;contain:paint;gap:2px;overflow-y:auto}::part(popup-base){inline-size:max-content;min-inline-size:var(--_combobox-fixed-width, 100%)}@supports selector(:has(*)){.fieldset:has(.control:focus-within):after{--focus-stroke-gap-color: transparent;box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px))}}@supports not selector(:has(*)){.fieldset:focus-within:after{box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px));--focus-stroke-gap-color: transparent;position:absolute;z-index:1;display:block;border-radius:inherit;content:\"\";inset:0;pointer-events:none}}";
|
|
21
21
|
|
|
22
22
|
class _Combobox extends Listbox {
|
|
23
23
|
}
|
|
@@ -100,7 +100,7 @@ let Combobox = class extends FormAssociatedCombobox {
|
|
|
100
100
|
return this.autocomplete === ComboboxAutocomplete.both;
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
|
-
* Sets focus
|
|
103
|
+
* Sets focus when the open property changes.
|
|
104
104
|
*
|
|
105
105
|
* @param prev - the previous open value
|
|
106
106
|
* @param next - the current open value
|
|
@@ -109,14 +109,10 @@ let Combobox = class extends FormAssociatedCombobox {
|
|
|
109
109
|
*/
|
|
110
110
|
openChanged() {
|
|
111
111
|
if (this.open) {
|
|
112
|
-
this.ariaControls = this.listboxId;
|
|
113
|
-
this.ariaExpanded = "true";
|
|
114
112
|
this.focusAndScrollOptionIntoView();
|
|
115
113
|
DOM.queueUpdate(() => this.focus());
|
|
116
114
|
return;
|
|
117
115
|
}
|
|
118
|
-
this.ariaControls = "";
|
|
119
|
-
this.ariaExpanded = "false";
|
|
120
116
|
}
|
|
121
117
|
/**
|
|
122
118
|
* The list of options.
|
|
@@ -179,14 +175,14 @@ let Combobox = class extends FormAssociatedCombobox {
|
|
|
179
175
|
return;
|
|
180
176
|
}
|
|
181
177
|
if (this.open) {
|
|
182
|
-
const
|
|
178
|
+
const capturedOption = e.target.closest(
|
|
183
179
|
`option,[role=option]`
|
|
184
180
|
);
|
|
185
|
-
if (!
|
|
181
|
+
if (!capturedOption || capturedOption.disabled) {
|
|
186
182
|
return;
|
|
187
183
|
}
|
|
188
|
-
this.selectedOptions = [
|
|
189
|
-
this.control.value =
|
|
184
|
+
this.selectedOptions = [capturedOption];
|
|
185
|
+
this.control.value = capturedOption.text;
|
|
190
186
|
this.clearSelectionRange();
|
|
191
187
|
this.updateValue(true);
|
|
192
188
|
}
|
|
@@ -196,6 +192,17 @@ let Combobox = class extends FormAssociatedCombobox {
|
|
|
196
192
|
}
|
|
197
193
|
return true;
|
|
198
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* Handle closing the listbox when the combobox is open and the chevron icon is clicked.
|
|
197
|
+
*
|
|
198
|
+
* @param e - the mouse event
|
|
199
|
+
* @internal
|
|
200
|
+
*/
|
|
201
|
+
_chevronIconClickHandler(e) {
|
|
202
|
+
if (!this.open) return;
|
|
203
|
+
e.stopPropagation();
|
|
204
|
+
this.open = false;
|
|
205
|
+
}
|
|
199
206
|
connectedCallback() {
|
|
200
207
|
super.connectedCallback();
|
|
201
208
|
if (this.value) {
|
|
@@ -203,20 +210,6 @@ let Combobox = class extends FormAssociatedCombobox {
|
|
|
203
210
|
}
|
|
204
211
|
this._popup.anchor = this._anchor;
|
|
205
212
|
}
|
|
206
|
-
/**
|
|
207
|
-
* Synchronize the `aria-disabled` property when the `disabled` property changes.
|
|
208
|
-
*
|
|
209
|
-
* @param prev - The previous disabled value
|
|
210
|
-
* @param next - The next disabled value
|
|
211
|
-
*
|
|
212
|
-
* @internal
|
|
213
|
-
*/
|
|
214
|
-
disabledChanged(prev, next) {
|
|
215
|
-
if (super.disabledChanged) {
|
|
216
|
-
super.disabledChanged(prev, next);
|
|
217
|
-
}
|
|
218
|
-
this.ariaDisabled = this.disabled ? "true" : "false";
|
|
219
|
-
}
|
|
220
213
|
/**
|
|
221
214
|
* Filter available options by text value.
|
|
222
215
|
*
|
|
@@ -597,10 +590,9 @@ function renderInput(context) {
|
|
|
597
590
|
id="control"
|
|
598
591
|
autocomplete="off"
|
|
599
592
|
class="control"
|
|
600
|
-
aria-activedescendant="${(x) => x.open ? x.
|
|
593
|
+
aria-activedescendant="${(x) => x.open ? x._activeDescendant : null}"
|
|
601
594
|
aria-autocomplete="${(x) => x.autocomplete}"
|
|
602
595
|
aria-controls="${(x) => x.listboxId}"
|
|
603
|
-
aria-disabled="${(x) => x.ariaDisabled}"
|
|
604
596
|
aria-expanded="${(x) => x.open}"
|
|
605
597
|
aria-haspopup="listbox"
|
|
606
598
|
placeholder="${(x) => x.placeholder}"
|
|
@@ -614,7 +606,11 @@ function renderInput(context) {
|
|
|
614
606
|
</div>
|
|
615
607
|
<div class="leading-items-wrapper">
|
|
616
608
|
<slot name="meta" ${slotted("metaSlottedContent")}></slot>
|
|
617
|
-
|
|
609
|
+
<div
|
|
610
|
+
@click="${(x, c) => x._chevronIconClickHandler(c.event)}"
|
|
611
|
+
>
|
|
612
|
+
${chevronTemplate}
|
|
613
|
+
</div>
|
|
618
614
|
</div>
|
|
619
615
|
</div>
|
|
620
616
|
</div>`;
|
|
@@ -623,8 +619,6 @@ const comboboxTemplate = (context) => {
|
|
|
623
619
|
const popupTag = context.tagFor(Popup);
|
|
624
620
|
return html`
|
|
625
621
|
<template
|
|
626
|
-
aria-disabled="${(x) => x.ariaDisabled}"
|
|
627
|
-
autocomplete="${(x) => x.autocomplete}"
|
|
628
622
|
tabindex="${(x) => !x.disabled ? "0" : null}"
|
|
629
623
|
@click="${(x, c) => x.clickHandler(c.event)}"
|
|
630
624
|
@focusout="${(x, c) => x.focusoutHandler(c.event)}"
|
|
@@ -633,6 +627,7 @@ const comboboxTemplate = (context) => {
|
|
|
633
627
|
return x.keydownHandler(event);
|
|
634
628
|
}}"
|
|
635
629
|
>
|
|
630
|
+
<div class="control-wrapper">
|
|
636
631
|
${() => renderInput(context)}
|
|
637
632
|
<${popupTag} class="popup"
|
|
638
633
|
style="${setFixedDropdownVarWidth}"
|
|
@@ -653,6 +648,7 @@ const comboboxTemplate = (context) => {
|
|
|
653
648
|
</slot>
|
|
654
649
|
</div>
|
|
655
650
|
</${popupTag}>
|
|
651
|
+
</div>
|
|
656
652
|
<div class="feedback-wrapper" @click="${(_, c) => c.event.stopPropagation()}">
|
|
657
653
|
${getFeedbackTemplate(context)}
|
|
658
654
|
</div>
|
package/shared/definition17.cjs
CHANGED
package/shared/definition17.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as Icon, i as iconDefinition } from './
|
|
1
|
+
import { I as Icon, i as iconDefinition } from './definition28.js';
|
|
2
2
|
import { V as VividElement, D as DOM, O as Observable, a as attr, o as observable, h as html, d as createRegisterFunction, f as defineVividComponent } from './vivid-element.js';
|
|
3
3
|
import { R as RepeatDirective } from './repeat.js';
|
|
4
4
|
import { d as keyEnd, g as keyHome, j as keyPageDown, l as keyPageUp, f as keyArrowDown, e as keyArrowUp, i as keyArrowRight, h as keyArrowLeft, b as keyEscape, m as keyFunction2, k as keyEnter, a as keySpace } from './key-codes.js';
|