@fluentui/web-components 3.0.0-beta.40 → 3.0.0-beta.42
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 +21 -2
- package/dist/dts/index-rollup.d.ts +1 -0
- package/dist/dts/index.d.ts +1 -0
- package/dist/dts/menu-item/menu-item.d.ts +31 -2
- package/dist/dts/menu-item/menu-item.styles.d.ts +5 -0
- package/dist/dts/menu-item/menu-item.template.d.ts +1 -1
- package/dist/dts/menu-list/menu-list.d.ts +7 -0
- package/dist/dts/slider/slider.d.ts +180 -35
- package/dist/dts/slider/slider.options.d.ts +2 -2
- package/dist/dts/slider/slider.template.d.ts +2 -2
- package/dist/dts/styles/states/index.d.ts +5 -0
- package/dist/dts/utils/converters.d.ts +17 -0
- package/dist/dts/utils/index.d.ts +1 -0
- package/dist/esm/accordion/accordion.js.map +1 -1
- package/dist/esm/accordion-item/accordion-item.js.map +1 -1
- package/dist/esm/anchor-button/anchor-button.js.map +1 -1
- package/dist/esm/avatar/avatar.js +2 -1
- package/dist/esm/avatar/avatar.js.map +1 -1
- package/dist/esm/badge/badge.js.map +1 -1
- package/dist/esm/button/button.js +2 -1
- package/dist/esm/button/button.js.map +1 -1
- package/dist/esm/checkbox/checkbox.js +2 -1
- package/dist/esm/checkbox/checkbox.js.map +1 -1
- package/dist/esm/counter-badge/counter-badge.js.map +1 -1
- package/dist/esm/dialog/dialog.js.map +1 -1
- package/dist/esm/dialog-body/dialog-body.js.map +1 -1
- package/dist/esm/divider/divider.js.map +1 -1
- package/dist/esm/drawer/drawer.js.map +1 -1
- package/dist/esm/field/field.js.map +1 -1
- package/dist/esm/image/image.js.map +1 -1
- 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.js.map +1 -1
- package/dist/esm/link/link.js.map +1 -1
- package/dist/esm/menu/menu.js +0 -4
- package/dist/esm/menu/menu.js.map +1 -1
- package/dist/esm/menu-item/menu-item.js +55 -4
- package/dist/esm/menu-item/menu-item.js.map +1 -1
- package/dist/esm/menu-item/menu-item.styles.js +19 -17
- package/dist/esm/menu-item/menu-item.styles.js.map +1 -1
- package/dist/esm/menu-item/menu-item.template.js +3 -7
- package/dist/esm/menu-item/menu-item.template.js.map +1 -1
- package/dist/esm/menu-list/menu-list.js +18 -10
- package/dist/esm/menu-list/menu-list.js.map +1 -1
- package/dist/esm/menu-list/menu-list.template.js +0 -1
- package/dist/esm/menu-list/menu-list.template.js.map +1 -1
- package/dist/esm/message-bar/message-bar.js.map +1 -1
- package/dist/esm/patterns/aria-globals.js.map +1 -1
- package/dist/esm/progress-bar/progress-bar.js.map +1 -1
- package/dist/esm/radio-group/radio-group.js +2 -1
- package/dist/esm/radio-group/radio-group.js.map +1 -1
- package/dist/esm/rating-display/rating-display.js.map +1 -1
- package/dist/esm/slider/slider.js +442 -220
- package/dist/esm/slider/slider.js.map +1 -1
- package/dist/esm/slider/slider.styles.js +107 -132
- package/dist/esm/slider/slider.styles.js.map +1 -1
- package/dist/esm/slider/slider.template.js +11 -28
- package/dist/esm/slider/slider.template.js.map +1 -1
- package/dist/esm/spinner/spinner.js.map +1 -1
- package/dist/esm/styles/states/index.js +5 -0
- package/dist/esm/styles/states/index.js.map +1 -1
- package/dist/esm/tab/tab.js.map +1 -1
- package/dist/esm/tabs/tabs.js.map +1 -1
- package/dist/esm/text-input/text-input.js +2 -1
- package/dist/esm/text-input/text-input.js.map +1 -1
- package/dist/esm/toggle-button/toggle-button.js.map +1 -1
- package/dist/esm/utils/converters.js +26 -0
- package/dist/esm/utils/converters.js.map +1 -0
- package/dist/esm/utils/index.js +1 -0
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/web-components.d.ts +231 -102
- package/dist/web-components.js +531 -594
- package/dist/web-components.min.js +207 -203
- package/package.json +3 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A {@link ValueConverter} that makes sure the attribute and property values
|
|
3
|
+
* are a string representation of a number, e.g. `'10'` instead of `10`.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* This converter allows any data type, but if the data is evaluated as `NaN`
|
|
7
|
+
* by `Number.isNaN()`, it’d be converted to an empty string. Otherwise, the
|
|
8
|
+
* converted value is a string of number.
|
|
9
|
+
*
|
|
10
|
+
* It is useful for somm custom element’s attributes and properties, e.g.
|
|
11
|
+
* `min`, `max`, `step` on an `<input type=range>`-like element, to align with
|
|
12
|
+
* the built-in HTML element behavior, those property values should be strings.
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export const numberLikeStringConverter = {
|
|
17
|
+
fromView(value) {
|
|
18
|
+
const valueAsNumber = parseFloat(value);
|
|
19
|
+
return Number.isNaN(valueAsNumber) ? '' : valueAsNumber.toString();
|
|
20
|
+
},
|
|
21
|
+
toView(value) {
|
|
22
|
+
const valueAsNumber = parseFloat(value);
|
|
23
|
+
return Number.isNaN(valueAsNumber) ? undefined : valueAsNumber.toString();
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=converters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"converters.js","sourceRoot":"","sources":["../../../src/utils/converters.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAmB;IACvD,QAAQ,CAAC,KAAa;QACpB,MAAM,aAAa,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;QACxC,OAAO,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;IACrE,CAAC;IACD,MAAM,CAAC,KAAU;QACf,MAAM,aAAa,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;QACxC,OAAO,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;IAC5E,CAAC;CACF,CAAC"}
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,gDAAgD,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,gDAAgD,CAAC"}
|
package/dist/web-components.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="web" />
|
|
2
2
|
|
|
3
|
-
import type { Constructable } from '@microsoft/fast-element';
|
|
4
3
|
import { CSSDirective } from '@microsoft/fast-element';
|
|
5
4
|
import { Direction } from '@microsoft/fast-web-utilities';
|
|
6
5
|
import { ElementStyles } from '@microsoft/fast-element';
|
|
@@ -4142,13 +4141,6 @@ export declare const CompoundButtonStyles: ElementStyles;
|
|
|
4142
4141
|
*/
|
|
4143
4142
|
export declare const CompoundButtonTemplate: ElementViewTemplate<CompoundButton>;
|
|
4144
4143
|
|
|
4145
|
-
/**
|
|
4146
|
-
* Combined type to describe a Constructable Form-Associated type.
|
|
4147
|
-
*
|
|
4148
|
-
* @beta
|
|
4149
|
-
*/
|
|
4150
|
-
declare type ConstructableFormAssociated = Constructable<HTMLElement & FASTElement>;
|
|
4151
|
-
|
|
4152
4144
|
/**
|
|
4153
4145
|
* The base class used for constructing a fluent-badge custom element
|
|
4154
4146
|
* @public
|
|
@@ -4827,6 +4819,24 @@ export declare class Drawer extends FASTElement {
|
|
|
4827
4819
|
clickHandler(event: Event): boolean;
|
|
4828
4820
|
}
|
|
4829
4821
|
|
|
4822
|
+
export declare class DrawerBody extends FASTElement {
|
|
4823
|
+
}
|
|
4824
|
+
|
|
4825
|
+
/**
|
|
4826
|
+
*
|
|
4827
|
+
* @public
|
|
4828
|
+
* @remarks
|
|
4829
|
+
* HTML Element: <fluent-drawer>
|
|
4830
|
+
*/
|
|
4831
|
+
export declare const DrawerBodyDefinition: FASTElementDefinition<typeof DrawerBody>;
|
|
4832
|
+
|
|
4833
|
+
/** Drawer styles
|
|
4834
|
+
* @public
|
|
4835
|
+
*/
|
|
4836
|
+
export declare const DrawerBodyStyles: ElementStyles;
|
|
4837
|
+
|
|
4838
|
+
export declare const DrawerBodyTemplate: ElementViewTemplate<DrawerBody>;
|
|
4839
|
+
|
|
4830
4840
|
/**
|
|
4831
4841
|
*
|
|
4832
4842
|
* @public
|
|
@@ -5219,57 +5229,6 @@ export declare const fontWeightSemibold = "var(--fontWeightSemibold)";
|
|
|
5219
5229
|
*/
|
|
5220
5230
|
export declare const forcedColorsStylesheetBehavior: (styles: ElementStyles) => MatchMediaStyleSheetBehavior;
|
|
5221
5231
|
|
|
5222
|
-
/**
|
|
5223
|
-
* Base function for providing Custom Element Form Association.
|
|
5224
|
-
*
|
|
5225
|
-
* @beta
|
|
5226
|
-
*/
|
|
5227
|
-
declare function FormAssociated<T extends ConstructableFormAssociated>(BaseCtor: T): T;
|
|
5228
|
-
|
|
5229
|
-
/**
|
|
5230
|
-
* Base class for providing Custom Element Form Association.
|
|
5231
|
-
*
|
|
5232
|
-
* @beta
|
|
5233
|
-
*/
|
|
5234
|
-
declare interface FormAssociated extends Omit<ElementInternals, 'labels'> {
|
|
5235
|
-
dirtyValue: boolean;
|
|
5236
|
-
disabled: boolean;
|
|
5237
|
-
readonly elementInternals: ElementInternals | null;
|
|
5238
|
-
readonly formAssociated: boolean;
|
|
5239
|
-
initialValue: string;
|
|
5240
|
-
readonly labels: ReadonlyArray<Node[]>;
|
|
5241
|
-
name: string;
|
|
5242
|
-
required: boolean;
|
|
5243
|
-
value: string;
|
|
5244
|
-
currentValue: string;
|
|
5245
|
-
attachProxy(): void;
|
|
5246
|
-
detachProxy(): void;
|
|
5247
|
-
disabledChanged?(previous: boolean, next: boolean): void;
|
|
5248
|
-
formDisabledCallback?(disabled: boolean): void;
|
|
5249
|
-
formResetCallback(): void;
|
|
5250
|
-
initialValueChanged?(previous: string, next: string): void;
|
|
5251
|
-
nameChanged?(previous: string, next: string): void;
|
|
5252
|
-
requiredChanged(prev: boolean, next: boolean): void;
|
|
5253
|
-
stopPropagation(e: Event): void;
|
|
5254
|
-
/**
|
|
5255
|
-
* Sets the validity of the custom element. By default this uses the proxy element to determine
|
|
5256
|
-
* validity, but this can be extended or replaced in implementation.
|
|
5257
|
-
*
|
|
5258
|
-
* @param anchor - The anchor element to provide to ElementInternals.setValidity for surfacing the browser's constraint validation UI
|
|
5259
|
-
*/
|
|
5260
|
-
validate(anchor?: HTMLElement): void;
|
|
5261
|
-
valueChanged(previous: string, next: string): void;
|
|
5262
|
-
}
|
|
5263
|
-
|
|
5264
|
-
/**
|
|
5265
|
-
* @beta
|
|
5266
|
-
*/
|
|
5267
|
-
declare class FormAssociatedSlider extends FormAssociatedSlider_base {
|
|
5268
|
-
proxy: HTMLInputElement;
|
|
5269
|
-
}
|
|
5270
|
-
|
|
5271
|
-
declare const FormAssociatedSlider_base: typeof _Slider;
|
|
5272
|
-
|
|
5273
5232
|
/**
|
|
5274
5233
|
* Determines the current localization direction of an element.
|
|
5275
5234
|
*
|
|
@@ -6095,6 +6054,12 @@ export declare const MenuDefinition: FASTElementDefinition<typeof Menu>;
|
|
|
6095
6054
|
* @public
|
|
6096
6055
|
*/
|
|
6097
6056
|
export declare class MenuItem extends FASTElement {
|
|
6057
|
+
/**
|
|
6058
|
+
* The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
6059
|
+
*
|
|
6060
|
+
* @internal
|
|
6061
|
+
*/
|
|
6062
|
+
elementInternals: ElementInternals;
|
|
6098
6063
|
/**
|
|
6099
6064
|
* The disabled state of the element.
|
|
6100
6065
|
*
|
|
@@ -6103,6 +6068,12 @@ export declare class MenuItem extends FASTElement {
|
|
|
6103
6068
|
* HTML Attribute: disabled
|
|
6104
6069
|
*/
|
|
6105
6070
|
disabled: boolean;
|
|
6071
|
+
/**
|
|
6072
|
+
* Handles changes to disabled attribute custom states and element internals
|
|
6073
|
+
* @param prev - the previous state
|
|
6074
|
+
* @param next - the next state
|
|
6075
|
+
*/
|
|
6076
|
+
disabledChanged(prev: boolean | undefined, next: boolean | undefined): void;
|
|
6106
6077
|
/**
|
|
6107
6078
|
* The role of the element.
|
|
6108
6079
|
*
|
|
@@ -6111,6 +6082,12 @@ export declare class MenuItem extends FASTElement {
|
|
|
6111
6082
|
* HTML Attribute: role
|
|
6112
6083
|
*/
|
|
6113
6084
|
role: MenuItemRole;
|
|
6085
|
+
/**
|
|
6086
|
+
* Handles changes to role attribute element internals properties
|
|
6087
|
+
* @param prev - the previous state
|
|
6088
|
+
* @param next - the next state
|
|
6089
|
+
*/
|
|
6090
|
+
roleChanged(prev: MenuItemRole | undefined, next: MenuItemRole | undefined): void;
|
|
6114
6091
|
/**
|
|
6115
6092
|
* The checked value of the element.
|
|
6116
6093
|
*
|
|
@@ -6119,7 +6096,12 @@ export declare class MenuItem extends FASTElement {
|
|
|
6119
6096
|
* HTML Attribute: checked
|
|
6120
6097
|
*/
|
|
6121
6098
|
checked: boolean;
|
|
6122
|
-
|
|
6099
|
+
/**
|
|
6100
|
+
* Handles changes to checked attribute custom states and element internals
|
|
6101
|
+
* @param prev - the previous state
|
|
6102
|
+
* @param next - the next state
|
|
6103
|
+
*/
|
|
6104
|
+
protected checkedChanged(prev: boolean, next: boolean): void;
|
|
6123
6105
|
/**
|
|
6124
6106
|
* The hidden attribute.
|
|
6125
6107
|
*
|
|
@@ -6144,6 +6126,7 @@ export declare class MenuItem extends FASTElement {
|
|
|
6144
6126
|
* @internal
|
|
6145
6127
|
*/
|
|
6146
6128
|
submenu: HTMLElement | undefined;
|
|
6129
|
+
connectedCallback(): void;
|
|
6147
6130
|
/**
|
|
6148
6131
|
* @internal
|
|
6149
6132
|
*/
|
|
@@ -6244,6 +6227,12 @@ export declare const MenuItemTemplate: ElementViewTemplate<MenuItem>;
|
|
|
6244
6227
|
* @public
|
|
6245
6228
|
*/
|
|
6246
6229
|
export declare class MenuList extends FASTElement {
|
|
6230
|
+
/**
|
|
6231
|
+
* The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
6232
|
+
*
|
|
6233
|
+
* @internal
|
|
6234
|
+
*/
|
|
6235
|
+
elementInternals: ElementInternals;
|
|
6247
6236
|
/**
|
|
6248
6237
|
* @internal
|
|
6249
6238
|
*/
|
|
@@ -6256,6 +6245,7 @@ export declare class MenuList extends FASTElement {
|
|
|
6256
6245
|
*/
|
|
6257
6246
|
private focusIndex;
|
|
6258
6247
|
private static focusableElementRoles;
|
|
6248
|
+
constructor();
|
|
6259
6249
|
/**
|
|
6260
6250
|
* @internal
|
|
6261
6251
|
*/
|
|
@@ -7125,9 +7115,34 @@ export declare const shadow8Brand = "var(--shadow8Brand)";
|
|
|
7125
7115
|
|
|
7126
7116
|
/**
|
|
7127
7117
|
* The base class used for constructing a fluent-slider custom element
|
|
7118
|
+
*
|
|
7119
|
+
* @slot thumb - The slot for a custom thumb element.
|
|
7120
|
+
* @csspart thumb-container - The container element of the thumb.
|
|
7121
|
+
* @csspart track-container - The container element of the track.
|
|
7122
|
+
* @fire change - Fires a custom 'change' event when the value changes.
|
|
7123
|
+
*
|
|
7128
7124
|
* @public
|
|
7129
7125
|
*/
|
|
7130
|
-
export declare class Slider extends
|
|
7126
|
+
export declare class Slider extends FASTElement implements SliderConfiguration {
|
|
7127
|
+
/**
|
|
7128
|
+
* The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
7129
|
+
*
|
|
7130
|
+
* @internal
|
|
7131
|
+
*/
|
|
7132
|
+
elementInternals: ElementInternals;
|
|
7133
|
+
/**
|
|
7134
|
+
* The form-associated flag.
|
|
7135
|
+
* @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
|
|
7136
|
+
*
|
|
7137
|
+
* @public
|
|
7138
|
+
*/
|
|
7139
|
+
static formAssociated: boolean;
|
|
7140
|
+
/**
|
|
7141
|
+
* A reference to all associated `<label>` elements.
|
|
7142
|
+
*
|
|
7143
|
+
* @public
|
|
7144
|
+
*/
|
|
7145
|
+
get labels(): ReadonlyArray<Node>;
|
|
7131
7146
|
/**
|
|
7132
7147
|
* The size of the slider
|
|
7133
7148
|
* @public
|
|
@@ -7135,7 +7150,8 @@ export declare class Slider extends FormAssociatedSlider implements SliderConfig
|
|
|
7135
7150
|
* HTML Attribute: size
|
|
7136
7151
|
*/
|
|
7137
7152
|
size?: SliderSize;
|
|
7138
|
-
|
|
7153
|
+
protected sizeChanged(prev: string, next: string): void;
|
|
7154
|
+
handleChange(_: any, propertyName: string): void;
|
|
7139
7155
|
private stepStyles?;
|
|
7140
7156
|
/**
|
|
7141
7157
|
* Handles changes to step styling based on the step value
|
|
@@ -7143,14 +7159,110 @@ export declare class Slider extends FormAssociatedSlider implements SliderConfig
|
|
|
7143
7159
|
*/
|
|
7144
7160
|
private handleStepStyles;
|
|
7145
7161
|
/**
|
|
7146
|
-
*
|
|
7162
|
+
* The initial value of the input.
|
|
7147
7163
|
*
|
|
7148
7164
|
* @public
|
|
7149
7165
|
* @remarks
|
|
7150
|
-
* HTML Attribute:
|
|
7166
|
+
* HTML Attribute: `value`
|
|
7151
7167
|
*/
|
|
7152
|
-
|
|
7153
|
-
|
|
7168
|
+
initialValue: string;
|
|
7169
|
+
/**
|
|
7170
|
+
* Sets the value of the input when the value attribute changes.
|
|
7171
|
+
*
|
|
7172
|
+
* @param prev - The previous value
|
|
7173
|
+
* @param next - The current value
|
|
7174
|
+
* @internal
|
|
7175
|
+
*/
|
|
7176
|
+
protected initialValueChanged(_: string, next: string): void;
|
|
7177
|
+
/**
|
|
7178
|
+
* The element's validity state.
|
|
7179
|
+
*
|
|
7180
|
+
* @public
|
|
7181
|
+
* @remarks
|
|
7182
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/validity | `ElementInternals.validity`} property.
|
|
7183
|
+
*/
|
|
7184
|
+
get validity(): ValidityState;
|
|
7185
|
+
/**
|
|
7186
|
+
* The element's validation message.
|
|
7187
|
+
*
|
|
7188
|
+
* @public
|
|
7189
|
+
* @remarks
|
|
7190
|
+
* Reflects the {@link https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/validationMessage | `ElemenentInternals.validationMessage`} property.
|
|
7191
|
+
*/
|
|
7192
|
+
get validationMessage(): string;
|
|
7193
|
+
/**
|
|
7194
|
+
* Whether the element is a candidate for its owning form's constraint validation.
|
|
7195
|
+
*
|
|
7196
|
+
* @public
|
|
7197
|
+
* @remarks
|
|
7198
|
+
* Reflects the {@link https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/willValidate | `ElemenentInternals.willValidate`} property.
|
|
7199
|
+
*/
|
|
7200
|
+
get willValidate(): boolean;
|
|
7201
|
+
/**
|
|
7202
|
+
* Checks the element's validity.
|
|
7203
|
+
* @public
|
|
7204
|
+
* @remarks
|
|
7205
|
+
* Reflects the {@link https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/checkValidity | `ElemenentInternals.checkValidity`} method.
|
|
7206
|
+
*/
|
|
7207
|
+
checkValidity(): boolean;
|
|
7208
|
+
/**
|
|
7209
|
+
* Reports the element's validity.
|
|
7210
|
+
* @public
|
|
7211
|
+
* @remarks
|
|
7212
|
+
* Reflects the {@link https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/reportValidity | `ElemenentInternals.reportValidity`} method.
|
|
7213
|
+
*/
|
|
7214
|
+
reportValidity(): boolean;
|
|
7215
|
+
/**
|
|
7216
|
+
* Sets a custom validity message.
|
|
7217
|
+
* @public
|
|
7218
|
+
*/
|
|
7219
|
+
setCustomValidity(message: string): void;
|
|
7220
|
+
/**
|
|
7221
|
+
* Sets the validity of the control.
|
|
7222
|
+
*
|
|
7223
|
+
* @param flags - Validity flags to set.
|
|
7224
|
+
* @param message - Optional message to supply. If not provided, the control's `validationMessage` will be used.
|
|
7225
|
+
* @param anchor - Optional anchor to use for the validation message.
|
|
7226
|
+
*
|
|
7227
|
+
* @internal
|
|
7228
|
+
*/
|
|
7229
|
+
setValidity(flags?: Partial<ValidityState>, message?: string, anchor?: HTMLElement): void;
|
|
7230
|
+
/**
|
|
7231
|
+
* The internal value of the input.
|
|
7232
|
+
*
|
|
7233
|
+
* @internal
|
|
7234
|
+
*/
|
|
7235
|
+
private _value;
|
|
7236
|
+
/**
|
|
7237
|
+
* The current value of the input.
|
|
7238
|
+
*
|
|
7239
|
+
* @public
|
|
7240
|
+
*/
|
|
7241
|
+
get value(): string;
|
|
7242
|
+
set value(value: string);
|
|
7243
|
+
/**
|
|
7244
|
+
* Resets the form value to its initial value when the form is reset.
|
|
7245
|
+
*
|
|
7246
|
+
* @internal
|
|
7247
|
+
*/
|
|
7248
|
+
formResetCallback(): void;
|
|
7249
|
+
/**
|
|
7250
|
+
* Disabled the component when its associated form is disabled.
|
|
7251
|
+
*
|
|
7252
|
+
* @internal
|
|
7253
|
+
*
|
|
7254
|
+
* @privateRemarks
|
|
7255
|
+
* DO NOT change the `disabled` property or attribute here, because if the
|
|
7256
|
+
* `disabled` attribute is present, reenabling an ancestor `<fieldset>`
|
|
7257
|
+
* element will not reenabling this component.
|
|
7258
|
+
*/
|
|
7259
|
+
formDisabledCallback(disabled: boolean): void;
|
|
7260
|
+
/**
|
|
7261
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/setFormValue | `ElementInternals.setFormValue()`} method.
|
|
7262
|
+
*
|
|
7263
|
+
* @internal
|
|
7264
|
+
*/
|
|
7265
|
+
setFormValue(value: File | string | FormData | null, state?: File | string | FormData | null): void;
|
|
7154
7266
|
/**
|
|
7155
7267
|
* @internal
|
|
7156
7268
|
*/
|
|
@@ -7203,35 +7315,50 @@ export declare class Slider extends FormAssociatedSlider implements SliderConfig
|
|
|
7203
7315
|
get valueAsNumber(): number;
|
|
7204
7316
|
set valueAsNumber(next: number);
|
|
7205
7317
|
/**
|
|
7206
|
-
* Custom function that generates a string for the component's "
|
|
7318
|
+
* Custom function that generates a string for the component's "ariaValueText" on element internals based on the current value.
|
|
7207
7319
|
*
|
|
7208
7320
|
* @public
|
|
7209
7321
|
*/
|
|
7210
|
-
valueTextFormatter: (value: string) => string
|
|
7322
|
+
valueTextFormatter: (value: string) => string;
|
|
7323
|
+
protected valueTextFormatterChanged(): void;
|
|
7211
7324
|
/**
|
|
7212
|
-
*
|
|
7325
|
+
* The element's disabled state.
|
|
7326
|
+
* @public
|
|
7327
|
+
* @remarks
|
|
7328
|
+
* HTML Attribute: `disabled`
|
|
7213
7329
|
*/
|
|
7214
|
-
|
|
7330
|
+
disabled: boolean;
|
|
7331
|
+
protected disabledChanged(): void;
|
|
7215
7332
|
/**
|
|
7216
7333
|
* The minimum allowed value.
|
|
7217
7334
|
*
|
|
7218
|
-
* @defaultValue - 0
|
|
7219
7335
|
* @public
|
|
7220
7336
|
* @remarks
|
|
7221
7337
|
* HTML Attribute: min
|
|
7222
7338
|
*/
|
|
7223
|
-
min:
|
|
7339
|
+
min: string;
|
|
7224
7340
|
protected minChanged(): void;
|
|
7341
|
+
/**
|
|
7342
|
+
* Returns the min property or the default value
|
|
7343
|
+
*
|
|
7344
|
+
* @internal
|
|
7345
|
+
*/
|
|
7346
|
+
private get minAsNumber();
|
|
7225
7347
|
/**
|
|
7226
7348
|
* The maximum allowed value.
|
|
7227
7349
|
*
|
|
7228
|
-
* @defaultValue - 10
|
|
7229
7350
|
* @public
|
|
7230
7351
|
* @remarks
|
|
7231
7352
|
* HTML Attribute: max
|
|
7232
7353
|
*/
|
|
7233
|
-
max:
|
|
7354
|
+
max: string;
|
|
7234
7355
|
protected maxChanged(): void;
|
|
7356
|
+
/**
|
|
7357
|
+
* Returns the max property or the default value
|
|
7358
|
+
*
|
|
7359
|
+
* @internal
|
|
7360
|
+
*/
|
|
7361
|
+
private get maxAsNumber();
|
|
7235
7362
|
/**
|
|
7236
7363
|
* Value to increment or decrement via arrow keys, mouse click or drag.
|
|
7237
7364
|
*
|
|
@@ -7239,17 +7366,30 @@ export declare class Slider extends FormAssociatedSlider implements SliderConfig
|
|
|
7239
7366
|
* @remarks
|
|
7240
7367
|
* HTML Attribute: step
|
|
7241
7368
|
*/
|
|
7242
|
-
step:
|
|
7369
|
+
step: string;
|
|
7243
7370
|
protected stepChanged(): void;
|
|
7371
|
+
/**
|
|
7372
|
+
* Returns the step property as a number.
|
|
7373
|
+
*
|
|
7374
|
+
* @internal
|
|
7375
|
+
*/
|
|
7376
|
+
private get stepAsNumber();
|
|
7244
7377
|
/**
|
|
7245
7378
|
* The orientation of the slider.
|
|
7246
7379
|
*
|
|
7247
7380
|
* @public
|
|
7248
7381
|
* @remarks
|
|
7249
7382
|
* HTML Attribute: orientation
|
|
7383
|
+
*
|
|
7384
|
+
* @privateRemarks
|
|
7385
|
+
* When checking the value of `this.orientation`, always compare it to
|
|
7386
|
+
* `Orientation.vertical`, never to `Orientation.horizontal`, it’s because
|
|
7387
|
+
* this property is optional, so it could be `undefined`. So any
|
|
7388
|
+
* orientation-related behavior should consider horizontal as default, and
|
|
7389
|
+
* apply different behavior when it’s vertical.
|
|
7250
7390
|
*/
|
|
7251
|
-
orientation
|
|
7252
|
-
protected orientationChanged(): void;
|
|
7391
|
+
orientation?: Orientation;
|
|
7392
|
+
protected orientationChanged(prev: string | undefined, next: string | undefined): void;
|
|
7253
7393
|
/**
|
|
7254
7394
|
* The selection mode.
|
|
7255
7395
|
*
|
|
@@ -7258,6 +7398,7 @@ export declare class Slider extends FormAssociatedSlider implements SliderConfig
|
|
|
7258
7398
|
* HTML Attribute: mode
|
|
7259
7399
|
*/
|
|
7260
7400
|
mode: SliderMode;
|
|
7401
|
+
constructor();
|
|
7261
7402
|
/**
|
|
7262
7403
|
* @internal
|
|
7263
7404
|
*/
|
|
@@ -7278,19 +7419,13 @@ export declare class Slider extends FormAssociatedSlider implements SliderConfig
|
|
|
7278
7419
|
* @public
|
|
7279
7420
|
*/
|
|
7280
7421
|
decrement(): void;
|
|
7281
|
-
keypressHandler: (
|
|
7282
|
-
/**
|
|
7283
|
-
* Gets the actual step value for the slider
|
|
7284
|
-
*
|
|
7285
|
-
*/
|
|
7286
|
-
private get stepValue();
|
|
7422
|
+
keypressHandler: (event: KeyboardEvent) => void;
|
|
7287
7423
|
/**
|
|
7288
7424
|
* Places the thumb based on the current value
|
|
7289
7425
|
*
|
|
7290
|
-
* @public
|
|
7291
7426
|
* @param direction - writing mode
|
|
7292
7427
|
*/
|
|
7293
|
-
private
|
|
7428
|
+
private setSliderPosition;
|
|
7294
7429
|
/**
|
|
7295
7430
|
* Update the step multiplier used to ensure rounding errors from steps that
|
|
7296
7431
|
* are not whole numbers
|
|
@@ -7298,21 +7433,17 @@ export declare class Slider extends FormAssociatedSlider implements SliderConfig
|
|
|
7298
7433
|
private updateStepMultiplier;
|
|
7299
7434
|
private setupTrackConstraints;
|
|
7300
7435
|
private setupListeners;
|
|
7301
|
-
/**
|
|
7302
|
-
* @internal
|
|
7303
|
-
*/
|
|
7304
|
-
initialValue: string;
|
|
7305
7436
|
private get midpoint();
|
|
7306
7437
|
private setupDefaultValue;
|
|
7307
7438
|
/**
|
|
7308
7439
|
* Handle mouse moves during a thumb drag operation
|
|
7309
7440
|
* If the event handler is null it removes the events
|
|
7310
7441
|
*/
|
|
7311
|
-
|
|
7442
|
+
handleThumbPointerDown: (event: PointerEvent | null) => void;
|
|
7312
7443
|
/**
|
|
7313
7444
|
* Handle mouse moves during a thumb drag operation
|
|
7314
7445
|
*/
|
|
7315
|
-
private
|
|
7446
|
+
private handlePointerMove;
|
|
7316
7447
|
/**
|
|
7317
7448
|
* Calculate the new value based on the given raw pixel value.
|
|
7318
7449
|
*
|
|
@@ -7325,28 +7456,26 @@ export declare class Slider extends FormAssociatedSlider implements SliderConfig
|
|
|
7325
7456
|
/**
|
|
7326
7457
|
* Handle a window mouse up during a drag operation
|
|
7327
7458
|
*/
|
|
7328
|
-
private
|
|
7459
|
+
private handleWindowPointerUp;
|
|
7329
7460
|
private stopDragging;
|
|
7330
7461
|
/**
|
|
7331
7462
|
*
|
|
7332
|
-
* @param
|
|
7463
|
+
* @param event - PointerEvent or null. If there is no event handler it will remove the events
|
|
7333
7464
|
*/
|
|
7334
|
-
|
|
7465
|
+
handlePointerDown: (event: PointerEvent | null) => void;
|
|
7335
7466
|
private convertToConstrainedValue;
|
|
7336
|
-
|
|
7337
|
-
|
|
7338
|
-
|
|
7339
|
-
|
|
7340
|
-
|
|
7341
|
-
declare interface _Slider extends FormAssociated {
|
|
7467
|
+
/**
|
|
7468
|
+
* Makes sure the side effects of set up when the disabled state changes.
|
|
7469
|
+
*/
|
|
7470
|
+
private setDisabledSideEffect;
|
|
7342
7471
|
}
|
|
7343
7472
|
|
|
7344
7473
|
/**
|
|
7345
7474
|
* @public
|
|
7346
7475
|
*/
|
|
7347
7476
|
export declare interface SliderConfiguration {
|
|
7348
|
-
max
|
|
7349
|
-
min
|
|
7477
|
+
max?: string;
|
|
7478
|
+
min?: string;
|
|
7350
7479
|
orientation?: SliderOrientation;
|
|
7351
7480
|
direction?: Direction;
|
|
7352
7481
|
disabled?: boolean;
|