@fluentui/web-components 3.0.0-beta.25 → 3.0.0-beta.26
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 +13 -2
- package/dist/dts/checkbox/checkbox.d.ts +19 -17
- package/dist/dts/switch/switch.d.ts +2 -39
- package/dist/esm/checkbox/checkbox.js +12 -10
- package/dist/esm/checkbox/checkbox.js.map +1 -1
- package/dist/esm/switch/switch.js +2 -52
- package/dist/esm/switch/switch.js.map +1 -1
- package/dist/esm/switch/switch.styles.js +34 -55
- package/dist/esm/switch/switch.styles.js.map +1 -1
- package/dist/esm/switch/switch.template.js +6 -16
- package/dist/esm/switch/switch.template.js.map +1 -1
- package/dist/esm/theme/set-theme.js +10 -5
- package/dist/esm/theme/set-theme.js.map +1 -1
- package/dist/web-components.d.ts +526 -574
- package/dist/web-components.js +300 -362
- package/dist/web-components.min.js +137 -137
- package/package.json +1 -1
package/dist/web-components.d.ts
CHANGED
|
@@ -1065,591 +1065,476 @@ export declare const BadgeStyles: ElementStyles;
|
|
|
1065
1065
|
export declare const BadgeTemplate: ElementViewTemplate<Badge>;
|
|
1066
1066
|
|
|
1067
1067
|
/**
|
|
1068
|
-
* A
|
|
1068
|
+
* A Checkbox Custom HTML Element.
|
|
1069
|
+
* Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#checkbox | ARIA checkbox }.
|
|
1070
|
+
*
|
|
1071
|
+
* @slot checked-indicator - The checked indicator
|
|
1072
|
+
* @slot indeterminate-indicator - The indeterminate indicator
|
|
1073
|
+
* @fires change - Emits a custom change event when the checked state changes
|
|
1074
|
+
* @fires input - Emits a custom input event when the checked state changes
|
|
1075
|
+
*
|
|
1069
1076
|
* @public
|
|
1070
1077
|
*/
|
|
1071
|
-
declare class
|
|
1078
|
+
declare class BaseCheckbox extends FASTElement {
|
|
1072
1079
|
/**
|
|
1073
|
-
*
|
|
1080
|
+
* Indicates that the element should get focus after the page finishes loading.
|
|
1081
|
+
* @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/input#autofocus | `autofocus`} attribute
|
|
1082
|
+
*
|
|
1074
1083
|
* @public
|
|
1075
1084
|
* @remarks
|
|
1076
|
-
* HTML Attribute:
|
|
1085
|
+
* HTML Attribute: `autofocus`
|
|
1077
1086
|
*/
|
|
1078
|
-
|
|
1079
|
-
protected valueChanged(): void;
|
|
1087
|
+
autofocus: boolean;
|
|
1080
1088
|
/**
|
|
1081
|
-
* The
|
|
1089
|
+
* The element's current checked state.
|
|
1090
|
+
*
|
|
1091
|
+
* @public
|
|
1092
|
+
*/
|
|
1093
|
+
get checked(): boolean;
|
|
1094
|
+
set checked(state: boolean);
|
|
1095
|
+
/**
|
|
1096
|
+
* The element's disabled state.
|
|
1082
1097
|
* @public
|
|
1083
1098
|
* @remarks
|
|
1084
|
-
* HTML Attribute:
|
|
1099
|
+
* HTML Attribute: `disabled`
|
|
1085
1100
|
*/
|
|
1086
|
-
|
|
1087
|
-
protected minChanged(): void;
|
|
1101
|
+
disabled: boolean;
|
|
1088
1102
|
/**
|
|
1089
|
-
* The
|
|
1103
|
+
* The id of a form to associate the element to.
|
|
1104
|
+
* @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/input#form | `form`} attribute
|
|
1105
|
+
*
|
|
1090
1106
|
* @public
|
|
1091
1107
|
* @remarks
|
|
1092
|
-
* HTML Attribute:
|
|
1108
|
+
* HTML Attribute: `form`
|
|
1093
1109
|
*/
|
|
1094
|
-
|
|
1095
|
-
protected maxChanged(): void;
|
|
1110
|
+
formAttribute?: string;
|
|
1096
1111
|
/**
|
|
1097
|
-
* Indicates
|
|
1098
|
-
*
|
|
1112
|
+
* Indicates that the element is in an indeterminate or mixed state.
|
|
1113
|
+
*
|
|
1114
|
+
* @public
|
|
1099
1115
|
*/
|
|
1100
|
-
|
|
1116
|
+
indeterminate?: boolean;
|
|
1101
1117
|
/**
|
|
1118
|
+
* Synchronizes the element's indeterminate state with the internal ElementInternals state.
|
|
1119
|
+
*
|
|
1102
1120
|
* @internal
|
|
1103
1121
|
*/
|
|
1104
|
-
|
|
1105
|
-
private updatePercentComplete;
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
/**
|
|
1109
|
-
* A Tabs component that wraps a collection of tab and tab panel elements.
|
|
1110
|
-
*
|
|
1111
|
-
* @public
|
|
1112
|
-
*/
|
|
1113
|
-
declare class BaseTabs extends FASTElement {
|
|
1122
|
+
indeterminateChanged(prev: boolean, next: boolean): void;
|
|
1114
1123
|
/**
|
|
1115
|
-
* The
|
|
1124
|
+
* The element's checked state.
|
|
1125
|
+
*
|
|
1116
1126
|
* @public
|
|
1117
1127
|
* @remarks
|
|
1118
|
-
* HTML Attribute:
|
|
1128
|
+
* HTML Attribute: `checked`
|
|
1119
1129
|
*/
|
|
1120
|
-
|
|
1130
|
+
initialChecked?: boolean;
|
|
1121
1131
|
/**
|
|
1132
|
+
* Updates the form value when the checked state changes.
|
|
1133
|
+
*
|
|
1122
1134
|
* @internal
|
|
1123
1135
|
*/
|
|
1124
|
-
|
|
1136
|
+
initialCheckedChanged(prev: boolean | undefined, next: boolean): void;
|
|
1125
1137
|
/**
|
|
1126
|
-
* The
|
|
1138
|
+
* The initial value of the input.
|
|
1127
1139
|
*
|
|
1128
1140
|
* @public
|
|
1129
1141
|
* @remarks
|
|
1130
|
-
* HTML Attribute:
|
|
1142
|
+
* HTML Attribute: `value`
|
|
1131
1143
|
*/
|
|
1132
|
-
|
|
1144
|
+
initialValue: string;
|
|
1133
1145
|
/**
|
|
1146
|
+
* Sets the value of the input when the value attribute changes.
|
|
1147
|
+
*
|
|
1148
|
+
* @param prev - The previous value
|
|
1149
|
+
* @param next - The current value
|
|
1134
1150
|
* @internal
|
|
1135
1151
|
*/
|
|
1136
|
-
|
|
1152
|
+
initialValueChanged(prev: string, next: string): void;
|
|
1137
1153
|
/**
|
|
1138
|
-
*
|
|
1154
|
+
* The name of the element. This element's value will be surfaced during form submission under the provided name.
|
|
1155
|
+
*
|
|
1156
|
+
* @public
|
|
1157
|
+
* @remarks
|
|
1158
|
+
* HTML Attribute: `name`
|
|
1139
1159
|
*/
|
|
1140
|
-
|
|
1160
|
+
name: string;
|
|
1141
1161
|
/**
|
|
1142
|
-
*
|
|
1162
|
+
* The element's required state.
|
|
1163
|
+
*
|
|
1164
|
+
* @public
|
|
1165
|
+
* @remarks
|
|
1166
|
+
* HTML Attribute: `required`
|
|
1143
1167
|
*/
|
|
1144
|
-
|
|
1168
|
+
required: boolean;
|
|
1145
1169
|
/**
|
|
1170
|
+
* Sets the validity of the control when the required state changes.
|
|
1171
|
+
*
|
|
1172
|
+
* @param prev - The previous required state
|
|
1173
|
+
* @param next - The current required state
|
|
1146
1174
|
* @internal
|
|
1147
1175
|
*/
|
|
1148
|
-
|
|
1176
|
+
requiredChanged(prev: boolean, next: boolean): void;
|
|
1149
1177
|
/**
|
|
1178
|
+
* The internal checked state of the control.
|
|
1179
|
+
*
|
|
1150
1180
|
* @internal
|
|
1151
1181
|
*/
|
|
1152
|
-
|
|
1153
|
-
/**
|
|
1154
|
-
* A reference to the active tab
|
|
1155
|
-
* @public
|
|
1156
|
-
*/
|
|
1157
|
-
activetab: HTMLElement;
|
|
1158
|
-
private prevActiveTabIndex;
|
|
1159
|
-
private activeTabIndex;
|
|
1160
|
-
private tabIds;
|
|
1161
|
-
private tabpanelIds;
|
|
1162
|
-
private change;
|
|
1163
|
-
private isDisabledElement;
|
|
1164
|
-
private isHiddenElement;
|
|
1165
|
-
private isFocusableElement;
|
|
1166
|
-
private getActiveIndex;
|
|
1182
|
+
private _checked;
|
|
1167
1183
|
/**
|
|
1168
|
-
*
|
|
1184
|
+
* Indicates that the checked state has been changed by the user.
|
|
1169
1185
|
*
|
|
1170
|
-
* @
|
|
1186
|
+
* @internal
|
|
1171
1187
|
*/
|
|
1172
|
-
|
|
1173
|
-
private setTabPanels;
|
|
1174
|
-
private getTabIds;
|
|
1175
|
-
private getTabPanelIds;
|
|
1176
|
-
private setComponent;
|
|
1177
|
-
private handleTabClick;
|
|
1178
|
-
private isHorizontal;
|
|
1179
|
-
private handleTabKeyDown;
|
|
1188
|
+
private dirtyChecked;
|
|
1180
1189
|
/**
|
|
1181
|
-
* The
|
|
1190
|
+
* The associated `<form>` element.
|
|
1191
|
+
*
|
|
1182
1192
|
* @public
|
|
1183
1193
|
* @remarks
|
|
1184
|
-
*
|
|
1194
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/form | `ElementInternals.form`} property.
|
|
1185
1195
|
*/
|
|
1186
|
-
|
|
1187
|
-
private adjustForward;
|
|
1188
|
-
private adjustBackward;
|
|
1189
|
-
private moveToTabByIndex;
|
|
1190
|
-
private focusTab;
|
|
1196
|
+
get form(): HTMLFormElement | null;
|
|
1191
1197
|
/**
|
|
1198
|
+
* The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
1199
|
+
*
|
|
1192
1200
|
* @internal
|
|
1193
1201
|
*/
|
|
1194
|
-
|
|
1195
|
-
}
|
|
1196
|
-
|
|
1197
|
-
/**
|
|
1198
|
-
* CSS custom property value for the {@link @fluentui/tokens#borderRadiusCircular | `borderRadiusCircular`} design token.
|
|
1199
|
-
* @public
|
|
1200
|
-
*/
|
|
1201
|
-
export declare const borderRadiusCircular = "var(--borderRadiusCircular)";
|
|
1202
|
-
|
|
1203
|
-
/**
|
|
1204
|
-
* CSS custom property value for the {@link @fluentui/tokens#borderRadiusLarge | `borderRadiusLarge`} design token.
|
|
1205
|
-
* @public
|
|
1206
|
-
*/
|
|
1207
|
-
export declare const borderRadiusLarge = "var(--borderRadiusLarge)";
|
|
1208
|
-
|
|
1209
|
-
/**
|
|
1210
|
-
* CSS custom property value for the {@link @fluentui/tokens#borderRadiusMedium | `borderRadiusMedium`} design token.
|
|
1211
|
-
* @public
|
|
1212
|
-
*/
|
|
1213
|
-
export declare const borderRadiusMedium = "var(--borderRadiusMedium)";
|
|
1214
|
-
|
|
1215
|
-
/**
|
|
1216
|
-
* CSS custom property value for the {@link @fluentui/tokens#borderRadiusNone | `borderRadiusNone`} design token.
|
|
1217
|
-
* @public
|
|
1218
|
-
*/
|
|
1219
|
-
export declare const borderRadiusNone = "var(--borderRadiusNone)";
|
|
1220
|
-
|
|
1221
|
-
/**
|
|
1222
|
-
* CSS custom property value for the {@link @fluentui/tokens#borderRadiusSmall | `borderRadiusSmall`} design token.
|
|
1223
|
-
* @public
|
|
1224
|
-
*/
|
|
1225
|
-
export declare const borderRadiusSmall = "var(--borderRadiusSmall)";
|
|
1226
|
-
|
|
1227
|
-
/**
|
|
1228
|
-
* CSS custom property value for the {@link @fluentui/tokens#borderRadiusXLarge | `borderRadiusXLarge`} design token.
|
|
1229
|
-
* @public
|
|
1230
|
-
*/
|
|
1231
|
-
export declare const borderRadiusXLarge = "var(--borderRadiusXLarge)";
|
|
1232
|
-
|
|
1233
|
-
/**
|
|
1234
|
-
* A Button Custom HTML Element.
|
|
1235
|
-
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button | `<button>`} element.
|
|
1236
|
-
*
|
|
1237
|
-
* @slot start - Content which can be provided before the button content
|
|
1238
|
-
* @slot end - Content which can be provided after the button content
|
|
1239
|
-
* @slot - The default slot for button content
|
|
1240
|
-
* @csspart content - The button content container
|
|
1241
|
-
*
|
|
1242
|
-
* @public
|
|
1243
|
-
*/
|
|
1244
|
-
export declare class Button extends FASTElement {
|
|
1202
|
+
elementInternals: ElementInternals;
|
|
1245
1203
|
/**
|
|
1246
|
-
*
|
|
1204
|
+
* The form-associated flag.
|
|
1205
|
+
* @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
|
|
1247
1206
|
*
|
|
1248
1207
|
* @public
|
|
1249
|
-
* @remarks
|
|
1250
|
-
* HTML Attribute: `appearance`
|
|
1251
1208
|
*/
|
|
1252
|
-
|
|
1209
|
+
static formAssociated: boolean;
|
|
1253
1210
|
/**
|
|
1254
|
-
*
|
|
1255
|
-
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#autofocus | `autofocus`} attribute
|
|
1211
|
+
* A reference to all associated `<label>` elements.
|
|
1256
1212
|
*
|
|
1257
1213
|
* @public
|
|
1258
|
-
* @remarks
|
|
1259
|
-
* HTML Attribute: `autofocus`
|
|
1260
1214
|
*/
|
|
1261
|
-
|
|
1215
|
+
get labels(): ReadonlyArray<Node>;
|
|
1262
1216
|
/**
|
|
1263
|
-
*
|
|
1217
|
+
* The fallback validation message, taken from a native checkbox `<input>` element.
|
|
1264
1218
|
*
|
|
1265
|
-
* @
|
|
1219
|
+
* @internal
|
|
1266
1220
|
*/
|
|
1267
|
-
|
|
1221
|
+
private _validationFallbackMessage;
|
|
1268
1222
|
/**
|
|
1269
|
-
*
|
|
1270
|
-
*
|
|
1223
|
+
* The validation message. Uses the browser's default validation message for native checkboxes if not otherwise
|
|
1224
|
+
* specified (e.g., via `setCustomValidity`).
|
|
1271
1225
|
*
|
|
1272
1226
|
* @public
|
|
1273
1227
|
* @remarks
|
|
1274
|
-
*
|
|
1228
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/validationMessage | `ElementInternals.validationMessage`} property.
|
|
1275
1229
|
*/
|
|
1276
|
-
|
|
1230
|
+
get validationMessage(): string;
|
|
1277
1231
|
/**
|
|
1278
|
-
*
|
|
1232
|
+
* The element's validity state.
|
|
1279
1233
|
*
|
|
1280
1234
|
* @public
|
|
1281
1235
|
* @remarks
|
|
1282
|
-
*
|
|
1236
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/validity | `ElementInternals.validity`} property.
|
|
1283
1237
|
*/
|
|
1284
|
-
|
|
1238
|
+
get validity(): ValidityState;
|
|
1285
1239
|
/**
|
|
1286
|
-
*
|
|
1240
|
+
* The internal value of the input.
|
|
1287
1241
|
*
|
|
1288
|
-
* @param previous - the previous disabledFocusable value
|
|
1289
|
-
* @param next - the current disabledFocusable value
|
|
1290
1242
|
* @internal
|
|
1291
1243
|
*/
|
|
1292
|
-
|
|
1244
|
+
private _value;
|
|
1293
1245
|
/**
|
|
1294
|
-
* The
|
|
1246
|
+
* The current value of the input.
|
|
1295
1247
|
*
|
|
1296
|
-
* @
|
|
1248
|
+
* @public
|
|
1297
1249
|
*/
|
|
1298
|
-
|
|
1250
|
+
get value(): string;
|
|
1251
|
+
set value(value: string);
|
|
1299
1252
|
/**
|
|
1300
|
-
*
|
|
1253
|
+
* Determines if the control can be submitted for constraint validation.
|
|
1301
1254
|
*
|
|
1302
1255
|
* @public
|
|
1256
|
+
* @remarks
|
|
1257
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/willValidate | `ElementInternals.willValidate`} property.
|
|
1303
1258
|
*/
|
|
1304
|
-
get
|
|
1259
|
+
get willValidate(): boolean;
|
|
1305
1260
|
/**
|
|
1306
|
-
*
|
|
1307
|
-
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formaction | `formaction`} attribute
|
|
1308
|
-
*
|
|
1309
|
-
* @public
|
|
1310
|
-
* @remarks
|
|
1311
|
-
* HTML Attribute: `formaction`
|
|
1312
|
-
*/
|
|
1313
|
-
formAction?: string;
|
|
1314
|
-
/**
|
|
1315
|
-
* The form-associated flag.
|
|
1316
|
-
* @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
|
|
1261
|
+
* Sets the `elementInternals.ariaChecked` value based on the checked state.
|
|
1317
1262
|
*
|
|
1318
|
-
* @
|
|
1263
|
+
* @internal
|
|
1319
1264
|
*/
|
|
1320
|
-
|
|
1265
|
+
private setAriaChecked;
|
|
1321
1266
|
/**
|
|
1322
|
-
*
|
|
1323
|
-
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#form | `form`} attribute
|
|
1267
|
+
* Checks the validity of the element and returns the result.
|
|
1324
1268
|
*
|
|
1325
1269
|
* @public
|
|
1326
1270
|
* @remarks
|
|
1327
|
-
*
|
|
1271
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/checkValidity | `HTMLInputElement.checkValidity()`} method.
|
|
1328
1272
|
*/
|
|
1329
|
-
|
|
1273
|
+
checkValidity(): boolean;
|
|
1330
1274
|
/**
|
|
1331
|
-
*
|
|
1332
|
-
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formenctype | `formenctype`} attribute
|
|
1275
|
+
* Toggles the checked state when the user clicks the element.
|
|
1333
1276
|
*
|
|
1334
|
-
* @
|
|
1335
|
-
* @
|
|
1336
|
-
* HTML Attribute: `formenctype`
|
|
1277
|
+
* @param e - the event object
|
|
1278
|
+
* @internal
|
|
1337
1279
|
*/
|
|
1338
|
-
|
|
1280
|
+
clickHandler(e: MouseEvent): boolean | void;
|
|
1281
|
+
connectedCallback(): void;
|
|
1282
|
+
constructor();
|
|
1339
1283
|
/**
|
|
1340
|
-
*
|
|
1341
|
-
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formmethod | `formmethod`} attribute
|
|
1284
|
+
* Updates the form value when a user changes the `checked` state.
|
|
1342
1285
|
*
|
|
1343
|
-
* @
|
|
1344
|
-
* @
|
|
1345
|
-
* HTML Attribute: `formmethod`
|
|
1286
|
+
* @param e - the event object
|
|
1287
|
+
* @internal
|
|
1346
1288
|
*/
|
|
1347
|
-
|
|
1289
|
+
inputHandler(e: Event): boolean | void;
|
|
1348
1290
|
/**
|
|
1349
|
-
*
|
|
1350
|
-
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formnovalidate | `formnovalidate`} attribute
|
|
1291
|
+
* Prevents scrolling when the user presses the space key.
|
|
1351
1292
|
*
|
|
1352
|
-
* @
|
|
1353
|
-
* @
|
|
1354
|
-
* HTML Attribute: `formnovalidate`
|
|
1293
|
+
* @param e - the event object
|
|
1294
|
+
* @internal
|
|
1355
1295
|
*/
|
|
1356
|
-
|
|
1296
|
+
keydownHandler(e: KeyboardEvent): boolean | void;
|
|
1357
1297
|
/**
|
|
1358
|
-
*
|
|
1298
|
+
* Toggles the checked state when the user releases the space key.
|
|
1359
1299
|
*
|
|
1300
|
+
* @param e - the event object
|
|
1360
1301
|
* @internal
|
|
1361
1302
|
*/
|
|
1362
|
-
|
|
1303
|
+
keyupHandler(e: KeyboardEvent): boolean | void;
|
|
1363
1304
|
/**
|
|
1364
|
-
*
|
|
1305
|
+
* Resets the form value to its initial value when the form is reset.
|
|
1365
1306
|
*
|
|
1366
1307
|
* @internal
|
|
1367
1308
|
*/
|
|
1368
|
-
|
|
1309
|
+
formResetCallback(): void;
|
|
1369
1310
|
/**
|
|
1370
|
-
*
|
|
1371
|
-
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formtarget | `formtarget`} attribute
|
|
1311
|
+
* Reports the validity of the element.
|
|
1372
1312
|
*
|
|
1373
1313
|
* @public
|
|
1374
1314
|
* @remarks
|
|
1375
|
-
*
|
|
1315
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/reportValidity | `HTMLInputElement.reportValidity()`} method.
|
|
1376
1316
|
*/
|
|
1377
|
-
|
|
1317
|
+
reportValidity(): boolean;
|
|
1378
1318
|
/**
|
|
1379
|
-
*
|
|
1319
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/setFormValue | `ElementInternals.setFormValue()`} method.
|
|
1380
1320
|
*
|
|
1381
|
-
* @
|
|
1382
|
-
* @remarks
|
|
1383
|
-
* HTML Attribute: `icon-only`
|
|
1321
|
+
* @internal
|
|
1384
1322
|
*/
|
|
1385
|
-
|
|
1323
|
+
setFormValue(value: File | string | FormData | null, state?: File | string | FormData | null): void;
|
|
1386
1324
|
/**
|
|
1387
|
-
*
|
|
1325
|
+
* Sets a custom validity message.
|
|
1388
1326
|
*
|
|
1327
|
+
* @param message - The message to set
|
|
1389
1328
|
* @public
|
|
1390
1329
|
*/
|
|
1391
|
-
|
|
1330
|
+
setCustomValidity(message: string): void;
|
|
1392
1331
|
/**
|
|
1393
|
-
*
|
|
1394
|
-
*
|
|
1332
|
+
* Sets the validity of the control.
|
|
1333
|
+
*
|
|
1334
|
+
* @param flags - Validity flags to set.
|
|
1335
|
+
* @param message - Optional message to supply. If not provided, the control's `validationMessage` will be used.
|
|
1336
|
+
* @param anchor - Optional anchor to use for the validation message.
|
|
1337
|
+
*
|
|
1338
|
+
* @internal
|
|
1339
|
+
*/
|
|
1340
|
+
setValidity(flags?: Partial<ValidityState>, message?: string, anchor?: HTMLElement): void;
|
|
1341
|
+
/**
|
|
1342
|
+
* Toggles the checked state of the control.
|
|
1395
1343
|
*
|
|
1396
1344
|
* @public
|
|
1345
|
+
*/
|
|
1346
|
+
private toggleChecked;
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
/**
|
|
1350
|
+
* A base class for progress components.
|
|
1351
|
+
* @public
|
|
1352
|
+
*/
|
|
1353
|
+
declare class BaseProgress extends FASTElement {
|
|
1354
|
+
/**
|
|
1355
|
+
* The value of the progress
|
|
1356
|
+
* @public
|
|
1397
1357
|
* @remarks
|
|
1398
|
-
* HTML Attribute:
|
|
1358
|
+
* HTML Attribute: value
|
|
1399
1359
|
*/
|
|
1400
|
-
|
|
1360
|
+
value: number | null;
|
|
1361
|
+
protected valueChanged(): void;
|
|
1401
1362
|
/**
|
|
1402
|
-
* The
|
|
1403
|
-
*
|
|
1363
|
+
* The minimum value
|
|
1404
1364
|
* @public
|
|
1405
1365
|
* @remarks
|
|
1406
|
-
* HTML Attribute:
|
|
1366
|
+
* HTML Attribute: min
|
|
1407
1367
|
*/
|
|
1408
|
-
|
|
1368
|
+
min: number;
|
|
1369
|
+
protected minChanged(): void;
|
|
1409
1370
|
/**
|
|
1410
|
-
* The
|
|
1411
|
-
*
|
|
1371
|
+
* The maximum value
|
|
1412
1372
|
* @public
|
|
1413
1373
|
* @remarks
|
|
1414
|
-
* HTML Attribute:
|
|
1374
|
+
* HTML Attribute: max
|
|
1415
1375
|
*/
|
|
1416
|
-
|
|
1376
|
+
max: number;
|
|
1377
|
+
protected maxChanged(): void;
|
|
1417
1378
|
/**
|
|
1418
|
-
*
|
|
1419
|
-
* @
|
|
1420
|
-
|
|
1379
|
+
* Indicates progress in %
|
|
1380
|
+
* @internal
|
|
1381
|
+
*/
|
|
1382
|
+
percentComplete: number;
|
|
1383
|
+
/**
|
|
1384
|
+
* @internal
|
|
1385
|
+
*/
|
|
1386
|
+
connectedCallback(): void;
|
|
1387
|
+
private updatePercentComplete;
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
/**
|
|
1391
|
+
* A Tabs component that wraps a collection of tab and tab panel elements.
|
|
1392
|
+
*
|
|
1393
|
+
* @public
|
|
1394
|
+
*/
|
|
1395
|
+
declare class BaseTabs extends FASTElement {
|
|
1396
|
+
/**
|
|
1397
|
+
* The orientation
|
|
1421
1398
|
* @public
|
|
1422
1399
|
* @remarks
|
|
1423
|
-
* HTML Attribute:
|
|
1400
|
+
* HTML Attribute: orientation
|
|
1424
1401
|
*/
|
|
1425
|
-
|
|
1402
|
+
orientation: TabsOrientation;
|
|
1426
1403
|
/**
|
|
1427
|
-
* Removes the form submission fallback control when the type changes.
|
|
1428
|
-
*
|
|
1429
|
-
* @param previous - the previous type value
|
|
1430
|
-
* @param next - the new type value
|
|
1431
1404
|
* @internal
|
|
1432
1405
|
*/
|
|
1433
|
-
|
|
1406
|
+
orientationChanged(): void;
|
|
1434
1407
|
/**
|
|
1435
|
-
* The
|
|
1436
|
-
*
|
|
1437
|
-
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#value | `value`} attribute
|
|
1408
|
+
* The id of the active tab
|
|
1438
1409
|
*
|
|
1439
1410
|
* @public
|
|
1440
1411
|
* @remarks
|
|
1441
|
-
* HTML Attribute:
|
|
1412
|
+
* HTML Attribute: activeid
|
|
1442
1413
|
*/
|
|
1443
|
-
|
|
1414
|
+
activeid: string;
|
|
1444
1415
|
/**
|
|
1445
|
-
* Handles the button click event.
|
|
1446
|
-
*
|
|
1447
|
-
* @param e - The event object
|
|
1448
1416
|
* @internal
|
|
1449
1417
|
*/
|
|
1450
|
-
|
|
1451
|
-
connectedCallback(): void;
|
|
1452
|
-
constructor();
|
|
1418
|
+
activeidChanged(oldValue: string, newValue: string): void;
|
|
1453
1419
|
/**
|
|
1454
|
-
* This fallback creates a new slot, then creates a submit button to mirror the custom element's
|
|
1455
|
-
* properties. The submit button is then appended to the slot and the form is submitted.
|
|
1456
|
-
*
|
|
1457
1420
|
* @internal
|
|
1458
|
-
* @privateRemarks
|
|
1459
|
-
* This is a workaround until {@link https://github.com/WICG/webcomponents/issues/814 | WICG/webcomponents/issues/814} is resolved.
|
|
1460
1421
|
*/
|
|
1461
|
-
|
|
1422
|
+
tabs: HTMLElement[];
|
|
1462
1423
|
/**
|
|
1463
|
-
* Invoked when a connected component's form or fieldset has its disabled state changed.
|
|
1464
|
-
*
|
|
1465
|
-
* @param disabled - the disabled value of the form / fieldset
|
|
1466
|
-
*
|
|
1467
1424
|
* @internal
|
|
1468
1425
|
*/
|
|
1469
|
-
|
|
1426
|
+
tabsChanged(): void;
|
|
1470
1427
|
/**
|
|
1471
|
-
*
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1428
|
+
* @internal
|
|
1429
|
+
*/
|
|
1430
|
+
tabpanels: HTMLElement[];
|
|
1431
|
+
/**
|
|
1432
|
+
* @internal
|
|
1433
|
+
*/
|
|
1434
|
+
tabpanelsChanged(): void;
|
|
1435
|
+
/**
|
|
1436
|
+
* A reference to the active tab
|
|
1475
1437
|
* @public
|
|
1476
1438
|
*/
|
|
1477
|
-
|
|
1439
|
+
activetab: HTMLElement;
|
|
1440
|
+
private prevActiveTabIndex;
|
|
1441
|
+
private activeTabIndex;
|
|
1442
|
+
private tabIds;
|
|
1443
|
+
private tabpanelIds;
|
|
1444
|
+
private change;
|
|
1445
|
+
private isDisabledElement;
|
|
1446
|
+
private isHiddenElement;
|
|
1447
|
+
private isFocusableElement;
|
|
1448
|
+
private getActiveIndex;
|
|
1478
1449
|
/**
|
|
1479
|
-
*
|
|
1450
|
+
* Function that is invoked whenever the selected tab or the tab collection changes.
|
|
1480
1451
|
*
|
|
1481
1452
|
* @public
|
|
1482
1453
|
*/
|
|
1483
|
-
protected
|
|
1454
|
+
protected setTabs(): void;
|
|
1455
|
+
private setTabPanels;
|
|
1456
|
+
private getTabIds;
|
|
1457
|
+
private getTabPanelIds;
|
|
1458
|
+
private setComponent;
|
|
1459
|
+
private handleTabClick;
|
|
1460
|
+
private isHorizontal;
|
|
1461
|
+
private handleTabKeyDown;
|
|
1484
1462
|
/**
|
|
1485
|
-
*
|
|
1486
|
-
*
|
|
1463
|
+
* The adjust method for FASTTabs
|
|
1487
1464
|
* @public
|
|
1465
|
+
* @remarks
|
|
1466
|
+
* This method allows the active index to be adjusted by numerical increments
|
|
1488
1467
|
*/
|
|
1489
|
-
|
|
1468
|
+
adjust(adjustment: number): void;
|
|
1469
|
+
private adjustForward;
|
|
1470
|
+
private adjustBackward;
|
|
1471
|
+
private moveToTabByIndex;
|
|
1472
|
+
private focusTab;
|
|
1490
1473
|
/**
|
|
1491
|
-
* Submits the associated form.
|
|
1492
|
-
*
|
|
1493
1474
|
* @internal
|
|
1494
|
-
*/
|
|
1495
|
-
|
|
1496
|
-
}
|
|
1497
|
-
|
|
1498
|
-
/**
|
|
1499
|
-
* @internal
|
|
1500
|
-
* @privateRemarks
|
|
1501
|
-
* Mark internal because exporting class and interface of the same name confuses API documenter.
|
|
1502
|
-
* TODO: https://github.com/microsoft/fast/issues/3317
|
|
1503
|
-
*/
|
|
1504
|
-
export declare interface Button extends StartEnd {
|
|
1505
|
-
}
|
|
1506
|
-
|
|
1507
|
-
/**
|
|
1508
|
-
* ButtonAppearance constants
|
|
1509
|
-
* @public
|
|
1510
|
-
*/
|
|
1511
|
-
export declare const ButtonAppearance: {
|
|
1512
|
-
readonly primary: "primary";
|
|
1513
|
-
readonly outline: "outline";
|
|
1514
|
-
readonly subtle: "subtle";
|
|
1515
|
-
readonly secondary: "secondary";
|
|
1516
|
-
readonly transparent: "transparent";
|
|
1517
|
-
};
|
|
1518
|
-
|
|
1519
|
-
/**
|
|
1520
|
-
* A Button can be secondary, primary, outline, subtle, transparent
|
|
1521
|
-
* @public
|
|
1522
|
-
*/
|
|
1523
|
-
export declare type ButtonAppearance = ValuesOf<typeof ButtonAppearance>;
|
|
1524
|
-
|
|
1525
|
-
/**
|
|
1526
|
-
* The definition for the Fluent Button component.
|
|
1527
|
-
*
|
|
1528
|
-
* @public
|
|
1529
|
-
* @remarks
|
|
1530
|
-
* HTML Element: `<fluent-button>`
|
|
1531
|
-
*/
|
|
1532
|
-
export declare const ButtonDefinition: FASTElementDefinition<typeof Button>;
|
|
1533
|
-
|
|
1534
|
-
/**
|
|
1535
|
-
* Button `formtarget` attribute values.
|
|
1536
|
-
* @public
|
|
1537
|
-
*/
|
|
1538
|
-
export declare const ButtonFormTarget: {
|
|
1539
|
-
readonly blank: "_blank";
|
|
1540
|
-
readonly self: "_self";
|
|
1541
|
-
readonly parent: "_parent";
|
|
1542
|
-
readonly top: "_top";
|
|
1543
|
-
};
|
|
1544
|
-
|
|
1545
|
-
/**
|
|
1546
|
-
* Types for the `formtarget` attribute values.
|
|
1547
|
-
* @public
|
|
1548
|
-
*/
|
|
1549
|
-
export declare type ButtonFormTarget = ValuesOf<typeof ButtonFormTarget>;
|
|
1550
|
-
|
|
1551
|
-
/**
|
|
1552
|
-
* Button configuration options.
|
|
1553
|
-
* @public
|
|
1554
|
-
*/
|
|
1555
|
-
declare type ButtonOptions = StartEndOptions<Button>;
|
|
1556
|
-
export { ButtonOptions }
|
|
1557
|
-
export { ButtonOptions as MenuButtonOptions }
|
|
1558
|
-
export { ButtonOptions as ToggleButtonOptions }
|
|
1559
|
-
|
|
1560
|
-
/**
|
|
1561
|
-
* A Button can be square, circular or rounded.
|
|
1562
|
-
* @public
|
|
1563
|
-
*/
|
|
1564
|
-
export declare const ButtonShape: {
|
|
1565
|
-
readonly circular: "circular";
|
|
1566
|
-
readonly rounded: "rounded";
|
|
1567
|
-
readonly square: "square";
|
|
1568
|
-
};
|
|
1569
|
-
|
|
1570
|
-
/**
|
|
1571
|
-
* A Button can be square, circular or rounded
|
|
1572
|
-
* @public
|
|
1573
|
-
*/
|
|
1574
|
-
export declare type ButtonShape = ValuesOf<typeof ButtonShape>;
|
|
1475
|
+
*/
|
|
1476
|
+
connectedCallback(): void;
|
|
1477
|
+
}
|
|
1575
1478
|
|
|
1576
1479
|
/**
|
|
1577
|
-
*
|
|
1480
|
+
* CSS custom property value for the {@link @fluentui/tokens#borderRadiusCircular | `borderRadiusCircular`} design token.
|
|
1578
1481
|
* @public
|
|
1579
1482
|
*/
|
|
1580
|
-
export declare const
|
|
1581
|
-
readonly small: "small";
|
|
1582
|
-
readonly medium: "medium";
|
|
1583
|
-
readonly large: "large";
|
|
1584
|
-
};
|
|
1483
|
+
export declare const borderRadiusCircular = "var(--borderRadiusCircular)";
|
|
1585
1484
|
|
|
1586
1485
|
/**
|
|
1587
|
-
*
|
|
1486
|
+
* CSS custom property value for the {@link @fluentui/tokens#borderRadiusLarge | `borderRadiusLarge`} design token.
|
|
1588
1487
|
* @public
|
|
1589
1488
|
*/
|
|
1590
|
-
export declare
|
|
1489
|
+
export declare const borderRadiusLarge = "var(--borderRadiusLarge)";
|
|
1591
1490
|
|
|
1592
1491
|
/**
|
|
1593
|
-
*
|
|
1594
|
-
*
|
|
1492
|
+
* CSS custom property value for the {@link @fluentui/tokens#borderRadiusMedium | `borderRadiusMedium`} design token.
|
|
1595
1493
|
* @public
|
|
1596
1494
|
*/
|
|
1597
|
-
export declare const
|
|
1495
|
+
export declare const borderRadiusMedium = "var(--borderRadiusMedium)";
|
|
1598
1496
|
|
|
1599
1497
|
/**
|
|
1600
|
-
*
|
|
1601
|
-
*
|
|
1498
|
+
* CSS custom property value for the {@link @fluentui/tokens#borderRadiusNone | `borderRadiusNone`} design token.
|
|
1602
1499
|
* @public
|
|
1603
1500
|
*/
|
|
1604
|
-
export declare const
|
|
1605
|
-
readonly submit: "submit";
|
|
1606
|
-
readonly reset: "reset";
|
|
1607
|
-
readonly button: "button";
|
|
1608
|
-
};
|
|
1501
|
+
export declare const borderRadiusNone = "var(--borderRadiusNone)";
|
|
1609
1502
|
|
|
1610
1503
|
/**
|
|
1611
|
-
*
|
|
1612
|
-
*
|
|
1504
|
+
* CSS custom property value for the {@link @fluentui/tokens#borderRadiusSmall | `borderRadiusSmall`} design token.
|
|
1613
1505
|
* @public
|
|
1614
1506
|
*/
|
|
1615
|
-
export declare
|
|
1616
|
-
|
|
1617
|
-
/**
|
|
1618
|
-
* Creates a checkable form associated component.
|
|
1619
|
-
* @beta
|
|
1620
|
-
*/
|
|
1621
|
-
declare function CheckableFormAssociated<T extends ConstructableFormAssociated>(BaseCtor: T): T;
|
|
1507
|
+
export declare const borderRadiusSmall = "var(--borderRadiusSmall)";
|
|
1622
1508
|
|
|
1623
1509
|
/**
|
|
1624
|
-
*
|
|
1625
|
-
*
|
|
1626
|
-
* @beta
|
|
1510
|
+
* CSS custom property value for the {@link @fluentui/tokens#borderRadiusXLarge | `borderRadiusXLarge`} design token.
|
|
1511
|
+
* @public
|
|
1627
1512
|
*/
|
|
1628
|
-
declare
|
|
1629
|
-
currentChecked: boolean;
|
|
1630
|
-
dirtyChecked: boolean;
|
|
1631
|
-
checkedAttribute: boolean;
|
|
1632
|
-
defaultChecked: boolean;
|
|
1633
|
-
defaultCheckedChanged(oldValue: boolean | undefined, newValue: boolean): void;
|
|
1634
|
-
checked: boolean;
|
|
1635
|
-
checkedChanged(oldValue: boolean | undefined, newValue: boolean): void;
|
|
1636
|
-
}
|
|
1513
|
+
export declare const borderRadiusXLarge = "var(--borderRadiusXLarge)";
|
|
1637
1514
|
|
|
1638
1515
|
/**
|
|
1639
|
-
* A
|
|
1640
|
-
*
|
|
1516
|
+
* A Button Custom HTML Element.
|
|
1517
|
+
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button | `<button>`} element.
|
|
1641
1518
|
*
|
|
1642
|
-
* @slot
|
|
1643
|
-
* @slot
|
|
1644
|
-
* @
|
|
1645
|
-
* @
|
|
1519
|
+
* @slot start - Content which can be provided before the button content
|
|
1520
|
+
* @slot end - Content which can be provided after the button content
|
|
1521
|
+
* @slot - The default slot for button content
|
|
1522
|
+
* @csspart content - The button content container
|
|
1646
1523
|
*
|
|
1647
1524
|
* @public
|
|
1648
1525
|
*/
|
|
1649
|
-
export declare class
|
|
1526
|
+
export declare class Button extends FASTElement {
|
|
1650
1527
|
/**
|
|
1651
|
-
* Indicates
|
|
1652
|
-
*
|
|
1528
|
+
* Indicates the styled appearance of the button.
|
|
1529
|
+
*
|
|
1530
|
+
* @public
|
|
1531
|
+
* @remarks
|
|
1532
|
+
* HTML Attribute: `appearance`
|
|
1533
|
+
*/
|
|
1534
|
+
appearance?: ButtonAppearance;
|
|
1535
|
+
/**
|
|
1536
|
+
* Indicates the button should be focused when the page is loaded.
|
|
1537
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#autofocus | `autofocus`} attribute
|
|
1653
1538
|
*
|
|
1654
1539
|
* @public
|
|
1655
1540
|
* @remarks
|
|
@@ -1657,280 +1542,398 @@ export declare class Checkbox extends FASTElement {
|
|
|
1657
1542
|
*/
|
|
1658
1543
|
autofocus: boolean;
|
|
1659
1544
|
/**
|
|
1660
|
-
*
|
|
1545
|
+
* Default slotted content.
|
|
1661
1546
|
*
|
|
1662
1547
|
* @public
|
|
1663
1548
|
*/
|
|
1664
|
-
|
|
1665
|
-
set checked(state: boolean);
|
|
1549
|
+
defaultSlottedContent: HTMLElement[];
|
|
1666
1550
|
/**
|
|
1667
|
-
*
|
|
1551
|
+
* Sets the element's disabled state.
|
|
1552
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#disabled | `disabled`} attribute
|
|
1553
|
+
*
|
|
1668
1554
|
* @public
|
|
1669
1555
|
* @remarks
|
|
1670
1556
|
* HTML Attribute: `disabled`
|
|
1671
1557
|
*/
|
|
1672
|
-
disabled
|
|
1558
|
+
disabled?: boolean;
|
|
1673
1559
|
/**
|
|
1674
|
-
*
|
|
1675
|
-
* @see The {@link https://developer.mozilla.org/docs/Web/HTML/Element/input#form | `form`} attribute
|
|
1560
|
+
* Indicates that the button is focusable while disabled.
|
|
1676
1561
|
*
|
|
1677
1562
|
* @public
|
|
1678
1563
|
* @remarks
|
|
1679
|
-
* HTML Attribute: `
|
|
1564
|
+
* HTML Attribute: `disabled-focusable`
|
|
1680
1565
|
*/
|
|
1681
|
-
|
|
1566
|
+
disabledFocusable: boolean;
|
|
1682
1567
|
/**
|
|
1683
|
-
*
|
|
1568
|
+
* Sets the element's internal disabled state when the element is focusable while disabled.
|
|
1684
1569
|
*
|
|
1685
|
-
* @
|
|
1570
|
+
* @param previous - the previous disabledFocusable value
|
|
1571
|
+
* @param next - the current disabledFocusable value
|
|
1572
|
+
* @internal
|
|
1686
1573
|
*/
|
|
1687
|
-
|
|
1574
|
+
disabledFocusableChanged(previous: boolean, next: boolean): void;
|
|
1688
1575
|
/**
|
|
1689
|
-
*
|
|
1576
|
+
* The internal {@link https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
1690
1577
|
*
|
|
1691
1578
|
* @internal
|
|
1692
1579
|
*/
|
|
1693
|
-
|
|
1580
|
+
protected elementInternals: ElementInternals;
|
|
1694
1581
|
/**
|
|
1695
|
-
* The
|
|
1582
|
+
* The associated form element.
|
|
1696
1583
|
*
|
|
1697
1584
|
* @public
|
|
1698
|
-
* @remarks
|
|
1699
|
-
* HTML Attribute: `checked`
|
|
1700
|
-
*/
|
|
1701
|
-
initialChecked?: boolean;
|
|
1702
|
-
/**
|
|
1703
|
-
* Updates the form value when the checked state changes.
|
|
1704
|
-
*
|
|
1705
|
-
* @internal
|
|
1706
1585
|
*/
|
|
1707
|
-
|
|
1586
|
+
get form(): HTMLFormElement | null;
|
|
1708
1587
|
/**
|
|
1709
|
-
* The
|
|
1588
|
+
* The URL that processes the form submission.
|
|
1589
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formaction | `formaction`} attribute
|
|
1710
1590
|
*
|
|
1711
1591
|
* @public
|
|
1712
1592
|
* @remarks
|
|
1713
|
-
* HTML Attribute: `
|
|
1593
|
+
* HTML Attribute: `formaction`
|
|
1714
1594
|
*/
|
|
1715
|
-
|
|
1595
|
+
formAction?: string;
|
|
1716
1596
|
/**
|
|
1717
|
-
*
|
|
1597
|
+
* The form-associated flag.
|
|
1598
|
+
* @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
|
|
1718
1599
|
*
|
|
1719
|
-
* @
|
|
1720
|
-
* @param next - The current value
|
|
1721
|
-
* @internal
|
|
1600
|
+
* @public
|
|
1722
1601
|
*/
|
|
1723
|
-
|
|
1602
|
+
static readonly formAssociated = true;
|
|
1724
1603
|
/**
|
|
1725
|
-
* The
|
|
1604
|
+
* The id of a form to associate the element to.
|
|
1605
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#form | `form`} attribute
|
|
1726
1606
|
*
|
|
1727
1607
|
* @public
|
|
1728
1608
|
* @remarks
|
|
1729
|
-
* HTML Attribute: `
|
|
1609
|
+
* HTML Attribute: `form`
|
|
1730
1610
|
*/
|
|
1731
|
-
|
|
1611
|
+
formAttribute?: string;
|
|
1732
1612
|
/**
|
|
1733
|
-
* The
|
|
1613
|
+
* The encoding type for the form submission.
|
|
1614
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formenctype | `formenctype`} attribute
|
|
1734
1615
|
*
|
|
1735
1616
|
* @public
|
|
1736
1617
|
* @remarks
|
|
1737
|
-
* HTML Attribute: `
|
|
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
|
|
1618
|
+
* HTML Attribute: `formenctype`
|
|
1746
1619
|
*/
|
|
1747
|
-
|
|
1620
|
+
formEnctype?: string;
|
|
1748
1621
|
/**
|
|
1749
|
-
*
|
|
1622
|
+
* The HTTP method that the browser uses to submit the form.
|
|
1623
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formmethod | `formmethod`} attribute
|
|
1750
1624
|
*
|
|
1751
1625
|
* @public
|
|
1752
1626
|
* @remarks
|
|
1753
|
-
* HTML Attribute: `
|
|
1627
|
+
* HTML Attribute: `formmethod`
|
|
1754
1628
|
*/
|
|
1755
|
-
|
|
1629
|
+
formMethod?: string;
|
|
1756
1630
|
/**
|
|
1757
|
-
* Indicates the
|
|
1631
|
+
* Indicates that the form will not be validated when submitted.
|
|
1632
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formnovalidate | `formnovalidate`} attribute
|
|
1758
1633
|
*
|
|
1759
1634
|
* @public
|
|
1760
1635
|
* @remarks
|
|
1761
|
-
* HTML Attribute: `
|
|
1636
|
+
* HTML Attribute: `formnovalidate`
|
|
1762
1637
|
*/
|
|
1763
|
-
|
|
1638
|
+
formNoValidate?: boolean;
|
|
1764
1639
|
/**
|
|
1765
|
-
* The internal
|
|
1640
|
+
* The internal form submission fallback control.
|
|
1766
1641
|
*
|
|
1767
1642
|
* @internal
|
|
1768
1643
|
*/
|
|
1769
|
-
private
|
|
1644
|
+
private formSubmissionFallbackControl?;
|
|
1770
1645
|
/**
|
|
1771
|
-
*
|
|
1646
|
+
* The internal slot for the form submission fallback control.
|
|
1772
1647
|
*
|
|
1773
1648
|
* @internal
|
|
1774
1649
|
*/
|
|
1775
|
-
private
|
|
1650
|
+
private formSubmissionFallbackControlSlot?;
|
|
1776
1651
|
/**
|
|
1777
|
-
* The
|
|
1652
|
+
* The target frame or window to open the form submission in.
|
|
1653
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formtarget | `formtarget`} attribute
|
|
1778
1654
|
*
|
|
1779
1655
|
* @public
|
|
1780
1656
|
* @remarks
|
|
1781
|
-
*
|
|
1782
|
-
*/
|
|
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
|
|
1657
|
+
* HTML Attribute: `formtarget`
|
|
1788
1658
|
*/
|
|
1789
|
-
|
|
1659
|
+
formTarget?: ButtonFormTarget;
|
|
1790
1660
|
/**
|
|
1791
|
-
*
|
|
1792
|
-
* @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
|
|
1661
|
+
* Indicates that the button should only display as an icon with no text content.
|
|
1793
1662
|
*
|
|
1794
1663
|
* @public
|
|
1664
|
+
* @remarks
|
|
1665
|
+
* HTML Attribute: `icon-only`
|
|
1795
1666
|
*/
|
|
1796
|
-
|
|
1667
|
+
iconOnly: boolean;
|
|
1797
1668
|
/**
|
|
1798
|
-
* A reference to all associated
|
|
1669
|
+
* A reference to all associated label elements.
|
|
1799
1670
|
*
|
|
1800
1671
|
* @public
|
|
1801
1672
|
*/
|
|
1802
1673
|
get labels(): ReadonlyArray<Node>;
|
|
1803
1674
|
/**
|
|
1804
|
-
* The
|
|
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`).
|
|
1675
|
+
* The name of the element. This element's value will be surfaced during form submission under the provided name.
|
|
1676
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#name | `name`} attribute
|
|
1812
1677
|
*
|
|
1813
1678
|
* @public
|
|
1814
1679
|
* @remarks
|
|
1815
|
-
*
|
|
1680
|
+
* HTML Attribute: `name`
|
|
1816
1681
|
*/
|
|
1817
|
-
|
|
1682
|
+
name?: string;
|
|
1818
1683
|
/**
|
|
1819
|
-
* The
|
|
1684
|
+
* The shape of the button.
|
|
1820
1685
|
*
|
|
1821
1686
|
* @public
|
|
1822
1687
|
* @remarks
|
|
1823
|
-
*
|
|
1824
|
-
*/
|
|
1825
|
-
get validity(): ValidityState;
|
|
1826
|
-
/**
|
|
1827
|
-
* The internal value of the input.
|
|
1828
|
-
*
|
|
1829
|
-
* @internal
|
|
1688
|
+
* HTML Attribute: `shape`
|
|
1830
1689
|
*/
|
|
1831
|
-
|
|
1690
|
+
shape?: ButtonShape;
|
|
1832
1691
|
/**
|
|
1833
|
-
* The
|
|
1692
|
+
* The size of the button.
|
|
1834
1693
|
*
|
|
1835
1694
|
* @public
|
|
1695
|
+
* @remarks
|
|
1696
|
+
* HTML Attribute: `size`
|
|
1836
1697
|
*/
|
|
1837
|
-
|
|
1838
|
-
set value(value: string);
|
|
1698
|
+
size?: ButtonSize;
|
|
1839
1699
|
/**
|
|
1840
|
-
*
|
|
1700
|
+
* The button type.
|
|
1701
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type | `type`} attribute
|
|
1841
1702
|
*
|
|
1842
1703
|
* @public
|
|
1843
1704
|
* @remarks
|
|
1844
|
-
*
|
|
1705
|
+
* HTML Attribute: `type`
|
|
1845
1706
|
*/
|
|
1846
|
-
|
|
1707
|
+
type: ButtonType;
|
|
1847
1708
|
/**
|
|
1848
|
-
*
|
|
1709
|
+
* Removes the form submission fallback control when the type changes.
|
|
1849
1710
|
*
|
|
1711
|
+
* @param previous - the previous type value
|
|
1712
|
+
* @param next - the new type value
|
|
1850
1713
|
* @internal
|
|
1851
1714
|
*/
|
|
1852
|
-
|
|
1715
|
+
typeChanged(previous: ButtonType, next: ButtonType): void;
|
|
1853
1716
|
/**
|
|
1854
|
-
*
|
|
1717
|
+
* The value attribute.
|
|
1718
|
+
*
|
|
1719
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#value | `value`} attribute
|
|
1855
1720
|
*
|
|
1856
1721
|
* @public
|
|
1857
1722
|
* @remarks
|
|
1858
|
-
*
|
|
1723
|
+
* HTML Attribute: `value`
|
|
1859
1724
|
*/
|
|
1860
|
-
|
|
1725
|
+
value?: string;
|
|
1861
1726
|
/**
|
|
1862
|
-
*
|
|
1727
|
+
* Handles the button click event.
|
|
1863
1728
|
*
|
|
1864
|
-
* @param e -
|
|
1729
|
+
* @param e - The event object
|
|
1865
1730
|
* @internal
|
|
1866
1731
|
*/
|
|
1867
|
-
clickHandler(e:
|
|
1732
|
+
clickHandler(e: Event): boolean | void;
|
|
1868
1733
|
connectedCallback(): void;
|
|
1869
1734
|
constructor();
|
|
1870
1735
|
/**
|
|
1871
|
-
*
|
|
1736
|
+
* This fallback creates a new slot, then creates a submit button to mirror the custom element's
|
|
1737
|
+
* properties. The submit button is then appended to the slot and the form is submitted.
|
|
1872
1738
|
*
|
|
1873
|
-
* @param e - the event object
|
|
1874
1739
|
* @internal
|
|
1740
|
+
* @privateRemarks
|
|
1741
|
+
* This is a workaround until {@link https://github.com/WICG/webcomponents/issues/814 | WICG/webcomponents/issues/814} is resolved.
|
|
1875
1742
|
*/
|
|
1876
|
-
|
|
1743
|
+
private createAndInsertFormSubmissionFallbackControl;
|
|
1877
1744
|
/**
|
|
1878
|
-
*
|
|
1745
|
+
* Invoked when a connected component's form or fieldset has its disabled state changed.
|
|
1746
|
+
*
|
|
1747
|
+
* @param disabled - the disabled value of the form / fieldset
|
|
1879
1748
|
*
|
|
1880
|
-
* @param e - the event object
|
|
1881
1749
|
* @internal
|
|
1882
1750
|
*/
|
|
1883
|
-
|
|
1751
|
+
formDisabledCallback(disabled: boolean): void;
|
|
1884
1752
|
/**
|
|
1885
|
-
*
|
|
1753
|
+
* Handles keypress events for the button.
|
|
1886
1754
|
*
|
|
1887
|
-
* @param e - the event
|
|
1888
|
-
* @
|
|
1755
|
+
* @param e - the keyboard event
|
|
1756
|
+
* @returns - the return value of the click handler
|
|
1757
|
+
* @public
|
|
1889
1758
|
*/
|
|
1890
|
-
|
|
1759
|
+
keypressHandler(e: KeyboardEvent): boolean | void;
|
|
1891
1760
|
/**
|
|
1892
|
-
*
|
|
1761
|
+
* Presses the button.
|
|
1893
1762
|
*
|
|
1894
|
-
* @
|
|
1763
|
+
* @public
|
|
1895
1764
|
*/
|
|
1896
|
-
|
|
1765
|
+
protected press(): void;
|
|
1897
1766
|
/**
|
|
1898
|
-
*
|
|
1767
|
+
* Resets the associated form.
|
|
1899
1768
|
*
|
|
1900
1769
|
* @public
|
|
1901
|
-
* @remarks
|
|
1902
|
-
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/reportValidity | `HTMLInputElement.reportValidity()`} method.
|
|
1903
1770
|
*/
|
|
1904
|
-
|
|
1771
|
+
resetForm(): void;
|
|
1905
1772
|
/**
|
|
1906
|
-
*
|
|
1773
|
+
* Submits the associated form.
|
|
1907
1774
|
*
|
|
1908
1775
|
* @internal
|
|
1909
1776
|
*/
|
|
1910
|
-
|
|
1777
|
+
private submitForm;
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
/**
|
|
1781
|
+
* @internal
|
|
1782
|
+
* @privateRemarks
|
|
1783
|
+
* Mark internal because exporting class and interface of the same name confuses API documenter.
|
|
1784
|
+
* TODO: https://github.com/microsoft/fast/issues/3317
|
|
1785
|
+
*/
|
|
1786
|
+
export declare interface Button extends StartEnd {
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
/**
|
|
1790
|
+
* ButtonAppearance constants
|
|
1791
|
+
* @public
|
|
1792
|
+
*/
|
|
1793
|
+
export declare const ButtonAppearance: {
|
|
1794
|
+
readonly primary: "primary";
|
|
1795
|
+
readonly outline: "outline";
|
|
1796
|
+
readonly subtle: "subtle";
|
|
1797
|
+
readonly secondary: "secondary";
|
|
1798
|
+
readonly transparent: "transparent";
|
|
1799
|
+
};
|
|
1800
|
+
|
|
1801
|
+
/**
|
|
1802
|
+
* A Button can be secondary, primary, outline, subtle, transparent
|
|
1803
|
+
* @public
|
|
1804
|
+
*/
|
|
1805
|
+
export declare type ButtonAppearance = ValuesOf<typeof ButtonAppearance>;
|
|
1806
|
+
|
|
1807
|
+
/**
|
|
1808
|
+
* The definition for the Fluent Button component.
|
|
1809
|
+
*
|
|
1810
|
+
* @public
|
|
1811
|
+
* @remarks
|
|
1812
|
+
* HTML Element: `<fluent-button>`
|
|
1813
|
+
*/
|
|
1814
|
+
export declare const ButtonDefinition: FASTElementDefinition<typeof Button>;
|
|
1815
|
+
|
|
1816
|
+
/**
|
|
1817
|
+
* Button `formtarget` attribute values.
|
|
1818
|
+
* @public
|
|
1819
|
+
*/
|
|
1820
|
+
export declare const ButtonFormTarget: {
|
|
1821
|
+
readonly blank: "_blank";
|
|
1822
|
+
readonly self: "_self";
|
|
1823
|
+
readonly parent: "_parent";
|
|
1824
|
+
readonly top: "_top";
|
|
1825
|
+
};
|
|
1826
|
+
|
|
1827
|
+
/**
|
|
1828
|
+
* Types for the `formtarget` attribute values.
|
|
1829
|
+
* @public
|
|
1830
|
+
*/
|
|
1831
|
+
export declare type ButtonFormTarget = ValuesOf<typeof ButtonFormTarget>;
|
|
1832
|
+
|
|
1833
|
+
/**
|
|
1834
|
+
* Button configuration options.
|
|
1835
|
+
* @public
|
|
1836
|
+
*/
|
|
1837
|
+
declare type ButtonOptions = StartEndOptions<Button>;
|
|
1838
|
+
export { ButtonOptions }
|
|
1839
|
+
export { ButtonOptions as MenuButtonOptions }
|
|
1840
|
+
export { ButtonOptions as ToggleButtonOptions }
|
|
1841
|
+
|
|
1842
|
+
/**
|
|
1843
|
+
* A Button can be square, circular or rounded.
|
|
1844
|
+
* @public
|
|
1845
|
+
*/
|
|
1846
|
+
export declare const ButtonShape: {
|
|
1847
|
+
readonly circular: "circular";
|
|
1848
|
+
readonly rounded: "rounded";
|
|
1849
|
+
readonly square: "square";
|
|
1850
|
+
};
|
|
1851
|
+
|
|
1852
|
+
/**
|
|
1853
|
+
* A Button can be square, circular or rounded
|
|
1854
|
+
* @public
|
|
1855
|
+
*/
|
|
1856
|
+
export declare type ButtonShape = ValuesOf<typeof ButtonShape>;
|
|
1857
|
+
|
|
1858
|
+
/**
|
|
1859
|
+
* A Button can be a size of small, medium or large.
|
|
1860
|
+
* @public
|
|
1861
|
+
*/
|
|
1862
|
+
export declare const ButtonSize: {
|
|
1863
|
+
readonly small: "small";
|
|
1864
|
+
readonly medium: "medium";
|
|
1865
|
+
readonly large: "large";
|
|
1866
|
+
};
|
|
1867
|
+
|
|
1868
|
+
/**
|
|
1869
|
+
* A Button can be on of several preset sizes.
|
|
1870
|
+
* @public
|
|
1871
|
+
*/
|
|
1872
|
+
export declare type ButtonSize = ValuesOf<typeof ButtonSize>;
|
|
1873
|
+
|
|
1874
|
+
/**
|
|
1875
|
+
* The template for the Button component.
|
|
1876
|
+
*
|
|
1877
|
+
* @public
|
|
1878
|
+
*/
|
|
1879
|
+
export declare const ButtonTemplate: ElementViewTemplate<Button>;
|
|
1880
|
+
|
|
1881
|
+
/**
|
|
1882
|
+
* Button type values.
|
|
1883
|
+
*
|
|
1884
|
+
* @public
|
|
1885
|
+
*/
|
|
1886
|
+
export declare const ButtonType: {
|
|
1887
|
+
readonly submit: "submit";
|
|
1888
|
+
readonly reset: "reset";
|
|
1889
|
+
readonly button: "button";
|
|
1890
|
+
};
|
|
1891
|
+
|
|
1892
|
+
/**
|
|
1893
|
+
* Type for button type values.
|
|
1894
|
+
*
|
|
1895
|
+
* @public
|
|
1896
|
+
*/
|
|
1897
|
+
export declare type ButtonType = ValuesOf<typeof ButtonType>;
|
|
1898
|
+
|
|
1899
|
+
/**
|
|
1900
|
+
* Creates a checkable form associated component.
|
|
1901
|
+
* @beta
|
|
1902
|
+
*/
|
|
1903
|
+
declare function CheckableFormAssociated<T extends ConstructableFormAssociated>(BaseCtor: T): T;
|
|
1904
|
+
|
|
1905
|
+
/**
|
|
1906
|
+
* Base class for providing Custom Element Form Association with checkable features.
|
|
1907
|
+
*
|
|
1908
|
+
* @beta
|
|
1909
|
+
*/
|
|
1910
|
+
declare interface CheckableFormAssociated extends FormAssociated {
|
|
1911
|
+
currentChecked: boolean;
|
|
1912
|
+
dirtyChecked: boolean;
|
|
1913
|
+
checkedAttribute: boolean;
|
|
1914
|
+
defaultChecked: boolean;
|
|
1915
|
+
defaultCheckedChanged(oldValue: boolean | undefined, newValue: boolean): void;
|
|
1916
|
+
checked: boolean;
|
|
1917
|
+
checkedChanged(oldValue: boolean | undefined, newValue: boolean): void;
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
export declare class Checkbox extends BaseCheckbox {
|
|
1911
1921
|
/**
|
|
1912
|
-
*
|
|
1922
|
+
* Indicates the shape of the checkbox.
|
|
1913
1923
|
*
|
|
1914
|
-
* @param message - The message to set
|
|
1915
1924
|
* @public
|
|
1925
|
+
* @remarks
|
|
1926
|
+
* HTML Attribute: `shape`
|
|
1916
1927
|
*/
|
|
1917
|
-
|
|
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
|
+
shape: CheckboxShape;
|
|
1928
1929
|
/**
|
|
1929
|
-
*
|
|
1930
|
+
* Indicates the size of the checkbox.
|
|
1930
1931
|
*
|
|
1931
1932
|
* @public
|
|
1933
|
+
* @remarks
|
|
1934
|
+
* HTML Attribute: `size`
|
|
1932
1935
|
*/
|
|
1933
|
-
|
|
1936
|
+
size?: CheckboxSize;
|
|
1934
1937
|
}
|
|
1935
1938
|
|
|
1936
1939
|
/**
|
|
@@ -5054,15 +5057,6 @@ declare class FormAssociatedSlider extends FormAssociatedSlider_base {
|
|
|
5054
5057
|
|
|
5055
5058
|
declare const FormAssociatedSlider_base: typeof _Slider;
|
|
5056
5059
|
|
|
5057
|
-
/**
|
|
5058
|
-
* @beta
|
|
5059
|
-
*/
|
|
5060
|
-
declare class FormAssociatedSwitch extends FormAssociatedSwitch_base {
|
|
5061
|
-
proxy: HTMLInputElement;
|
|
5062
|
-
}
|
|
5063
|
-
|
|
5064
|
-
declare const FormAssociatedSwitch_base: typeof _Switch;
|
|
5065
|
-
|
|
5066
5060
|
/**
|
|
5067
5061
|
* Determines the current localization direction of an element.
|
|
5068
5062
|
*
|
|
@@ -7008,49 +7002,7 @@ declare const styles: ElementStyles;
|
|
|
7008
7002
|
export { styles as ButtonStyles }
|
|
7009
7003
|
export { styles as MenuButtonStyles }
|
|
7010
7004
|
|
|
7011
|
-
export declare class Switch extends
|
|
7012
|
-
/**
|
|
7013
|
-
* The label position of the switch
|
|
7014
|
-
*
|
|
7015
|
-
* @public
|
|
7016
|
-
* @remarks
|
|
7017
|
-
* HTML Attribute: labelposition
|
|
7018
|
-
*/
|
|
7019
|
-
labelPosition: SwitchLabelPosition | undefined;
|
|
7020
|
-
/**
|
|
7021
|
-
* When true, the control will be immutable by user interaction. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly | readonly HTML attribute} for more information.
|
|
7022
|
-
* @public
|
|
7023
|
-
* @remarks
|
|
7024
|
-
* HTML Attribute: readonly
|
|
7025
|
-
*/
|
|
7026
|
-
readOnly: boolean;
|
|
7027
|
-
protected readOnlyChanged(): void;
|
|
7028
|
-
/**
|
|
7029
|
-
* The element's value to be included in form submission when checked.
|
|
7030
|
-
* Default to "on" to reach parity with input[type="checkbox"]
|
|
7031
|
-
*
|
|
7032
|
-
* @internal
|
|
7033
|
-
*/
|
|
7034
|
-
initialValue: string;
|
|
7035
|
-
/**
|
|
7036
|
-
* @internal
|
|
7037
|
-
*/
|
|
7038
|
-
defaultSlottedNodes: Node[];
|
|
7039
|
-
constructor();
|
|
7040
|
-
/**
|
|
7041
|
-
* @internal
|
|
7042
|
-
*/
|
|
7043
|
-
keypressHandler: (e: KeyboardEvent) => void;
|
|
7044
|
-
/**
|
|
7045
|
-
* @internal
|
|
7046
|
-
*/
|
|
7047
|
-
clickHandler: (e: MouseEvent) => void;
|
|
7048
|
-
}
|
|
7049
|
-
|
|
7050
|
-
declare class _Switch extends FASTElement {
|
|
7051
|
-
}
|
|
7052
|
-
|
|
7053
|
-
declare interface _Switch extends CheckableFormAssociated {
|
|
7005
|
+
export declare class Switch extends BaseCheckbox {
|
|
7054
7006
|
}
|
|
7055
7007
|
|
|
7056
7008
|
/**
|