@fluentui/web-components 3.0.0-beta.11 → 3.0.0-beta.13
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 +20 -2
- package/dist/dts/button/button.d.ts +173 -90
- package/dist/dts/button/button.definition.d.ts +3 -1
- package/dist/dts/button/button.options.d.ts +16 -1
- package/dist/dts/button/button.styles.d.ts +5 -0
- package/dist/dts/button/button.template.d.ts +7 -1
- package/dist/dts/form-associated/form-associated.d.ts +0 -74
- package/dist/dts/toggle-button/toggle-button.d.ts +29 -26
- package/dist/dts/toggle-button/toggle-button.styles.d.ts +7 -0
- package/dist/esm/anchor-button/anchor-button.styles.js +254 -3
- package/dist/esm/anchor-button/anchor-button.styles.js.map +1 -1
- package/dist/esm/button/button.definition.js +3 -4
- package/dist/esm/button/button.definition.js.map +1 -1
- package/dist/esm/button/button.js +233 -126
- package/dist/esm/button/button.js.map +1 -1
- package/dist/esm/button/button.options.js +10 -0
- package/dist/esm/button/button.options.js.map +1 -1
- package/dist/esm/button/button.styles.js +52 -54
- package/dist/esm/button/button.styles.js.map +1 -1
- package/dist/esm/button/button.template.js +13 -39
- package/dist/esm/button/button.template.js.map +1 -1
- package/dist/esm/compound-button/compound-button.definition.js +0 -3
- package/dist/esm/compound-button/compound-button.definition.js.map +1 -1
- package/dist/esm/compound-button/compound-button.styles.js +7 -7
- package/dist/esm/compound-button/compound-button.template.js +3 -39
- package/dist/esm/compound-button/compound-button.template.js.map +1 -1
- package/dist/esm/form-associated/form-associated.js.map +1 -1
- package/dist/esm/menu-button/menu-button.definition.js +0 -3
- package/dist/esm/menu-button/menu-button.definition.js.map +1 -1
- package/dist/esm/menu-button/menu-button.template.js +5 -1
- package/dist/esm/menu-button/menu-button.template.js.map +1 -1
- package/dist/esm/toggle-button/toggle-button.definition.js +0 -3
- package/dist/esm/toggle-button/toggle-button.definition.js.map +1 -1
- package/dist/esm/toggle-button/toggle-button.js +42 -85
- package/dist/esm/toggle-button/toggle-button.js.map +1 -1
- package/dist/esm/toggle-button/toggle-button.styles.js +31 -26
- package/dist/esm/toggle-button/toggle-button.styles.js.map +1 -1
- package/dist/fluent-web-components.api.json +342 -673
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/main.e73a6496.iframe.bundle.js +2 -0
- package/dist/storybook/project.json +1 -1
- package/dist/web-components.d.ts +250 -223
- package/dist/web-components.js +236 -229
- package/dist/web-components.min.js +51 -50
- package/docs/api-report.md +63 -79
- package/package.json +3 -2
- package/playwright.config.ts +2 -3
- package/dist/dts/button/button.form-associated.d.ts +0 -14
- package/dist/esm/button/button.form-associated.js +0 -14
- package/dist/esm/button/button.form-associated.js.map +0 -1
- package/dist/storybook/main.81e47c59.iframe.bundle.js +0 -2
- /package/dist/storybook/{main.81e47c59.iframe.bundle.js.LICENSE.txt → main.e73a6496.iframe.bundle.js.LICENSE.txt} +0 -0
package/dist/web-components.d.ts
CHANGED
|
@@ -1218,171 +1218,276 @@ export declare const borderRadiusXLarge = "var(--borderRadiusXLarge)";
|
|
|
1218
1218
|
|
|
1219
1219
|
/**
|
|
1220
1220
|
* A Button Custom HTML Element.
|
|
1221
|
-
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button |
|
|
1221
|
+
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button | `<button>`} element.
|
|
1222
1222
|
*
|
|
1223
1223
|
* @slot start - Content which can be provided before the button content
|
|
1224
1224
|
* @slot end - Content which can be provided after the button content
|
|
1225
1225
|
* @slot - The default slot for button content
|
|
1226
|
-
* @csspart
|
|
1227
|
-
* @csspart content - The element wrapping button content
|
|
1226
|
+
* @csspart content - The button content container
|
|
1228
1227
|
*
|
|
1229
1228
|
* @public
|
|
1230
1229
|
*/
|
|
1231
|
-
export declare class Button extends
|
|
1230
|
+
export declare class Button extends FASTElement {
|
|
1232
1231
|
/**
|
|
1233
|
-
*
|
|
1232
|
+
* Indicates the styled appearance of the button.
|
|
1234
1233
|
*
|
|
1235
1234
|
* @public
|
|
1236
1235
|
* @remarks
|
|
1237
|
-
* HTML Attribute:
|
|
1236
|
+
* HTML Attribute: `appearance`
|
|
1237
|
+
*/
|
|
1238
|
+
appearance?: ButtonAppearance;
|
|
1239
|
+
/**
|
|
1240
|
+
* Indicates the button should be focused when the page is loaded.
|
|
1241
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#autofocus | `autofocus`} attribute
|
|
1242
|
+
*
|
|
1243
|
+
* @public
|
|
1244
|
+
* @remarks
|
|
1245
|
+
* HTML Attribute: `autofocus`
|
|
1238
1246
|
*/
|
|
1239
1247
|
autofocus: boolean;
|
|
1240
1248
|
/**
|
|
1241
|
-
*
|
|
1249
|
+
* Default slotted content.
|
|
1250
|
+
*
|
|
1251
|
+
* @public
|
|
1252
|
+
*/
|
|
1253
|
+
defaultSlottedContent: HTMLElement[];
|
|
1254
|
+
/**
|
|
1255
|
+
* Sets the element's disabled state.
|
|
1256
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#disabled | `disabled`} attribute
|
|
1242
1257
|
*
|
|
1243
1258
|
* @public
|
|
1244
1259
|
* @remarks
|
|
1245
|
-
* HTML Attribute:
|
|
1260
|
+
* HTML Attribute: `disabled`
|
|
1246
1261
|
*/
|
|
1247
|
-
|
|
1262
|
+
disabled?: boolean;
|
|
1248
1263
|
/**
|
|
1249
|
-
*
|
|
1264
|
+
* Indicates that the button is focusable while disabled.
|
|
1250
1265
|
*
|
|
1251
1266
|
* @public
|
|
1252
1267
|
* @remarks
|
|
1253
|
-
* HTML Attribute:
|
|
1268
|
+
* HTML Attribute: `disabled-focusable`
|
|
1254
1269
|
*/
|
|
1255
|
-
|
|
1256
|
-
protected formactionChanged(): void;
|
|
1270
|
+
disabledFocusable: boolean;
|
|
1257
1271
|
/**
|
|
1258
|
-
*
|
|
1272
|
+
* Sets the element's internal disabled state when the element is focusable while disabled.
|
|
1273
|
+
*
|
|
1274
|
+
* @param previous - the previous disabledFocusable value
|
|
1275
|
+
* @param next - the current disabledFocusable value
|
|
1276
|
+
* @internal
|
|
1277
|
+
*/
|
|
1278
|
+
disabledFocusableChanged(previous: boolean, next: boolean): void;
|
|
1279
|
+
/**
|
|
1280
|
+
* The internal {@link https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
1281
|
+
*
|
|
1282
|
+
* @internal
|
|
1283
|
+
*/
|
|
1284
|
+
protected elementInternals: ElementInternals;
|
|
1285
|
+
/**
|
|
1286
|
+
* The associated form element.
|
|
1287
|
+
*
|
|
1288
|
+
* @public
|
|
1289
|
+
*/
|
|
1290
|
+
get form(): HTMLFormElement | null;
|
|
1291
|
+
/**
|
|
1292
|
+
* The URL that processes the form submission.
|
|
1293
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formaction | `formaction`} attribute
|
|
1259
1294
|
*
|
|
1260
1295
|
* @public
|
|
1261
1296
|
* @remarks
|
|
1262
|
-
* HTML Attribute:
|
|
1297
|
+
* HTML Attribute: `formaction`
|
|
1298
|
+
*/
|
|
1299
|
+
formAction?: string;
|
|
1300
|
+
/**
|
|
1301
|
+
* The form-associated flag.
|
|
1302
|
+
* @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
|
|
1303
|
+
*
|
|
1304
|
+
* @public
|
|
1263
1305
|
*/
|
|
1264
|
-
|
|
1265
|
-
protected formenctypeChanged(): void;
|
|
1306
|
+
static readonly formAssociated = true;
|
|
1266
1307
|
/**
|
|
1267
|
-
*
|
|
1308
|
+
* The id of a form to associate the element to.
|
|
1309
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#form | `form`} attribute
|
|
1268
1310
|
*
|
|
1269
1311
|
* @public
|
|
1270
1312
|
* @remarks
|
|
1271
|
-
* HTML Attribute:
|
|
1313
|
+
* HTML Attribute: `form`
|
|
1272
1314
|
*/
|
|
1273
|
-
|
|
1274
|
-
protected formmethodChanged(): void;
|
|
1315
|
+
formAttribute?: string;
|
|
1275
1316
|
/**
|
|
1276
|
-
*
|
|
1317
|
+
* The encoding type for the form submission.
|
|
1318
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formenctype | `formenctype`} attribute
|
|
1277
1319
|
*
|
|
1278
1320
|
* @public
|
|
1279
1321
|
* @remarks
|
|
1280
|
-
* HTML Attribute:
|
|
1322
|
+
* HTML Attribute: `formenctype`
|
|
1281
1323
|
*/
|
|
1282
|
-
|
|
1283
|
-
protected formnovalidateChanged(): void;
|
|
1324
|
+
formEnctype?: string;
|
|
1284
1325
|
/**
|
|
1285
|
-
*
|
|
1326
|
+
* The HTTP method that the browser uses to submit the form.
|
|
1327
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formmethod | `formmethod`} attribute
|
|
1286
1328
|
*
|
|
1287
1329
|
* @public
|
|
1288
1330
|
* @remarks
|
|
1289
|
-
* HTML Attribute:
|
|
1331
|
+
* HTML Attribute: `formmethod`
|
|
1290
1332
|
*/
|
|
1291
|
-
|
|
1292
|
-
protected formtargetChanged(): void;
|
|
1333
|
+
formMethod?: string;
|
|
1293
1334
|
/**
|
|
1294
|
-
*
|
|
1335
|
+
* Indicates that the form will not be validated when submitted.
|
|
1336
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formnovalidate | `formnovalidate`} attribute
|
|
1295
1337
|
*
|
|
1296
1338
|
* @public
|
|
1297
1339
|
* @remarks
|
|
1298
|
-
* HTML Attribute:
|
|
1340
|
+
* HTML Attribute: `formnovalidate`
|
|
1299
1341
|
*/
|
|
1300
|
-
|
|
1301
|
-
|
|
1342
|
+
formNoValidate?: boolean;
|
|
1343
|
+
/**
|
|
1344
|
+
* The internal form submission fallback control.
|
|
1345
|
+
*
|
|
1346
|
+
* @internal
|
|
1347
|
+
*/
|
|
1348
|
+
private formSubmissionFallbackControl?;
|
|
1349
|
+
/**
|
|
1350
|
+
* The internal slot for the form submission fallback control.
|
|
1351
|
+
*
|
|
1352
|
+
* @internal
|
|
1353
|
+
*/
|
|
1354
|
+
private formSubmissionFallbackControlSlot?;
|
|
1302
1355
|
/**
|
|
1303
|
-
* The
|
|
1356
|
+
* The target frame or window to open the form submission in.
|
|
1357
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formtarget | `formtarget`} attribute
|
|
1304
1358
|
*
|
|
1305
1359
|
* @public
|
|
1306
1360
|
* @remarks
|
|
1307
|
-
* HTML Attribute:
|
|
1361
|
+
* HTML Attribute: `formtarget`
|
|
1308
1362
|
*/
|
|
1309
|
-
|
|
1363
|
+
formTarget?: ButtonFormTarget;
|
|
1310
1364
|
/**
|
|
1311
|
-
*
|
|
1365
|
+
* Indicates that the button should only display as an icon with no text content.
|
|
1312
1366
|
*
|
|
1313
1367
|
* @public
|
|
1314
1368
|
* @remarks
|
|
1315
|
-
* HTML Attribute:
|
|
1369
|
+
* HTML Attribute: `icon-only`
|
|
1316
1370
|
*/
|
|
1317
|
-
|
|
1371
|
+
iconOnly: boolean;
|
|
1318
1372
|
/**
|
|
1319
|
-
*
|
|
1373
|
+
* A reference to all associated label elements.
|
|
1374
|
+
*
|
|
1375
|
+
* @public
|
|
1376
|
+
*/
|
|
1377
|
+
get labels(): ReadonlyArray<Node>;
|
|
1378
|
+
/**
|
|
1379
|
+
* The name of the element. This element's value will be surfaced during form submission under the provided name.
|
|
1380
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#name | `name`} attribute
|
|
1320
1381
|
*
|
|
1321
1382
|
* @public
|
|
1322
1383
|
* @remarks
|
|
1323
|
-
* HTML Attribute:
|
|
1384
|
+
* HTML Attribute: `name`
|
|
1324
1385
|
*/
|
|
1325
|
-
|
|
1386
|
+
name?: string;
|
|
1326
1387
|
/**
|
|
1327
|
-
* The
|
|
1388
|
+
* The shape of the button.
|
|
1328
1389
|
*
|
|
1329
1390
|
* @public
|
|
1330
1391
|
* @remarks
|
|
1331
|
-
* HTML Attribute:
|
|
1392
|
+
* HTML Attribute: `shape`
|
|
1332
1393
|
*/
|
|
1333
|
-
|
|
1394
|
+
shape?: ButtonShape;
|
|
1334
1395
|
/**
|
|
1335
|
-
* The
|
|
1396
|
+
* The size of the button.
|
|
1336
1397
|
*
|
|
1337
1398
|
* @public
|
|
1338
1399
|
* @remarks
|
|
1339
|
-
* HTML Attribute:
|
|
1400
|
+
* HTML Attribute: `size`
|
|
1340
1401
|
*/
|
|
1341
|
-
|
|
1342
|
-
protected disabledFocusableChanged(prev: boolean, next: boolean): void;
|
|
1402
|
+
size?: ButtonSize;
|
|
1343
1403
|
/**
|
|
1344
|
-
*
|
|
1404
|
+
* The button type.
|
|
1405
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type | `type`} attribute
|
|
1406
|
+
*
|
|
1407
|
+
* @public
|
|
1408
|
+
* @remarks
|
|
1409
|
+
* HTML Attribute: `type`
|
|
1345
1410
|
*/
|
|
1346
|
-
|
|
1411
|
+
type: ButtonType;
|
|
1347
1412
|
/**
|
|
1413
|
+
* Removes the form submission fallback control when the type changes.
|
|
1348
1414
|
*
|
|
1349
|
-
*
|
|
1415
|
+
* @param previous - the previous type value
|
|
1416
|
+
* @param next - the new type value
|
|
1417
|
+
* @internal
|
|
1418
|
+
*/
|
|
1419
|
+
typeChanged(previous: ButtonType, next: ButtonType): void;
|
|
1420
|
+
/**
|
|
1421
|
+
* The value attribute.
|
|
1422
|
+
*
|
|
1423
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#value | `value`} attribute
|
|
1350
1424
|
*
|
|
1351
1425
|
* @public
|
|
1352
1426
|
* @remarks
|
|
1427
|
+
* HTML Attribute: `value`
|
|
1353
1428
|
*/
|
|
1354
|
-
|
|
1355
|
-
/** {@inheritDoc (FormAssociated:interface).validate} */
|
|
1356
|
-
validate(): void;
|
|
1429
|
+
value?: string;
|
|
1357
1430
|
/**
|
|
1431
|
+
* Handles the button click event.
|
|
1432
|
+
*
|
|
1433
|
+
* @param e - The event object
|
|
1358
1434
|
* @internal
|
|
1359
1435
|
*/
|
|
1436
|
+
clickHandler(e: Event): boolean | void;
|
|
1360
1437
|
connectedCallback(): void;
|
|
1361
|
-
|
|
1438
|
+
constructor();
|
|
1439
|
+
/**
|
|
1440
|
+
* This fallback creates a new slot, then creates a submit button to mirror the custom element's
|
|
1441
|
+
* properties. The submit button is then appended to the slot and the form is submitted.
|
|
1442
|
+
*
|
|
1443
|
+
* @internal
|
|
1444
|
+
* @privateRemarks
|
|
1445
|
+
* This is a workaround until {@link https://github.com/WICG/webcomponents/issues/814 | WICG/webcomponents/issues/814} is resolved.
|
|
1446
|
+
*/
|
|
1447
|
+
private createAndInsertFormSubmissionFallbackControl;
|
|
1362
1448
|
/**
|
|
1363
|
-
*
|
|
1449
|
+
* Invoked when a connected component's form or fieldset has its disabled state changed.
|
|
1450
|
+
*
|
|
1451
|
+
* @param disabled - the disabled value of the form / fieldset
|
|
1452
|
+
*
|
|
1453
|
+
* @internal
|
|
1454
|
+
*/
|
|
1455
|
+
formDisabledCallback(disabled: boolean): void;
|
|
1456
|
+
/**
|
|
1457
|
+
* Handles keypress events for the button.
|
|
1458
|
+
*
|
|
1459
|
+
* @param e - the keyboard event
|
|
1460
|
+
* @returns - the return value of the click handler
|
|
1461
|
+
* @public
|
|
1462
|
+
*/
|
|
1463
|
+
keypressHandler(e: KeyboardEvent): boolean | void;
|
|
1464
|
+
/**
|
|
1465
|
+
* Presses the button.
|
|
1466
|
+
*
|
|
1467
|
+
* @public
|
|
1468
|
+
*/
|
|
1469
|
+
protected press(): void;
|
|
1470
|
+
/**
|
|
1471
|
+
* Resets the associated form.
|
|
1472
|
+
*
|
|
1473
|
+
* @public
|
|
1364
1474
|
*/
|
|
1365
|
-
|
|
1475
|
+
resetForm(): void;
|
|
1366
1476
|
/**
|
|
1367
|
-
*
|
|
1477
|
+
* Submits the associated form.
|
|
1478
|
+
*
|
|
1479
|
+
* @internal
|
|
1368
1480
|
*/
|
|
1369
|
-
private
|
|
1370
|
-
control: HTMLButtonElement;
|
|
1481
|
+
private submitForm;
|
|
1371
1482
|
}
|
|
1372
1483
|
|
|
1373
1484
|
/**
|
|
1374
|
-
* Mark internal because exporting class and interface of the same name
|
|
1375
|
-
* confuses API documenter.
|
|
1376
|
-
* TODO: https://github.com/microsoft/fast/issues/3317
|
|
1377
1485
|
* @internal
|
|
1486
|
+
* @privateRemarks
|
|
1487
|
+
* Mark internal because exporting class and interface of the same name confuses API documenter.
|
|
1488
|
+
* TODO: https://github.com/microsoft/fast/issues/3317
|
|
1378
1489
|
*/
|
|
1379
|
-
export declare interface Button extends StartEnd
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
declare class _Button extends FASTElement {
|
|
1383
|
-
}
|
|
1384
|
-
|
|
1385
|
-
declare interface _Button extends FormAssociated {
|
|
1490
|
+
export declare interface Button extends StartEnd {
|
|
1386
1491
|
}
|
|
1387
1492
|
|
|
1388
1493
|
/**
|
|
@@ -1404,14 +1509,33 @@ export declare const ButtonAppearance: {
|
|
|
1404
1509
|
export declare type ButtonAppearance = ValuesOf<typeof ButtonAppearance>;
|
|
1405
1510
|
|
|
1406
1511
|
/**
|
|
1512
|
+
* The definition for the Fluent Button component.
|
|
1513
|
+
*
|
|
1407
1514
|
* @public
|
|
1408
1515
|
* @remarks
|
|
1409
|
-
* HTML Element:
|
|
1516
|
+
* HTML Element: `<fluent-button>`
|
|
1410
1517
|
*/
|
|
1411
1518
|
export declare const ButtonDefinition: FASTElementDefinition<typeof Button>;
|
|
1412
1519
|
|
|
1413
1520
|
/**
|
|
1414
|
-
* Button
|
|
1521
|
+
* Button `formtarget` attribute values.
|
|
1522
|
+
* @public
|
|
1523
|
+
*/
|
|
1524
|
+
export declare const ButtonFormTarget: {
|
|
1525
|
+
readonly blank: "_blank";
|
|
1526
|
+
readonly self: "_self";
|
|
1527
|
+
readonly parent: "_parent";
|
|
1528
|
+
readonly top: "_top";
|
|
1529
|
+
};
|
|
1530
|
+
|
|
1531
|
+
/**
|
|
1532
|
+
* Types for the `formtarget` attribute values.
|
|
1533
|
+
* @public
|
|
1534
|
+
*/
|
|
1535
|
+
export declare type ButtonFormTarget = ValuesOf<typeof ButtonFormTarget>;
|
|
1536
|
+
|
|
1537
|
+
/**
|
|
1538
|
+
* Button configuration options.
|
|
1415
1539
|
* @public
|
|
1416
1540
|
*/
|
|
1417
1541
|
declare type ButtonOptions = StartEndOptions<Button>;
|
|
@@ -1452,6 +1576,11 @@ export declare const ButtonSize: {
|
|
|
1452
1576
|
*/
|
|
1453
1577
|
export declare type ButtonSize = ValuesOf<typeof ButtonSize>;
|
|
1454
1578
|
|
|
1579
|
+
/**
|
|
1580
|
+
* The template for the Button component.
|
|
1581
|
+
*
|
|
1582
|
+
* @public
|
|
1583
|
+
*/
|
|
1455
1584
|
export declare const ButtonTemplate: ElementViewTemplate<Button>;
|
|
1456
1585
|
|
|
1457
1586
|
/**
|
|
@@ -2520,37 +2649,6 @@ export declare const curveLinear = "var(--curveLinear)";
|
|
|
2520
2649
|
*/
|
|
2521
2650
|
export declare const darkModeStylesheetBehavior: (styles: ElementStyles) => MatchMediaStyleSheetBehavior;
|
|
2522
2651
|
|
|
2523
|
-
/**
|
|
2524
|
-
* Includes ARIA states and properties relating to the ARIA button role
|
|
2525
|
-
*
|
|
2526
|
-
* @public
|
|
2527
|
-
*/
|
|
2528
|
-
export declare class DelegatesARIAButton {
|
|
2529
|
-
/**
|
|
2530
|
-
* See {@link https://www.w3.org/WAI/PF/aria/roles#button} for more information
|
|
2531
|
-
* @public
|
|
2532
|
-
* @remarks
|
|
2533
|
-
* HTML Attribute: aria-expanded
|
|
2534
|
-
*/
|
|
2535
|
-
ariaExpanded: 'true' | 'false' | string | null;
|
|
2536
|
-
/**
|
|
2537
|
-
* See {@link https://www.w3.org/WAI/PF/aria/roles#button} for more information
|
|
2538
|
-
* @public
|
|
2539
|
-
* @remarks
|
|
2540
|
-
* HTML Attribute: aria-pressed
|
|
2541
|
-
*/
|
|
2542
|
-
ariaPressed: 'true' | 'false' | 'mixed' | string | null;
|
|
2543
|
-
}
|
|
2544
|
-
|
|
2545
|
-
/**
|
|
2546
|
-
* Mark internal because exporting class and interface of the same name
|
|
2547
|
-
* confuses API documenter.
|
|
2548
|
-
* TODO: https://github.com/microsoft/fast/issues/3317
|
|
2549
|
-
* @internal
|
|
2550
|
-
*/
|
|
2551
|
-
export declare interface DelegatesARIAButton extends ARIAGlobalStatesAndProperties {
|
|
2552
|
-
}
|
|
2553
|
-
|
|
2554
2652
|
/**
|
|
2555
2653
|
* Includes ARIA states and properties relating to the ARIA link role
|
|
2556
2654
|
*
|
|
@@ -2968,63 +3066,6 @@ export declare const durationUltraFast = "var(--durationUltraFast)";
|
|
|
2968
3066
|
|
|
2969
3067
|
export declare const durationUltraSlow = "var(--durationUltraSlow)";
|
|
2970
3068
|
|
|
2971
|
-
/**
|
|
2972
|
-
* Source:
|
|
2973
|
-
* https://html.spec.whatwg.org/multipage/custom-elements.html#elementinternals
|
|
2974
|
-
*/
|
|
2975
|
-
declare interface ElementInternals_2 {
|
|
2976
|
-
/**
|
|
2977
|
-
* Returns the form owner of internals target element.
|
|
2978
|
-
*/
|
|
2979
|
-
readonly form: HTMLFormElement | null;
|
|
2980
|
-
/**
|
|
2981
|
-
* Returns a NodeList of all the label elements that internals target element is associated with.
|
|
2982
|
-
*/
|
|
2983
|
-
readonly labels: NodeList;
|
|
2984
|
-
/**
|
|
2985
|
-
* Returns the error message that would be shown to the user if internals target element was to be checked for validity.
|
|
2986
|
-
*/
|
|
2987
|
-
readonly validationMessage: string;
|
|
2988
|
-
/**
|
|
2989
|
-
* Returns the ValidityState object for internals target element.
|
|
2990
|
-
*/
|
|
2991
|
-
readonly validity: ValidityState;
|
|
2992
|
-
/**
|
|
2993
|
-
* Returns true if internals target element will be validated when the form is submitted; false otherwise.
|
|
2994
|
-
*/
|
|
2995
|
-
readonly willValidate: boolean;
|
|
2996
|
-
/**
|
|
2997
|
-
* Returns true if internals target element has no validity problems; false otherwise. Fires an invalid event at the element in the latter case.
|
|
2998
|
-
*/
|
|
2999
|
-
checkValidity(): boolean;
|
|
3000
|
-
/**
|
|
3001
|
-
* Returns true if internals target element has no validity problems; otherwise,
|
|
3002
|
-
* returns false, fires an invalid event at the element, and (if the event isn't canceled) reports the problem to the user.
|
|
3003
|
-
*/
|
|
3004
|
-
reportValidity(): boolean;
|
|
3005
|
-
/**
|
|
3006
|
-
* Sets both the state and submission value of internals target element to value.
|
|
3007
|
-
*
|
|
3008
|
-
* While "null" isn't enumerated as a argument type (here)[https://html.spec.whatwg.org/multipage/custom-elements.html#the-elementinternals-interface],
|
|
3009
|
-
* In practice it appears to remove the value from the form data on submission. Adding it as a valid type here
|
|
3010
|
-
* becuase that capability is required for checkbox and radio types
|
|
3011
|
-
*/
|
|
3012
|
-
setFormValue(value: File | string | FormData | null, state?: File | string | FormData | null): void;
|
|
3013
|
-
/**
|
|
3014
|
-
* Marks internals target element as suffering from the constraints indicated by the flags argument,
|
|
3015
|
-
* and sets the element's validation message to message.
|
|
3016
|
-
* If anchor is specified, the user agent might use
|
|
3017
|
-
* it to indicate problems with the constraints of internals target
|
|
3018
|
-
* element when the form owner is validated interactively or reportValidity() is called.
|
|
3019
|
-
*/
|
|
3020
|
-
setValidity(flags: ValidityStateFlags, message?: string, anchor?: HTMLElement): void;
|
|
3021
|
-
}
|
|
3022
|
-
|
|
3023
|
-
declare let ElementInternals_2: {
|
|
3024
|
-
prototype: ElementInternals_2;
|
|
3025
|
-
new (): ElementInternals_2;
|
|
3026
|
-
};
|
|
3027
|
-
|
|
3028
3069
|
/**
|
|
3029
3070
|
* End configuration options
|
|
3030
3071
|
* @public
|
|
@@ -3091,10 +3132,10 @@ declare function FormAssociated<T extends ConstructableFormAssociated>(BaseCtor:
|
|
|
3091
3132
|
*
|
|
3092
3133
|
* @beta
|
|
3093
3134
|
*/
|
|
3094
|
-
declare interface FormAssociated extends Omit<
|
|
3135
|
+
declare interface FormAssociated extends Omit<ElementInternals, 'labels'> {
|
|
3095
3136
|
dirtyValue: boolean;
|
|
3096
3137
|
disabled: boolean;
|
|
3097
|
-
readonly elementInternals:
|
|
3138
|
+
readonly elementInternals: ElementInternals | null;
|
|
3098
3139
|
readonly formAssociated: boolean;
|
|
3099
3140
|
initialValue: string;
|
|
3100
3141
|
readonly labels: ReadonlyArray<Node[]>;
|
|
@@ -3121,15 +3162,6 @@ declare interface FormAssociated extends Omit<ElementInternals_2, 'labels'> {
|
|
|
3121
3162
|
valueChanged(previous: string, next: string): void;
|
|
3122
3163
|
}
|
|
3123
3164
|
|
|
3124
|
-
/**
|
|
3125
|
-
* @beta
|
|
3126
|
-
*/
|
|
3127
|
-
declare class FormAssociatedButton extends FormAssociatedButton_base {
|
|
3128
|
-
proxy: HTMLInputElement;
|
|
3129
|
-
}
|
|
3130
|
-
|
|
3131
|
-
declare const FormAssociatedButton_base: typeof _Button;
|
|
3132
|
-
|
|
3133
3165
|
/**
|
|
3134
3166
|
* @beta
|
|
3135
3167
|
*/
|
|
@@ -4097,7 +4129,7 @@ export declare const MenuTemplate: ElementViewTemplate<Menu>;
|
|
|
4097
4129
|
*
|
|
4098
4130
|
* @public
|
|
4099
4131
|
*/
|
|
4100
|
-
declare class
|
|
4132
|
+
export declare class ProgressBar extends BaseProgress {
|
|
4101
4133
|
/**
|
|
4102
4134
|
* The thickness of the progress bar
|
|
4103
4135
|
*
|
|
@@ -4121,7 +4153,6 @@ declare class ProgressBar_2 extends BaseProgress {
|
|
|
4121
4153
|
*/
|
|
4122
4154
|
validationState: ProgressBarValidationState | null;
|
|
4123
4155
|
}
|
|
4124
|
-
export { ProgressBar_2 as ProgressBar }
|
|
4125
4156
|
|
|
4126
4157
|
/**
|
|
4127
4158
|
* The Fluent ProgressBar Element.
|
|
@@ -4131,7 +4162,7 @@ export { ProgressBar_2 as ProgressBar }
|
|
|
4131
4162
|
* @remarks
|
|
4132
4163
|
* HTML Element: \<fluent-progress-bar\>
|
|
4133
4164
|
*/
|
|
4134
|
-
export declare const ProgressBarDefinition: FASTElementDefinition<typeof
|
|
4165
|
+
export declare const ProgressBarDefinition: FASTElementDefinition<typeof ProgressBar>;
|
|
4135
4166
|
|
|
4136
4167
|
/**
|
|
4137
4168
|
* ProgressBarShape Constants
|
|
@@ -4153,7 +4184,7 @@ export declare type ProgressBarShape = ValuesOf<typeof ProgressBarShape>;
|
|
|
4153
4184
|
*/
|
|
4154
4185
|
export declare const ProgressBarStyles: ElementStyles;
|
|
4155
4186
|
|
|
4156
|
-
export declare const ProgressBarTemplate: ElementViewTemplate<
|
|
4187
|
+
export declare const ProgressBarTemplate: ElementViewTemplate<ProgressBar>;
|
|
4157
4188
|
|
|
4158
4189
|
/**
|
|
4159
4190
|
* ProgressBarThickness Constants
|
|
@@ -4191,8 +4222,8 @@ export declare type ProgressBarValidationState = ValuesOf<typeof ProgressBarVali
|
|
|
4191
4222
|
* @public
|
|
4192
4223
|
*/
|
|
4193
4224
|
export declare type ProgressOptions = {
|
|
4194
|
-
indeterminateIndicator1?: StaticallyComposableHTML<
|
|
4195
|
-
indeterminateIndicator2?: StaticallyComposableHTML<
|
|
4225
|
+
indeterminateIndicator1?: StaticallyComposableHTML<ProgressBar>;
|
|
4226
|
+
indeterminateIndicator2?: StaticallyComposableHTML<ProgressBar>;
|
|
4196
4227
|
};
|
|
4197
4228
|
|
|
4198
4229
|
/**
|
|
@@ -4921,6 +4952,11 @@ export declare const strokeWidthThickest = "var(--strokeWidthThickest)";
|
|
|
4921
4952
|
|
|
4922
4953
|
export declare const strokeWidthThin = "var(--strokeWidthThin)";
|
|
4923
4954
|
|
|
4955
|
+
/**
|
|
4956
|
+
* The styles for the Button component.
|
|
4957
|
+
*
|
|
4958
|
+
* @public
|
|
4959
|
+
*/
|
|
4924
4960
|
declare const styles: ElementStyles;
|
|
4925
4961
|
export { styles as ButtonStyles }
|
|
4926
4962
|
export { styles as MenuButtonStyles }
|
|
@@ -5590,51 +5626,54 @@ export declare const TextWeight: {
|
|
|
5590
5626
|
export declare type TextWeight = ValuesOf<typeof TextWeight>;
|
|
5591
5627
|
|
|
5592
5628
|
/**
|
|
5593
|
-
* The base class used for constructing a fluent-toggle-button custom element
|
|
5629
|
+
* The base class used for constructing a `<fluent-toggle-button>` custom element.
|
|
5630
|
+
*
|
|
5594
5631
|
* @public
|
|
5595
5632
|
*/
|
|
5596
5633
|
export declare class ToggleButton extends Button {
|
|
5597
5634
|
/**
|
|
5598
|
-
*
|
|
5599
|
-
*
|
|
5600
|
-
*
|
|
5635
|
+
* Indicates the pressed state of the control.
|
|
5636
|
+
*
|
|
5637
|
+
* @public
|
|
5638
|
+
* @remarks
|
|
5639
|
+
* HTML Attribute: `pressed`
|
|
5601
5640
|
*/
|
|
5602
|
-
|
|
5641
|
+
pressed: boolean;
|
|
5603
5642
|
/**
|
|
5604
|
-
*
|
|
5605
|
-
*
|
|
5643
|
+
* Updates the pressed state when the `pressed` property changes.
|
|
5644
|
+
*
|
|
5645
|
+
* @internal
|
|
5646
|
+
*/
|
|
5647
|
+
protected pressedChanged(): void;
|
|
5648
|
+
/**
|
|
5649
|
+
* Indicates the mixed state of the control. This property takes precedence over `pressed`.
|
|
5606
5650
|
*
|
|
5607
5651
|
* @public
|
|
5608
5652
|
* @remarks
|
|
5609
|
-
* HTML Attribute:
|
|
5653
|
+
* HTML Attribute: `mixed`
|
|
5610
5654
|
*/
|
|
5611
|
-
|
|
5612
|
-
protected checkedAttributeChanged(): void;
|
|
5613
|
-
defaultChecked: boolean;
|
|
5614
|
-
protected defaultCheckedChanged(): void;
|
|
5655
|
+
mixed?: boolean;
|
|
5615
5656
|
/**
|
|
5616
|
-
*
|
|
5657
|
+
* Updates the pressed state when the `mixed` property changes.
|
|
5617
5658
|
*
|
|
5618
|
-
* @
|
|
5659
|
+
* @param previous - the previous mixed state
|
|
5660
|
+
* @param next - the current mixed state
|
|
5661
|
+
* @internal
|
|
5619
5662
|
*/
|
|
5620
|
-
|
|
5621
|
-
protected checkedChanged(prev: boolean | undefined, next: boolean): void;
|
|
5663
|
+
protected mixedChanged(): void;
|
|
5622
5664
|
/**
|
|
5623
|
-
*
|
|
5624
|
-
*
|
|
5625
|
-
*
|
|
5626
|
-
* in UI libraries that bind data through the .setAttribute() API
|
|
5627
|
-
* and don't support IDL attribute binding.
|
|
5665
|
+
* Toggles the pressed state of the button.
|
|
5666
|
+
*
|
|
5667
|
+
* @override
|
|
5628
5668
|
*/
|
|
5629
|
-
|
|
5630
|
-
currentCheckedChanged(prev: boolean | undefined, next: boolean): void;
|
|
5631
|
-
constructor();
|
|
5669
|
+
protected press(): void;
|
|
5632
5670
|
connectedCallback(): void;
|
|
5633
|
-
disconnectedCallback(): void;
|
|
5634
5671
|
/**
|
|
5672
|
+
* Sets the `aria-pressed` attribute based on the `pressed` and `mixed` properties.
|
|
5673
|
+
*
|
|
5635
5674
|
* @internal
|
|
5636
5675
|
*/
|
|
5637
|
-
|
|
5676
|
+
private setPressedState;
|
|
5638
5677
|
}
|
|
5639
5678
|
|
|
5640
5679
|
/**
|
|
@@ -5695,6 +5734,13 @@ export declare const ToggleButtonSize: {
|
|
|
5695
5734
|
*/
|
|
5696
5735
|
export declare type ToggleButtonSize = ValuesOf<typeof ToggleButtonSize>;
|
|
5697
5736
|
|
|
5737
|
+
/**
|
|
5738
|
+
* The styles for the ToggleButton component.
|
|
5739
|
+
*
|
|
5740
|
+
* @public
|
|
5741
|
+
* @privateRemarks
|
|
5742
|
+
* TODO: Need to support icon hover styles
|
|
5743
|
+
*/
|
|
5698
5744
|
export declare const ToggleButtonStyles: ElementStyles;
|
|
5699
5745
|
|
|
5700
5746
|
/**
|
|
@@ -5703,25 +5749,6 @@ export declare const ToggleButtonStyles: ElementStyles;
|
|
|
5703
5749
|
*/
|
|
5704
5750
|
export declare const ToggleButtonTemplate: ElementViewTemplate<ToggleButton>;
|
|
5705
5751
|
|
|
5706
|
-
/**
|
|
5707
|
-
* This file enables typing support for ElementInternals APIs.
|
|
5708
|
-
* It is largely taken from https://github.com/microsoft/TSJS-lib-generator/pull/818/files.
|
|
5709
|
-
*
|
|
5710
|
-
* When TypeScript adds support for these APIs we can delete this file.
|
|
5711
|
-
*/
|
|
5712
|
-
declare interface ValidityStateFlags {
|
|
5713
|
-
badInput?: boolean;
|
|
5714
|
-
customError?: boolean;
|
|
5715
|
-
patternMismatch?: boolean;
|
|
5716
|
-
rangeOverflow?: boolean;
|
|
5717
|
-
rangeUnderflow?: boolean;
|
|
5718
|
-
stepMismatch?: boolean;
|
|
5719
|
-
tooLong?: boolean;
|
|
5720
|
-
tooShort?: boolean;
|
|
5721
|
-
typeMismatch?: boolean;
|
|
5722
|
-
valueMissing?: boolean;
|
|
5723
|
-
}
|
|
5724
|
-
|
|
5725
5752
|
/**
|
|
5726
5753
|
* Helper for enumerating a type from a const object
|
|
5727
5754
|
* Example: export type Foo = ValuesOf\<typeof Foo\>
|