@vonage/vivid 4.14.1 → 4.14.3
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 +393 -201
- package/index.cjs +1 -0
- package/index.js +1 -1
- package/lib/accordion/definition.d.ts +5 -1
- package/lib/combobox/combobox.d.ts +5 -1
- package/lib/divider/divider.d.ts +1 -1
- package/lib/divider/divider.template.d.ts +1 -1
- package/lib/file-picker/file-picker.d.ts +1 -0
- package/lib/menu-item/definition.d.ts +1 -1
- package/lib/menu-item/menu-item-role.d.ts +7 -0
- package/lib/menu-item/menu-item.d.ts +1 -7
- package/lib/number-field/number-field.d.ts +1 -1
- package/lib/radio/radio.d.ts +2 -2
- package/lib/searchable-select/option-tag.d.ts +2 -2
- package/lib/select/select.form-associated.d.ts +1 -1
- package/lib/switch/switch.d.ts +1 -0
- package/lib/tabs/tabs.d.ts +5 -1
- package/lib/text-anchor/text-anchor.d.ts +1 -1
- package/lib/tree-item/tree-item.d.ts +1 -1
- package/lib/tree-view/tree-view.d.ts +1 -1
- package/package.json +1 -1
- package/shared/affix.js +1 -1
- package/shared/applyMixinsWithObservables.cjs +1 -1
- package/shared/applyMixinsWithObservables.js +1 -1
- package/shared/definition.js +1 -1
- package/shared/definition11.cjs +1 -1
- package/shared/definition11.js +2 -2
- package/shared/definition16.cjs +64 -32
- package/shared/definition16.js +62 -30
- package/shared/definition17.cjs +9 -7
- package/shared/definition17.js +9 -7
- package/shared/definition2.cjs +9 -4
- package/shared/definition2.js +9 -5
- package/shared/definition22.cjs +2 -1
- package/shared/definition22.js +2 -1
- package/shared/definition24.js +1 -1
- package/shared/definition25.cjs +25 -18
- package/shared/definition25.js +26 -19
- package/shared/definition27.cjs +1 -1
- package/shared/definition27.js +1 -1
- package/shared/definition29.cjs +12 -30
- package/shared/definition29.js +13 -31
- package/shared/definition30.js +1 -1
- package/shared/definition31.js +1 -1
- package/shared/definition33.cjs +1 -1
- package/shared/definition33.js +2 -2
- package/shared/definition34.cjs +7 -228
- package/shared/definition34.js +5 -226
- package/shared/definition35.cjs +2 -201
- package/shared/definition35.js +4 -201
- package/shared/definition4.js +1 -1
- package/shared/definition41.cjs +1 -1
- package/shared/definition41.js +1 -1
- package/shared/definition42.cjs +2 -3
- package/shared/definition42.js +3 -4
- package/shared/definition43.cjs +10 -11
- package/shared/definition43.js +6 -7
- package/shared/definition46.cjs +2 -2
- package/shared/definition46.js +3 -3
- package/shared/definition47.js +1 -1
- package/shared/definition48.cjs +22 -15
- package/shared/definition48.js +22 -15
- package/shared/definition5.cjs +3 -2
- package/shared/definition5.js +3 -2
- package/shared/definition50.js +1 -1
- package/shared/definition51.cjs +14 -383
- package/shared/definition51.js +17 -386
- package/shared/definition53.js +1 -1
- package/shared/definition54.js +1 -1
- package/shared/definition56.js +1 -1
- package/shared/definition59.js +1 -1
- package/shared/definition7.js +1 -1
- package/shared/definition8.js +1 -1
- package/shared/direction.cjs +2 -16
- package/shared/direction.js +3 -17
- package/shared/foundation/utilities/direction.d.ts +2 -0
- package/shared/listbox.cjs +25 -6
- package/shared/listbox.js +22 -3
- package/shared/option.cjs +205 -0
- package/shared/option.js +202 -0
- package/shared/text-anchor.cjs +1 -1
- package/shared/text-anchor.js +2 -2
- package/shared/text-field2.js +2 -2
- package/shared/vivid-element.cjs +0 -2
- package/shared/vivid-element.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/vivid.api.json +70 -3
- package/lib/listbox/definition.d.ts +0 -2
- package/lib/listbox/listbox.d.ts +0 -14
- package/lib/listbox/listbox.template.d.ts +0 -2
- package/listbox/index.cjs +0 -54
- package/listbox/index.js +0 -52
- package/shared/apply-mixins2.cjs +0 -25
- package/shared/apply-mixins2.js +0 -23
- package/shared/aria-global2.cjs +0 -75
- package/shared/aria-global2.js +0 -73
- package/shared/form-associated2.cjs +0 -383
- package/shared/form-associated2.js +0 -381
- package/shared/key-codes2.cjs +0 -1565
- package/shared/key-codes2.js +0 -1551
- package/shared/listbox2.cjs +0 -1267
- package/shared/listbox2.js +0 -1264
- package/shared/strings2.cjs +0 -37
- package/shared/strings2.js +0 -33
package/index.cjs
CHANGED
|
@@ -83,6 +83,7 @@ exports.TabsGutters = enums.TabsGutters;
|
|
|
83
83
|
exports.setLocale = localized.setLocale;
|
|
84
84
|
exports.accordionItemDefinition = definition.accordionItemDefinition;
|
|
85
85
|
exports.registerAccordionItem = definition.registerAccordionItem;
|
|
86
|
+
exports.AccordionExpandMode = definition$1.AccordionExpandMode;
|
|
86
87
|
exports.accordionDefinition = definition$1.accordionDefinition;
|
|
87
88
|
exports.registerAccordion = definition$1.registerAccordion;
|
|
88
89
|
exports.actionGroupDefinition = definition$2.actionGroupDefinition;
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { A as Appearance, c as AriaLive, C as Connotation, a as ConnotationDecorative, I as IconDecoration, L as LayoutSize, M as MediaSkipBy, P as Position, R as Role, S as Shape, b as Size, T as TabsGutters } from './shared/enums.js';
|
|
2
2
|
export { s as setLocale } from './shared/localized.js';
|
|
3
3
|
export { a as accordionItemDefinition, r as registerAccordionItem } from './shared/definition.js';
|
|
4
|
-
export { a as accordionDefinition, r as registerAccordion } from './shared/definition2.js';
|
|
4
|
+
export { A as AccordionExpandMode, a as accordionDefinition, r as registerAccordion } from './shared/definition2.js';
|
|
5
5
|
export { a as actionGroupDefinition, r as registerActionGroup } from './shared/definition3.js';
|
|
6
6
|
export { a as alertDefinition, r as registerAlert } from './shared/definition4.js';
|
|
7
7
|
export { a as audioPlayerDefinition, r as registerAudioPlayer } from './shared/definition5.js';
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare const AccordionExpandMode: {
|
|
2
|
+
readonly single: "single";
|
|
3
|
+
readonly multi: "multi";
|
|
4
|
+
};
|
|
5
|
+
export type AccordionExpandMode = typeof AccordionExpandMode[keyof typeof AccordionExpandMode];
|
|
2
6
|
export declare const registerAccordion: (prefix?: string) => void;
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import type { Popup } from '../popup/popup';
|
|
2
|
-
import type { Appearance } from '../enums';
|
|
2
|
+
import type { Appearance, Shape, Size } from '../enums';
|
|
3
3
|
import { AffixIcon, type FormElement } from '../../shared/patterns';
|
|
4
4
|
import type { ListboxOption } from '../option/option';
|
|
5
5
|
import { FormAssociatedCombobox } from './combobox.form-associated';
|
|
6
6
|
import { ComboboxAutocomplete } from './combobox.options';
|
|
7
7
|
export type PopupPlacement = 'top' | 'bottom';
|
|
8
8
|
export type ComboboxAppearance = Extract<Appearance, Appearance.Fieldset | Appearance.Ghost>;
|
|
9
|
+
export type ComboboxShape = Extract<Shape, Shape.Rounded | Shape.Pill>;
|
|
10
|
+
export type ComboboxSize = Extract<Size, Size.Condensed | Size.Normal>;
|
|
9
11
|
export declare class Combobox extends FormAssociatedCombobox {
|
|
10
12
|
autocomplete: ComboboxAutocomplete | undefined;
|
|
11
13
|
filteredOptions: ListboxOption[];
|
|
12
14
|
appearance?: ComboboxAppearance;
|
|
15
|
+
shape?: ComboboxShape;
|
|
16
|
+
scale?: ComboboxSize;
|
|
13
17
|
placement?: PopupPlacement;
|
|
14
18
|
fixedDropdown: boolean;
|
|
15
19
|
_popup: Popup;
|
package/lib/divider/divider.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Orientation } from '@microsoft/fast-web-utilities';
|
|
2
2
|
import { VividElement } from '../../shared/foundation/vivid-element/vivid-element';
|
|
3
|
-
declare const DividerRole: {
|
|
3
|
+
export declare const DividerRole: {
|
|
4
4
|
readonly separator: "separator";
|
|
5
5
|
readonly presentation: "presentation";
|
|
6
6
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Divider } from './divider';
|
|
2
2
|
export declare const DividerTemplate: import("@microsoft/fast-element").ViewTemplate<Divider, any>;
|
|
@@ -22,6 +22,7 @@ export declare class FilePicker extends FormAssociatedFilePicker {
|
|
|
22
22
|
fileTooBigErrorChanged(_oldValue: string, newValue: string): void;
|
|
23
23
|
nameChanged(previous: string, next: string): void;
|
|
24
24
|
private buttonTag;
|
|
25
|
+
private iconTag;
|
|
25
26
|
constructor();
|
|
26
27
|
connectedCallback(): void;
|
|
27
28
|
disconnectedCallback(): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const MenuItemRole: {
|
|
2
|
+
readonly menuitem: "menuitem";
|
|
3
|
+
readonly menuitemcheckbox: "menuitemcheckbox";
|
|
4
|
+
readonly menuitemradio: "menuitemradio";
|
|
5
|
+
readonly presentation: "presentation";
|
|
6
|
+
};
|
|
7
|
+
export type MenuItemRole = typeof MenuItemRole[keyof typeof MenuItemRole];
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { AffixIcon } from '../../shared/patterns/affix';
|
|
2
2
|
import { Connotation } from '../enums';
|
|
3
3
|
import { VividElement } from '../../shared/foundation/vivid-element/vivid-element';
|
|
4
|
-
|
|
5
|
-
readonly presentation: "presentation";
|
|
6
|
-
readonly menuitem: "menuitem";
|
|
7
|
-
readonly menuitemcheckbox: "menuitemcheckbox";
|
|
8
|
-
readonly menuitemradio: "menuitemradio";
|
|
9
|
-
};
|
|
10
|
-
export type MenuItemRole = typeof MenuItemRole[keyof typeof MenuItemRole];
|
|
4
|
+
import { MenuItemRole } from './menu-item-role';
|
|
11
5
|
export declare enum CheckAppearance {
|
|
12
6
|
Normal = "normal",
|
|
13
7
|
TickOnly = "tick-only"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DelegatesARIATextbox } from '@microsoft/fast-foundation';
|
|
2
1
|
import type { Appearance, Shape, Size } from '../enums';
|
|
2
|
+
import { DelegatesARIATextbox } from '../text-field/text-field';
|
|
3
3
|
import { AffixIcon, type ErrorText, type FormElement, FormElementCharCount, FormElementHelperText, FormElementSuccessText, Localized } from '../../shared/patterns';
|
|
4
4
|
import { FormAssociatedNumberField } from './number-field.form-associated';
|
|
5
5
|
export type NumberFieldAppearance = Extract<Appearance, Appearance.Fieldset | Appearance.Ghost>;
|
package/lib/radio/radio.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type SyntheticViewTemplate } from '@microsoft/fast-element';
|
|
2
|
-
import {
|
|
2
|
+
import type { VividComponentDefinition } from '../../shared/design-system/defineVividComponent.js';
|
|
3
3
|
import type { Connotation } from '../enums.js';
|
|
4
4
|
import { FormAssociatedRadio } from './radio.form-associated';
|
|
5
5
|
export type RadioConnotation = Extract<Connotation, Connotation.Accent | Connotation.CTA>;
|
|
6
6
|
export type RadioControl = Pick<HTMLInputElement, 'checked' | 'disabled' | 'readOnly' | 'focus' | 'setAttribute' | 'getAttribute'>;
|
|
7
|
-
export type RadioOptions =
|
|
7
|
+
export type RadioOptions = VividComponentDefinition & {
|
|
8
8
|
checkedIndicator?: string | SyntheticViewTemplate;
|
|
9
9
|
};
|
|
10
10
|
export declare class Radio extends FormAssociatedRadio {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { VividElement } from '../../shared/foundation/vivid-element/vivid-element';
|
|
2
2
|
import { Shape } from '../enums';
|
|
3
3
|
import { Localized } from '../../shared/patterns';
|
|
4
4
|
export type OptionTagShape = Extract<Shape, Shape.Rounded | Shape.Pill>;
|
|
5
|
-
export declare class OptionTag extends
|
|
5
|
+
export declare class OptionTag extends VividElement {
|
|
6
6
|
shape?: OptionTagShape;
|
|
7
7
|
label?: string;
|
|
8
8
|
removable: boolean;
|
package/lib/switch/switch.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { Connotation } from '../enums';
|
|
|
2
2
|
import { FormAssociatedSwitch } from './switch.form-associated';
|
|
3
3
|
export type SwitchConnotation = Connotation.Accent | Connotation.Alert | Connotation.Announcement | Connotation.Success | Connotation.CTA;
|
|
4
4
|
export declare class Switch extends FormAssociatedSwitch {
|
|
5
|
+
ariaLabel: string | null;
|
|
5
6
|
label?: string;
|
|
6
7
|
connotation?: SwitchConnotation;
|
|
7
8
|
readOnly: boolean;
|
package/lib/tabs/tabs.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { TabsOrientation } from '@microsoft/fast-foundation';
|
|
2
1
|
import type { Connotation, TabsGutters } from '../enums.js';
|
|
3
2
|
import { VividElement } from '../../shared/foundation/vivid-element/vivid-element';
|
|
4
3
|
export declare const ACTIVE_TAB_WIDTH = "--_tabs-active-tab-inline-size";
|
|
5
4
|
export declare const TABLIST_COLUMN = "--_tabs-tablist-column";
|
|
6
5
|
export type TabsConnotation = Extract<Connotation, Connotation.Accent | Connotation.CTA>;
|
|
6
|
+
export declare const TabsOrientation: {
|
|
7
|
+
readonly vertical: "vertical";
|
|
8
|
+
readonly horizontal: "horizontal";
|
|
9
|
+
};
|
|
10
|
+
export type TabsOrientation = typeof TabsOrientation[keyof typeof TabsOrientation];
|
|
7
11
|
export declare class Tabs extends VividElement {
|
|
8
12
|
#private;
|
|
9
13
|
orientation: TabsOrientation;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { VividElement } from '../../shared/foundation/vivid-element/vivid-element';
|
|
1
2
|
import { Appearance, Connotation } from '../enums';
|
|
2
3
|
import { AffixIcon } from '../../shared/patterns/affix';
|
|
3
4
|
import { Anchor } from '../../shared/foundation/anchor/anchor';
|
|
4
|
-
import { VividElement } from '../../shared/foundation/vivid-element/vivid-element';
|
|
5
5
|
export type TextAnchorConnotation = Extract<Connotation, Connotation.Accent | Connotation.CTA>;
|
|
6
6
|
export type TextAnchorAppearance = Extract<Appearance, Appearance.Ghost | Appearance.GhostLight>;
|
|
7
7
|
export declare class TextAnchor extends VividElement {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AffixIcon } from '../../shared/patterns/affix';
|
|
2
1
|
import { VividElement } from '../../shared/foundation/vivid-element/vivid-element';
|
|
2
|
+
import { AffixIcon } from '../../shared/patterns/affix';
|
|
3
3
|
export declare function isTreeItemElement(el: Element): el is HTMLElement;
|
|
4
4
|
export declare class TreeItem extends VividElement {
|
|
5
5
|
text?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { VividElement } from '../../shared/foundation/vivid-element/vivid-element.js';
|
|
1
2
|
import { TreeItem } from '../tree-item/tree-item.js';
|
|
2
|
-
import { VividElement } from '../../shared/foundation/vivid-element/vivid-element';
|
|
3
3
|
export declare function getDisplayedNodes(rootNode: HTMLElement, selector: string): HTMLElement[];
|
|
4
4
|
export declare class TreeView extends VividElement {
|
|
5
5
|
renderCollapsedNodes: boolean;
|
package/package.json
CHANGED
package/shared/affix.js
CHANGED
|
@@ -61,4 +61,4 @@ const affixIconTemplateFactory = (context) => {
|
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
-
export {
|
|
64
|
+
export { AffixIconWithTrailing as A, IconWrapper as I, affixIconTemplateFactory as a, AffixIcon as b };
|
package/shared/definition.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { V as VividElement, a as attr, n as nullableNumberConverter, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
2
2
|
import { i as iconDefinition } from './definition27.js';
|
|
3
|
-
import {
|
|
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';
|
|
6
6
|
import { w as when } from './when.js';
|
package/shared/definition11.cjs
CHANGED
|
@@ -180,7 +180,7 @@ function renderButtonContent(context) {
|
|
|
180
180
|
formnovalidate="${(x) => x.formnovalidate}"
|
|
181
181
|
formtarget="${(x) => x.formtarget}"
|
|
182
182
|
name="${(x) => x.name}"
|
|
183
|
-
type="${(x) => x.type}"
|
|
183
|
+
type="${(x) => x.type ?? "submit"}"
|
|
184
184
|
value="${(x) => x.value}"
|
|
185
185
|
aria-atomic="${(x) => x.ariaAtomic}"
|
|
186
186
|
aria-busy="${(x) => x.ariaBusy}"
|
package/shared/definition11.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { I as Icon, i as iconDefinition } from './definition27.js';
|
|
2
2
|
import { P as ProgressRing, p as progressRingDefinition } from './definition37.js';
|
|
3
3
|
import { a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
4
|
-
import {
|
|
4
|
+
import { A as AffixIconWithTrailing, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
5
5
|
import { V as VividFoundationButton } from './button.js';
|
|
6
6
|
import { a as applyMixins } from './apply-mixins.js';
|
|
7
7
|
import { b as Size } from './enums.js';
|
|
@@ -178,7 +178,7 @@ function renderButtonContent(context) {
|
|
|
178
178
|
formnovalidate="${(x) => x.formnovalidate}"
|
|
179
179
|
formtarget="${(x) => x.formtarget}"
|
|
180
180
|
name="${(x) => x.name}"
|
|
181
|
-
type="${(x) => x.type}"
|
|
181
|
+
type="${(x) => x.type ?? "submit"}"
|
|
182
182
|
value="${(x) => x.value}"
|
|
183
183
|
aria-atomic="${(x) => x.ariaAtomic}"
|
|
184
184
|
aria-busy="${(x) => x.ariaBusy}"
|
package/shared/definition16.cjs
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const definition$
|
|
3
|
+
const definition$2 = require('./definition27.cjs');
|
|
4
4
|
const definition = require('./definition63.cjs');
|
|
5
|
-
const definition$
|
|
5
|
+
const definition$3 = require('./definition35.cjs');
|
|
6
6
|
const textField = require('./text-field.cjs');
|
|
7
7
|
const vividElement = require('./vivid-element.cjs');
|
|
8
|
+
const applyMixins = require('./apply-mixins.cjs');
|
|
8
9
|
const listbox = require('./listbox.cjs');
|
|
9
10
|
const formAssociated = require('./form-associated.cjs');
|
|
10
11
|
const affix = require('./affix.cjs');
|
|
11
12
|
const strings = require('./strings.cjs');
|
|
12
13
|
const numbers = require('./numbers.cjs');
|
|
13
|
-
const applyMixins = require('./apply-mixins2.cjs');
|
|
14
14
|
const formElements = require('./form-elements.cjs');
|
|
15
|
-
const listbox$1 = require('./listbox2.cjs');
|
|
16
15
|
const index = require('./index.cjs');
|
|
16
|
+
const definition$1 = require('./definition11.cjs');
|
|
17
17
|
const ref = require('./ref.cjs');
|
|
18
18
|
const slotted = require('./slotted.cjs');
|
|
19
19
|
const when = require('./when.cjs');
|
|
20
20
|
const classNames = require('./class-names.cjs');
|
|
21
21
|
|
|
22
|
-
const styles = ":host{position:relative}.base{--_text-field-gutter-end:
|
|
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}.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}:not(.disabled) .chevron{cursor:pointer}.disabled .chevron{color:var(--_low-ink-color);cursor:not-allowed}.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
|
}
|
|
@@ -478,6 +478,13 @@ let Combobox = class extends FormAssociatedCombobox {
|
|
|
478
478
|
slottedOptionsChanged(prev, next) {
|
|
479
479
|
super.slottedOptionsChanged(prev, next);
|
|
480
480
|
this.updateValue();
|
|
481
|
+
const scale = this.getAttribute("scale") || this.scale;
|
|
482
|
+
next.forEach((element) => {
|
|
483
|
+
if (scale) {
|
|
484
|
+
element.setAttribute("scale", scale);
|
|
485
|
+
element.scale = scale;
|
|
486
|
+
}
|
|
487
|
+
});
|
|
481
488
|
}
|
|
482
489
|
/**
|
|
483
490
|
* Sets the value and to match the first selected option.
|
|
@@ -509,12 +516,21 @@ __decorateClass([
|
|
|
509
516
|
__decorateClass([
|
|
510
517
|
vividElement.attr
|
|
511
518
|
], Combobox.prototype, "appearance", 2);
|
|
519
|
+
__decorateClass([
|
|
520
|
+
vividElement.attr
|
|
521
|
+
], Combobox.prototype, "shape", 2);
|
|
522
|
+
__decorateClass([
|
|
523
|
+
vividElement.attr()
|
|
524
|
+
], Combobox.prototype, "scale", 2);
|
|
512
525
|
__decorateClass([
|
|
513
526
|
vividElement.attr
|
|
514
527
|
], Combobox.prototype, "placement", 2);
|
|
515
528
|
__decorateClass([
|
|
516
529
|
vividElement.attr({ mode: "boolean", attribute: "fixed-dropdown" })
|
|
517
530
|
], Combobox.prototype, "fixedDropdown", 2);
|
|
531
|
+
__decorateClass([
|
|
532
|
+
vividElement.observable
|
|
533
|
+
], Combobox.prototype, "metaSlottedContent", 2);
|
|
518
534
|
__decorateClass([
|
|
519
535
|
vividElement.observable
|
|
520
536
|
], Combobox.prototype, "maxHeight", 2);
|
|
@@ -530,12 +546,12 @@ Combobox = __decorateClass([
|
|
|
530
546
|
], Combobox);
|
|
531
547
|
applyMixins.applyMixins(Combobox, affix.AffixIcon);
|
|
532
548
|
|
|
533
|
-
function renderLabel() {
|
|
534
|
-
return vividElement.html` <label for="control" class="label">
|
|
535
|
-
${(x) => x.label}
|
|
536
|
-
</label>`;
|
|
537
|
-
}
|
|
538
549
|
const getStateClasses = ({
|
|
550
|
+
icon,
|
|
551
|
+
iconSlottedContent,
|
|
552
|
+
metaSlottedContent,
|
|
553
|
+
shape,
|
|
554
|
+
scale,
|
|
539
555
|
disabled,
|
|
540
556
|
placeholder,
|
|
541
557
|
label,
|
|
@@ -543,10 +559,19 @@ const getStateClasses = ({
|
|
|
543
559
|
}) => classNames.classNames(
|
|
544
560
|
"base",
|
|
545
561
|
["disabled", disabled],
|
|
562
|
+
[`shape-${shape}`, Boolean(shape)],
|
|
563
|
+
[`size-${scale}`, Boolean(scale)],
|
|
546
564
|
["placeholder", Boolean(placeholder)],
|
|
547
565
|
[`appearance-${appearance}`, Boolean(appearance)],
|
|
548
|
-
["no-label", !label]
|
|
566
|
+
["no-label", !label],
|
|
567
|
+
["has-icon", !!icon || Boolean(iconSlottedContent?.length)],
|
|
568
|
+
["has-meta", Boolean(metaSlottedContent?.length)]
|
|
549
569
|
);
|
|
570
|
+
function renderLabel() {
|
|
571
|
+
return vividElement.html` <label for="control" class="label">
|
|
572
|
+
${(x) => x.label}
|
|
573
|
+
</label>`;
|
|
574
|
+
}
|
|
550
575
|
function setFixedDropdownVarWidth(x) {
|
|
551
576
|
return x.open && x.fixedDropdown ? `--_combobox-fixed-width: ${Math.round(
|
|
552
577
|
x.getBoundingClientRect().width
|
|
@@ -554,28 +579,35 @@ function setFixedDropdownVarWidth(x) {
|
|
|
554
579
|
}
|
|
555
580
|
function renderInput(context) {
|
|
556
581
|
const affixIconTemplate = affix.affixIconTemplateFactory(context);
|
|
582
|
+
const chevronTemplate = definition$1.chevronTemplateFactory(context);
|
|
557
583
|
return vividElement.html` <div class="${getStateClasses}" ${ref.ref("_anchor")}>
|
|
558
584
|
${when.when((x) => x.label, renderLabel())}
|
|
559
585
|
<div class="fieldset">
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
586
|
+
${(x) => affixIconTemplate(x.icon, affix.IconWrapper.Slot)}
|
|
587
|
+
<div class="wrapper">
|
|
588
|
+
<input
|
|
589
|
+
id="control"
|
|
590
|
+
autocomplete="off"
|
|
591
|
+
class="control"
|
|
592
|
+
aria-activedescendant="${(x) => x.open ? x.ariaActiveDescendant : null}"
|
|
593
|
+
aria-autocomplete="${(x) => x.autocomplete}"
|
|
594
|
+
aria-controls="${(x) => x.listboxId}"
|
|
595
|
+
aria-disabled="${(x) => x.ariaDisabled}"
|
|
596
|
+
aria-expanded="${(x) => x.open}"
|
|
597
|
+
aria-haspopup="listbox"
|
|
598
|
+
placeholder="${(x) => x.placeholder}"
|
|
599
|
+
role="combobox"
|
|
600
|
+
type="text"
|
|
601
|
+
?disabled="${(x) => x.disabled}"
|
|
602
|
+
:value="${(x) => x.value}"
|
|
603
|
+
@input="${(x, c) => x.inputHandler(c.event)}"
|
|
604
|
+
${ref.ref("control")}
|
|
605
|
+
/>
|
|
606
|
+
</div>
|
|
607
|
+
<div class="leading-items-wrapper">
|
|
608
|
+
<slot name="meta" ${slotted.slotted("metaSlottedContent")}></slot>
|
|
609
|
+
${chevronTemplate}
|
|
610
|
+
</div>
|
|
579
611
|
</div>
|
|
580
612
|
</div>`;
|
|
581
613
|
}
|
|
@@ -606,7 +638,7 @@ const comboboxTemplate = (context) => {
|
|
|
606
638
|
?disabled="${(x) => x.disabled}"
|
|
607
639
|
${ref.ref("listbox")}>
|
|
608
640
|
<slot ${slotted.slotted({
|
|
609
|
-
filter: listbox
|
|
641
|
+
filter: listbox.Listbox.slottedOptionFilter,
|
|
610
642
|
flatten: true,
|
|
611
643
|
property: "slottedOptions"
|
|
612
644
|
})}>
|
|
@@ -621,7 +653,7 @@ const comboboxDefinition = vividElement.defineVividComponent(
|
|
|
621
653
|
"combobox",
|
|
622
654
|
Combobox,
|
|
623
655
|
comboboxTemplate,
|
|
624
|
-
[definition$
|
|
656
|
+
[definition$2.iconDefinition, definition.popupDefinition, definition$3.listboxOptionDefinition],
|
|
625
657
|
{
|
|
626
658
|
styles: [textField.styles, styles],
|
|
627
659
|
shadowOptions: {
|