@vonage/vivid 4.12.0 → 4.13.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 +2339 -288
- package/lib/accordion/accordion.d.ts +21 -2
- package/lib/accordion-item/accordion-item.d.ts +6 -2
- package/lib/calendar/calendar.d.ts +1 -1
- package/lib/date-picker/date-picker.d.ts +1 -0
- package/lib/file-picker/file-picker.d.ts +6 -0
- package/lib/menu/menu.d.ts +16 -3
- package/lib/menu-item/menu-item.d.ts +10 -2
- package/lib/option/option.d.ts +27 -7
- package/lib/radio/radio.d.ts +12 -2
- package/lib/radio/radio.form-associated.d.ts +10 -0
- package/lib/radio-group/radio-group.d.ts +20 -2
- package/lib/switch/switch.d.ts +5 -2
- package/lib/switch/switch.form-associated.d.ts +10 -0
- package/lib/tab/tab.d.ts +3 -2
- package/lib/tab-panel/tab-panel.d.ts +2 -2
- package/lib/tabs/tabs.d.ts +33 -11
- package/lib/text-area/text-area.d.ts +25 -3
- package/lib/text-area/text-field.form-associated.d.ts +10 -0
- package/lib/text-field/text-field.d.ts +28 -3
- package/lib/text-field/text-field.form-associated.d.ts +10 -0
- package/package.json +1 -1
- package/shared/date-picker/date-picker-base.d.ts +1 -0
- package/shared/definition.cjs +29 -72
- package/shared/definition.js +30 -73
- package/shared/definition11.cjs +1 -1
- package/shared/definition11.js +1 -1
- package/shared/definition16.cjs +1 -2
- package/shared/definition16.js +1 -2
- package/shared/definition17.cjs +3 -3
- package/shared/definition17.js +3 -3
- package/shared/definition18.cjs +6 -1
- package/shared/definition18.js +6 -1
- package/shared/definition19.cjs +17 -8
- package/shared/definition19.js +17 -8
- package/shared/definition2.cjs +154 -187
- package/shared/definition2.js +157 -190
- package/shared/definition20.cjs +3 -2
- package/shared/definition20.js +3 -2
- package/shared/definition21.cjs +1 -1
- package/shared/definition21.js +1 -1
- package/shared/definition24.cjs +1 -1
- package/shared/definition24.js +1 -1
- package/shared/definition25.cjs +24 -3
- package/shared/definition25.js +24 -3
- package/shared/definition29.cjs +358 -559
- package/shared/definition29.js +359 -560
- package/shared/definition30.cjs +2 -0
- package/shared/definition30.js +2 -0
- package/shared/definition35.cjs +223 -3
- package/shared/definition35.js +223 -3
- package/shared/definition36.cjs +149 -14
- package/shared/definition36.js +150 -15
- package/shared/definition40.cjs +226 -399
- package/shared/definition40.js +229 -402
- package/shared/definition42.cjs +3 -2
- package/shared/definition42.js +3 -2
- package/shared/definition43.cjs +1 -0
- package/shared/definition43.js +1 -0
- package/shared/definition44.cjs +1 -1
- package/shared/definition44.js +1 -1
- package/shared/definition46.cjs +1 -1
- package/shared/definition46.js +1 -1
- package/shared/definition47.cjs +8 -16
- package/shared/definition47.js +4 -12
- package/shared/definition49.cjs +64 -89
- package/shared/definition49.js +66 -91
- package/shared/definition5.cjs +1 -1
- package/shared/definition5.js +1 -1
- package/shared/definition50.cjs +1 -11
- package/shared/definition50.js +1 -11
- package/shared/definition51.cjs +5 -15
- package/shared/definition51.js +6 -16
- package/shared/definition52.cjs +284 -20
- package/shared/definition52.js +288 -24
- package/shared/definition55.cjs +160 -180
- package/shared/definition55.js +160 -180
- package/shared/definition56.cjs +3 -307
- package/shared/definition56.js +5 -309
- package/shared/definition57.cjs +34 -11
- package/shared/definition57.js +30 -7
- package/shared/definition61.cjs +1 -1
- package/shared/definition61.js +1 -1
- package/shared/definition62.cjs +17 -8
- package/shared/definition62.js +17 -8
- package/shared/definition64.cjs +18 -7
- package/shared/definition64.js +19 -8
- package/shared/form-associated.cjs +1 -1
- package/shared/form-associated.js +1 -1
- package/shared/icon.cjs +1 -1
- package/shared/icon.js +1 -1
- package/shared/index.cjs +1 -0
- package/shared/index.js +1 -1
- package/shared/key-codes.cjs +1 -94
- package/shared/key-codes.js +2 -89
- package/shared/key-codes2.cjs +87 -1
- package/shared/key-codes2.js +83 -2
- package/shared/listbox.cjs +204 -10
- package/shared/listbox.js +200 -6
- package/shared/{direction.cjs → localization.cjs} +12 -3
- package/shared/{direction.js → localization.js} +12 -3
- package/shared/numbers.cjs +0 -12
- package/shared/numbers.js +1 -12
- package/shared/presentationDate.cjs +22 -8
- package/shared/presentationDate.js +16 -2
- package/shared/radio.cjs +92 -117
- package/shared/radio.js +93 -118
- package/shared/slider.template.cjs +2 -15
- package/shared/slider.template.js +2 -14
- package/shared/strings.cjs +26 -0
- package/shared/strings.js +25 -1
- package/shared/text-field2.cjs +538 -194
- package/shared/text-field2.js +539 -195
- package/styles/core/all.css +21 -1
- package/styles/core/theme.css +21 -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 +44 -0
- package/shared/Reflector.cjs +0 -71
- package/shared/Reflector.js +0 -69
- package/shared/listbox-option.cjs +0 -204
- package/shared/listbox-option.js +0 -201
|
@@ -1,5 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
1
|
+
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
|
+
export declare const AccordionExpandMode: {
|
|
3
|
+
readonly single: "single";
|
|
4
|
+
readonly multi: "multi";
|
|
5
|
+
};
|
|
6
|
+
export type AccordionExpandMode = typeof AccordionExpandMode[keyof typeof AccordionExpandMode];
|
|
7
|
+
export declare class Accordion extends FoundationElement {
|
|
3
8
|
expandmode: AccordionExpandMode;
|
|
9
|
+
activeid: string | null;
|
|
10
|
+
activeItemIndex: number;
|
|
11
|
+
accordionIds: Array<string | null>;
|
|
12
|
+
private change;
|
|
13
|
+
private findExpandedItem;
|
|
14
|
+
private setItems;
|
|
15
|
+
private resetItems;
|
|
16
|
+
private removeItemListeners;
|
|
17
|
+
private activeItemChange;
|
|
18
|
+
private getItemIds;
|
|
19
|
+
private isSingleExpandMode;
|
|
20
|
+
private handleItemKeyDown;
|
|
21
|
+
private adjust;
|
|
22
|
+
private focusItem;
|
|
4
23
|
closeAll(): void;
|
|
5
24
|
}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
2
|
import { AffixIconWithTrailing } from '../../shared/patterns/affix';
|
|
3
3
|
import type { Size } from '../enums.js';
|
|
4
4
|
export type AccordionItemSize = Extract<Size, Size.Condensed | Size.Normal>;
|
|
5
|
-
export declare class AccordionItem extends
|
|
5
|
+
export declare class AccordionItem extends FoundationElement {
|
|
6
|
+
headinglevel: 1 | 2 | 3 | 4 | 5 | 6;
|
|
7
|
+
expanded: boolean;
|
|
8
|
+
id: string;
|
|
6
9
|
heading?: string;
|
|
7
10
|
noIndicator: boolean;
|
|
8
11
|
meta?: string;
|
|
9
12
|
size?: AccordionItemSize;
|
|
13
|
+
private change;
|
|
10
14
|
}
|
|
11
15
|
export interface AccordionItem extends AffixIconWithTrailing {
|
|
12
16
|
}
|
|
@@ -5,7 +5,7 @@ export declare class Calendar extends FoundationElement {
|
|
|
5
5
|
startDay?: 'sunday' | 'monday';
|
|
6
6
|
locales?: string | string[] | undefined;
|
|
7
7
|
hour12: boolean;
|
|
8
|
-
getEventContext: (this: Calendar, e:
|
|
8
|
+
getEventContext: (this: Calendar, e: KeyboardEvent | MouseEvent) => import("./helpers/calendar.event-context").CalendarEventContext | null;
|
|
9
9
|
private getCalendarEventContainingCell;
|
|
10
10
|
private arrowKeysInteractions;
|
|
11
11
|
private activateElement;
|
|
@@ -2,6 +2,7 @@ import { type ErrorText, type FormElement } from '../../shared/patterns';
|
|
|
2
2
|
import { DatePickerBase } from '../../shared/date-picker/date-picker-base';
|
|
3
3
|
export declare class DatePicker extends DatePickerBase {
|
|
4
4
|
#private;
|
|
5
|
+
protected _updatePresentationValue(): void;
|
|
5
6
|
constructor();
|
|
6
7
|
}
|
|
7
8
|
export interface DatePicker extends ErrorText, FormElement {
|
|
@@ -14,6 +14,12 @@ export declare class FilePicker extends FormAssociatedFilePicker {
|
|
|
14
14
|
accept?: string;
|
|
15
15
|
acceptChanged(_oldValue: string, newValue: string): void;
|
|
16
16
|
size?: FilePickerSize;
|
|
17
|
+
invalidFileTypeError?: string;
|
|
18
|
+
invalidFileTypeErrorChanged(_oldValue: string, newValue: string): void;
|
|
19
|
+
maxFilesExceededError?: string;
|
|
20
|
+
maxFilesExceededErrorChanged(_oldValue: string, newValue: string): void;
|
|
21
|
+
fileTooBigError?: string;
|
|
22
|
+
fileTooBigErrorChanged(_oldValue: string, newValue: string): void;
|
|
17
23
|
nameChanged(previous: string, next: string): void;
|
|
18
24
|
private buttonTag;
|
|
19
25
|
constructor();
|
package/lib/menu/menu.d.ts
CHANGED
|
@@ -1,8 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
2
|
import type { Placement, Strategy } from '@floating-ui/dom';
|
|
3
3
|
import { type Anchored } from '../../shared/patterns/anchored';
|
|
4
|
-
export declare class Menu extends
|
|
4
|
+
export declare class Menu extends FoundationElement {
|
|
5
5
|
#private;
|
|
6
|
+
private menuItems;
|
|
7
|
+
private expandedItem;
|
|
8
|
+
private focusIndex;
|
|
9
|
+
private static focusableElementRoles;
|
|
10
|
+
focus(): void;
|
|
11
|
+
collapseExpandedItem(): void;
|
|
12
|
+
private handleItemFocus;
|
|
13
|
+
private handleExpandedChanged;
|
|
14
|
+
private removeItemListeners;
|
|
15
|
+
private setItems;
|
|
16
|
+
private domChildren;
|
|
17
|
+
private isMenuItemElement;
|
|
18
|
+
private isFocusableElement;
|
|
19
|
+
private setFocus;
|
|
6
20
|
ariaLabel: string | null;
|
|
7
21
|
placement?: Placement;
|
|
8
22
|
trigger?: 'auto' | 'legacy' | 'off';
|
|
@@ -10,7 +24,6 @@ export declare class Menu extends FastMenu {
|
|
|
10
24
|
positionStrategy?: Strategy;
|
|
11
25
|
open: boolean;
|
|
12
26
|
openChanged(_: boolean, newValue: boolean): void;
|
|
13
|
-
constructor();
|
|
14
27
|
_onFocusout: (e: FocusEvent) => void;
|
|
15
28
|
actionItemsSlottedContent?: HTMLElement[];
|
|
16
29
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
2
|
import { AffixIcon } from '../../shared/patterns/affix';
|
|
3
3
|
import { Connotation } from '../enums';
|
|
4
4
|
export declare const MenuItemRole: {
|
|
@@ -7,13 +7,20 @@ export declare const MenuItemRole: {
|
|
|
7
7
|
readonly menuitemcheckbox: "menuitemcheckbox";
|
|
8
8
|
readonly menuitemradio: "menuitemradio";
|
|
9
9
|
};
|
|
10
|
+
export type MenuItemRole = typeof MenuItemRole[keyof typeof MenuItemRole];
|
|
10
11
|
export declare enum CheckAppearance {
|
|
11
12
|
Normal = "normal",
|
|
12
13
|
TickOnly = "tick-only"
|
|
13
14
|
}
|
|
14
15
|
export type MenuItemConnotation = Extract<Connotation, Connotation.CTA | Connotation.Accent>;
|
|
15
|
-
export declare class MenuItem extends
|
|
16
|
+
export declare class MenuItem extends FoundationElement {
|
|
16
17
|
#private;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
expanded: boolean;
|
|
20
|
+
role: MenuItemRole;
|
|
21
|
+
checked: boolean;
|
|
22
|
+
private observer;
|
|
23
|
+
private invoke;
|
|
17
24
|
text?: string;
|
|
18
25
|
textSecondary?: string;
|
|
19
26
|
connotation?: MenuItemConnotation;
|
|
@@ -21,6 +28,7 @@ export declare class MenuItem extends FastMenuItem {
|
|
|
21
28
|
checkedAppearance?: CheckAppearance;
|
|
22
29
|
trailingMetaSlottedContent?: HTMLElement[];
|
|
23
30
|
constructor();
|
|
31
|
+
private updateSubmenu;
|
|
24
32
|
}
|
|
25
33
|
export interface MenuItem extends AffixIcon {
|
|
26
34
|
}
|
package/lib/option/option.d.ts
CHANGED
|
@@ -1,12 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
|
+
export declare class ListboxOption extends FoundationElement {
|
|
3
|
+
checked?: boolean;
|
|
4
|
+
protected checkedChanged(_: boolean | unknown, next?: boolean): void;
|
|
5
|
+
defaultSelected: boolean;
|
|
6
|
+
protected defaultSelectedChanged(): void;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
protected disabledChanged(): void;
|
|
9
|
+
selectedAttribute: boolean;
|
|
10
|
+
protected selectedAttributeChanged(): void;
|
|
11
|
+
selected: boolean;
|
|
12
|
+
protected selectedChanged(): void;
|
|
13
|
+
dirtyValue: boolean;
|
|
14
|
+
protected initialValue: string;
|
|
15
|
+
initialValueChanged(): void;
|
|
7
16
|
_label?: string;
|
|
8
17
|
get label(): string;
|
|
9
18
|
set label(value: string);
|
|
19
|
+
_text?: string;
|
|
20
|
+
set text(value: string);
|
|
21
|
+
get text(): string;
|
|
22
|
+
set value(next: string);
|
|
23
|
+
get value(): string;
|
|
24
|
+
get form(): HTMLFormElement | null;
|
|
25
|
+
constructor(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean);
|
|
10
26
|
}
|
|
11
|
-
export
|
|
27
|
+
export declare class DelegatesARIAListboxOption {
|
|
28
|
+
ariaChecked: 'true' | 'false' | string | null;
|
|
29
|
+
ariaPosInSet: string | null;
|
|
30
|
+
ariaSelected: 'true' | 'false' | string | null;
|
|
31
|
+
ariaSetSize: string | null;
|
|
12
32
|
}
|
package/lib/radio/radio.d.ts
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type SyntheticViewTemplate } from '@microsoft/fast-element';
|
|
2
|
+
import { type FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
2
3
|
import type { Connotation } from '../enums.js';
|
|
4
|
+
import { FormAssociatedRadio } from './radio.form-associated';
|
|
3
5
|
export type RadioConnotation = Extract<Connotation, Connotation.Accent | Connotation.CTA>;
|
|
4
|
-
export
|
|
6
|
+
export type RadioControl = Pick<HTMLInputElement, 'checked' | 'disabled' | 'readOnly' | 'focus' | 'setAttribute' | 'getAttribute'>;
|
|
7
|
+
export type RadioOptions = FoundationElementDefinition & {
|
|
8
|
+
checkedIndicator?: string | SyntheticViewTemplate;
|
|
9
|
+
};
|
|
10
|
+
export declare class Radio extends FormAssociatedRadio {
|
|
5
11
|
ariaLabel: string | null;
|
|
6
12
|
label?: string;
|
|
7
13
|
connotation?: RadioConnotation;
|
|
14
|
+
readOnly: boolean;
|
|
15
|
+
name: string;
|
|
16
|
+
constructor();
|
|
17
|
+
private isInsideRadioGroup;
|
|
8
18
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CheckableFormAssociated, FoundationElement } from '@microsoft/fast-foundation';
|
|
2
|
+
declare class _Radio extends FoundationElement {
|
|
3
|
+
}
|
|
4
|
+
interface _Radio extends CheckableFormAssociated {
|
|
5
|
+
}
|
|
6
|
+
declare const FormAssociatedRadio_base: typeof _Radio;
|
|
7
|
+
export declare class FormAssociatedRadio extends FormAssociatedRadio_base {
|
|
8
|
+
proxy: HTMLInputElement;
|
|
9
|
+
}
|
|
10
|
+
export {};
|
|
@@ -1,4 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
|
+
import { Orientation } from '@microsoft/fast-web-utilities';
|
|
3
|
+
export declare class RadioGroup extends FoundationElement {
|
|
4
|
+
#private;
|
|
3
5
|
label?: string;
|
|
6
|
+
readOnly: boolean;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
name: string;
|
|
9
|
+
nameChanged(): void;
|
|
10
|
+
value: string;
|
|
11
|
+
orientation: Orientation | 'horizontal' | 'vertical';
|
|
12
|
+
private get isInsideToolbar();
|
|
13
|
+
disconnectedCallback(): void;
|
|
14
|
+
private setupRadioButtons;
|
|
15
|
+
private radioChangeHandler;
|
|
16
|
+
private moveToRadioByIndex;
|
|
17
|
+
private moveRightOffGroup;
|
|
18
|
+
private moveLeftOffGroup;
|
|
19
|
+
private checkFocusedRadio;
|
|
20
|
+
private moveRight;
|
|
21
|
+
private moveLeft;
|
|
4
22
|
}
|
package/lib/switch/switch.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { Switch as FoundationSwitch } from '@microsoft/fast-foundation';
|
|
2
1
|
import type { Connotation } from '../enums';
|
|
2
|
+
import { FormAssociatedSwitch } from './switch.form-associated';
|
|
3
3
|
export type SwitchConnotation = Connotation.Accent | Connotation.Alert | Connotation.Announcement | Connotation.Success | Connotation.CTA;
|
|
4
|
-
export declare class Switch extends
|
|
4
|
+
export declare class Switch extends FormAssociatedSwitch {
|
|
5
5
|
label?: string;
|
|
6
6
|
connotation?: SwitchConnotation;
|
|
7
|
+
readOnly: boolean;
|
|
8
|
+
constructor();
|
|
9
|
+
private updateForm;
|
|
7
10
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CheckableFormAssociated, FoundationElement } from '@microsoft/fast-foundation';
|
|
2
|
+
declare class _Switch extends FoundationElement {
|
|
3
|
+
}
|
|
4
|
+
interface _Switch extends CheckableFormAssociated {
|
|
5
|
+
}
|
|
6
|
+
declare const FormAssociatedSwitch_base: typeof _Switch;
|
|
7
|
+
export declare class FormAssociatedSwitch extends FormAssociatedSwitch_base {
|
|
8
|
+
proxy: HTMLInputElement;
|
|
9
|
+
}
|
|
10
|
+
export {};
|
package/lib/tab/tab.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
2
|
import { AffixIconWithTrailing } from '../../shared/patterns/affix';
|
|
3
3
|
import { Localized } from '../../shared/patterns';
|
|
4
4
|
import type { Connotation, Shape } from '../enums.js';
|
|
5
5
|
export type TabConnotation = Extract<Connotation, Connotation.Accent | Connotation.CTA>;
|
|
6
6
|
export type TabShape = Extract<Shape, Shape.Rounded | Shape.Sharp>;
|
|
7
|
-
export declare class Tab extends
|
|
7
|
+
export declare class Tab extends FoundationElement {
|
|
8
|
+
disabled: boolean;
|
|
8
9
|
connotation?: TabConnotation;
|
|
9
10
|
shape?: TabShape;
|
|
10
11
|
label?: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class TabPanel extends
|
|
1
|
+
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
|
+
export declare class TabPanel extends FoundationElement {
|
|
3
3
|
}
|
package/lib/tabs/tabs.d.ts
CHANGED
|
@@ -1,21 +1,43 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FoundationElement, TabsOrientation } from '@microsoft/fast-foundation';
|
|
2
2
|
import type { Connotation, TabsGutters } from '../enums.js';
|
|
3
3
|
export declare const ACTIVE_TAB_WIDTH = "--_tabs-active-tab-inline-size";
|
|
4
|
+
export declare const TABLIST_COLUMN = "--_tabs-tablist-column";
|
|
4
5
|
export type TabsConnotation = Extract<Connotation, Connotation.Accent | Connotation.CTA>;
|
|
5
|
-
export
|
|
6
|
-
export declare class Tabs extends FoundationTabs {
|
|
6
|
+
export declare class Tabs extends FoundationElement {
|
|
7
7
|
#private;
|
|
8
|
+
orientation: TabsOrientation;
|
|
9
|
+
activeid: string;
|
|
10
|
+
activeindicator: boolean;
|
|
11
|
+
activetab: HTMLElement;
|
|
12
|
+
private prevActiveTabIndex;
|
|
13
|
+
private activeTabIndex;
|
|
14
|
+
private tabIds;
|
|
15
|
+
private tabpanelIds;
|
|
16
|
+
private change;
|
|
17
|
+
private isDisabledElement;
|
|
18
|
+
private isHiddenElement;
|
|
19
|
+
private isFocusableElement;
|
|
20
|
+
private getActiveIndex;
|
|
21
|
+
private setTabs;
|
|
22
|
+
private setTabPanels;
|
|
23
|
+
private getTabIds;
|
|
24
|
+
private getTabPanelIds;
|
|
25
|
+
private setComponent;
|
|
26
|
+
private handleTabClick;
|
|
27
|
+
private isHorizontal;
|
|
28
|
+
private handleTabKeyDown;
|
|
29
|
+
adjust(adjustment: number): void;
|
|
30
|
+
private adjustForward;
|
|
31
|
+
private adjustBackward;
|
|
32
|
+
private moveToTabByIndex;
|
|
33
|
+
private focusTab;
|
|
8
34
|
tablist?: HTMLElement;
|
|
9
35
|
connotation?: TabsConnotation;
|
|
10
|
-
gutters?:
|
|
36
|
+
gutters?: TabsGutters;
|
|
11
37
|
scrollablePanel: boolean;
|
|
12
|
-
|
|
13
|
-
orientationChanged(): void;
|
|
14
|
-
activeidChanged(oldValue: string, newValue: string): void;
|
|
15
|
-
tabsChanged(): void;
|
|
16
|
-
tabpanelsChanged(): void;
|
|
17
|
-
patchIndicatorStyleTransition(): void;
|
|
38
|
+
tabsLayout?: 'align-start' | 'stretch';
|
|
18
39
|
connectedCallback(): void;
|
|
19
40
|
disconnectedCallback(): void;
|
|
20
|
-
|
|
41
|
+
private handleActiveIndicatorPosition;
|
|
42
|
+
private animateActiveIndicator;
|
|
21
43
|
}
|
|
@@ -1,11 +1,33 @@
|
|
|
1
|
-
import { TextArea as FoundationTextArea } from '@microsoft/fast-foundation';
|
|
2
1
|
import { type ErrorText, type FormElement, FormElementCharCount, FormElementHelperText, FormElementSuccessText } from '../../shared/patterns';
|
|
2
|
+
import { DelegatesARIATextbox } from '../text-field/text-field';
|
|
3
|
+
import { FormAssociatedTextArea } from './text-field.form-associated';
|
|
3
4
|
export type TextAreaWrap = 'hard' | 'soft' | 'off';
|
|
4
|
-
export declare
|
|
5
|
+
export declare const TextAreaResize: {
|
|
6
|
+
readonly none: "none";
|
|
7
|
+
readonly both: "both";
|
|
8
|
+
readonly horizontal: "horizontal";
|
|
9
|
+
readonly vertical: "vertical";
|
|
10
|
+
};
|
|
11
|
+
export type TextAreaResize = typeof TextAreaResize[keyof typeof TextAreaResize];
|
|
12
|
+
export declare class TextArea extends FormAssociatedTextArea {
|
|
5
13
|
#private;
|
|
14
|
+
readOnly: boolean;
|
|
15
|
+
resize: TextAreaResize;
|
|
16
|
+
autofocus: boolean;
|
|
17
|
+
formId: string;
|
|
18
|
+
list: string;
|
|
19
|
+
maxlength: number;
|
|
20
|
+
minlength: number;
|
|
21
|
+
name: string;
|
|
22
|
+
placeholder: string;
|
|
23
|
+
cols: number;
|
|
24
|
+
rows: number;
|
|
25
|
+
spellcheck: boolean;
|
|
26
|
+
select(): void;
|
|
27
|
+
validate(): void;
|
|
6
28
|
wrap?: TextAreaWrap;
|
|
7
29
|
connectedCallback(): void;
|
|
8
30
|
disconnectedCallback(): void;
|
|
9
31
|
}
|
|
10
|
-
export interface TextArea extends FormElement, ErrorText, FormElementCharCount, FormElementHelperText, FormElementSuccessText {
|
|
32
|
+
export interface TextArea extends FormElement, ErrorText, FormElementCharCount, FormElementHelperText, FormElementSuccessText, DelegatesARIATextbox {
|
|
11
33
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FormAssociated, FoundationElement } from '@microsoft/fast-foundation';
|
|
2
|
+
declare class _TextArea extends FoundationElement {
|
|
3
|
+
}
|
|
4
|
+
interface _TextArea extends FormAssociated {
|
|
5
|
+
}
|
|
6
|
+
declare const FormAssociatedTextArea_base: typeof _TextArea;
|
|
7
|
+
export declare class FormAssociatedTextArea extends FormAssociatedTextArea_base {
|
|
8
|
+
proxy: HTMLTextAreaElement;
|
|
9
|
+
}
|
|
10
|
+
export {};
|
|
@@ -1,11 +1,32 @@
|
|
|
1
|
-
import { TextField as FoundationTextfield } from '@microsoft/fast-foundation';
|
|
2
1
|
import type { Appearance, Shape, Size } from '../enums';
|
|
3
2
|
import { AffixIcon, type ErrorText, type FormElement, FormElementCharCount, FormElementHelperText, FormElementSuccessText } from '../../shared/patterns';
|
|
3
|
+
import { ARIAGlobalStatesAndProperties } from '../../shared/foundation/patterns';
|
|
4
|
+
import { FormAssociatedTextField } from './text-field.form-associated';
|
|
4
5
|
export type TextFieldAppearance = Extract<Appearance, Appearance.Fieldset | Appearance.Ghost>;
|
|
5
6
|
export type TextFieldShape = Extract<Shape, Shape.Rounded | Shape.Pill>;
|
|
6
7
|
export type TextFieldSize = Extract<Size, Size.Condensed | Size.Normal>;
|
|
7
|
-
export declare
|
|
8
|
+
export declare const TextFieldType: {
|
|
9
|
+
readonly email: "email";
|
|
10
|
+
readonly password: "password";
|
|
11
|
+
readonly tel: "tel";
|
|
12
|
+
readonly text: "text";
|
|
13
|
+
readonly url: "url";
|
|
14
|
+
};
|
|
15
|
+
export type TextFieldType = typeof TextFieldType[keyof typeof TextFieldType];
|
|
16
|
+
export declare class TextField extends FormAssociatedTextField {
|
|
8
17
|
#private;
|
|
18
|
+
readOnly: boolean;
|
|
19
|
+
autofocus: boolean;
|
|
20
|
+
placeholder: string;
|
|
21
|
+
type: TextFieldType;
|
|
22
|
+
list: string;
|
|
23
|
+
maxlength: number;
|
|
24
|
+
minlength: number;
|
|
25
|
+
pattern: string;
|
|
26
|
+
size: number;
|
|
27
|
+
spellcheck: boolean;
|
|
28
|
+
select(): void;
|
|
29
|
+
validate(): void;
|
|
9
30
|
appearance?: TextFieldAppearance;
|
|
10
31
|
shape?: TextFieldShape;
|
|
11
32
|
autoComplete?: string;
|
|
@@ -16,5 +37,9 @@ export declare class TextField extends FoundationTextfield {
|
|
|
16
37
|
disconnectedCallback(): void;
|
|
17
38
|
focus(): void;
|
|
18
39
|
}
|
|
19
|
-
export
|
|
40
|
+
export declare class DelegatesARIATextbox {
|
|
41
|
+
}
|
|
42
|
+
export interface DelegatesARIATextbox extends ARIAGlobalStatesAndProperties {
|
|
43
|
+
}
|
|
44
|
+
export interface TextField extends AffixIcon, ErrorText, FormElement, FormElementCharCount, FormElementHelperText, FormElementSuccessText, DelegatesARIATextbox {
|
|
20
45
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FormAssociated, FoundationElement } from '@microsoft/fast-foundation';
|
|
2
|
+
declare class _TextField extends FoundationElement {
|
|
3
|
+
}
|
|
4
|
+
interface _TextField extends FormAssociated {
|
|
5
|
+
}
|
|
6
|
+
declare const FormAssociatedTextField_base: typeof _TextField;
|
|
7
|
+
export declare class FormAssociatedTextField extends FormAssociatedTextField_base {
|
|
8
|
+
proxy: HTMLInputElement;
|
|
9
|
+
}
|
|
10
|
+
export {};
|
package/package.json
CHANGED
|
@@ -14,6 +14,7 @@ export declare abstract class DatePickerBase extends FormAssociatedDatePickerBas
|
|
|
14
14
|
connectedCallback(): void;
|
|
15
15
|
disconnectedCallback(): void;
|
|
16
16
|
protected abstract _getCustomValidationError(): string | null;
|
|
17
|
+
protected abstract _updatePresentationValue(): void;
|
|
17
18
|
protected abstract _getSelectedDates(): DateStr[];
|
|
18
19
|
}
|
|
19
20
|
export interface DatePickerBase extends Localized, FormElementHelperText, TrappedFocus {
|
package/shared/definition.cjs
CHANGED
|
@@ -3,79 +3,10 @@
|
|
|
3
3
|
const index = require('./index.cjs');
|
|
4
4
|
const definition = require('./definition27.cjs');
|
|
5
5
|
const affix = require('./affix.cjs');
|
|
6
|
-
const startEnd = require('./start-end.cjs');
|
|
7
6
|
const applyMixins = require('./apply-mixins.cjs');
|
|
8
7
|
const ref = require('./ref.cjs');
|
|
9
8
|
const when = require('./when.cjs');
|
|
10
9
|
|
|
11
|
-
/**
|
|
12
|
-
* An individual item in an {@link @microsoft/fast-foundation#(Accordion:class) }.
|
|
13
|
-
*
|
|
14
|
-
* @slot start - Content which can be provided between the heading and the icon
|
|
15
|
-
* @slot end - Content which can be provided between the start slot and icon
|
|
16
|
-
* @slot heading - Content which serves as the accordion item heading and text of the expand button
|
|
17
|
-
* @slot - The default slot for accordion item content
|
|
18
|
-
* @slot expanded-icon - The expanded icon
|
|
19
|
-
* @slot collapsed-icon - The collapsed icon
|
|
20
|
-
* @fires change - Fires a custom 'change' event when the button is invoked
|
|
21
|
-
* @csspart heading - Wraps the button
|
|
22
|
-
* @csspart button - The button which serves to invoke the item
|
|
23
|
-
* @csspart heading-content - Wraps the slot for the heading content within the button
|
|
24
|
-
* @csspart icon - The icon container
|
|
25
|
-
* @csspart expanded-icon - The expanded icon slot
|
|
26
|
-
* @csspart collapsed-icon - The collapsed icon
|
|
27
|
-
* @csspart region - The wrapper for the accordion item content
|
|
28
|
-
*
|
|
29
|
-
* @public
|
|
30
|
-
*/
|
|
31
|
-
let AccordionItem$1 = class AccordionItem extends index.FoundationElement {
|
|
32
|
-
constructor() {
|
|
33
|
-
super(...arguments);
|
|
34
|
-
/**
|
|
35
|
-
* Configures the {@link https://www.w3.org/TR/wai-aria-1.1/#aria-level | level} of the
|
|
36
|
-
* heading element.
|
|
37
|
-
*
|
|
38
|
-
* @defaultValue 2
|
|
39
|
-
* @public
|
|
40
|
-
* @remarks
|
|
41
|
-
* HTML attribute: heading-level
|
|
42
|
-
*/
|
|
43
|
-
this.headinglevel = 2;
|
|
44
|
-
/**
|
|
45
|
-
* Expands or collapses the item.
|
|
46
|
-
*
|
|
47
|
-
* @public
|
|
48
|
-
* @remarks
|
|
49
|
-
* HTML attribute: expanded
|
|
50
|
-
*/
|
|
51
|
-
this.expanded = false;
|
|
52
|
-
/**
|
|
53
|
-
* @internal
|
|
54
|
-
*/
|
|
55
|
-
this.clickHandler = (e) => {
|
|
56
|
-
this.expanded = !this.expanded;
|
|
57
|
-
this.change();
|
|
58
|
-
};
|
|
59
|
-
this.change = () => {
|
|
60
|
-
this.$emit("change");
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
index.__decorate([
|
|
65
|
-
index.attr({
|
|
66
|
-
attribute: "heading-level",
|
|
67
|
-
mode: "fromView",
|
|
68
|
-
converter: index.nullableNumberConverter,
|
|
69
|
-
})
|
|
70
|
-
], AccordionItem$1.prototype, "headinglevel", void 0);
|
|
71
|
-
index.__decorate([
|
|
72
|
-
index.attr({ mode: "boolean" })
|
|
73
|
-
], AccordionItem$1.prototype, "expanded", void 0);
|
|
74
|
-
index.__decorate([
|
|
75
|
-
index.attr
|
|
76
|
-
], AccordionItem$1.prototype, "id", void 0);
|
|
77
|
-
applyMixins.applyMixins(AccordionItem$1, startEnd.StartEnd);
|
|
78
|
-
|
|
79
10
|
const styles = ":host{--_vvd-accordion-item-accent-firm-wrapper: var( --vvd-accordion-item-accent-firm )}.heading-button{--vvd-accordion-item-accent-firm: var( --_vvd-accordion-item-accent-firm-wrapper, var(--vvd-accordion-item-accent-primary) )}:host{display:flex;box-sizing:border-box;flex-direction:column}.heading-container{margin:0}.heading-button{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.heading-button: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}.heading-button: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}.heading-button{--_connotation-color-faint: var(--vvd-accordion-item-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-accordion-item-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-firm: var(--vvd-accordion-item-accent-firm, var(--vvd-color-canvas-text))}.heading-button{--focus-stroke-gap-color: transparent;display:flex;width:100%;align-items:center;padding:16px;border:none;background-color:var(--_appearance-color-fill);color:var(--_appearance-color-text);cursor:pointer;text-align:left}.heading-button:focus-visible{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))}.heading-button.size-condensed{font:var(--vvd-typography-base-extended-bold);gap:12px}.heading-button:not(.size-condensed){font:var(--vvd-typography-heading-4);gap:16px}.heading-content{flex:auto}.meta{overflow:hidden;max-width:var(--accordion-item-meta-inline-size, 20%);flex-shrink:0;color:var(--vvd-color-neutral-600);text-align:end;text-overflow:ellipsis;white-space:nowrap}.heading-button:not(.size-condensed) .meta{font:var(--vvd-typography-base-bold)}.heading-button.size-condensed .meta{font:var(--vvd-typography-base-condensed-bold)}.region{display:none;padding:8px 32px 24px 16px}.region:not(.size-condensed).padded{padding-inline-start:52px}:host([expanded]) .region{display:block}.region.size-condensed.padded{padding-inline-start:44px}slot[name=icon]{color:var(--vvd-color-neutral-600)}.heading-button:not(.size-condensed) slot[name=icon]{font:inherit}.heading-button.size-condensed slot[name=icon]{font:var(--vvd-typography-base-extended)}:host(:not([icon-trailing])) slot[name=icon]:last-of-type{color:var(--_appearance-color-text)}";
|
|
80
11
|
|
|
81
12
|
var __defProp = Object.defineProperty;
|
|
@@ -87,12 +18,38 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
87
18
|
if (result) __defProp(target, key, result);
|
|
88
19
|
return result;
|
|
89
20
|
};
|
|
90
|
-
class AccordionItem extends
|
|
21
|
+
class AccordionItem extends index.FoundationElement {
|
|
91
22
|
constructor() {
|
|
92
23
|
super(...arguments);
|
|
24
|
+
this.headinglevel = 2;
|
|
25
|
+
this.expanded = false;
|
|
93
26
|
this.noIndicator = false;
|
|
27
|
+
/**
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
this.clickHandler = () => {
|
|
31
|
+
this.expanded = !this.expanded;
|
|
32
|
+
this.change();
|
|
33
|
+
};
|
|
34
|
+
this.change = () => {
|
|
35
|
+
this.$emit("change");
|
|
36
|
+
};
|
|
94
37
|
}
|
|
95
38
|
}
|
|
39
|
+
__decorateClass([
|
|
40
|
+
index.attr({
|
|
41
|
+
attribute: "heading-level",
|
|
42
|
+
mode: "fromView",
|
|
43
|
+
converter: index.nullableNumberConverter
|
|
44
|
+
})
|
|
45
|
+
], AccordionItem.prototype, "headinglevel");
|
|
46
|
+
__decorateClass([
|
|
47
|
+
index.attr({ mode: "boolean" })
|
|
48
|
+
], AccordionItem.prototype, "expanded");
|
|
49
|
+
// @ts-expect-error Type is incorrectly non-optional
|
|
50
|
+
__decorateClass([
|
|
51
|
+
index.attr
|
|
52
|
+
], AccordionItem.prototype, "id");
|
|
96
53
|
__decorateClass([
|
|
97
54
|
index.attr
|
|
98
55
|
], AccordionItem.prototype, "heading");
|
|
@@ -116,7 +73,7 @@ const header = (context, hTag) => {
|
|
|
116
73
|
id="${(x) => x.id}"
|
|
117
74
|
aria-expanded="${(x) => x.expanded}"
|
|
118
75
|
aria-controls="${(x) => x.id}-panel"
|
|
119
|
-
@click="${(x
|
|
76
|
+
@click="${(x) => x.clickHandler()}"
|
|
120
77
|
${ref.ref("expandbutton")}
|
|
121
78
|
>
|
|
122
79
|
|
|
@@ -158,7 +115,7 @@ const accordionItemRegistries = [
|
|
|
158
115
|
];
|
|
159
116
|
const registerAccordionItem = index.registerFactory(accordionItemRegistries);
|
|
160
117
|
|
|
161
|
-
exports.AccordionItem = AccordionItem
|
|
118
|
+
exports.AccordionItem = AccordionItem;
|
|
162
119
|
exports.accordionItemDefinition = accordionItemDefinition;
|
|
163
120
|
exports.accordionItemRegistries = accordionItemRegistries;
|
|
164
121
|
exports.registerAccordionItem = registerAccordionItem;
|