@fluentui/web-components 3.0.0-beta.23 → 3.0.0-beta.25
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/CHANGELOG.md +22 -2
- package/dist/dts/checkbox/checkbox.d.ts +256 -32
- package/dist/dts/checkbox/checkbox.options.d.ts +13 -10
- package/dist/dts/checkbox/checkbox.template.d.ts +3 -2
- package/dist/dts/checkbox/index.d.ts +2 -2
- package/dist/dts/field/define.d.ts +1 -0
- package/dist/dts/field/field.bench.d.ts +3 -0
- package/dist/dts/field/field.d.ts +99 -0
- package/dist/dts/field/field.definition.d.ts +9 -0
- package/dist/dts/field/field.options.d.ts +41 -0
- package/dist/dts/field/field.styles.d.ts +6 -0
- package/dist/dts/field/field.template.d.ts +6 -0
- package/dist/dts/field/index.d.ts +6 -0
- package/dist/dts/index-rollup.d.ts +1 -0
- package/dist/dts/index.d.ts +2 -0
- package/dist/dts/text-input/text-input.d.ts +50 -8
- package/dist/dts/utils/element-internals.d.ts +20 -0
- package/dist/esm/button/button.styles.js +27 -27
- package/dist/esm/button/button.styles.js.map +1 -1
- package/dist/esm/checkbox/checkbox.definition.js +1 -1
- package/dist/esm/checkbox/checkbox.definition.js.map +1 -1
- package/dist/esm/checkbox/checkbox.js +344 -41
- package/dist/esm/checkbox/checkbox.js.map +1 -1
- package/dist/esm/checkbox/checkbox.options.js +0 -8
- package/dist/esm/checkbox/checkbox.options.js.map +1 -1
- package/dist/esm/checkbox/checkbox.styles.js +145 -123
- package/dist/esm/checkbox/checkbox.styles.js.map +1 -1
- package/dist/esm/checkbox/checkbox.template.js +23 -34
- package/dist/esm/checkbox/checkbox.template.js.map +1 -1
- package/dist/esm/checkbox/index.js +1 -1
- package/dist/esm/checkbox/index.js.map +1 -1
- package/dist/esm/dialog/dialog.styles.js +9 -2
- package/dist/esm/dialog/dialog.styles.js.map +1 -1
- package/dist/esm/field/define.js +4 -0
- package/dist/esm/field/define.js.map +1 -0
- package/dist/esm/field/field.bench.js +10 -0
- package/dist/esm/field/field.bench.js.map +1 -0
- package/dist/esm/field/field.definition.js +20 -0
- package/dist/esm/field/field.definition.js.map +1 -0
- package/dist/esm/field/field.js +139 -0
- package/dist/esm/field/field.js.map +1 -0
- package/dist/esm/field/field.options.js +27 -0
- package/dist/esm/field/field.options.js.map +1 -0
- package/dist/esm/field/field.styles.js +186 -0
- package/dist/esm/field/field.styles.js.map +1 -0
- package/dist/esm/field/field.template.js +26 -0
- package/dist/esm/field/field.template.js.map +1 -0
- package/dist/esm/field/index.js +6 -0
- package/dist/esm/field/index.js.map +1 -0
- package/dist/esm/index-rollup.js +1 -0
- package/dist/esm/index-rollup.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/label/label.styles.js +12 -5
- package/dist/esm/label/label.styles.js.map +1 -1
- package/dist/esm/text/text.styles.js +48 -24
- package/dist/esm/text/text.styles.js.map +1 -1
- package/dist/esm/text-input/text-input.definition.js +3 -0
- package/dist/esm/text-input/text-input.definition.js.map +1 -1
- package/dist/esm/text-input/text-input.js +78 -20
- package/dist/esm/text-input/text-input.js.map +1 -1
- package/dist/esm/text-input/text-input.styles.js +14 -9
- package/dist/esm/text-input/text-input.styles.js.map +1 -1
- package/dist/esm/text-input/text-input.template.js +39 -33
- package/dist/esm/text-input/text-input.template.js.map +1 -1
- package/dist/esm/theme/set-theme.js +10 -1
- package/dist/esm/theme/set-theme.js.map +1 -1
- package/dist/esm/utils/element-internals.js +32 -0
- package/dist/esm/utils/element-internals.js.map +1 -0
- package/dist/web-components.d.ts +471 -55
- package/dist/web-components.js +2785 -2151
- package/dist/web-components.min.js +240 -235
- package/package.json +2 -1
- package/dist/dts/checkbox/checkbox.form-associated.d.ts +0 -14
- package/dist/esm/checkbox/checkbox.form-associated.js +0 -14
- package/dist/esm/checkbox/checkbox.form-associated.js.map +0 -1
package/dist/web-components.d.ts
CHANGED
|
@@ -1641,69 +1641,296 @@ declare interface CheckableFormAssociated extends FormAssociated {
|
|
|
1641
1641
|
*
|
|
1642
1642
|
* @slot checked-indicator - The checked indicator
|
|
1643
1643
|
* @slot indeterminate-indicator - The indeterminate indicator
|
|
1644
|
-
* @slot - The default slot for the label
|
|
1645
|
-
* @csspart control - The element representing the visual checkbox control
|
|
1646
|
-
* @csspart label - The label
|
|
1647
1644
|
* @fires change - Emits a custom change event when the checked state changes
|
|
1645
|
+
* @fires input - Emits a custom input event when the checked state changes
|
|
1648
1646
|
*
|
|
1649
1647
|
* @public
|
|
1650
1648
|
*/
|
|
1651
|
-
export declare class Checkbox extends
|
|
1649
|
+
export declare class Checkbox extends FASTElement {
|
|
1652
1650
|
/**
|
|
1653
|
-
*
|
|
1651
|
+
* Indicates that the element should get focus after the page finishes loading.
|
|
1652
|
+
* @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/input#autofocus | `autofocus`} attribute
|
|
1654
1653
|
*
|
|
1655
1654
|
* @public
|
|
1656
1655
|
* @remarks
|
|
1657
|
-
* HTML Attribute:
|
|
1656
|
+
* HTML Attribute: `autofocus`
|
|
1658
1657
|
*/
|
|
1659
|
-
|
|
1658
|
+
autofocus: boolean;
|
|
1660
1659
|
/**
|
|
1661
|
-
*
|
|
1660
|
+
* The element's current checked state.
|
|
1662
1661
|
*
|
|
1663
1662
|
* @public
|
|
1663
|
+
*/
|
|
1664
|
+
get checked(): boolean;
|
|
1665
|
+
set checked(state: boolean);
|
|
1666
|
+
/**
|
|
1667
|
+
* The element's disabled state.
|
|
1668
|
+
* @public
|
|
1664
1669
|
* @remarks
|
|
1665
|
-
* HTML Attribute:
|
|
1670
|
+
* HTML Attribute: `disabled`
|
|
1666
1671
|
*/
|
|
1667
|
-
|
|
1672
|
+
disabled: boolean;
|
|
1668
1673
|
/**
|
|
1669
|
-
*
|
|
1674
|
+
* The id of a form to associate the element to.
|
|
1675
|
+
* @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/input#form | `form`} attribute
|
|
1670
1676
|
*
|
|
1671
1677
|
* @public
|
|
1672
1678
|
* @remarks
|
|
1673
|
-
* HTML Attribute:
|
|
1679
|
+
* HTML Attribute: `form`
|
|
1674
1680
|
*/
|
|
1675
|
-
|
|
1681
|
+
formAttribute?: string;
|
|
1676
1682
|
/**
|
|
1677
|
-
*
|
|
1678
|
-
*
|
|
1683
|
+
* Indicates that the element is in an indeterminate or mixed state.
|
|
1684
|
+
*
|
|
1685
|
+
* @public
|
|
1686
|
+
*/
|
|
1687
|
+
indeterminate?: boolean;
|
|
1688
|
+
/**
|
|
1689
|
+
* Synchronizes the element's indeterminate state with the internal ElementInternals state.
|
|
1690
|
+
*
|
|
1691
|
+
* @internal
|
|
1692
|
+
*/
|
|
1693
|
+
indeterminateChanged(prev: boolean, next: boolean): void;
|
|
1694
|
+
/**
|
|
1695
|
+
* The element's checked state.
|
|
1696
|
+
*
|
|
1697
|
+
* @public
|
|
1698
|
+
* @remarks
|
|
1699
|
+
* HTML Attribute: `checked`
|
|
1700
|
+
*/
|
|
1701
|
+
initialChecked?: boolean;
|
|
1702
|
+
/**
|
|
1703
|
+
* Updates the form value when the checked state changes.
|
|
1679
1704
|
*
|
|
1680
1705
|
* @internal
|
|
1681
1706
|
*/
|
|
1707
|
+
initialCheckedChanged(prev: boolean | undefined, next: boolean): void;
|
|
1708
|
+
/**
|
|
1709
|
+
* The initial value of the input.
|
|
1710
|
+
*
|
|
1711
|
+
* @public
|
|
1712
|
+
* @remarks
|
|
1713
|
+
* HTML Attribute: `value`
|
|
1714
|
+
*/
|
|
1682
1715
|
initialValue: string;
|
|
1683
1716
|
/**
|
|
1717
|
+
* Sets the value of the input when the value attribute changes.
|
|
1718
|
+
*
|
|
1719
|
+
* @param prev - The previous value
|
|
1720
|
+
* @param next - The current value
|
|
1684
1721
|
* @internal
|
|
1685
1722
|
*/
|
|
1686
|
-
|
|
1723
|
+
initialValueChanged(prev: string, next: string): void;
|
|
1687
1724
|
/**
|
|
1688
|
-
* The
|
|
1725
|
+
* The name of the element. This element's value will be surfaced during form submission under the provided name.
|
|
1726
|
+
*
|
|
1727
|
+
* @public
|
|
1728
|
+
* @remarks
|
|
1729
|
+
* HTML Attribute: `name`
|
|
1730
|
+
*/
|
|
1731
|
+
name: string;
|
|
1732
|
+
/**
|
|
1733
|
+
* The element's required state.
|
|
1734
|
+
*
|
|
1735
|
+
* @public
|
|
1736
|
+
* @remarks
|
|
1737
|
+
* HTML Attribute: `required`
|
|
1738
|
+
*/
|
|
1739
|
+
required: boolean;
|
|
1740
|
+
/**
|
|
1741
|
+
* Sets the validity of the control when the required state changes.
|
|
1742
|
+
*
|
|
1743
|
+
* @param prev - The previous required state
|
|
1744
|
+
* @param next - The current required state
|
|
1745
|
+
* @internal
|
|
1746
|
+
*/
|
|
1747
|
+
requiredChanged(prev: boolean, next: boolean): void;
|
|
1748
|
+
/**
|
|
1749
|
+
* Indicates the shape of the checkbox.
|
|
1750
|
+
*
|
|
1751
|
+
* @public
|
|
1752
|
+
* @remarks
|
|
1753
|
+
* HTML Attribute: `shape`
|
|
1754
|
+
*/
|
|
1755
|
+
shape: CheckboxShape;
|
|
1756
|
+
/**
|
|
1757
|
+
* Indicates the size of the checkbox.
|
|
1758
|
+
*
|
|
1759
|
+
* @public
|
|
1760
|
+
* @remarks
|
|
1761
|
+
* HTML Attribute: `size`
|
|
1762
|
+
*/
|
|
1763
|
+
size?: CheckboxSize;
|
|
1764
|
+
/**
|
|
1765
|
+
* The internal checked state of the control.
|
|
1766
|
+
*
|
|
1767
|
+
* @internal
|
|
1768
|
+
*/
|
|
1769
|
+
private _checked;
|
|
1770
|
+
/**
|
|
1771
|
+
* Indicates that the checked state has been changed by the user.
|
|
1772
|
+
*
|
|
1773
|
+
* @internal
|
|
1774
|
+
*/
|
|
1775
|
+
private dirtyChecked;
|
|
1776
|
+
/**
|
|
1777
|
+
* The associated `<form>` element.
|
|
1778
|
+
*
|
|
1779
|
+
* @public
|
|
1780
|
+
* @remarks
|
|
1781
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/form | `ElementInternals.form`} property.
|
|
1689
1782
|
*/
|
|
1690
|
-
|
|
1783
|
+
get form(): HTMLFormElement | null;
|
|
1784
|
+
/**
|
|
1785
|
+
* The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
1786
|
+
*
|
|
1787
|
+
* @internal
|
|
1788
|
+
*/
|
|
1789
|
+
elementInternals: ElementInternals;
|
|
1790
|
+
/**
|
|
1791
|
+
* The form-associated flag.
|
|
1792
|
+
* @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
|
|
1793
|
+
*
|
|
1794
|
+
* @public
|
|
1795
|
+
*/
|
|
1796
|
+
static formAssociated: boolean;
|
|
1797
|
+
/**
|
|
1798
|
+
* A reference to all associated `<label>` elements.
|
|
1799
|
+
*
|
|
1800
|
+
* @public
|
|
1801
|
+
*/
|
|
1802
|
+
get labels(): ReadonlyArray<Node>;
|
|
1803
|
+
/**
|
|
1804
|
+
* The fallback validation message, taken from a native checkbox `<input>` element.
|
|
1805
|
+
*
|
|
1806
|
+
* @internal
|
|
1807
|
+
*/
|
|
1808
|
+
private _validationFallbackMessage;
|
|
1809
|
+
/**
|
|
1810
|
+
* The validation message. Uses the browser's default validation message for native checkboxes if not otherwise
|
|
1811
|
+
* specified (e.g., via `setCustomValidity`).
|
|
1812
|
+
*
|
|
1813
|
+
* @public
|
|
1814
|
+
* @remarks
|
|
1815
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/validationMessage | `ElementInternals.validationMessage`} property.
|
|
1816
|
+
*/
|
|
1817
|
+
get validationMessage(): string;
|
|
1818
|
+
/**
|
|
1819
|
+
* The element's validity state.
|
|
1820
|
+
*
|
|
1821
|
+
* @public
|
|
1822
|
+
* @remarks
|
|
1823
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/validity | `ElementInternals.validity`} property.
|
|
1824
|
+
*/
|
|
1825
|
+
get validity(): ValidityState;
|
|
1826
|
+
/**
|
|
1827
|
+
* The internal value of the input.
|
|
1828
|
+
*
|
|
1829
|
+
* @internal
|
|
1830
|
+
*/
|
|
1831
|
+
private _value;
|
|
1832
|
+
/**
|
|
1833
|
+
* The current value of the input.
|
|
1834
|
+
*
|
|
1835
|
+
* @public
|
|
1836
|
+
*/
|
|
1837
|
+
get value(): string;
|
|
1838
|
+
set value(value: string);
|
|
1839
|
+
/**
|
|
1840
|
+
* Determines if the control can be submitted for constraint validation.
|
|
1841
|
+
*
|
|
1842
|
+
* @public
|
|
1843
|
+
* @remarks
|
|
1844
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/willValidate | `ElementInternals.willValidate`} property.
|
|
1845
|
+
*/
|
|
1846
|
+
get willValidate(): boolean;
|
|
1847
|
+
/**
|
|
1848
|
+
* Sets the `elementInternals.ariaChecked` value based on the checked state.
|
|
1849
|
+
*
|
|
1850
|
+
* @internal
|
|
1851
|
+
*/
|
|
1852
|
+
private setAriaChecked;
|
|
1853
|
+
/**
|
|
1854
|
+
* Checks the validity of the element and returns the result.
|
|
1855
|
+
*
|
|
1856
|
+
* @public
|
|
1857
|
+
* @remarks
|
|
1858
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/checkValidity | `HTMLInputElement.checkValidity()`} method.
|
|
1859
|
+
*/
|
|
1860
|
+
checkValidity(): boolean;
|
|
1861
|
+
/**
|
|
1862
|
+
* Toggles the checked state when the user clicks the element.
|
|
1863
|
+
*
|
|
1864
|
+
* @param e - the event object
|
|
1865
|
+
* @internal
|
|
1866
|
+
*/
|
|
1867
|
+
clickHandler(e: MouseEvent): boolean | void;
|
|
1868
|
+
connectedCallback(): void;
|
|
1691
1869
|
constructor();
|
|
1692
|
-
private toggleChecked;
|
|
1693
1870
|
/**
|
|
1871
|
+
* Updates the form value when a user changes the `checked` state.
|
|
1872
|
+
*
|
|
1873
|
+
* @param e - the event object
|
|
1694
1874
|
* @internal
|
|
1695
1875
|
*/
|
|
1696
|
-
|
|
1876
|
+
inputHandler(e: Event): boolean | void;
|
|
1697
1877
|
/**
|
|
1878
|
+
* Prevents scrolling when the user presses the space key.
|
|
1879
|
+
*
|
|
1880
|
+
* @param e - the event object
|
|
1698
1881
|
* @internal
|
|
1699
1882
|
*/
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1883
|
+
keydownHandler(e: KeyboardEvent): boolean | void;
|
|
1884
|
+
/**
|
|
1885
|
+
* Toggles the checked state when the user releases the space key.
|
|
1886
|
+
*
|
|
1887
|
+
* @param e - the event object
|
|
1888
|
+
* @internal
|
|
1889
|
+
*/
|
|
1890
|
+
keyupHandler(e: KeyboardEvent): boolean | void;
|
|
1891
|
+
/**
|
|
1892
|
+
* Resets the form value to its initial value when the form is reset.
|
|
1893
|
+
*
|
|
1894
|
+
* @internal
|
|
1895
|
+
*/
|
|
1896
|
+
formResetCallback(): void;
|
|
1897
|
+
/**
|
|
1898
|
+
* Reports the validity of the element.
|
|
1899
|
+
*
|
|
1900
|
+
* @public
|
|
1901
|
+
* @remarks
|
|
1902
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/reportValidity | `HTMLInputElement.reportValidity()`} method.
|
|
1903
|
+
*/
|
|
1904
|
+
reportValidity(): boolean;
|
|
1905
|
+
/**
|
|
1906
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/setFormValue | `ElementInternals.setFormValue()`} method.
|
|
1907
|
+
*
|
|
1908
|
+
* @internal
|
|
1909
|
+
*/
|
|
1910
|
+
setFormValue(value: File | string | FormData | null, state?: File | string | FormData | null): void;
|
|
1911
|
+
/**
|
|
1912
|
+
* Sets a custom validity message.
|
|
1913
|
+
*
|
|
1914
|
+
* @param message - The message to set
|
|
1915
|
+
* @public
|
|
1916
|
+
*/
|
|
1917
|
+
setCustomValidity(message: string): void;
|
|
1918
|
+
/**
|
|
1919
|
+
* Sets the validity of the control.
|
|
1920
|
+
*
|
|
1921
|
+
* @param flags - Validity flags to set.
|
|
1922
|
+
* @param message - Optional message to supply. If not provided, the control's `validationMessage` will be used.
|
|
1923
|
+
* @param anchor - Optional anchor to use for the validation message.
|
|
1924
|
+
*
|
|
1925
|
+
* @internal
|
|
1926
|
+
*/
|
|
1927
|
+
setValidity(flags?: Partial<ValidityState>, message?: string, anchor?: HTMLElement): void;
|
|
1928
|
+
/**
|
|
1929
|
+
* Toggles the checked state of the control.
|
|
1930
|
+
*
|
|
1931
|
+
* @public
|
|
1932
|
+
*/
|
|
1933
|
+
private toggleChecked;
|
|
1707
1934
|
}
|
|
1708
1935
|
|
|
1709
1936
|
/**
|
|
@@ -1715,17 +1942,6 @@ declare interface _Checkbox extends CheckableFormAssociated {
|
|
|
1715
1942
|
*/
|
|
1716
1943
|
export declare const CheckboxDefinition: FASTElementDefinition<typeof Checkbox>;
|
|
1717
1944
|
|
|
1718
|
-
/**
|
|
1719
|
-
* Checkbox label position
|
|
1720
|
-
* @public
|
|
1721
|
-
*/
|
|
1722
|
-
declare const CheckboxLabelPosition: {
|
|
1723
|
-
readonly before: "before";
|
|
1724
|
-
readonly after: "after";
|
|
1725
|
-
};
|
|
1726
|
-
|
|
1727
|
-
declare type CheckboxLabelPosition = ValuesOf<typeof CheckboxLabelPosition>;
|
|
1728
|
-
|
|
1729
1945
|
/**
|
|
1730
1946
|
* Checkbox configuration options
|
|
1731
1947
|
* @public
|
|
@@ -1744,6 +1960,7 @@ export declare const CheckboxShape: {
|
|
|
1744
1960
|
readonly square: "square";
|
|
1745
1961
|
};
|
|
1746
1962
|
|
|
1963
|
+
/** @public */
|
|
1747
1964
|
export declare type CheckboxShape = ValuesOf<typeof CheckboxShape>;
|
|
1748
1965
|
|
|
1749
1966
|
/**
|
|
@@ -1755,6 +1972,7 @@ export declare const CheckboxSize: {
|
|
|
1755
1972
|
readonly large: "large";
|
|
1756
1973
|
};
|
|
1757
1974
|
|
|
1975
|
+
/** @public */
|
|
1758
1976
|
export declare type CheckboxSize = ValuesOf<typeof CheckboxSize>;
|
|
1759
1977
|
|
|
1760
1978
|
/** Checkbox styles
|
|
@@ -4529,6 +4747,139 @@ declare type EndOptions<TSource = any, TParent = any> = {
|
|
|
4529
4747
|
end?: StaticallyComposableHTML<TSource, TParent>;
|
|
4530
4748
|
};
|
|
4531
4749
|
|
|
4750
|
+
/**
|
|
4751
|
+
* A Field Custom HTML Element.
|
|
4752
|
+
*
|
|
4753
|
+
* @public
|
|
4754
|
+
*/
|
|
4755
|
+
export declare class Field extends FASTElement {
|
|
4756
|
+
/**
|
|
4757
|
+
* The position of the label relative to the input.
|
|
4758
|
+
*
|
|
4759
|
+
* @public
|
|
4760
|
+
* @remarks
|
|
4761
|
+
* HTML Attribute: `label-position`
|
|
4762
|
+
*/
|
|
4763
|
+
labelPosition: FieldLabelPosition;
|
|
4764
|
+
/**
|
|
4765
|
+
* The slotted message elements. Filtered to only include elements with a `flag` attribute.
|
|
4766
|
+
*
|
|
4767
|
+
* @internal
|
|
4768
|
+
*/
|
|
4769
|
+
messageSlot: Element[];
|
|
4770
|
+
/**
|
|
4771
|
+
* Adds or removes the `invalid` event listener based on the presence of slotted message elements.
|
|
4772
|
+
*
|
|
4773
|
+
* @param prev - the previous list of slotted message elements
|
|
4774
|
+
* @param next - the current list of slotted message elements
|
|
4775
|
+
* @internal
|
|
4776
|
+
*/
|
|
4777
|
+
messageSlotChanged(prev: Element[], next: Element[]): void;
|
|
4778
|
+
/**
|
|
4779
|
+
* The slotted inputs.
|
|
4780
|
+
*
|
|
4781
|
+
* @internal
|
|
4782
|
+
* @privateRemarks
|
|
4783
|
+
* This field is populated with the `children` directive in the template rather than `slotted`.
|
|
4784
|
+
*/
|
|
4785
|
+
slottedInputs: SlottableInput[];
|
|
4786
|
+
/**
|
|
4787
|
+
* Sets the `input` property to the first slotted input.
|
|
4788
|
+
*
|
|
4789
|
+
* @param prev - The previous collection of inputs.
|
|
4790
|
+
* @param next - The current collection of inputs.
|
|
4791
|
+
* @internal
|
|
4792
|
+
*/
|
|
4793
|
+
slottedInputsChanged(prev: SlottableInput[] | undefined, next: SlottableInput[] | undefined): void;
|
|
4794
|
+
/**
|
|
4795
|
+
* The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
4796
|
+
*
|
|
4797
|
+
* @internal
|
|
4798
|
+
*/
|
|
4799
|
+
elementInternals: ElementInternals;
|
|
4800
|
+
/**
|
|
4801
|
+
* Reference to the first slotted input.
|
|
4802
|
+
*
|
|
4803
|
+
* @public
|
|
4804
|
+
*/
|
|
4805
|
+
input: SlottableInput;
|
|
4806
|
+
/**
|
|
4807
|
+
* Calls the `setStates` method when a `change` event is emitted from the slotted input.
|
|
4808
|
+
*
|
|
4809
|
+
* @param e - the event object
|
|
4810
|
+
* @internal
|
|
4811
|
+
*/
|
|
4812
|
+
changeHandler(e: Event): void;
|
|
4813
|
+
/**
|
|
4814
|
+
* Redirects `click` events to the slotted input.
|
|
4815
|
+
*
|
|
4816
|
+
* @internal
|
|
4817
|
+
*/
|
|
4818
|
+
clickHandler(e: MouseEvent): boolean | void;
|
|
4819
|
+
/**
|
|
4820
|
+
* Applies the `focus-visible` state to the element when the slotted input receives visible focus.
|
|
4821
|
+
*
|
|
4822
|
+
* @param e - the focus event
|
|
4823
|
+
* @internal
|
|
4824
|
+
*/
|
|
4825
|
+
focusinHandler(e: FocusEvent): boolean | void;
|
|
4826
|
+
/**
|
|
4827
|
+
* Removes the `focus-visible` state from the field when a slotted input loses focus.
|
|
4828
|
+
*
|
|
4829
|
+
* @param e - the focus event
|
|
4830
|
+
* @internal
|
|
4831
|
+
*/
|
|
4832
|
+
focusoutHandler(e: FocusEvent): boolean | void;
|
|
4833
|
+
/**
|
|
4834
|
+
* Toggles validity state flags on the element when the slotted input emits an `invalid` event (if slotted validation messages are present).
|
|
4835
|
+
*
|
|
4836
|
+
* @param e - the event object
|
|
4837
|
+
* @internal
|
|
4838
|
+
*/
|
|
4839
|
+
invalidHandler(e: Event): boolean | void;
|
|
4840
|
+
/**
|
|
4841
|
+
* Toggles the field's states based on the slotted input.
|
|
4842
|
+
*
|
|
4843
|
+
* @internal
|
|
4844
|
+
*/
|
|
4845
|
+
setStates(): void;
|
|
4846
|
+
}
|
|
4847
|
+
|
|
4848
|
+
/**
|
|
4849
|
+
* The Fluent Field Element
|
|
4850
|
+
*
|
|
4851
|
+
* @public
|
|
4852
|
+
* @remarks
|
|
4853
|
+
* HTML Element: `<fluent-field>`
|
|
4854
|
+
*/
|
|
4855
|
+
export declare const FieldDefinition: FASTElementDefinition<typeof Field>;
|
|
4856
|
+
|
|
4857
|
+
/**
|
|
4858
|
+
* Label position values
|
|
4859
|
+
* @public
|
|
4860
|
+
*/
|
|
4861
|
+
export declare const FieldLabelPosition: {
|
|
4862
|
+
readonly above: "above";
|
|
4863
|
+
readonly after: "after";
|
|
4864
|
+
readonly before: "before";
|
|
4865
|
+
};
|
|
4866
|
+
|
|
4867
|
+
/** @public */
|
|
4868
|
+
export declare type FieldLabelPosition = ValuesOf<typeof FieldLabelPosition>;
|
|
4869
|
+
|
|
4870
|
+
/**
|
|
4871
|
+
* The styles for the {@link Field} component.
|
|
4872
|
+
*
|
|
4873
|
+
* @public
|
|
4874
|
+
*/
|
|
4875
|
+
export declare const FieldStyles: ElementStyles;
|
|
4876
|
+
|
|
4877
|
+
/**
|
|
4878
|
+
* Template for the Field component
|
|
4879
|
+
* @public
|
|
4880
|
+
*/
|
|
4881
|
+
export declare const FieldTemplate: ElementViewTemplate;
|
|
4882
|
+
|
|
4532
4883
|
export declare const FluentDesignSystem: Readonly<{
|
|
4533
4884
|
prefix: "fluent";
|
|
4534
4885
|
shadowRootMode: "open";
|
|
@@ -4685,15 +5036,6 @@ declare interface FormAssociated extends Omit<ElementInternals, 'labels'> {
|
|
|
4685
5036
|
valueChanged(previous: string, next: string): void;
|
|
4686
5037
|
}
|
|
4687
5038
|
|
|
4688
|
-
/**
|
|
4689
|
-
* @beta
|
|
4690
|
-
*/
|
|
4691
|
-
declare class FormAssociatedCheckbox extends FormAssociatedCheckbox_base {
|
|
4692
|
-
proxy: HTMLInputElement;
|
|
4693
|
-
}
|
|
4694
|
-
|
|
4695
|
-
declare const FormAssociatedCheckbox_base: typeof _Checkbox;
|
|
4696
|
-
|
|
4697
5039
|
/**
|
|
4698
5040
|
* @beta
|
|
4699
5041
|
*/
|
|
@@ -6381,6 +6723,17 @@ export declare const SliderStyles: ElementStyles;
|
|
|
6381
6723
|
|
|
6382
6724
|
export declare const SliderTemplate: ElementViewTemplate<Slider>;
|
|
6383
6725
|
|
|
6726
|
+
/**
|
|
6727
|
+
* Synthetic type for slotted input elements
|
|
6728
|
+
* @public
|
|
6729
|
+
*/
|
|
6730
|
+
export declare type SlottableInput = HTMLElement & ElementInternals & {
|
|
6731
|
+
elementInternals?: ElementInternals;
|
|
6732
|
+
required: boolean;
|
|
6733
|
+
disabled: boolean;
|
|
6734
|
+
readOnly: boolean;
|
|
6735
|
+
};
|
|
6736
|
+
|
|
6384
6737
|
/**
|
|
6385
6738
|
* CSS custom property value for the {@link @fluentui/tokens#spacingHorizontalL | `spacingHorizontalL`} design token.
|
|
6386
6739
|
* @public
|
|
@@ -7205,13 +7558,13 @@ export declare class TextInput extends FASTElement {
|
|
|
7205
7558
|
* @remarks
|
|
7206
7559
|
* HTML Attribute: `readonly`
|
|
7207
7560
|
*/
|
|
7208
|
-
|
|
7561
|
+
readOnly?: boolean;
|
|
7209
7562
|
/**
|
|
7210
7563
|
* Syncs the `ElementInternals.ariaReadOnly` property when the `readonly` property changes.
|
|
7211
7564
|
*
|
|
7212
7565
|
* @internal
|
|
7213
7566
|
*/
|
|
7214
|
-
|
|
7567
|
+
readOnlyChanged(): void;
|
|
7215
7568
|
/**
|
|
7216
7569
|
* The element's required attribute.
|
|
7217
7570
|
*
|
|
@@ -7283,7 +7636,7 @@ export declare class TextInput extends FASTElement {
|
|
|
7283
7636
|
*
|
|
7284
7637
|
* @internal
|
|
7285
7638
|
*/
|
|
7286
|
-
|
|
7639
|
+
elementInternals: ElementInternals;
|
|
7287
7640
|
/**
|
|
7288
7641
|
* The form-associated flag.
|
|
7289
7642
|
* @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
|
|
@@ -7329,6 +7682,12 @@ export declare class TextInput extends FASTElement {
|
|
|
7329
7682
|
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/form | `ElementInternals.form`} property.
|
|
7330
7683
|
*/
|
|
7331
7684
|
get form(): HTMLFormElement | null;
|
|
7685
|
+
/**
|
|
7686
|
+
* Handles the internal control's `keypress` event.
|
|
7687
|
+
*
|
|
7688
|
+
* @internal
|
|
7689
|
+
*/
|
|
7690
|
+
beforeinputHandler(e: InputEvent): boolean | void;
|
|
7332
7691
|
/**
|
|
7333
7692
|
* Change event handler for inner control.
|
|
7334
7693
|
*
|
|
@@ -7337,9 +7696,29 @@ export declare class TextInput extends FASTElement {
|
|
|
7337
7696
|
* "Change" events are not `composable` so they will not permeate the shadow DOM boundary. This function effectively
|
|
7338
7697
|
* proxies the change event, emitting a `change` event whenever the internal control emits a `change` event.
|
|
7339
7698
|
*/
|
|
7340
|
-
changeHandler(e: InputEvent): void;
|
|
7699
|
+
changeHandler(e: InputEvent): boolean | void;
|
|
7700
|
+
/**
|
|
7701
|
+
* Checks the validity of the element and returns the result.
|
|
7702
|
+
*
|
|
7703
|
+
* @public
|
|
7704
|
+
* @remarks
|
|
7705
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/checkValidity | `HTMLInputElement.checkValidity()`} method.
|
|
7706
|
+
*/
|
|
7707
|
+
checkValidity(): boolean;
|
|
7708
|
+
/**
|
|
7709
|
+
* Clicks the inner control when the component is clicked.
|
|
7710
|
+
*
|
|
7711
|
+
* @param e - the event object
|
|
7712
|
+
*/
|
|
7713
|
+
clickHandler(e: MouseEvent): boolean | void;
|
|
7341
7714
|
connectedCallback(): void;
|
|
7342
|
-
|
|
7715
|
+
/**
|
|
7716
|
+
* Focuses the inner control when the component is focused.
|
|
7717
|
+
*
|
|
7718
|
+
* @param e - the event object
|
|
7719
|
+
* @public
|
|
7720
|
+
*/
|
|
7721
|
+
focusinHandler(e: FocusEvent): boolean | void;
|
|
7343
7722
|
/**
|
|
7344
7723
|
* Resets the value to its initial value when the form is reset.
|
|
7345
7724
|
*
|
|
@@ -7359,11 +7738,12 @@ export declare class TextInput extends FASTElement {
|
|
|
7359
7738
|
*/
|
|
7360
7739
|
inputHandler(e: InputEvent): boolean | void;
|
|
7361
7740
|
/**
|
|
7362
|
-
* Handles the internal control's `
|
|
7741
|
+
* Handles the internal control's `keydown` event.
|
|
7363
7742
|
*
|
|
7743
|
+
* @param e - the event object
|
|
7364
7744
|
* @internal
|
|
7365
7745
|
*/
|
|
7366
|
-
|
|
7746
|
+
keydownHandler(e: KeyboardEvent): boolean | void;
|
|
7367
7747
|
/**
|
|
7368
7748
|
* Selects all the text in the text field.
|
|
7369
7749
|
*
|
|
@@ -7374,6 +7754,21 @@ export declare class TextInput extends FASTElement {
|
|
|
7374
7754
|
*
|
|
7375
7755
|
*/
|
|
7376
7756
|
select(): void;
|
|
7757
|
+
/**
|
|
7758
|
+
* Sets the custom validity message.
|
|
7759
|
+
* @param message - The message to set
|
|
7760
|
+
*
|
|
7761
|
+
* @public
|
|
7762
|
+
*/
|
|
7763
|
+
setCustomValidity(message: string): void;
|
|
7764
|
+
/**
|
|
7765
|
+
* Reports the validity of the element.
|
|
7766
|
+
*
|
|
7767
|
+
* @public
|
|
7768
|
+
* @remarks
|
|
7769
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/reportValidity | `HTMLInputElement.reportValidity()`} method.
|
|
7770
|
+
*/
|
|
7771
|
+
reportValidity(): boolean;
|
|
7377
7772
|
/**
|
|
7378
7773
|
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/setFormValue | `ElementInternals.setFormValue()`} method.
|
|
7379
7774
|
*
|
|
@@ -7389,7 +7784,7 @@ export declare class TextInput extends FASTElement {
|
|
|
7389
7784
|
*
|
|
7390
7785
|
* @internal
|
|
7391
7786
|
*/
|
|
7392
|
-
setValidity(flags?:
|
|
7787
|
+
setValidity(flags?: Partial<ValidityState>, message?: string, anchor?: HTMLElement): void;
|
|
7393
7788
|
}
|
|
7394
7789
|
|
|
7395
7790
|
/**
|
|
@@ -7681,6 +8076,27 @@ export declare const typographyTitle2Styles: CSSDirective;
|
|
|
7681
8076
|
|
|
7682
8077
|
export declare const typographyTitle3Styles: CSSDirective;
|
|
7683
8078
|
|
|
8079
|
+
/**
|
|
8080
|
+
* Synthetic type for slotted message elements
|
|
8081
|
+
* @public
|
|
8082
|
+
*/
|
|
8083
|
+
export declare const ValidationFlags: {
|
|
8084
|
+
readonly badInput: "bad-input";
|
|
8085
|
+
readonly customError: "custom-error";
|
|
8086
|
+
readonly patternMismatch: "pattern-mismatch";
|
|
8087
|
+
readonly rangeOverflow: "range-overflow";
|
|
8088
|
+
readonly rangeUnderflow: "range-underflow";
|
|
8089
|
+
readonly stepMismatch: "step-mismatch";
|
|
8090
|
+
readonly tooLong: "too-long";
|
|
8091
|
+
readonly tooShort: "too-short";
|
|
8092
|
+
readonly typeMismatch: "type-mismatch";
|
|
8093
|
+
readonly valueMissing: "value-missing";
|
|
8094
|
+
readonly valid: "valid";
|
|
8095
|
+
};
|
|
8096
|
+
|
|
8097
|
+
/** @public */
|
|
8098
|
+
export declare type ValidationFlags = ValuesOf<typeof ValidationFlags>;
|
|
8099
|
+
|
|
7684
8100
|
/**
|
|
7685
8101
|
* Helper for enumerating a type from a const object
|
|
7686
8102
|
* Example: export type Foo = ValuesOf\<typeof Foo\>
|