@microsoft/fast-foundation
Advanced tools
Comparing version 3.0.0-alpha.7 to 3.0.0-alpha.8
@@ -23,10 +23,18 @@ { | ||
} | ||
], | ||
"no-restricted-imports": [ | ||
"error", | ||
{ | ||
"patterns": ["**/stories/**"] | ||
] | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["**/*.ts"], | ||
"excludedFiles": ["**/*.stories.ts"], | ||
"rules": { | ||
"no-restricted-imports": [ | ||
"error", | ||
{ | ||
"patterns": ["**/stories/**"] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} |
@@ -0,1 +1,2 @@ | ||
import "@microsoft/fast-element/polyfills"; | ||
import "../src/anchor/stories/anchor.register.js"; | ||
@@ -2,0 +3,0 @@ import "../src/anchored-region/stories/anchored-region.register.js"; |
import { FASTElement } from "@microsoft/fast-element"; | ||
import { AccordionExpandMode } from "./accordion.options.js"; | ||
/** | ||
* Expand mode for {@link FASTAccordion} | ||
* @public | ||
*/ | ||
export declare const AccordionExpandMode: { | ||
/** | ||
* Designates only a single {@link @microsoft/fast-foundation#(FASTAccordionItem:class) } can be open a time. | ||
*/ | ||
readonly single: "single"; | ||
/** | ||
* Designates multiple {@link @microsoft/fast-foundation#(FASTAccordionItem:class) | FASTAccordionItemItems} can be open simultaneously. | ||
*/ | ||
readonly multi: "multi"; | ||
}; | ||
/** | ||
* Type for the {@link FASTAccordion} Expand Mode | ||
* @public | ||
*/ | ||
export declare type AccordionExpandMode = typeof AccordionExpandMode[keyof typeof AccordionExpandMode]; | ||
/** | ||
* An Accordion Custom HTML Element | ||
@@ -23,0 +5,0 @@ * Implements {@link https://www.w3.org/TR/wai-aria-practices-1.1/#accordion | ARIA Accordion}. |
@@ -0,2 +1,3 @@ | ||
export * from "./accordion.js"; | ||
export * from "./accordion.options.js"; | ||
export * from "./accordion.template.js"; | ||
export * from "./accordion.js"; |
import { FASTElement } from "@microsoft/fast-element"; | ||
import { ARIAGlobalStatesAndProperties, StartEnd, StartEndOptions } from "../patterns/index.js"; | ||
import type { AnchorTarget } from "./anchor.options.js"; | ||
/** | ||
@@ -69,3 +70,3 @@ * Anchor configuration options | ||
*/ | ||
target: "_self" | "_blank" | "_parent" | "_top"; | ||
target: AnchorTarget; | ||
/** | ||
@@ -72,0 +73,0 @@ * See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element } for more information. |
@@ -0,2 +1,3 @@ | ||
export * from "./anchor.js"; | ||
export * from "./anchor.options.js"; | ||
export * from "./anchor.template.js"; | ||
export * from "./anchor.js"; |
@@ -1,2 +0,2 @@ | ||
import type { AutoUpdateMode, AxisPositioningMode, AxisScalingMode, HorizontalPosition, VerticalPosition } from "./anchored-region.js"; | ||
import type { AutoUpdateMode, AxisPositioningMode, AxisScalingMode, HorizontalPosition, VerticalPosition } from "./anchored-region.options.js"; | ||
/** | ||
@@ -3,0 +3,0 @@ * A utility interface to store anchored region |
import { FASTElement } from "@microsoft/fast-element"; | ||
import type { AnchoredRegionPositionLabel, AutoUpdateMode, AxisPositioningMode, AxisScalingMode, HorizontalPosition, VerticalPosition } from "./anchored-region.options.js"; | ||
/** | ||
* Defines the base behavior of an anchored region on a particular axis | ||
* | ||
* @public | ||
*/ | ||
export declare type AxisPositioningMode = "uncontrolled" | "locktodefault" | "dynamic"; | ||
/** | ||
* Defines the scaling behavior of an anchored region on a particular axis | ||
* | ||
* @public | ||
*/ | ||
export declare type AxisScalingMode = "anchor" | "fill" | "content"; | ||
/** | ||
* Defines the horizontal positioning options for an anchored region | ||
* | ||
* @public | ||
*/ | ||
export declare type HorizontalPosition = "start" | "end" | "left" | "right" | "center" | "unset"; | ||
/** | ||
* Defines the vertical positioning options for an anchored region | ||
* | ||
* @public | ||
*/ | ||
export declare type VerticalPosition = "top" | "bottom" | "center" | "unset"; | ||
/** | ||
* Defines if the component updates its position automatically. Calling update() always provokes an update. | ||
* anchor - the component only updates its position when the anchor resizes (default) | ||
* auto - the component updates its position when: | ||
* - update() is called | ||
* - the anchor resizes | ||
* - the window resizes | ||
* - the viewport resizes | ||
* - any scroll event in the document | ||
* | ||
* @public | ||
*/ | ||
export declare const AutoUpdateMode: { | ||
readonly anchor: "anchor"; | ||
readonly auto: "auto"; | ||
}; | ||
/** | ||
* @public | ||
*/ | ||
export declare type AutoUpdateMode = typeof AutoUpdateMode[keyof typeof AutoUpdateMode]; | ||
/** | ||
* Describes the possible positions of the region relative | ||
* to its anchor. Depending on the axis start = left/top, end = right/bottom | ||
* | ||
* @public | ||
*/ | ||
export declare type AnchoredRegionPositionLabel = "start" | "insetStart" | "insetEnd" | "end" | "center"; | ||
/** | ||
* An anchored region Custom HTML Element. | ||
@@ -55,0 +5,0 @@ * |
@@ -0,3 +1,4 @@ | ||
export * from "./anchored-region-config.js"; | ||
export * from "./anchored-region.js"; | ||
export * from "./anchored-region.options.js"; | ||
export * from "./anchored-region.template.js"; | ||
export * from "./anchored-region.js"; | ||
export * from "./anchored-region-config.js"; |
import { ARIAGlobalStatesAndProperties, StartEnd, StartEndOptions } from "../patterns/index.js"; | ||
import { FormAssociatedButton } from "./button.form-associated.js"; | ||
import { ButtonType } from "./button.options.js"; | ||
/** | ||
@@ -89,4 +90,4 @@ * Button configuration options | ||
*/ | ||
type: "submit" | "reset" | "button"; | ||
protected typeChanged(previous: "submit" | "reset" | "button" | void, next: "submit" | "reset" | "button"): void; | ||
type: ButtonType; | ||
protected typeChanged(previous: ButtonType | undefined, next: ButtonType): void; | ||
/** | ||
@@ -100,2 +101,4 @@ * | ||
defaultSlottedContent: HTMLElement[]; | ||
/** {@inheritDoc (FormAssociated:interface).validate} */ | ||
validate(): void; | ||
/** | ||
@@ -102,0 +105,0 @@ * @internal |
@@ -0,2 +1,3 @@ | ||
export * from "./button.js"; | ||
export * from "./button.options.js"; | ||
export * from "./button.template.js"; | ||
export * from "./button.js"; |
@@ -83,2 +83,4 @@ import { SyntheticViewTemplate } from "@microsoft/fast-element"; | ||
formResetCallback(): void; | ||
/** {@inheritDoc (FormAssociated:interface).validate} */ | ||
validate(): void; | ||
private get isAutocompleteInline(); | ||
@@ -85,0 +87,0 @@ private get isAutocompleteList(); |
@@ -104,3 +104,9 @@ import type { Constructable, FASTElement } from "@microsoft/fast-element"; | ||
stopPropagation(e: Event): void; | ||
validate(): void; | ||
/** | ||
* Sets the validity of the custom element. By default this uses the proxy element to determine | ||
* validity, but this can be extended or replaced in implementation. | ||
* | ||
* @param anchor - The anchor element to provide to ElementInternals.setValidity for surfacing the browser's constraint validation UI | ||
*/ | ||
validate(anchor?: HTMLElement): void; | ||
valueChanged(previous: string, next: string): void; | ||
@@ -107,0 +113,0 @@ } |
import { FASTElement } from "@microsoft/fast-element"; | ||
import type { SyntheticViewTemplate } from "@microsoft/fast-element"; | ||
import type { StartEndOptions } from "../patterns/index.js"; | ||
import type { HorizontalScrollView } from "./horizontal-scroll.options.js"; | ||
import { ScrollEasing } from "./horizontal-scroll.options.js"; | ||
/** | ||
* The views types for a horizontal-scroll {@link @microsoft/fast-foundation#(FASTHorizontalScroll:class)} | ||
* @public | ||
*/ | ||
export declare type HorizontalScrollView = "default" | "mobile"; | ||
/** | ||
* The easing types available for the horizontal-scroll {@link @microsoft/fast-foundation#(FASTHorizontalScroll:class)} | ||
* @public | ||
*/ | ||
export declare type ScrollEasing = "linear" | "ease-in" | "ease-out" | "ease-in-out" | string; | ||
/** | ||
* Horizontal scroll configuration options | ||
* @public | ||
*/ | ||
export declare type HorizontalScrollOptions = StartEndOptions & { | ||
nextFlipper?: SyntheticViewTemplate | string; | ||
previousFlipper?: SyntheticViewTemplate | string; | ||
}; | ||
/** | ||
* A HorizontalScroll Custom HTML Element | ||
@@ -106,3 +88,3 @@ * | ||
*/ | ||
easing: ScrollEasing; | ||
easing: ScrollEasing | string; | ||
/** | ||
@@ -109,0 +91,0 @@ * Attribute to hide flippers from assistive technology |
@@ -1,3 +0,4 @@ | ||
import { ElementViewTemplate } from "@microsoft/fast-element"; | ||
import type { FASTHorizontalScroll, HorizontalScrollOptions } from "./horizontal-scroll.js"; | ||
import type { ElementViewTemplate } from "@microsoft/fast-element"; | ||
import type { FASTHorizontalScroll } from "./horizontal-scroll.js"; | ||
import type { HorizontalScrollOptions } from "./horizontal-scroll.options.js"; | ||
/** | ||
@@ -4,0 +5,0 @@ * @public |
export * from "./horizontal-scroll.js"; | ||
export * from "./horizontal-scroll.options.js"; | ||
export * from "./horizontal-scroll.template.js"; |
@@ -160,2 +160,4 @@ import { SyntheticViewTemplate } from "@microsoft/fast-element"; | ||
valueChanged(previous: string, next: string): void; | ||
/** {@inheritDoc (FormAssociated:interface).validate} */ | ||
validate(): void; | ||
/** | ||
@@ -162,0 +164,0 @@ * Sets the internal value to a valid number between the min and max properties |
@@ -0,10 +1,11 @@ | ||
export * from "./picker-list-item.js"; | ||
export * from "./picker-list-item.template.js"; | ||
export * from "./picker-list.js"; | ||
export * from "./picker-list.template.js"; | ||
export * from "./picker-menu-option.js"; | ||
export * from "./picker-menu-option.template.js"; | ||
export * from "./picker-menu.js"; | ||
export * from "./picker-menu.template.js"; | ||
export * from "./picker.js"; | ||
export * from "./picker.options.js"; | ||
export * from "./picker.template.js"; | ||
export * from "./picker.js"; | ||
export * from "./picker-menu.template.js"; | ||
export * from "./picker-menu.js"; | ||
export * from "./picker-menu-option.template.js"; | ||
export * from "./picker-menu-option.js"; | ||
export * from "./picker-list.template.js"; | ||
export * from "./picker-list.js"; | ||
export * from "./picker-list-item.template.js"; | ||
export * from "./picker-list-item.js"; |
import { ViewTemplate } from "@microsoft/fast-element"; | ||
import { AnchoredRegionConfig, FASTAnchoredRegion } from "../anchored-region/index.js"; | ||
import type { FASTPickerList } from "./picker-list.js"; | ||
import type { FASTPickerMenu } from "./picker-menu.js"; | ||
import { FormAssociatedPicker } from "./picker.form-associated.js"; | ||
import type { FASTPickerList } from "./picker-list.js"; | ||
import { MenuPlacement } from "./picker.options.js"; | ||
/** | ||
* Defines the vertical positioning options for an anchored region | ||
* | ||
* @beta | ||
*/ | ||
export declare type menuConfigs = "bottom" | "bottom-fill" | "tallest" | "tallest-fill" | "top" | "top-fill"; | ||
/** | ||
* A Picker Custom HTML Element. This is an early "alpha" version of the component. | ||
@@ -104,3 +99,3 @@ * Developers should expect the api to evolve, breaking changes are possible. | ||
*/ | ||
menuPlacement: menuConfigs; | ||
menuPlacement: MenuPlacement; | ||
protected menuPlacementChanged(): void; | ||
@@ -107,0 +102,0 @@ /** |
@@ -116,2 +116,4 @@ import { ARIAGlobalStatesAndProperties, StartEnd, StartEndOptions } from "../patterns/index.js"; | ||
connectedCallback(): void; | ||
/** {@inheritDoc (FormAssociated:interface).validate} */ | ||
validate(): void; | ||
/** | ||
@@ -118,0 +120,0 @@ * Handles the internal control's `input` event |
@@ -0,2 +1,3 @@ | ||
export * from "./slider.js"; | ||
export * from "./slider.options.js"; | ||
export * from "./slider.template.js"; | ||
export * from "./slider.js"; |
@@ -1,35 +0,5 @@ | ||
import { SyntheticViewTemplate } from "@microsoft/fast-element"; | ||
import { Direction, Orientation } from "@microsoft/fast-web-utilities"; | ||
import { FormAssociatedSlider } from "./slider.form-associated.js"; | ||
import { SliderConfiguration, SliderMode } from "./slider.options.js"; | ||
/** | ||
* The selection modes of a {@link @microsoft/fast-foundation#(FASTSlider:class)}. | ||
* @public | ||
*/ | ||
export declare const SliderMode: { | ||
readonly singleValue: "single-value"; | ||
}; | ||
/** | ||
* The types for the selection mode of the slider | ||
* @public | ||
*/ | ||
export declare type SliderMode = typeof SliderMode[keyof typeof SliderMode]; | ||
/** | ||
* The configuration structure of {@link @microsoft/fast-foundation#(FASTSlider:class)}. | ||
* @public | ||
*/ | ||
export interface SliderConfiguration { | ||
max: number; | ||
min: number; | ||
orientation?: Orientation; | ||
direction?: Direction; | ||
disabled?: boolean; | ||
} | ||
/** | ||
* Slider configuration options | ||
* @public | ||
*/ | ||
export declare type SliderOptions = { | ||
thumb?: string | SyntheticViewTemplate; | ||
}; | ||
/** | ||
* A Slider Custom HTML Element. | ||
@@ -36,0 +6,0 @@ * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#slider | ARIA slider }. |
import { ElementViewTemplate } from "@microsoft/fast-element"; | ||
import type { FASTSlider, SliderOptions } from "./slider.js"; | ||
import type { FASTSlider } from "./slider.js"; | ||
import type { SliderOptions } from "./slider.options.js"; | ||
/** | ||
@@ -4,0 +5,0 @@ * The template for the {@link @microsoft/fast-foundation#(FASTSlider:class)} component. |
@@ -139,2 +139,4 @@ import { DelegatesARIATextbox } from "../text-field/text-field.js"; | ||
handleChange(): void; | ||
/** {@inheritDoc (FormAssociated:interface).validate} */ | ||
validate(): void; | ||
} | ||
@@ -141,0 +143,0 @@ /** |
@@ -140,2 +140,4 @@ import { ARIAGlobalStatesAndProperties, StartEnd, StartEndOptions } from "../patterns/index.js"; | ||
handleChange(): void; | ||
/** {@inheritDoc (FormAssociated:interface).validate} */ | ||
validate(): void; | ||
} | ||
@@ -142,0 +144,0 @@ /** |
import { FASTElement } from "@microsoft/fast-element"; | ||
import { Direction } from "@microsoft/fast-web-utilities"; | ||
import type { AutoUpdateMode, AxisPositioningMode, AxisScalingMode, FASTAnchoredRegion } from "../anchored-region/anchored-region.js"; | ||
import type { FASTAnchoredRegion } from "../anchored-region/anchored-region.js"; | ||
import type { AutoUpdateMode, AxisPositioningMode, AxisScalingMode } from "../anchored-region/anchored-region.options.js"; | ||
import { TooltipPosition } from "./tooltip.options.js"; | ||
@@ -5,0 +6,0 @@ export { TooltipPosition }; |
@@ -24,2 +24,6 @@ /** | ||
/** | ||
* The tooltip is positioned in the center of the element | ||
*/ | ||
readonly center: "center"; | ||
/** | ||
* The tooltip is positioned before the element | ||
@@ -37,2 +41,6 @@ */ | ||
/** | ||
* The tooltip is positioned above the element and horizontally centered | ||
*/ | ||
readonly topCenter: "top-center"; | ||
/** | ||
* The tooltip is positioned above the element and to the right | ||
@@ -46,2 +54,6 @@ */ | ||
/** | ||
* The tooltip is positioned below the element and horizontally centered | ||
*/ | ||
readonly bottomCenter: "bottom-center"; | ||
/** | ||
* The tooltip is positioned below the element and to the right | ||
@@ -48,0 +60,0 @@ */ |
@@ -5,17 +5,4 @@ import { __decorate } from "tslib"; | ||
import { FASTAccordionItem } from "../accordion-item/accordion-item.js"; | ||
import { AccordionExpandMode } from "./accordion.options.js"; | ||
/** | ||
* Expand mode for {@link FASTAccordion} | ||
* @public | ||
*/ | ||
export const AccordionExpandMode = { | ||
/** | ||
* Designates only a single {@link @microsoft/fast-foundation#(FASTAccordionItem:class) } can be open a time. | ||
*/ | ||
single: "single", | ||
/** | ||
* Designates multiple {@link @microsoft/fast-foundation#(FASTAccordionItem:class) | FASTAccordionItemItems} can be open simultaneously. | ||
*/ | ||
multi: "multi", | ||
}; | ||
/** | ||
* An Accordion Custom HTML Element | ||
@@ -22,0 +9,0 @@ * Implements {@link https://www.w3.org/TR/wai-aria-practices-1.1/#accordion | ARIA Accordion}. |
@@ -0,2 +1,3 @@ | ||
export * from "./accordion.js"; | ||
export * from "./accordion.options.js"; | ||
export * from "./accordion.template.js"; | ||
export * from "./accordion.js"; |
@@ -0,2 +1,3 @@ | ||
export * from "./anchor.js"; | ||
export * from "./anchor.options.js"; | ||
export * from "./anchor.template.js"; | ||
export * from "./anchor.js"; |
@@ -7,18 +7,2 @@ import { __decorate } from "tslib"; | ||
/** | ||
* Defines if the component updates its position automatically. Calling update() always provokes an update. | ||
* anchor - the component only updates its position when the anchor resizes (default) | ||
* auto - the component updates its position when: | ||
* - update() is called | ||
* - the anchor resizes | ||
* - the window resizes | ||
* - the viewport resizes | ||
* - any scroll event in the document | ||
* | ||
* @public | ||
*/ | ||
export const AutoUpdateMode = { | ||
anchor: "anchor", | ||
auto: "auto", | ||
}; | ||
/** | ||
* An anchored region Custom HTML Element. | ||
@@ -25,0 +9,0 @@ * |
@@ -0,3 +1,4 @@ | ||
export * from "./anchored-region-config.js"; | ||
export * from "./anchored-region.js"; | ||
export * from "./anchored-region.options.js"; | ||
export * from "./anchored-region.template.js"; | ||
export * from "./anchored-region.js"; | ||
export * from "./anchored-region-config.js"; |
@@ -6,2 +6,3 @@ import { __decorate } from "tslib"; | ||
import { FormAssociatedButton } from "./button.form-associated.js"; | ||
import { ButtonType } from "./button.options.js"; | ||
/** | ||
@@ -105,7 +106,14 @@ * A Button Custom HTML Element. | ||
} | ||
next === "submit" && this.addEventListener("click", this.handleSubmission); | ||
previous === "submit" && this.removeEventListener("click", this.handleSubmission); | ||
next === "reset" && this.addEventListener("click", this.handleFormReset); | ||
previous === "reset" && this.removeEventListener("click", this.handleFormReset); | ||
next === ButtonType.submit && | ||
this.addEventListener("click", this.handleSubmission); | ||
previous === ButtonType.submit && | ||
this.removeEventListener("click", this.handleSubmission); | ||
next === ButtonType.reset && this.addEventListener("click", this.handleFormReset); | ||
previous === ButtonType.reset && | ||
this.removeEventListener("click", this.handleFormReset); | ||
} | ||
/** {@inheritDoc (FormAssociated:interface).validate} */ | ||
validate() { | ||
super.validate(this.control); | ||
} | ||
/** | ||
@@ -112,0 +120,0 @@ * @internal |
@@ -0,2 +1,3 @@ | ||
export * from "./button.js"; | ||
export * from "./button.options.js"; | ||
export * from "./button.template.js"; | ||
export * from "./button.js"; |
@@ -86,2 +86,6 @@ import { __decorate } from "tslib"; | ||
} | ||
/** {@inheritDoc (FormAssociated:interface).validate} */ | ||
validate() { | ||
super.validate(this.control); | ||
} | ||
get isAutocompleteInline() { | ||
@@ -88,0 +92,0 @@ return (this.autocomplete === ComboboxAutocomplete.inline || this.isAutocompleteBoth); |
@@ -335,9 +335,6 @@ import { attr, booleanConverter, emptyArray, observable, Updates, } from "@microsoft/fast-element"; | ||
} | ||
/** | ||
* Sets the validity of the custom element. By default this uses the proxy element to determine | ||
* validity, but this can be extended or replaced in implementation. | ||
*/ | ||
validate() { | ||
/** {@inheritDoc (FormAssociated:interface).validate} */ | ||
validate(anchor) { | ||
if (this.proxy instanceof HTMLElement) { | ||
this.setValidity(this.proxy.validity, this.proxy.validationMessage); | ||
this.setValidity(this.proxy.validity, this.proxy.validationMessage, anchor); | ||
} | ||
@@ -344,0 +341,0 @@ } |
import { __decorate } from "tslib"; | ||
import { attr, booleanConverter, FASTElement, nullableNumberConverter, observable, Updates, } from "@microsoft/fast-element"; | ||
import { ScrollEasing } from "./horizontal-scroll.options.js"; | ||
/** | ||
@@ -42,3 +43,3 @@ * A HorizontalScroll Custom HTML Element | ||
*/ | ||
this.easing = "ease-in-out"; | ||
this.easing = ScrollEasing.easeInOut; | ||
/** | ||
@@ -45,0 +46,0 @@ * Attribute to hide flippers from assistive technology |
@@ -1,3 +0,3 @@ | ||
import { elements, html, ref, slotted, when, } from "@microsoft/fast-element"; | ||
import { endSlotTemplate, startSlotTemplate } from "../patterns/index.js"; | ||
import { elements, html, ref, slotted, when } from "@microsoft/fast-element"; | ||
import { endSlotTemplate, startSlotTemplate } from "../patterns/start-end.js"; | ||
/** | ||
@@ -4,0 +4,0 @@ * @public |
export * from "./horizontal-scroll.js"; | ||
export * from "./horizontal-scroll.options.js"; | ||
export * from "./horizontal-scroll.template.js"; |
@@ -118,2 +118,6 @@ import { __decorate } from "tslib"; | ||
} | ||
/** {@inheritDoc (FormAssociated:interface).validate} */ | ||
validate() { | ||
super.validate(this.control); | ||
} | ||
/** | ||
@@ -120,0 +124,0 @@ * Sets the internal value to a valid number between the min and max properties |
@@ -0,10 +1,11 @@ | ||
export * from "./picker-list-item.js"; | ||
export * from "./picker-list-item.template.js"; | ||
export * from "./picker-list.js"; | ||
export * from "./picker-list.template.js"; | ||
export * from "./picker-menu-option.js"; | ||
export * from "./picker-menu-option.template.js"; | ||
export * from "./picker-menu.js"; | ||
export * from "./picker-menu.template.js"; | ||
export * from "./picker.js"; | ||
export * from "./picker.options.js"; | ||
export * from "./picker.template.js"; | ||
export * from "./picker.js"; | ||
export * from "./picker-menu.template.js"; | ||
export * from "./picker-menu.js"; | ||
export * from "./picker-menu-option.template.js"; | ||
export * from "./picker-menu-option.js"; | ||
export * from "./picker-list.template.js"; | ||
export * from "./picker-list.js"; | ||
export * from "./picker-list-item.template.js"; | ||
export * from "./picker-list-item.js"; |
@@ -5,5 +5,6 @@ import { __decorate } from "tslib"; | ||
import { FlyoutPosBottom, FlyoutPosBottomFill, FlyoutPosTallest, FlyoutPosTallestFill, FlyoutPosTop, FlyoutPosTopFill, } from "../anchored-region/index.js"; | ||
import { FASTPickerListItem } from "./picker-list-item.js"; | ||
import { FASTPickerMenuOption } from "./picker-menu-option.js"; | ||
import { FASTPickerListItem } from "./picker-list-item.js"; | ||
import { FormAssociatedPicker } from "./picker.form-associated.js"; | ||
import { MenuPlacement } from "./picker.options.js"; | ||
const pickerInputTemplate = html ` | ||
@@ -80,3 +81,3 @@ <input | ||
*/ | ||
this.menuPlacement = "bottom-fill"; | ||
this.menuPlacement = MenuPlacement.bottomFill; | ||
/** | ||
@@ -83,0 +84,0 @@ * Whether to display a loading state if the menu is opened. |
@@ -17,5 +17,3 @@ import { __decorate } from "tslib"; | ||
valueChanged() { | ||
if (this.$fastController.isConnected) { | ||
this.updatePercentComplete(); | ||
} | ||
this.updatePercentComplete(); | ||
} | ||
@@ -22,0 +20,0 @@ minChanged() { |
@@ -86,2 +86,6 @@ import { __decorate } from "tslib"; | ||
} | ||
/** {@inheritDoc (FormAssociated:interface).validate} */ | ||
validate() { | ||
super.validate(this.control); | ||
} | ||
/** | ||
@@ -88,0 +92,0 @@ * Handles the internal control's `input` event |
@@ -0,2 +1,3 @@ | ||
export * from "./slider.js"; | ||
export * from "./slider.options.js"; | ||
export * from "./slider.template.js"; | ||
export * from "./slider.js"; |
import { __decorate } from "tslib"; | ||
import { attr, nullableNumberConverter, observable, } from "@microsoft/fast-element"; | ||
import { attr, nullableNumberConverter, observable } from "@microsoft/fast-element"; | ||
import { Direction, keyArrowDown, keyArrowLeft, keyArrowRight, keyArrowUp, keyEnd, keyHome, Orientation, } from "@microsoft/fast-web-utilities"; | ||
@@ -7,10 +7,4 @@ import { getDirection } from "../utilities/direction.js"; | ||
import { FormAssociatedSlider } from "./slider.form-associated.js"; | ||
import { SliderMode } from "./slider.options.js"; | ||
/** | ||
* The selection modes of a {@link @microsoft/fast-foundation#(FASTSlider:class)}. | ||
* @public | ||
*/ | ||
export const SliderMode = { | ||
singleValue: "single-value", | ||
}; | ||
/** | ||
* A Slider Custom HTML Element. | ||
@@ -17,0 +11,0 @@ * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#slider | ARIA slider }. |
import { __decorate } from "tslib"; | ||
import { attr, FASTElement, observable } from "@microsoft/fast-element"; | ||
import { keyArrowDown, keyArrowLeft, keyArrowRight, keyArrowUp, keyEnd, keyHome, uniqueId, wrapInBounds, } from "@microsoft/fast-web-utilities"; | ||
import { keyArrowDown, keyArrowLeft, keyArrowRight, keyArrowUp, keyEnd, keyHome, limit, uniqueId, } from "@microsoft/fast-web-utilities"; | ||
import { StartEnd } from "../patterns/index.js"; | ||
@@ -325,5 +325,10 @@ import { applyMixins } from "../utilities/apply-mixins.js"; | ||
adjust(adjustment) { | ||
this.prevActiveTabIndex = this.activeTabIndex; | ||
this.activeTabIndex = wrapInBounds(0, this.tabs.length - 1, this.activeTabIndex + adjustment); | ||
this.setComponent(); | ||
const focusableTabs = this.tabs.filter(t => !this.isDisabledElement(t)); | ||
const currentActiveTabIndex = focusableTabs.indexOf(this.activetab); | ||
const nextTabIndex = limit(0, focusableTabs.length - 1, currentActiveTabIndex + adjustment); | ||
// the index of the next focusable tab within the context of all available tabs | ||
const nextIndex = this.tabs.indexOf(focusableTabs[nextTabIndex]); | ||
if (nextIndex > -1) { | ||
this.moveToTabByIndex(this.tabs, nextIndex); | ||
} | ||
} | ||
@@ -330,0 +335,0 @@ focusTab() { |
@@ -102,2 +102,6 @@ import { __decorate } from "tslib"; | ||
} | ||
/** {@inheritDoc (FormAssociated:interface).validate} */ | ||
validate() { | ||
super.validate(this.control); | ||
} | ||
} | ||
@@ -104,0 +108,0 @@ __decorate([ |
@@ -137,2 +137,6 @@ import { __decorate } from "tslib"; | ||
} | ||
/** {@inheritDoc (FormAssociated:interface).validate} */ | ||
validate() { | ||
super.validate(this.control); | ||
} | ||
} | ||
@@ -139,0 +143,0 @@ __decorate([ |
@@ -414,2 +414,6 @@ import { __decorate } from "tslib"; | ||
break; | ||
case TooltipPosition.center: | ||
this.verticalDefaultPosition = "center"; | ||
this.horizontalDefaultPosition = "center"; | ||
break; | ||
case TooltipPosition.topLeft: | ||
@@ -419,2 +423,10 @@ this.verticalDefaultPosition = "top"; | ||
break; | ||
case TooltipPosition.topCenter: | ||
this.verticalDefaultPosition = "top"; | ||
this.horizontalDefaultPosition = "center"; | ||
break; | ||
case TooltipPosition.bottomCenter: | ||
this.verticalDefaultPosition = "bottom"; | ||
this.horizontalDefaultPosition = "center"; | ||
break; | ||
case TooltipPosition.topRight: | ||
@@ -421,0 +433,0 @@ this.verticalDefaultPosition = "top"; |
@@ -24,2 +24,6 @@ /** | ||
/** | ||
* The tooltip is positioned in the center of the element | ||
*/ | ||
center: "center", | ||
/** | ||
* The tooltip is positioned before the element | ||
@@ -37,2 +41,6 @@ */ | ||
/** | ||
* The tooltip is positioned above the element and horizontally centered | ||
*/ | ||
topCenter: "top-center", | ||
/** | ||
* The tooltip is positioned above the element and to the right | ||
@@ -46,2 +54,6 @@ */ | ||
/** | ||
* The tooltip is positioned below the element and horizontally centered | ||
*/ | ||
bottomCenter: "bottom-center", | ||
/** | ||
* The tooltip is positioned below the element and to the right | ||
@@ -48,0 +60,0 @@ */ |
@@ -5,3 +5,3 @@ { | ||
"sideEffects": false, | ||
"version": "3.0.0-alpha.7", | ||
"version": "3.0.0-alpha.8", | ||
"author": { | ||
@@ -8,0 +8,0 @@ "name": "Microsoft", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5056759
463
129436