@fluentui/web-components 3.0.0-beta.22 → 3.0.0-beta.24
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 +23 -2
- package/dist/dts/accordion/accordion.bench.d.ts +3 -0
- package/dist/dts/accordion/accordion.options.d.ts +1 -1
- package/dist/dts/accordion-item/accordion-item.bench.d.ts +3 -0
- package/dist/dts/accordion-item/accordion-item.d.ts +1 -1
- package/dist/dts/accordion-item/accordion-item.options.d.ts +2 -2
- package/dist/dts/anchor-button/anchor-button.bench.d.ts +3 -0
- package/dist/dts/anchor-button/anchor-button.d.ts +1 -1
- package/dist/dts/anchor-button/anchor-button.options.d.ts +4 -4
- package/dist/dts/avatar/avatar.bench.d.ts +3 -0
- package/dist/dts/avatar/avatar.options.d.ts +6 -6
- package/dist/dts/badge/badge.bench.d.ts +3 -0
- package/dist/dts/badge/badge.options.d.ts +5 -5
- package/dist/dts/button/button.bench.d.ts +3 -0
- package/dist/dts/button/button.options.d.ts +6 -6
- package/dist/dts/checkbox/checkbox.bench.d.ts +3 -0
- package/dist/dts/checkbox/checkbox.d.ts +1 -1
- package/dist/dts/checkbox/checkbox.options.d.ts +3 -3
- package/dist/dts/compound-button/compound-button.bench.d.ts +3 -0
- package/dist/dts/compound-button/compound-button.options.d.ts +3 -3
- package/dist/dts/counter-badge/counter-badge.bench.d.ts +3 -0
- package/dist/dts/counter-badge/counter-badge.options.d.ts +5 -5
- package/dist/dts/dialog/dialog.bench.d.ts +3 -0
- package/dist/dts/dialog/dialog.d.ts +11 -144
- package/dist/dts/dialog/dialog.options.d.ts +2 -2
- package/dist/dts/dialog/index.d.ts +1 -1
- package/dist/dts/dialog-body/define.d.ts +1 -0
- package/dist/dts/dialog-body/dialog-body.bench.d.ts +3 -0
- package/dist/dts/dialog-body/dialog-body.d.ts +14 -0
- package/dist/dts/dialog-body/dialog-body.definition.d.ts +9 -0
- package/dist/dts/dialog-body/dialog-body.styles.d.ts +4 -0
- package/dist/dts/dialog-body/dialog-body.template.d.ts +6 -0
- package/dist/dts/dialog-body/index.d.ts +4 -0
- package/dist/dts/divider/divider.bench.d.ts +3 -0
- package/dist/dts/divider/divider.options.d.ts +4 -4
- package/dist/dts/form-associated/form-associated.d.ts +4 -4
- package/dist/dts/image/image.bench.d.ts +3 -0
- package/dist/dts/image/image.options.d.ts +2 -2
- package/dist/dts/index-rollup.d.ts +1 -0
- package/dist/dts/index.d.ts +2 -1
- package/dist/dts/label/label.bench.d.ts +3 -0
- package/dist/dts/label/label.options.d.ts +2 -2
- package/dist/dts/menu/menu.bench.d.ts +3 -0
- package/dist/dts/menu-button/menu-button.bench.d.ts +3 -0
- package/dist/dts/menu-button/menu-button.options.d.ts +3 -3
- package/dist/dts/menu-item/menu-item.bench.d.ts +3 -0
- package/dist/dts/menu-item/menu-item.d.ts +2 -2
- package/dist/dts/menu-item/menu-item.options.d.ts +1 -1
- package/dist/dts/menu-list/menu-list.bench.d.ts +3 -0
- package/dist/dts/patterns/start-end.d.ts +3 -3
- package/dist/dts/progress-bar/progress-bar.bench.d.ts +3 -0
- package/dist/dts/progress-bar/progress-bar.options.d.ts +4 -4
- package/dist/dts/radio/radio.bench.d.ts +3 -0
- package/dist/dts/radio/radio.d.ts +2 -2
- package/dist/dts/radio-group/radio-group.bench.d.ts +3 -0
- package/dist/dts/radio-group/radio-group.options.d.ts +1 -1
- package/dist/dts/slider/slider.bench.d.ts +3 -0
- package/dist/dts/slider/slider.options.d.ts +4 -4
- package/dist/dts/spinner/spinner.bench.d.ts +3 -0
- package/dist/dts/spinner/spinner.options.d.ts +2 -2
- package/dist/dts/switch/switch.bench.d.ts +3 -0
- package/dist/dts/switch/switch.d.ts +1 -1
- package/dist/dts/switch/switch.options.d.ts +1 -1
- package/dist/dts/tab/tab.bench.d.ts +3 -0
- package/dist/dts/tab/tab.d.ts +1 -1
- package/dist/dts/tab-panel/tab-panel.bench.d.ts +3 -0
- package/dist/dts/tabs/tabs.bench.d.ts +3 -0
- package/dist/dts/tabs/tabs.options.d.ts +4 -4
- package/dist/dts/text/text.bench.d.ts +3 -0
- package/dist/dts/text/text.options.d.ts +4 -4
- package/dist/dts/text-input/text-input.bench.d.ts +3 -0
- package/dist/dts/text-input/text-input.d.ts +0 -1
- package/dist/dts/text-input/text-input.options.d.ts +4 -4
- package/dist/dts/toggle-button/toggle-button.bench.d.ts +3 -0
- package/dist/dts/toggle-button/toggle-button.options.d.ts +3 -3
- package/dist/dts/utils/behaviors/match-media-stylesheet-behavior.d.ts +1 -1
- package/dist/dts/utils/display.d.ts +1 -1
- package/dist/dts/utils/template-helpers.d.ts +1 -1
- package/dist/dts/utils/typings.d.ts +1 -1
- package/dist/esm/accordion/accordion.bench.js +30 -0
- package/dist/esm/accordion/accordion.bench.js.map +1 -0
- package/dist/esm/accordion-item/accordion-item.bench.js +14 -0
- package/dist/esm/accordion-item/accordion-item.bench.js.map +1 -0
- package/dist/esm/anchor-button/anchor-button.bench.js +11 -0
- package/dist/esm/anchor-button/anchor-button.bench.js.map +1 -0
- package/dist/esm/avatar/avatar.bench.js +10 -0
- package/dist/esm/avatar/avatar.bench.js.map +1 -0
- package/dist/esm/badge/badge.bench.js +11 -0
- package/dist/esm/badge/badge.bench.js.map +1 -0
- package/dist/esm/button/button.bench.js +11 -0
- package/dist/esm/button/button.bench.js.map +1 -0
- package/dist/esm/button/button.js +26 -26
- package/dist/esm/button/button.js.map +1 -1
- package/dist/esm/button/button.styles.js +27 -27
- package/dist/esm/button/button.styles.js.map +1 -1
- package/dist/esm/checkbox/checkbox.bench.js +11 -0
- package/dist/esm/checkbox/checkbox.bench.js.map +1 -0
- package/dist/esm/compound-button/compound-button.bench.js +15 -0
- package/dist/esm/compound-button/compound-button.bench.js.map +1 -0
- package/dist/esm/counter-badge/counter-badge.bench.js +11 -0
- package/dist/esm/counter-badge/counter-badge.bench.js.map +1 -0
- package/dist/esm/dialog/dialog.bench.js +11 -0
- package/dist/esm/dialog/dialog.bench.js.map +1 -0
- package/dist/esm/dialog/dialog.js +31 -304
- package/dist/esm/dialog/dialog.js.map +1 -1
- package/dist/esm/dialog/dialog.options.js +1 -1
- package/dist/esm/dialog/dialog.options.js.map +1 -1
- package/dist/esm/dialog/dialog.styles.js +61 -84
- package/dist/esm/dialog/dialog.styles.js.map +1 -1
- package/dist/esm/dialog/dialog.template.js +17 -54
- package/dist/esm/dialog/dialog.template.js.map +1 -1
- package/dist/esm/dialog/index.js +1 -1
- package/dist/esm/dialog/index.js.map +1 -1
- package/dist/esm/dialog-body/define.js +4 -0
- package/dist/esm/dialog-body/define.js.map +1 -0
- package/dist/esm/dialog-body/dialog-body.bench.js +11 -0
- package/dist/esm/dialog-body/dialog-body.bench.js.map +1 -0
- package/dist/esm/dialog-body/dialog-body.definition.js +17 -0
- package/dist/esm/dialog-body/dialog-body.definition.js.map +1 -0
- package/dist/esm/dialog-body/dialog-body.js +22 -0
- package/dist/esm/dialog-body/dialog-body.js.map +1 -0
- package/dist/esm/dialog-body/dialog-body.styles.js +79 -0
- package/dist/esm/dialog-body/dialog-body.styles.js.map +1 -0
- package/dist/esm/dialog-body/dialog-body.template.js +42 -0
- package/dist/esm/dialog-body/dialog-body.template.js.map +1 -0
- package/dist/esm/dialog-body/index.js +5 -0
- package/dist/esm/dialog-body/index.js.map +1 -0
- package/dist/esm/divider/divider.bench.js +10 -0
- package/dist/esm/divider/divider.bench.js.map +1 -0
- package/dist/esm/form-associated/form-associated.js +66 -66
- package/dist/esm/form-associated/form-associated.js.map +1 -1
- package/dist/esm/image/image.bench.js +14 -0
- package/dist/esm/image/image.bench.js.map +1 -0
- package/dist/esm/index-rollup.js +1 -0
- package/dist/esm/index-rollup.js.map +1 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/label/label.bench.js +11 -0
- package/dist/esm/label/label.bench.js.map +1 -0
- package/dist/esm/menu/menu.bench.js +31 -0
- package/dist/esm/menu/menu.bench.js.map +1 -0
- package/dist/esm/menu-button/menu-button.bench.js +11 -0
- package/dist/esm/menu-button/menu-button.bench.js.map +1 -0
- package/dist/esm/menu-item/menu-item.bench.js +11 -0
- package/dist/esm/menu-item/menu-item.bench.js.map +1 -0
- package/dist/esm/menu-list/menu-list.bench.js +21 -0
- package/dist/esm/menu-list/menu-list.bench.js.map +1 -0
- package/dist/esm/progress-bar/progress-bar.bench.js +10 -0
- package/dist/esm/progress-bar/progress-bar.bench.js.map +1 -0
- package/dist/esm/radio/radio.bench.js +11 -0
- package/dist/esm/radio/radio.bench.js.map +1 -0
- package/dist/esm/radio/radio.js +11 -11
- package/dist/esm/radio/radio.js.map +1 -1
- package/dist/esm/radio-group/radio-group.bench.js +21 -0
- package/dist/esm/radio-group/radio-group.bench.js.map +1 -0
- package/dist/esm/slider/slider.bench.js +10 -0
- package/dist/esm/slider/slider.bench.js.map +1 -0
- package/dist/esm/slider/slider.template.js +1 -1
- package/dist/esm/slider/slider.template.js.map +1 -1
- package/dist/esm/spinner/spinner.bench.js +10 -0
- package/dist/esm/spinner/spinner.bench.js.map +1 -0
- package/dist/esm/switch/switch.bench.js +11 -0
- package/dist/esm/switch/switch.bench.js.map +1 -0
- package/dist/esm/switch/switch.js +5 -5
- package/dist/esm/switch/switch.js.map +1 -1
- package/dist/esm/tab/tab.bench.js +11 -0
- package/dist/esm/tab/tab.bench.js.map +1 -0
- package/dist/esm/tab-panel/tab-panel.bench.js +13 -0
- package/dist/esm/tab-panel/tab-panel.bench.js.map +1 -0
- package/dist/esm/tabs/tabs.bench.js +32 -0
- package/dist/esm/tabs/tabs.bench.js.map +1 -0
- package/dist/esm/text/text.bench.js +13 -0
- package/dist/esm/text/text.bench.js.map +1 -0
- package/dist/esm/text-input/text-input.bench.js +10 -0
- package/dist/esm/text-input/text-input.bench.js.map +1 -0
- package/dist/esm/theme/set-theme.js +10 -1
- package/dist/esm/theme/set-theme.js.map +1 -1
- package/dist/esm/toggle-button/toggle-button.bench.js +11 -0
- package/dist/esm/toggle-button/toggle-button.bench.js.map +1 -0
- package/dist/web-components.d.ts +51 -151
- package/dist/web-components.js +264 -838
- package/dist/web-components.min.js +235 -237
- package/package.json +15 -1
- package/dist/fluent-web-components.api.json +0 -29528
- package/docs/api-report.md +0 -3366
- package/playwright.config.ts +0 -24
- package/project.json +0 -6
- package/tensile.config.js +0 -22
- package/tsdoc.json +0 -44
package/dist/web-components.js
CHANGED
|
@@ -3318,70 +3318,70 @@ function uniqueId(prefix = "") {
|
|
|
3318
3318
|
return `${prefix}${uniqueIdCounter++}`;
|
|
3319
3319
|
}
|
|
3320
3320
|
|
|
3321
|
-
var __defProp$
|
|
3322
|
-
var __getOwnPropDesc$
|
|
3323
|
-
var __decorateClass$
|
|
3324
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
3321
|
+
var __defProp$s = Object.defineProperty;
|
|
3322
|
+
var __getOwnPropDesc$s = Object.getOwnPropertyDescriptor;
|
|
3323
|
+
var __decorateClass$s = (decorators, target, key, kind) => {
|
|
3324
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$s(target, key) : target;
|
|
3325
3325
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
3326
|
-
if (kind && result) __defProp$
|
|
3326
|
+
if (kind && result) __defProp$s(target, key, result);
|
|
3327
3327
|
return result;
|
|
3328
3328
|
};
|
|
3329
3329
|
class ARIAGlobalStatesAndProperties {}
|
|
3330
|
-
__decorateClass$
|
|
3330
|
+
__decorateClass$s([attr({
|
|
3331
3331
|
attribute: "aria-atomic"
|
|
3332
3332
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaAtomic", 2);
|
|
3333
|
-
__decorateClass$
|
|
3333
|
+
__decorateClass$s([attr({
|
|
3334
3334
|
attribute: "aria-busy"
|
|
3335
3335
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaBusy", 2);
|
|
3336
|
-
__decorateClass$
|
|
3336
|
+
__decorateClass$s([attr({
|
|
3337
3337
|
attribute: "aria-controls"
|
|
3338
3338
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaControls", 2);
|
|
3339
|
-
__decorateClass$
|
|
3339
|
+
__decorateClass$s([attr({
|
|
3340
3340
|
attribute: "aria-current"
|
|
3341
3341
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaCurrent", 2);
|
|
3342
|
-
__decorateClass$
|
|
3342
|
+
__decorateClass$s([attr({
|
|
3343
3343
|
attribute: "aria-describedby"
|
|
3344
3344
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaDescribedby", 2);
|
|
3345
|
-
__decorateClass$
|
|
3345
|
+
__decorateClass$s([attr({
|
|
3346
3346
|
attribute: "aria-details"
|
|
3347
3347
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaDetails", 2);
|
|
3348
|
-
__decorateClass$
|
|
3348
|
+
__decorateClass$s([attr({
|
|
3349
3349
|
attribute: "aria-disabled"
|
|
3350
3350
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaDisabled", 2);
|
|
3351
|
-
__decorateClass$
|
|
3351
|
+
__decorateClass$s([attr({
|
|
3352
3352
|
attribute: "aria-errormessage"
|
|
3353
3353
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaErrormessage", 2);
|
|
3354
|
-
__decorateClass$
|
|
3354
|
+
__decorateClass$s([attr({
|
|
3355
3355
|
attribute: "aria-flowto"
|
|
3356
3356
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaFlowto", 2);
|
|
3357
|
-
__decorateClass$
|
|
3357
|
+
__decorateClass$s([attr({
|
|
3358
3358
|
attribute: "aria-haspopup"
|
|
3359
3359
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaHaspopup", 2);
|
|
3360
|
-
__decorateClass$
|
|
3360
|
+
__decorateClass$s([attr({
|
|
3361
3361
|
attribute: "aria-hidden"
|
|
3362
3362
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaHidden", 2);
|
|
3363
|
-
__decorateClass$
|
|
3363
|
+
__decorateClass$s([attr({
|
|
3364
3364
|
attribute: "aria-invalid"
|
|
3365
3365
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaInvalid", 2);
|
|
3366
|
-
__decorateClass$
|
|
3366
|
+
__decorateClass$s([attr({
|
|
3367
3367
|
attribute: "aria-keyshortcuts"
|
|
3368
3368
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaKeyshortcuts", 2);
|
|
3369
|
-
__decorateClass$
|
|
3369
|
+
__decorateClass$s([attr({
|
|
3370
3370
|
attribute: "aria-label"
|
|
3371
3371
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaLabel", 2);
|
|
3372
|
-
__decorateClass$
|
|
3372
|
+
__decorateClass$s([attr({
|
|
3373
3373
|
attribute: "aria-labelledby"
|
|
3374
3374
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaLabelledby", 2);
|
|
3375
|
-
__decorateClass$
|
|
3375
|
+
__decorateClass$s([attr({
|
|
3376
3376
|
attribute: "aria-live"
|
|
3377
3377
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaLive", 2);
|
|
3378
|
-
__decorateClass$
|
|
3378
|
+
__decorateClass$s([attr({
|
|
3379
3379
|
attribute: "aria-owns"
|
|
3380
3380
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaOwns", 2);
|
|
3381
|
-
__decorateClass$
|
|
3381
|
+
__decorateClass$s([attr({
|
|
3382
3382
|
attribute: "aria-relevant"
|
|
3383
3383
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaRelevant", 2);
|
|
3384
|
-
__decorateClass$
|
|
3384
|
+
__decorateClass$s([attr({
|
|
3385
3385
|
attribute: "aria-roledescription"
|
|
3386
3386
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaRoledescription", 2);
|
|
3387
3387
|
|
|
@@ -3550,12 +3550,12 @@ function applyMixins(derivedCtor, ...baseCtors) {
|
|
|
3550
3550
|
});
|
|
3551
3551
|
}
|
|
3552
3552
|
|
|
3553
|
-
var __defProp$
|
|
3554
|
-
var __getOwnPropDesc$
|
|
3555
|
-
var __decorateClass$
|
|
3556
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
3553
|
+
var __defProp$r = Object.defineProperty;
|
|
3554
|
+
var __getOwnPropDesc$r = Object.getOwnPropertyDescriptor;
|
|
3555
|
+
var __decorateClass$r = (decorators, target, key, kind) => {
|
|
3556
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$r(target, key) : target;
|
|
3557
3557
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
3558
|
-
if (kind && result) __defProp$
|
|
3558
|
+
if (kind && result) __defProp$r(target, key, result);
|
|
3559
3559
|
return result;
|
|
3560
3560
|
};
|
|
3561
3561
|
class AccordionItem extends FASTElement {
|
|
@@ -3577,23 +3577,23 @@ class AccordionItem extends FASTElement {
|
|
|
3577
3577
|
};
|
|
3578
3578
|
}
|
|
3579
3579
|
}
|
|
3580
|
-
__decorateClass$
|
|
3580
|
+
__decorateClass$r([attr({
|
|
3581
3581
|
attribute: "heading-level",
|
|
3582
3582
|
mode: "fromView",
|
|
3583
3583
|
converter: nullableNumberConverter
|
|
3584
3584
|
})], AccordionItem.prototype, "headinglevel", 2);
|
|
3585
|
-
__decorateClass$
|
|
3585
|
+
__decorateClass$r([attr({
|
|
3586
3586
|
mode: "boolean"
|
|
3587
3587
|
})], AccordionItem.prototype, "expanded", 2);
|
|
3588
|
-
__decorateClass$
|
|
3588
|
+
__decorateClass$r([attr({
|
|
3589
3589
|
mode: "boolean"
|
|
3590
3590
|
})], AccordionItem.prototype, "disabled", 2);
|
|
3591
|
-
__decorateClass$
|
|
3592
|
-
__decorateClass$
|
|
3593
|
-
__decorateClass$
|
|
3591
|
+
__decorateClass$r([attr], AccordionItem.prototype, "id", 2);
|
|
3592
|
+
__decorateClass$r([attr], AccordionItem.prototype, "size", 2);
|
|
3593
|
+
__decorateClass$r([attr({
|
|
3594
3594
|
mode: "boolean"
|
|
3595
3595
|
})], AccordionItem.prototype, "block", 2);
|
|
3596
|
-
__decorateClass$
|
|
3596
|
+
__decorateClass$r([attr({
|
|
3597
3597
|
attribute: "expand-icon-position"
|
|
3598
3598
|
})], AccordionItem.prototype, "expandIconPosition", 2);
|
|
3599
3599
|
applyMixins(AccordionItem, StartEnd);
|
|
@@ -3814,6 +3814,7 @@ const spacingVerticalXXL = "var(--spacingVerticalXXL)";
|
|
|
3814
3814
|
const durationUltraFast = "var(--durationUltraFast)";
|
|
3815
3815
|
const durationFaster = "var(--durationFaster)";
|
|
3816
3816
|
const durationNormal = "var(--durationNormal)";
|
|
3817
|
+
const durationGentle = "var(--durationGentle)";
|
|
3817
3818
|
const durationSlow = "var(--durationSlow)";
|
|
3818
3819
|
const durationSlower = "var(--durationSlower)";
|
|
3819
3820
|
const durationUltraSlow = "var(--durationUltraSlow)";
|
|
@@ -3827,7 +3828,7 @@ const curveEasyEaseMax = "var(--curveEasyEaseMax)";
|
|
|
3827
3828
|
const curveEasyEase = "var(--curveEasyEase)";
|
|
3828
3829
|
const curveLinear = "var(--curveLinear)";
|
|
3829
3830
|
|
|
3830
|
-
const styles$
|
|
3831
|
+
const styles$s = css`
|
|
3831
3832
|
${display("block")}
|
|
3832
3833
|
|
|
3833
3834
|
:host{max-width:fit-content;contain:content}.heading{height:44px;display:grid;position:relative;vertical-align:middle;padding-inline:${spacingHorizontalM} ${spacingHorizontalMNudge};border-radius:${borderRadiusMedium};font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};line-height:${lineHeightBase300};grid-template-columns:auto auto 1fr auto}.heading-content{height:100%;display:flex;align-items:center}.button{box-sizing:border-box;appearance:none;border:none;outline:none;text-align:start;cursor:pointer;font-family:inherit;height:44px;color:${colorNeutralForeground1};background:${colorTransparentBackground};line-height:${lineHeightBase300};height:auto;padding:0;font-size:inherit;grid-column:auto / span 2;grid-row:1}.button::before{content:'';position:absolute;inset:0px;cursor:pointer;border-radius:${borderRadiusSmall}}.icon{display:flex;align-items:center;justify-content:center;pointer-events:none;position:relative;height:100%;padding-right:${spacingHorizontalS};grid-column:1 / span 1;grid-row:1}.region{margin:0 ${spacingHorizontalM}}::slotted([slot='start']),::slotted([slot='end']){justify-content:center;align-items:center;padding-right:${spacingHorizontalS};grid-column:2 / span 1;grid-row:1 / span 1}button:focus-visible::after{content:'';position:absolute;inset:0px;cursor:pointer;border-radius:${borderRadiusSmall};outline:none;border:2px solid ${colorStrokeFocus1};box-shadow:inset 0 0 0 1px ${colorStrokeFocus2}}:host([disabled]) .button{color:${colorNeutralForegroundDisabled}}:host([disabled]) svg{filter:invert(89%) sepia(0%) saturate(569%) hue-rotate(155deg) brightness(88%) contrast(87%)}:host([expanded]) .region{display:block}:host([expanded]) .default-collapsed-icon,:host([expanded]) ::slotted([slot='collapsed-icon']),:host(:not([expanded])) .default-expanded-icon,:host(:not([expanded])) ::slotted([slot='expanded-icon']),:host([expanded]) ::slotted([slot='end']),::slotted([slot='start']),.region{display:none}:host([expanded]) ::slotted([slot='start']),:host([expanded]) ::slotted([slot='expanded-icon']),:host(:not([expanded])) ::slotted([slot='collapsed-icon']),::slotted([slot='end']){display:flex}.heading{font-size:${fontSizeBase300};line-height:${lineHeightBase300}}:host([size='small']) .heading{font-size:${fontSizeBase200};line-height:${lineHeightBase200}}:host([size='large']) .heading{font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host([size='extra-large']) .heading{font-size:${fontSizeBase500};line-height:${lineHeightBase500}}:host([expand-icon-position='end']) :slotted(span[slot='start']),:host([expand-icon-position='end']) ::slotted(span[slot='end']){grid-column:1 / span 1;grid-row:1}:host([expand-icon-position='end']) ::slotted(span[slot='start']),:host([expand-icon-position='end']) ::slotted(span[slot='end']){grid-column:1 / span 1;grid-row:1}:host([expand-icon-position='end']) .icon{grid-column:4 / span 1;grid-row:1;display:flex;padding-left:10px;padding-right:0}:host([expand-icon-position='end']) .button{grid-column:2 / span 3;grid-row:1}:host([block]){max-width:100%}:host([expand-icon-position='end']) .heading{grid-template-columns:auto auto 28px}:host([expand-icon-position='end']) .icon{grid-column:5 / span 1}:host([block][expand-icon-position='end']) .heading{grid-template-columns:auto 1fr}:host([block][expand-icon-position='end']) .icon{grid-column:5 / span 1}`;
|
|
@@ -3861,30 +3862,30 @@ const chevronDown20Filled = html.partial(`<svg
|
|
|
3861
3862
|
function accordionItemTemplate(options = {}) {
|
|
3862
3863
|
return html`<div class="heading" part="heading" role="heading" aria-level="${x => x.headinglevel}"><button class="button" part="button" ${ref("expandbutton")} ?disabled="${x => x.disabled ? "true" : void 0}" aria-expanded="${x => x.expanded}" aria-controls="${x => x.id}-panel" id="${x => x.id}" @click="${(x, c) => x.clickHandler(c.event)}"><span class="heading-content" part="heading-content"><slot name="heading"></slot></span></button>${startSlotTemplate(options)} ${endSlotTemplate(options)}<span class="icon" part="icon" aria-hidden="true"><slot name="expanded-icon">${staticallyCompose(options.expandedIcon)}</slot><slot name="collapsed-icon">${staticallyCompose(options.collapsedIcon)}</slot><span></div><div class="region" part="region" id="${x => x.id}-panel" role="region" aria-labelledby="${x => x.id}"><slot></slot></div>`;
|
|
3863
3864
|
}
|
|
3864
|
-
const template$
|
|
3865
|
+
const template$t = accordionItemTemplate({
|
|
3865
3866
|
collapsedIcon: chevronRight20Filled,
|
|
3866
3867
|
expandedIcon: chevronDown20Filled
|
|
3867
3868
|
});
|
|
3868
3869
|
|
|
3869
|
-
const definition$
|
|
3870
|
+
const definition$t = AccordionItem.compose({
|
|
3870
3871
|
name: `${FluentDesignSystem.prefix}-accordion-item`,
|
|
3871
|
-
template: template$
|
|
3872
|
-
styles: styles$
|
|
3872
|
+
template: template$t,
|
|
3873
|
+
styles: styles$s
|
|
3873
3874
|
});
|
|
3874
3875
|
|
|
3875
|
-
definition$
|
|
3876
|
+
definition$t.define(FluentDesignSystem.registry);
|
|
3876
3877
|
|
|
3877
3878
|
const AccordionExpandMode = {
|
|
3878
3879
|
single: "single",
|
|
3879
3880
|
multi: "multi"
|
|
3880
3881
|
};
|
|
3881
3882
|
|
|
3882
|
-
var __defProp$
|
|
3883
|
-
var __getOwnPropDesc$
|
|
3884
|
-
var __decorateClass$
|
|
3885
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
3883
|
+
var __defProp$q = Object.defineProperty;
|
|
3884
|
+
var __getOwnPropDesc$q = Object.getOwnPropertyDescriptor;
|
|
3885
|
+
var __decorateClass$q = (decorators, target, key, kind) => {
|
|
3886
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$q(target, key) : target;
|
|
3886
3887
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
3887
|
-
if (kind && result) __defProp$
|
|
3888
|
+
if (kind && result) __defProp$q(target, key, result);
|
|
3888
3889
|
return result;
|
|
3889
3890
|
};
|
|
3890
3891
|
class Accordion extends FASTElement {
|
|
@@ -4062,12 +4063,12 @@ class Accordion extends FASTElement {
|
|
|
4062
4063
|
}
|
|
4063
4064
|
}
|
|
4064
4065
|
}
|
|
4065
|
-
__decorateClass$
|
|
4066
|
+
__decorateClass$q([attr({
|
|
4066
4067
|
attribute: "expand-mode"
|
|
4067
4068
|
})], Accordion.prototype, "expandmode", 2);
|
|
4068
|
-
__decorateClass$
|
|
4069
|
+
__decorateClass$q([observable], Accordion.prototype, "slottedAccordionItems", 2);
|
|
4069
4070
|
|
|
4070
|
-
const styles$
|
|
4071
|
+
const styles$r = css`
|
|
4071
4072
|
${display("flex")}
|
|
4072
4073
|
|
|
4073
4074
|
:host{flex-direction:column;width:100%;contain:content}`;
|
|
@@ -4078,22 +4079,22 @@ function accordionTemplate() {
|
|
|
4078
4079
|
filter: elements()
|
|
4079
4080
|
})}></slot></template>`;
|
|
4080
4081
|
}
|
|
4081
|
-
const template$
|
|
4082
|
+
const template$s = accordionTemplate();
|
|
4082
4083
|
|
|
4083
|
-
const definition$
|
|
4084
|
+
const definition$s = Accordion.compose({
|
|
4084
4085
|
name: `${FluentDesignSystem.prefix}-accordion`,
|
|
4085
|
-
template: template$
|
|
4086
|
-
styles: styles$
|
|
4086
|
+
template: template$s,
|
|
4087
|
+
styles: styles$r
|
|
4087
4088
|
});
|
|
4088
4089
|
|
|
4089
|
-
definition$
|
|
4090
|
+
definition$s.define(FluentDesignSystem.registry);
|
|
4090
4091
|
|
|
4091
|
-
var __defProp$
|
|
4092
|
-
var __getOwnPropDesc$
|
|
4093
|
-
var __decorateClass$
|
|
4094
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
4092
|
+
var __defProp$p = Object.defineProperty;
|
|
4093
|
+
var __getOwnPropDesc$p = Object.getOwnPropertyDescriptor;
|
|
4094
|
+
var __decorateClass$p = (decorators, target, key, kind) => {
|
|
4095
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$p(target, key) : target;
|
|
4095
4096
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
4096
|
-
if (kind && result) __defProp$
|
|
4097
|
+
if (kind && result) __defProp$p(target, key, result);
|
|
4097
4098
|
return result;
|
|
4098
4099
|
};
|
|
4099
4100
|
class AnchorButton extends FASTElement {
|
|
@@ -4140,37 +4141,37 @@ class AnchorButton extends FASTElement {
|
|
|
4140
4141
|
this.removeEventListener("click", this.handleDisabledFocusableClick);
|
|
4141
4142
|
}
|
|
4142
4143
|
}
|
|
4143
|
-
__decorateClass$
|
|
4144
|
-
__decorateClass$
|
|
4145
|
-
__decorateClass$
|
|
4146
|
-
__decorateClass$
|
|
4147
|
-
__decorateClass$
|
|
4148
|
-
__decorateClass$
|
|
4149
|
-
__decorateClass$
|
|
4150
|
-
__decorateClass$
|
|
4151
|
-
__decorateClass$
|
|
4152
|
-
__decorateClass$
|
|
4153
|
-
__decorateClass$
|
|
4154
|
-
__decorateClass$
|
|
4155
|
-
__decorateClass$
|
|
4144
|
+
__decorateClass$p([attr], AnchorButton.prototype, "download", 2);
|
|
4145
|
+
__decorateClass$p([attr], AnchorButton.prototype, "href", 2);
|
|
4146
|
+
__decorateClass$p([attr], AnchorButton.prototype, "hreflang", 2);
|
|
4147
|
+
__decorateClass$p([attr], AnchorButton.prototype, "ping", 2);
|
|
4148
|
+
__decorateClass$p([attr], AnchorButton.prototype, "referrerpolicy", 2);
|
|
4149
|
+
__decorateClass$p([attr], AnchorButton.prototype, "rel", 2);
|
|
4150
|
+
__decorateClass$p([attr], AnchorButton.prototype, "target", 2);
|
|
4151
|
+
__decorateClass$p([attr], AnchorButton.prototype, "type", 2);
|
|
4152
|
+
__decorateClass$p([observable], AnchorButton.prototype, "defaultSlottedContent", 2);
|
|
4153
|
+
__decorateClass$p([attr], AnchorButton.prototype, "appearance", 2);
|
|
4154
|
+
__decorateClass$p([attr], AnchorButton.prototype, "shape", 2);
|
|
4155
|
+
__decorateClass$p([attr], AnchorButton.prototype, "size", 2);
|
|
4156
|
+
__decorateClass$p([attr({
|
|
4156
4157
|
attribute: "icon-only",
|
|
4157
4158
|
mode: "boolean"
|
|
4158
4159
|
})], AnchorButton.prototype, "iconOnly", 2);
|
|
4159
|
-
__decorateClass$
|
|
4160
|
+
__decorateClass$p([attr({
|
|
4160
4161
|
mode: "boolean"
|
|
4161
4162
|
})], AnchorButton.prototype, "disabled", 2);
|
|
4162
|
-
__decorateClass$
|
|
4163
|
+
__decorateClass$p([attr({
|
|
4163
4164
|
attribute: "disabled-focusable",
|
|
4164
4165
|
mode: "boolean"
|
|
4165
4166
|
})], AnchorButton.prototype, "disabledFocusable", 2);
|
|
4166
4167
|
class DelegatesARIALink {}
|
|
4167
|
-
__decorateClass$
|
|
4168
|
+
__decorateClass$p([attr({
|
|
4168
4169
|
attribute: "aria-expanded"
|
|
4169
4170
|
})], DelegatesARIALink.prototype, "ariaExpanded", 2);
|
|
4170
4171
|
applyMixins(DelegatesARIALink, ARIAGlobalStatesAndProperties);
|
|
4171
4172
|
applyMixins(AnchorButton, StartEnd, DelegatesARIALink);
|
|
4172
4173
|
|
|
4173
|
-
const styles$
|
|
4174
|
+
const styles$q = css`
|
|
4174
4175
|
${display("inline-flex")}
|
|
4175
4176
|
|
|
4176
4177
|
:host{--icon-spacing:${spacingHorizontalSNudge};contain:layout style;vertical-align:middle}:host .control{display:inline-flex;align-items:center;box-sizing:border-box;justify-content:center;text-decoration-line:none;margin:0;min-height:32px;outline-style:none;background-color:${colorNeutralBackground1};color:${colorNeutralForeground1};border:${strokeWidthThin} solid ${colorNeutralStroke1};padding:0 ${spacingHorizontalM};min-width:96px;border-radius:${borderRadiusMedium};font-size:${fontSizeBase300};font-family:${fontFamilyBase};font-weight:${fontWeightSemibold};line-height:${lineHeightBase300};transition-duration:${durationFaster};transition-property:background,border,color;transition-timing-function:${curveEasyEase};cursor:pointer}.content{display:inherit;text-align:center}:host(:hover) .control{background-color:${colorNeutralBackground1Hover};color:${colorNeutralForeground1Hover};border-color:${colorNeutralStroke1Hover}}:host(:hover:active) .control{background-color:${colorNeutralBackground1Pressed};border-color:${colorNeutralStroke1Pressed};color:${colorNeutralForeground1Pressed};outline-style:none}:host .control:focus-visible{border-color:${colorTransparentStroke};outline:${strokeWidthThick}) solid ${colorTransparentStroke};box-shadow:${shadow4},0 0 0 2px ${colorStrokeFocus2}}@media screen and (prefers-reduced-motion:reduce){transition-duration:0.01ms}::slotted(svg){font-size:20px;height:20px;width:20px;fill:currentColor}[slot='start'],::slotted([slot='start']){margin-inline-end:var(--icon-spacing)}[slot='end'],::slotted([slot='end']){margin-inline-start:var(--icon-spacing)}:host([icon-only]) .control{min-width:32px;max-width:32px}:host([size='small']){--icon-spacing:${spacingHorizontalXS}}:host([size='small']) .control{min-height:24px;min-width:64px;padding:0 ${spacingHorizontalS};border-radius:${borderRadiusSmall};font-size:${fontSizeBase200};line-height:${lineHeightBase200};font-weight:${fontWeightRegular}}:host([size='small'][icon-only]) .control{min-width:24px;max-width:24px}:host([size='large']) .control{min-height:40px;border-radius:${borderRadiusLarge};padding:0 ${spacingHorizontalL};font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host([size='large'][icon-only]) .control{min-width:40px;max-width:40px}:host([size='large']) ::slotted(svg){font-size:24px;height:24px;width:24px}:host([shape='circular']) .control,:host([shape='circular']) .control:focus-visible{border-radius:${borderRadiusCircular}}:host([shape='square']) .control,:host([shape='square']) .control:focus-visible{border-radius:${borderRadiusNone}}:host([appearance='primary']) .control{background-color:${colorBrandBackground};color:${colorNeutralForegroundOnBrand};border-color:transparent}:host([appearance='primary']:hover) .control{background-color:${colorBrandBackgroundHover}}:host([appearance='primary']:hover) .control,:host([appearance='primary']:hover:active) .control{border-color:transparent;color:${colorNeutralForegroundOnBrand}}:host([appearance='primary']:hover:active) .control{background-color:${colorBrandBackgroundPressed}}:host([appearance='primary']) .control:focus-visible{border-color:${colorNeutralForegroundOnBrand};box-shadow:${shadow2},0 0 0 2px ${colorStrokeFocus2}}:host(:is([disabled][appearance='primary'],[disabled-focusabale][appearance='primary'])) .control,:host(:is([disabled][appearance='primary'],[disabled-focusabale][appearance='primary']):hover) .control,:host(:is([disabled][appearance='primary'],[disabled-focusabale][appearance='primary']):hover:active) .control{border-color:transparent}:host([appearance='outline']) .control{background-color:${colorTransparentBackground}}:host([appearance='outline']:hover) .control{background-color:${colorTransparentBackgroundHover}}:host([appearance='outline']:hover:active) .control{background-color:${colorTransparentBackgroundPressed}}:host(:is([disabled][appearance='outline'],[disabled-focusabale][appearance='outline'])) .control,:host(:is([disabled][appearance='outline'],[disabled-focusabale][appearance='outline']):hover) .control,:host(:is([disabled][appearance='outline'],[disabled-focusabale][appearance='outline']):hover:active) .control{background-color:${colorTransparentBackground}}:host([appearance='subtle']) .control{background-color:${colorSubtleBackground};color:${colorNeutralForeground2};border-color:transparent}:host([appearance='subtle']:hover) .control{background-color:${colorSubtleBackgroundHover};color:${colorNeutralForeground2Hover};border-color:transparent}:host([appearance='subtle']:hover:active) .control{background-color:${colorSubtleBackgroundPressed};color:${colorNeutralForeground2Pressed};border-color:transparent}:host(:is([disabled][appearance='subtle'],[disabled-focusabale][appearance='subtle'])) .control,:host(:is([disabled][appearance='subtle'],[disabled-focusabale][appearance='subtle']):hover) .control,:host(:is([disabled][appearance='subtle'],[disabled-focusabale][appearance='subtle']):hover:active) .control{background-color:${colorTransparentBackground};border-color:transparent}:host([appearance='subtle']:hover) ::slotted(svg){fill:${colorNeutralForeground2BrandHover}}:host([appearance='subtle']:hover:active) ::slotted(svg){fill:${colorNeutralForeground2BrandPressed}}:host([appearance='transparent']) .control{background-color:${colorTransparentBackground};color:${colorNeutralForeground2}}:host([appearance='transparent']:hover) .control{background-color:${colorTransparentBackgroundHover};color:${colorNeutralForeground2BrandHover}}:host([appearance='transparent']:hover:active) .control{background-color:${colorTransparentBackgroundPressed};color:${colorNeutralForeground2BrandPressed}}:host([appearance='transparent']) .control,:host([appearance='transparent']:hover) .control,:host([appearance='transparent']:hover:active) .control{border-color:transparent}:host(:is([disabled][appearance='transparent'],[disabled-focusabale][appearance='transparent'])) .control,:host(:is([disabled][appearance='transparent'],[disabled-focusabale][appearance='transparent']):hover) .control,:host(:is([disabled][appearance='transparent'],[disabled-focusabale][appearance='transparent']):hover:active)
|
|
@@ -4181,18 +4182,18 @@ const styles$p = css`
|
|
|
4181
4182
|
function anchorTemplate(options = {}) {
|
|
4182
4183
|
return html`<a class="control" part="control" download="${x => x.download}" href="${x => x.href}" hreflang="${x => x.hreflang}" ping="${x => x.ping}" referrerpolicy="${x => x.referrerpolicy}" rel="${x => x.rel}" target="${x => x.target}" type="${x => x.type}" aria-atomic="${x => x.ariaAtomic}" aria-busy="${x => x.ariaBusy}" aria-controls="${x => x.ariaControls}" aria-current="${x => x.ariaCurrent}" aria-describedby="${x => x.ariaDescribedby}" aria-details="${x => x.ariaDetails}" aria-disabled="${x => x.ariaDisabled}" aria-errormessage="${x => x.ariaErrormessage}" aria-expanded="${x => x.ariaExpanded}" aria-flowto="${x => x.ariaFlowto}" aria-haspopup="${x => x.ariaHaspopup}" aria-hidden="${x => x.ariaHidden}" aria-invalid="${x => x.ariaInvalid}" aria-keyshortcuts="${x => x.ariaKeyshortcuts}" aria-label="${x => x.ariaLabel}" aria-labelledby="${x => x.ariaLabelledby}" aria-live="${x => x.ariaLive}" aria-owns="${x => x.ariaOwns}" aria-relevant="${x => x.ariaRelevant}" aria-roledescription="${x => x.ariaRoledescription}" ${ref("control")}>${startSlotTemplate(options)}<span class="content" part="content"><slot ${slotted("defaultSlottedContent")}></slot></span>${endSlotTemplate(options)}</a>`;
|
|
4183
4184
|
}
|
|
4184
|
-
const template$
|
|
4185
|
+
const template$r = anchorTemplate();
|
|
4185
4186
|
|
|
4186
|
-
const definition$
|
|
4187
|
+
const definition$r = AnchorButton.compose({
|
|
4187
4188
|
name: `${FluentDesignSystem.prefix}-anchor-button`,
|
|
4188
|
-
template: template$
|
|
4189
|
-
styles: styles$
|
|
4189
|
+
template: template$r,
|
|
4190
|
+
styles: styles$q,
|
|
4190
4191
|
shadowOptions: {
|
|
4191
4192
|
delegatesFocus: true
|
|
4192
4193
|
}
|
|
4193
4194
|
});
|
|
4194
4195
|
|
|
4195
|
-
definition$
|
|
4196
|
+
definition$r.define(FluentDesignSystem.registry);
|
|
4196
4197
|
|
|
4197
4198
|
const UNWANTED_ENCLOSURES_REGEX = /[\(\[\{][^\)\]\}]*[\)\]\}]/g;
|
|
4198
4199
|
const UNWANTED_CHARS_REGEX = /[\0-\u001F\!-/:-@\[-`\{-\u00BF\u0250-\u036F\uD800-\uFFFF]/g;
|
|
@@ -4274,12 +4275,12 @@ const AvatarColor = {
|
|
|
4274
4275
|
...AvatarNamedColor
|
|
4275
4276
|
};
|
|
4276
4277
|
|
|
4277
|
-
var __defProp$
|
|
4278
|
-
var __getOwnPropDesc$
|
|
4279
|
-
var __decorateClass$
|
|
4280
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
4278
|
+
var __defProp$o = Object.defineProperty;
|
|
4279
|
+
var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
|
|
4280
|
+
var __decorateClass$o = (decorators, target, key, kind) => {
|
|
4281
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$o(target, key) : target;
|
|
4281
4282
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
4282
|
-
if (kind && result) __defProp$
|
|
4283
|
+
if (kind && result) __defProp$o(target, key, result);
|
|
4283
4284
|
return result;
|
|
4284
4285
|
};
|
|
4285
4286
|
const _Avatar = class _Avatar extends FASTElement {
|
|
@@ -4315,16 +4316,16 @@ const _Avatar = class _Avatar extends FASTElement {
|
|
|
4315
4316
|
* An array of the available Avatar named colors
|
|
4316
4317
|
*/
|
|
4317
4318
|
_Avatar.colors = Object.values(AvatarNamedColor);
|
|
4318
|
-
__decorateClass$
|
|
4319
|
-
__decorateClass$
|
|
4320
|
-
__decorateClass$
|
|
4319
|
+
__decorateClass$o([attr], _Avatar.prototype, "name", 2);
|
|
4320
|
+
__decorateClass$o([attr], _Avatar.prototype, "initials", 2);
|
|
4321
|
+
__decorateClass$o([attr({
|
|
4321
4322
|
converter: nullableNumberConverter
|
|
4322
4323
|
})], _Avatar.prototype, "size", 2);
|
|
4323
|
-
__decorateClass$
|
|
4324
|
-
__decorateClass$
|
|
4325
|
-
__decorateClass$
|
|
4326
|
-
__decorateClass$
|
|
4327
|
-
__decorateClass$
|
|
4324
|
+
__decorateClass$o([attr], _Avatar.prototype, "shape", 2);
|
|
4325
|
+
__decorateClass$o([attr], _Avatar.prototype, "active", 2);
|
|
4326
|
+
__decorateClass$o([attr], _Avatar.prototype, "appearance", 2);
|
|
4327
|
+
__decorateClass$o([attr], _Avatar.prototype, "color", 2);
|
|
4328
|
+
__decorateClass$o([attr({
|
|
4328
4329
|
attribute: "color-id"
|
|
4329
4330
|
})], _Avatar.prototype, "colorId", 2);
|
|
4330
4331
|
let Avatar = _Avatar;
|
|
@@ -4349,22 +4350,22 @@ const animations = {
|
|
|
4349
4350
|
normalEase: curveEasyEase,
|
|
4350
4351
|
nullEasing: curveLinear
|
|
4351
4352
|
};
|
|
4352
|
-
const styles$
|
|
4353
|
+
const styles$p = css`
|
|
4353
4354
|
${display("inline-flex")} :host{position:relative;align-items:center;justify-content:center;flex-shrink:0;width:32px;height:32px;font-family:${fontFamilyBase};font-weight:${fontWeightSemibold};font-size:${fontSizeBase300};border-radius:${borderRadiusCircular};color:${colorNeutralForeground3};background-color:${colorNeutralBackground6};contain:layout style}.default-icon,::slotted(svg){width:20px;height:20px;font-size:20px}::slotted(img){box-sizing:border-box;width:100%;height:100%;border-radius:${borderRadiusCircular}}::slotted([slot='badge']){position:absolute;bottom:0;right:0;box-shadow:0 0 0 ${strokeWidthThin}) ${colorNeutralBackground1}}:host([size='64']) ::slotted([slot='badge']),:host([size='72']) ::slotted([slot='badge']),:host([size='96']) ::slotted([slot='badge']),:host([size='120']) ::slotted([slot='badge']),:host([size='128']) ::slotted([slot='badge']){box-shadow:0 0 0 ${strokeWidthThick}) ${colorNeutralBackground1}}:host([size='16']),:host([size='20']),:host([size='24']){font-size:${fontSizeBase100};font-weight:${fontWeightRegular}}:host([size='16']){width:16px;height:16px}:host([size='20']){width:20px;height:20px}:host([size='24']){width:24px;height:24px}:host([size='16']) .default-icon,:host([size='16']) ::slotted(svg){width:12px;height:12px;font-size:12px}:host([size='20']) .default-icon,:host([size='24']) .default-icon,:host([size='20']) ::slotted(svg),:host([size='24']) ::slotted(svg){width:16px;height:16px;font-size:16px}:host([size='28']){width:28px;height:28px;font-size:${fontSizeBase200}}:host([size='36']){width:36px;height:36px}:host([size='40']){width:40px;height:40px}:host([size='48']),:host([size='56']){font-size:${fontSizeBase400}}:host([size='48']){width:48px;height:48px}:host([size='48']) .default-icon,:host([size='48']) ::slotted(svg){width:24px;height:24px;font-size:24px}:host([size='56']){width:56px;height:56px}:host([size='56']) .default-icon,:host([size='56']) ::slotted(svg){width:28px;height:28px;font-size:28px}:host([size='64']),:host([size='72']),:host([size='96']){font-size:${fontSizeBase500}}:host([size='64']) .default-icon,:host([size='72']) .default-icon,:host([size='64']) ::slotted(svg),:host([size='72']) ::slotted(svg){width:32px;height:32px;font-size:32px}:host([size='64']){width:64px;height:64px}:host([size='72']){width:72px;height:72px}:host([size='96']){width:96px;height:96px}:host([size='96']) .default-icon,:host([size='120']) .default-icon,:host([size='128']) .default-icon,:host([size='96']) ::slotted(svg),:host([size='120']) ::slotted(svg),:host([size='128']) ::slotted(svg){width:48px;height:48px;font-size:48px}:host([size='120']),:host([size='128']){font-size:${fontSizeBase600}}:host([size='120']){width:120px;height:120px}:host([size='128']){width:128px;height:128px}:host([shape='square']){border-radius:${borderRadiusMedium}}:host([shape='square'][size='20']),:host([shape='square'][size='24']){border-radius:${borderRadiusSmall}}:host([shape='square'][size='56']),:host([shape='square'][size='64']),:host([shape='square'][size='72']){border-radius:${borderRadiusLarge}}:host([shape='square'][size='96']),:host([shape='square'][size='120']),:host([shape='square'][size='128']){border-radius:${borderRadiusXLarge}}:host([data-color='brand']){color:${colorNeutralForegroundStaticInverted};background-color:${colorBrandBackgroundStatic}}:host([data-color='dark-red']){color:${colorPaletteDarkRedForeground2};background-color:${colorPaletteDarkRedBackground2}}:host([data-color='cranberry']){color:${colorPaletteCranberryForeground2};background-color:${colorPaletteCranberryBackground2}}:host([data-color='red']){color:${colorPaletteRedForeground2};background-color:${colorPaletteRedBackground2}}:host([data-color='pumpkin']){color:${colorPalettePumpkinForeground2};background-color:${colorPalettePumpkinBackground2}}:host([data-color='peach']){color:${colorPalettePeachForeground2};background-color:${colorPalettePeachBackground2}}:host([data-color='marigold']){color:${colorPaletteMarigoldForeground2};background-color:${colorPaletteMarigoldBackground2}}:host([data-color='gold']){color:${colorPaletteGoldForeground2};background-color:${colorPaletteGoldBackground2}}:host([data-color='brass']){color:${colorPaletteBrassForeground2};background-color:${colorPaletteBrassBackground2}}:host([data-color='brown']){color:${colorPaletteBrownForeground2};background-color:${colorPaletteBrownBackground2}}:host([data-color='forest']){color:${colorPaletteForestForeground2};background-color:${colorPaletteForestBackground2}}:host([data-color='seafoam']){color:${colorPaletteSeafoamForeground2};background-color:${colorPaletteSeafoamBackground2}}:host([data-color='dark-green']){color:${colorPaletteDarkGreenForeground2};background-color:${colorPaletteDarkGreenBackground2}}:host([data-color='light-teal']){color:${colorPaletteLightTealForeground2};background-color:${colorPaletteLightTealBackground2}}:host([data-color='teal']){color:${colorPaletteTealForeground2};background-color:${colorPaletteTealBackground2}}:host([data-color='steel']){color:${colorPaletteSteelForeground2};background-color:${colorPaletteSteelBackground2}}:host([data-color='blue']){color:${colorPaletteBlueForeground2};background-color:${colorPaletteBlueBackground2}}:host([data-color='royal-blue']){color:${colorPaletteRoyalBlueForeground2};background-color:${colorPaletteRoyalBlueBackground2}}:host([data-color='cornflower']){color:${colorPaletteCornflowerForeground2};background-color:${colorPaletteCornflowerBackground2}}:host([data-color='navy']){color:${colorPaletteNavyForeground2};background-color:${colorPaletteNavyBackground2}}:host([data-color='lavender']){color:${colorPaletteLavenderForeground2};background-color:${colorPaletteLavenderBackground2}}:host([data-color='purple']){color:${colorPalettePurpleForeground2};background-color:${colorPalettePurpleBackground2}}:host([data-color='grape']){color:${colorPaletteGrapeForeground2};background-color:${colorPaletteGrapeBackground2}}:host([data-color='lilac']){color:${colorPaletteLilacForeground2};background-color:${colorPaletteLilacBackground2}}:host([data-color='pink']){color:${colorPalettePinkForeground2};background-color:${colorPalettePinkBackground2}}:host([data-color='magenta']){color:${colorPaletteMagentaForeground2};background-color:${colorPaletteMagentaBackground2}}:host([data-color='plum']){color:${colorPalettePlumForeground2};background-color:${colorPalettePlumBackground2}}:host([data-color='beige']){color:${colorPaletteBeigeForeground2};background-color:${colorPaletteBeigeBackground2}}:host([data-color='mink']){color:${colorPaletteMinkForeground2};background-color:${colorPaletteMinkBackground2}}:host([data-color='platinum']){color:${colorPalettePlatinumForeground2};background-color:${colorPalettePlatinumBackground2}}:host([data-color='anchor']){color:${colorPaletteAnchorForeground2};background-color:${colorPaletteAnchorBackground2}}:host([active]){transform:perspective(1px);transition-property:transform,opacity;transition-duration:${durationUltraSlow},${durationFaster};transition-delay:${animations.fastEase},${animations.nullEasing}}:host([active])::before{content:'';position:absolute;top:0;left:0;bottom:0;right:0;border-radius:inherit;transition-property:margin,opacity;transition-duration:${durationUltraSlow}),${durationSlower};transition-delay:${animations.fastEase}),${animations.nullEasing})}:host([active])::before{box-shadow:${shadow8};border-style:solid;border-color:${colorBrandBackgroundStatic}}:host([active][appearance='shadow'])::before{border-style:none;border-color:none}:host([active]:not([appearance='shadow']))::before{margin:calc(-2 * ${strokeWidthThick});border-width:${strokeWidthThick}}:host([size='56'][active]:not([appearance='shadow']))::before,:host([size='64'][active]:not([appearance='shadow']))::before{margin:calc(-2 * ${strokeWidthThicker});border-width:${strokeWidthThicker}}:host([size='72'][active]:not([appearance='shadow']))::before,:host([size='96'][active]:not([appearance='shadow']))::before,:host([size='120'][active]:not([appearance='shadow']))::before,:host([size='128'][active]:not([appearance='shadow']))::before{margin:calc(-2 * ${strokeWidthThickest});border-width:${strokeWidthThickest}}:host([size='20'][active][appearance])::before,:host([size='24'][active][appearance])::before,:host([size='28'][active][appearance])::before{box-shadow:${shadow4}}:host([size='56'][active][appearance])::before,:host([size='64'][active][appearance])::before{box-shadow:${shadow16}}:host([size='72'][active][appearance])::before,:host([size='96'][active][appearance])::before,:host([size='120'][active][appearance])::before,:host([size='128'][active][appearance])::before{box-shadow:${shadow28}}:host([active][appearance='ring'])::before{box-shadow:none}:host([active='inactive']){opacity:0.8;transform:scale(0.875);transition-property:transform,opacity;transition-duration:${durationUltraSlow},${durationFaster};transition-delay:${animations.fastOutSlowInMin},${animations.nullEasing}}:host([active='inactive'])::before{margin:0;opacity:0;transition-property:margin,opacity;transition-duration:${durationUltraSlow},${durationSlower};transition-delay:${animations.fastOutSlowInMin},${animations.nullEasing}}@media screen and (prefers-reduced-motion:reduce){:host([active]){transition-duration:0.01ms}:host([active])::before{transition-duration:0.01ms;transition-delay:0.01ms}}`;
|
|
4354
4355
|
|
|
4355
4356
|
const defaultIconTemplate = html`<svg width="1em" height="1em" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" class="default-icon" fill="currentcolor" aria-hidden="true"><path d="M10 2a4 4 0 100 8 4 4 0 000-8zM7 6a3 3 0 116 0 3 3 0 01-6 0zm-2 5a2 2 0 00-2 2c0 1.7.83 2.97 2.13 3.8A9.14 9.14 0 0010 18c1.85 0 3.58-.39 4.87-1.2A4.35 4.35 0 0017 13a2 2 0 00-2-2H5zm-1 2a1 1 0 011-1h10a1 1 0 011 1c0 1.3-.62 2.28-1.67 2.95A8.16 8.16 0 0110 17a8.16 8.16 0 01-4.33-1.05A3.36 3.36 0 014 13z"></path></svg>`;
|
|
4356
4357
|
function avatarTemplate() {
|
|
4357
4358
|
return html`<template role="img" data-color=${x => x.generateColor()}><slot>${x => x.name || x.initials ? x.generateInitials() : defaultIconTemplate}</slot><slot name="badge"></slot></template>`;
|
|
4358
4359
|
}
|
|
4359
|
-
const template$
|
|
4360
|
+
const template$q = avatarTemplate();
|
|
4360
4361
|
|
|
4361
|
-
const definition$
|
|
4362
|
+
const definition$q = Avatar.compose({
|
|
4362
4363
|
name: `${FluentDesignSystem.prefix}-avatar`,
|
|
4363
|
-
template: template$
|
|
4364
|
-
styles: styles$
|
|
4364
|
+
template: template$q,
|
|
4365
|
+
styles: styles$p
|
|
4365
4366
|
});
|
|
4366
4367
|
|
|
4367
|
-
definition$
|
|
4368
|
+
definition$q.define(FluentDesignSystem.registry);
|
|
4368
4369
|
|
|
4369
4370
|
const BadgeAppearance = {
|
|
4370
4371
|
filled: "filled",
|
|
@@ -4383,12 +4384,12 @@ const BadgeColor = {
|
|
|
4383
4384
|
warning: "warning"
|
|
4384
4385
|
};
|
|
4385
4386
|
|
|
4386
|
-
var __defProp$
|
|
4387
|
-
var __getOwnPropDesc$
|
|
4388
|
-
var __decorateClass$
|
|
4389
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
4387
|
+
var __defProp$n = Object.defineProperty;
|
|
4388
|
+
var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
|
|
4389
|
+
var __decorateClass$n = (decorators, target, key, kind) => {
|
|
4390
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$n(target, key) : target;
|
|
4390
4391
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
4391
|
-
if (kind && result) __defProp$
|
|
4392
|
+
if (kind && result) __defProp$n(target, key, result);
|
|
4392
4393
|
return result;
|
|
4393
4394
|
};
|
|
4394
4395
|
class Badge extends FASTElement {
|
|
@@ -4398,10 +4399,10 @@ class Badge extends FASTElement {
|
|
|
4398
4399
|
this.color = BadgeColor.brand;
|
|
4399
4400
|
}
|
|
4400
4401
|
}
|
|
4401
|
-
__decorateClass$
|
|
4402
|
-
__decorateClass$
|
|
4403
|
-
__decorateClass$
|
|
4404
|
-
__decorateClass$
|
|
4402
|
+
__decorateClass$n([attr], Badge.prototype, "appearance", 2);
|
|
4403
|
+
__decorateClass$n([attr], Badge.prototype, "color", 2);
|
|
4404
|
+
__decorateClass$n([attr], Badge.prototype, "shape", 2);
|
|
4405
|
+
__decorateClass$n([attr], Badge.prototype, "size", 2);
|
|
4405
4406
|
applyMixins(Badge, StartEnd);
|
|
4406
4407
|
|
|
4407
4408
|
const textPadding = spacingHorizontalXXS;
|
|
@@ -4756,7 +4757,7 @@ css.partial`
|
|
|
4756
4757
|
font-weight: ${fontWeightSemibold};
|
|
4757
4758
|
`;
|
|
4758
4759
|
|
|
4759
|
-
const styles$
|
|
4760
|
+
const styles$o = css`
|
|
4760
4761
|
:host([shape='square']){border-radius:${borderRadiusNone}}:host([shape='rounded']){border-radius:${borderRadiusMedium}}:host([shape='rounded'][size='tiny']),:host([shape='rounded'][size='extra-small']),:host([shape='rounded'][size='small']){border-radius:${borderRadiusSmall}}${badgeSizeStyles}
|
|
4761
4762
|
${badgeFilledStyles}
|
|
4762
4763
|
${badgeGhostStyles}
|
|
@@ -4769,15 +4770,15 @@ const styles$n = css`
|
|
|
4769
4770
|
function badgeTemplate(options = {}) {
|
|
4770
4771
|
return html` ${startSlotTemplate(options)}<slot>${staticallyCompose(options.defaultContent)}</slot>${endSlotTemplate(options)} `;
|
|
4771
4772
|
}
|
|
4772
|
-
const template$
|
|
4773
|
+
const template$p = badgeTemplate();
|
|
4773
4774
|
|
|
4774
|
-
const definition$
|
|
4775
|
+
const definition$p = Badge.compose({
|
|
4775
4776
|
name: `${FluentDesignSystem.prefix}-badge`,
|
|
4776
|
-
template: template$
|
|
4777
|
-
styles: styles$
|
|
4777
|
+
template: template$p,
|
|
4778
|
+
styles: styles$o
|
|
4778
4779
|
});
|
|
4779
4780
|
|
|
4780
|
-
definition$
|
|
4781
|
+
definition$p.define(FluentDesignSystem.registry);
|
|
4781
4782
|
|
|
4782
4783
|
const ButtonType = {
|
|
4783
4784
|
submit: "submit",
|
|
@@ -4785,12 +4786,12 @@ const ButtonType = {
|
|
|
4785
4786
|
button: "button"
|
|
4786
4787
|
};
|
|
4787
4788
|
|
|
4788
|
-
var __defProp$
|
|
4789
|
-
var __getOwnPropDesc$
|
|
4790
|
-
var __decorateClass$
|
|
4791
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
4789
|
+
var __defProp$m = Object.defineProperty;
|
|
4790
|
+
var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
|
|
4791
|
+
var __decorateClass$m = (decorators, target, key, kind) => {
|
|
4792
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$m(target, key) : target;
|
|
4792
4793
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
4793
|
-
if (kind && result) __defProp$
|
|
4794
|
+
if (kind && result) __defProp$m(target, key, result);
|
|
4794
4795
|
return result;
|
|
4795
4796
|
};
|
|
4796
4797
|
class Button extends FASTElement {
|
|
@@ -4994,66 +4995,66 @@ class Button extends FASTElement {
|
|
|
4994
4995
|
* @public
|
|
4995
4996
|
*/
|
|
4996
4997
|
Button.formAssociated = true;
|
|
4997
|
-
__decorateClass$
|
|
4998
|
-
__decorateClass$
|
|
4998
|
+
__decorateClass$m([attr], Button.prototype, "appearance", 2);
|
|
4999
|
+
__decorateClass$m([attr({
|
|
4999
5000
|
mode: "boolean"
|
|
5000
5001
|
})], Button.prototype, "autofocus", 2);
|
|
5001
|
-
__decorateClass$
|
|
5002
|
-
__decorateClass$
|
|
5002
|
+
__decorateClass$m([observable], Button.prototype, "defaultSlottedContent", 2);
|
|
5003
|
+
__decorateClass$m([attr({
|
|
5003
5004
|
mode: "boolean"
|
|
5004
5005
|
})], Button.prototype, "disabled", 2);
|
|
5005
|
-
__decorateClass$
|
|
5006
|
+
__decorateClass$m([attr({
|
|
5006
5007
|
attribute: "disabled-focusable",
|
|
5007
5008
|
mode: "boolean"
|
|
5008
5009
|
})], Button.prototype, "disabledFocusable", 2);
|
|
5009
|
-
__decorateClass$
|
|
5010
|
+
__decorateClass$m([attr({
|
|
5010
5011
|
attribute: "formaction"
|
|
5011
5012
|
})], Button.prototype, "formAction", 2);
|
|
5012
|
-
__decorateClass$
|
|
5013
|
+
__decorateClass$m([attr({
|
|
5013
5014
|
attribute: "form"
|
|
5014
5015
|
})], Button.prototype, "formAttribute", 2);
|
|
5015
|
-
__decorateClass$
|
|
5016
|
+
__decorateClass$m([attr({
|
|
5016
5017
|
attribute: "formenctype"
|
|
5017
5018
|
})], Button.prototype, "formEnctype", 2);
|
|
5018
|
-
__decorateClass$
|
|
5019
|
+
__decorateClass$m([attr({
|
|
5019
5020
|
attribute: "formmethod"
|
|
5020
5021
|
})], Button.prototype, "formMethod", 2);
|
|
5021
|
-
__decorateClass$
|
|
5022
|
+
__decorateClass$m([attr({
|
|
5022
5023
|
attribute: "formnovalidate",
|
|
5023
5024
|
mode: "boolean"
|
|
5024
5025
|
})], Button.prototype, "formNoValidate", 2);
|
|
5025
|
-
__decorateClass$
|
|
5026
|
+
__decorateClass$m([attr({
|
|
5026
5027
|
attribute: "formtarget"
|
|
5027
5028
|
})], Button.prototype, "formTarget", 2);
|
|
5028
|
-
__decorateClass$
|
|
5029
|
+
__decorateClass$m([attr({
|
|
5029
5030
|
attribute: "icon-only",
|
|
5030
5031
|
mode: "boolean"
|
|
5031
5032
|
})], Button.prototype, "iconOnly", 2);
|
|
5032
|
-
__decorateClass$
|
|
5033
|
-
__decorateClass$
|
|
5034
|
-
__decorateClass$
|
|
5035
|
-
__decorateClass$
|
|
5036
|
-
__decorateClass$
|
|
5033
|
+
__decorateClass$m([attr], Button.prototype, "name", 2);
|
|
5034
|
+
__decorateClass$m([attr], Button.prototype, "shape", 2);
|
|
5035
|
+
__decorateClass$m([attr], Button.prototype, "size", 2);
|
|
5036
|
+
__decorateClass$m([attr], Button.prototype, "type", 2);
|
|
5037
|
+
__decorateClass$m([attr], Button.prototype, "value", 2);
|
|
5037
5038
|
applyMixins(Button, StartEnd);
|
|
5038
5039
|
|
|
5039
|
-
const styles$
|
|
5040
|
+
const styles$n = css`
|
|
5040
5041
|
${display("inline-flex")}
|
|
5041
5042
|
|
|
5042
|
-
:host{--icon-spacing:${spacingHorizontalSNudge};contain:layout style;vertical-align:middle;align-items:center;box-sizing:border-box;justify-content:center;text-align:center;text-decoration-line:none;margin:0;min-height:32px;outline-style:none;background-color:${colorNeutralBackground1};color:${colorNeutralForeground1};border:${strokeWidthThin} solid ${colorNeutralStroke1};padding:0 ${spacingHorizontalM};min-width:96px;border-radius:${borderRadiusMedium};font-size:${fontSizeBase300};font-family:${fontFamilyBase};font-weight:${fontWeightSemibold};line-height:${lineHeightBase300};transition-duration:${durationFaster};transition-property:background,border,color;transition-timing-function:${curveEasyEase};cursor:pointer;user-select:none}.content{display:inherit}:host(:hover){background-color:${colorNeutralBackground1Hover};color:${colorNeutralForeground1Hover};border-color:${colorNeutralStroke1Hover}}:host(:hover:active){background-color:${colorNeutralBackground1Pressed};border-color:${colorNeutralStroke1Pressed};color:${colorNeutralForeground1Pressed};outline-style:none}:host(:focus-visible){border-color:${colorTransparentStroke};outline:${strokeWidthThick}
|
|
5043
|
+
:host{--icon-spacing:${spacingHorizontalSNudge};contain:layout style;vertical-align:middle;align-items:center;box-sizing:border-box;justify-content:center;text-align:center;text-decoration-line:none;margin:0;min-height:32px;outline-style:none;background-color:${colorNeutralBackground1};color:${colorNeutralForeground1};border:${strokeWidthThin} solid ${colorNeutralStroke1};padding:0 ${spacingHorizontalM};min-width:96px;border-radius:${borderRadiusMedium};font-size:${fontSizeBase300};font-family:${fontFamilyBase};font-weight:${fontWeightSemibold};line-height:${lineHeightBase300};transition-duration:${durationFaster};transition-property:background,border,color;transition-timing-function:${curveEasyEase};cursor:pointer;user-select:none}.content{display:inherit}:host(:hover){background-color:${colorNeutralBackground1Hover};color:${colorNeutralForeground1Hover};border-color:${colorNeutralStroke1Hover}}:host(:hover:active){background-color:${colorNeutralBackground1Pressed};border-color:${colorNeutralStroke1Pressed};color:${colorNeutralForeground1Pressed};outline-style:none}:host(:focus-visible){border-color:${colorTransparentStroke};outline:${strokeWidthThick} solid ${colorTransparentStroke};box-shadow:${shadow4},0 0 0 2px ${colorStrokeFocus2}}@media screen and (prefers-reduced-motion:reduce){transition-duration:0.01ms}::slotted(svg){font-size:20px;height:20px;width:20px;fill:currentColor}[slot='start'],::slotted([slot='start']){margin-inline-end:var(--icon-spacing)}[slot='end'],::slotted([slot='end']){margin-inline-start:var(--icon-spacing)}:host([icon-only]){min-width:32px;max-width:32px}:host([size='small']){--icon-spacing:${spacingHorizontalXS};min-height:24px;min-width:64px;padding:0 ${spacingHorizontalS};border-radius:${borderRadiusSmall};font-size:${fontSizeBase200};line-height:${lineHeightBase200};font-weight:${fontWeightRegular}}:host([size='small'][icon-only]){min-width:24px;max-width:24px}:host([size='large']){min-height:40px;border-radius:${borderRadiusLarge};padding:0 ${spacingHorizontalL};font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host([size='large'][icon-only]){min-width:40px;max-width:40px}:host([size='large']) ::slotted(svg){font-size:24px;height:24px;width:24px}:host([shape='circular']),:host([shape='circular']:focus-visible){border-radius:${borderRadiusCircular}}:host([shape='square']),:host([shape='square']:focus-visible){border-radius:${borderRadiusNone}}:host([appearance='primary']){background-color:${colorBrandBackground};color:${colorNeutralForegroundOnBrand};border-color:transparent}:host([appearance='primary']:hover){background-color:${colorBrandBackgroundHover}}:host([appearance='primary']:hover),:host([appearance='primary']:hover:active){border-color:transparent;color:${colorNeutralForegroundOnBrand}}:host([appearance='primary']:hover:active){background-color:${colorBrandBackgroundPressed}}:host([appearance='primary']:focus-visible){border-color:${colorNeutralForegroundOnBrand};box-shadow:${shadow2},0 0 0 2px ${colorStrokeFocus2}}:host([appearance='outline']){background-color:${colorTransparentBackground}}:host([appearance='outline']:hover){background-color:${colorTransparentBackgroundHover}}:host([appearance='outline']:hover:active){background-color:${colorTransparentBackgroundPressed}}:host([appearance='subtle']){background-color:${colorSubtleBackground};color:${colorNeutralForeground2};border-color:transparent}:host([appearance='subtle']:hover){background-color:${colorSubtleBackgroundHover};color:${colorNeutralForeground2Hover};border-color:transparent}:host([appearance='subtle']:hover:active){background-color:${colorSubtleBackgroundPressed};color:${colorNeutralForeground2Pressed};border-color:transparent}:host([appearance='subtle']:hover) ::slotted(svg){fill:${colorNeutralForeground2BrandHover}}:host([appearance='subtle']:hover:active) ::slotted(svg){fill:${colorNeutralForeground2BrandPressed}}:host([appearance='transparent']){background-color:${colorTransparentBackground};color:${colorNeutralForeground2}}:host([appearance='transparent']:hover){background-color:${colorTransparentBackgroundHover};color:${colorNeutralForeground2BrandHover}}:host([appearance='transparent']:hover:active){background-color:${colorTransparentBackgroundPressed};color:${colorNeutralForeground2BrandPressed}}:host([appearance='transparent']),:host([appearance='transparent']:hover),:host([appearance='transparent']:hover:active){border-color:transparent}:host(:is([disabled],[disabled-focusable],[appearance][disabled],[appearance][disabled-focusable])),:host(:is([disabled],[disabled-focusable],[appearance][disabled],[appearance][disabled-focusable]):hover),:host(:is([disabled],[disabled-focusable],[appearance][disabled],[appearance][disabled-focusable]):hover:active){background-color:${colorNeutralBackgroundDisabled};border-color:${colorNeutralStrokeDisabled};color:${colorNeutralForegroundDisabled};cursor:not-allowed}:host(:is([disabled][appearance='primary'],[disabled-focusable][appearance='primary'])),:host(:is([disabled][appearance='primary'],[disabled-focusable][appearance='primary']):hover),:host(:is([disabled][appearance='primary'],[disabled-focusable][appearance='primary']):hover:active){border-color:transparent}:host(:is([disabled][appearance='outline'],[disabled-focusable][appearance='outline'])),:host(:is([disabled][appearance='outline'],[disabled-focusable][appearance='outline']):hover),:host(:is([disabled][appearance='outline'],[disabled-focusable][appearance='outline']):hover:active){background-color:${colorTransparentBackground}}:host(:is([disabled][appearance='subtle'],[disabled-focusable][appearance='subtle'])),:host(:is([disabled][appearance='subtle'],[disabled-focusable][appearance='subtle']):hover),:host(:is([disabled][appearance='subtle'],[disabled-focusable][appearance='subtle']):hover:active){background-color:${colorTransparentBackground};border-color:transparent}:host(:is([disabled][appearance='transparent'],[disabled-focusable][appearance='transparent'])),:host(:is([disabled][appearance='transparent'],[disabled-focusable][appearance='transparent']):hover),:host(:is([disabled][appearance='transparent'],[disabled-focusable][appearance='transparent']):hover:active){border-color:transparent;background-color:${colorTransparentBackground}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
5043
5044
|
:host([appearance='transparent']:hover){border-color:Highlight}`));
|
|
5044
5045
|
|
|
5045
5046
|
function buttonTemplate$1(options = {}) {
|
|
5046
5047
|
return html`<template tabindex="${x => x.disabled ? -1 : 0}" @click="${(x, c) => x.clickHandler(c.event)}" @keypress="${(x, c) => x.keypressHandler(c.event)}">${startSlotTemplate(options)}<span class="content" part="content"><slot ${slotted("defaultSlottedContent")}></slot></span>${endSlotTemplate(options)}</template>`;
|
|
5047
5048
|
}
|
|
5048
|
-
const template$
|
|
5049
|
+
const template$o = buttonTemplate$1();
|
|
5049
5050
|
|
|
5050
|
-
const definition$
|
|
5051
|
+
const definition$o = Button.compose({
|
|
5051
5052
|
name: `${FluentDesignSystem.prefix}-button`,
|
|
5052
|
-
template: template$
|
|
5053
|
-
styles: styles$
|
|
5053
|
+
template: template$o,
|
|
5054
|
+
styles: styles$n
|
|
5054
5055
|
});
|
|
5055
5056
|
|
|
5056
|
-
definition$
|
|
5057
|
+
definition$o.define(FluentDesignSystem.registry);
|
|
5057
5058
|
|
|
5058
5059
|
const proxySlotName = "form-associated-proxy";
|
|
5059
5060
|
const ElementInternalsKey = "ElementInternals";
|
|
@@ -5499,12 +5500,12 @@ class FormAssociatedCheckbox extends CheckableFormAssociated(_Checkbox) {
|
|
|
5499
5500
|
}
|
|
5500
5501
|
}
|
|
5501
5502
|
|
|
5502
|
-
var __defProp$
|
|
5503
|
-
var __getOwnPropDesc$
|
|
5504
|
-
var __decorateClass$
|
|
5505
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
5503
|
+
var __defProp$l = Object.defineProperty;
|
|
5504
|
+
var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
|
|
5505
|
+
var __decorateClass$l = (decorators, target, key, kind) => {
|
|
5506
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$l(target, key) : target;
|
|
5506
5507
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
5507
|
-
if (kind && result) __defProp$
|
|
5508
|
+
if (kind && result) __defProp$l(target, key, result);
|
|
5508
5509
|
return result;
|
|
5509
5510
|
};
|
|
5510
5511
|
class Checkbox extends FormAssociatedCheckbox {
|
|
@@ -5548,13 +5549,13 @@ class Checkbox extends FormAssociatedCheckbox {
|
|
|
5548
5549
|
this.checked = !this.checked;
|
|
5549
5550
|
}
|
|
5550
5551
|
}
|
|
5551
|
-
__decorateClass$
|
|
5552
|
-
__decorateClass$
|
|
5553
|
-
__decorateClass$
|
|
5552
|
+
__decorateClass$l([attr], Checkbox.prototype, "shape", 2);
|
|
5553
|
+
__decorateClass$l([attr], Checkbox.prototype, "size", 2);
|
|
5554
|
+
__decorateClass$l([attr({
|
|
5554
5555
|
attribute: "label-position"
|
|
5555
5556
|
})], Checkbox.prototype, "labelPosition", 2);
|
|
5556
|
-
__decorateClass$
|
|
5557
|
-
__decorateClass$
|
|
5557
|
+
__decorateClass$l([observable], Checkbox.prototype, "defaultSlottedNodes", 2);
|
|
5558
|
+
__decorateClass$l([observable], Checkbox.prototype, "indeterminate", 2);
|
|
5558
5559
|
|
|
5559
5560
|
const checkedIndicator = html.partial(`
|
|
5560
5561
|
<div class="checked-indicator">
|
|
@@ -5575,27 +5576,27 @@ const indeterminateIndicator = html.partial(`
|
|
|
5575
5576
|
function checkboxTemplate(options = {}) {
|
|
5576
5577
|
return html`<template role="checkbox" aria-checked="${x => x.indeterminate ? "mixed" : x.checked}" aria-required="${x => x.required}" aria-disabled="${x => x.disabled}" tabindex="${x => x.disabled ? null : 0}" @keypress="${(x, c) => x.keypressHandler(c.event)}" @click="${(x, c) => x.clickHandler(c.event)}"><div part="control" class="control"><slot name="checked-indicator">${staticallyCompose(options.checkedIndicator)}</slot><slot name="indeterminate-indicator">${staticallyCompose(options.indeterminateIndicator)}</slot></div><label part="label" class="${x => x.defaultSlottedNodes && x.defaultSlottedNodes.length ? "label" : "label label__hidden"}"><slot ${slotted("defaultSlottedNodes")}></slot></label></template>`;
|
|
5577
5578
|
}
|
|
5578
|
-
const template$
|
|
5579
|
+
const template$n = checkboxTemplate({
|
|
5579
5580
|
checkedIndicator,
|
|
5580
5581
|
indeterminateIndicator
|
|
5581
5582
|
});
|
|
5582
5583
|
|
|
5583
|
-
const styles$
|
|
5584
|
+
const styles$m = css`
|
|
5584
5585
|
${display("inline-flex")}
|
|
5585
5586
|
:host{align-items:center;outline:none;user-select:none;vertical-align:middle;cursor:pointer;font-family:${fontFamilyBase};font-size:${fontSizeBase300};line-height:${lineHeightBase300};color:${colorNeutralForeground3};position:relative}:host(:focus-visible)::after{content:'';position:absolute;inset:0px;cursor:pointer;border-radius:${borderRadiusMedium};outline:none;border:2px solid ${colorStrokeFocus1};box-shadow:inset 0 0 0 1px ${colorStrokeFocus2}}.control{position:relative;box-sizing:border-box;display:flex;flex-shrink:0;align-items:center;justify-content:center;overflow:hidden;margin:${spacingVerticalS} ${spacingHorizontalS};fill:currentcolor;height:16px;width:16px;border:${strokeWidthThin} solid ${colorNeutralStrokeAccessible};border-radius:${borderRadiusSmall};outline:none}.label{align-self:center;cursor:inherit;padding-inline:${spacingHorizontalS};padding-bottom:${spacingVerticalS};padding-top:${spacingVerticalS}}.label__hidden{display:none;visibility:hidden}.checked-indicator{display:flex;align-items:center;justify-content:center;color:${colorNeutralForegroundInverted};font-size:12px;margin:auto;opacity:0}.indeterminate-indicator{position:absolute;width:8px;height:8px;border-radius:${borderRadiusSmall};background-color:${colorCompoundBrandForeground1};opacity:0}:host(:hover){color:${colorNeutralForeground2}}:host(:hover) .control{border-color:${colorNeutralStrokeAccessibleHover}}:host(:hover) .indeterminate-indicator{background-color:${colorCompoundBrandForeground1Hover}}:host(:active) .control{border-color:${colorNeutralStrokeAccessiblePressed}}:host(:active) .indeterminate-indicator{background-color:${colorCompoundBrandForeground1Pressed}}:host([aria-checked='true']),:host([aria-checked='mixed']),:host(:active){color:${colorNeutralForeground1}}:host([aria-checked='true']) .control{background-color:${colorCompoundBrandBackground}}:host([aria-checked='true']:hover) .control{border-color:${colorCompoundBrandStrokeHover};background-color:${colorCompoundBrandBackgroundHover}}:host([aria-checked='true']:active) .control{background-color:${colorCompoundBrandBackgroundPressed}}:host([aria-checked='mixed']:hover) .control{border-color:${colorCompoundBrandStrokeHover}}:host([aria-checked='true']) .checked-indicator,:host([aria-checked='mixed']) .indeterminate-indicator{opacity:1}:host([aria-checked='true']) .control,:host([aria-checked='mixed']) .control{border-color:${colorCompoundBrandStroke}}:host([aria-checked='mixed']:active) .control,:host([aria-checked='true']:active) .control{border-color:${colorCompoundBrandStrokePressed}}:host([label-position='before']){flex-direction:row-reverse}:host([label-position='before']) .label{padding-inline:${spacingHorizontalS} ${spacingHorizontalXS};padding-top:${spacingVerticalS};padding-bottom:${spacingVerticalS}}:host([size='large']) .control{width:20px;height:20px}:host([size='large']) .checked-indicator{font-size:16px;height:20px}:host([aria-checked='mixed'][size='large']) .indeterminate-indicator{height:10px;width:10px}:host([shape='circular']) .control,:host([shape='circular']) .indeterminate-indicator{border-radius:${borderRadiusCircular}}:host([disabled]) .control,:host([aria-checked='mixed'][disabled]) .control,:host([aria-checked='true'][disabled]) .control{background-color:${colorTransparentBackgroundHover};border-color:${colorNeutralStrokeDisabled}}:host([aria-checked='true'][disabled]) .checked-indicator,:host([disabled]) ::slotted([slot='start']),:host([disabled]) .label,:host([aria-checked='mixed'][disabled]) .label,:host([aria-checked='true'][disabled]) .label{color:${colorNeutralForegroundDisabled}}:host([disabled]) .indeterminate-indicator{background-color:${colorNeutralForegroundDisabled}}`;
|
|
5586
5587
|
|
|
5587
|
-
const definition$
|
|
5588
|
+
const definition$n = Checkbox.compose({
|
|
5588
5589
|
name: `${FluentDesignSystem.prefix}-checkbox`,
|
|
5589
|
-
template: template$
|
|
5590
|
-
styles: styles$
|
|
5590
|
+
template: template$n,
|
|
5591
|
+
styles: styles$m
|
|
5591
5592
|
});
|
|
5592
5593
|
|
|
5593
|
-
definition$
|
|
5594
|
+
definition$n.define(FluentDesignSystem.registry);
|
|
5594
5595
|
|
|
5595
5596
|
class CompoundButton extends Button {}
|
|
5596
5597
|
|
|
5597
|
-
const styles$
|
|
5598
|
-
${styles$
|
|
5598
|
+
const styles$l = css`
|
|
5599
|
+
${styles$n}
|
|
5599
5600
|
|
|
5600
5601
|
:host,:host(:is([size])){gap:12px;height:auto;padding-top:14px;padding-inline:12px;padding-bottom:16px;font-size:${fontSizeBase300};line-height:${lineHeightBase300}}.content{display:flex;flex-direction:column;text-align:start}::slotted([slot='description']){color:${colorNeutralForeground2};line-height:100%;font-size:${fontSizeBase200};font-weight:${fontWeightRegular}}::slotted(svg),:host([size='large']) ::slotted(svg){font-size:40px;height:40px;width:40px}:host(:hover) ::slotted([slot='description']){color:${colorNeutralForeground2Hover}}:host(:active) ::slotted([slot='description']){color:${colorNeutralForeground2Pressed}}:host(:is([appearance='primary'],[appearance='primary']:hover,[appearance='primary']:active))
|
|
5601
5602
|
::slotted([slot='description']){color:${colorNeutralForegroundOnBrand}}:host(:is([appearance='subtle'],[appearance='subtle']:hover,[appearance='subtle']:active))
|
|
@@ -5605,22 +5606,22 @@ const styles$k = css`
|
|
|
5605
5606
|
function buttonTemplate(options = {}) {
|
|
5606
5607
|
return html`<template ?disabled="${x => x.disabled}" tabindex="${x => x.disabled ? -1 : 0}">${startSlotTemplate(options)}<span class="content" part="content"><slot ${slotted("defaultSlottedContent")}></slot><slot name="description"></slot></span>${endSlotTemplate(options)}</template>`;
|
|
5607
5608
|
}
|
|
5608
|
-
const template$
|
|
5609
|
+
const template$m = buttonTemplate();
|
|
5609
5610
|
|
|
5610
|
-
const definition$
|
|
5611
|
+
const definition$m = CompoundButton.compose({
|
|
5611
5612
|
name: `${FluentDesignSystem.prefix}-compound-button`,
|
|
5612
|
-
template: template$
|
|
5613
|
-
styles: styles$
|
|
5613
|
+
template: template$m,
|
|
5614
|
+
styles: styles$l
|
|
5614
5615
|
});
|
|
5615
5616
|
|
|
5616
|
-
definition$
|
|
5617
|
+
definition$m.define(FluentDesignSystem.registry);
|
|
5617
5618
|
|
|
5618
|
-
var __defProp$
|
|
5619
|
-
var __getOwnPropDesc$
|
|
5620
|
-
var __decorateClass$
|
|
5621
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
5619
|
+
var __defProp$k = Object.defineProperty;
|
|
5620
|
+
var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
|
|
5621
|
+
var __decorateClass$k = (decorators, target, key, kind) => {
|
|
5622
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$k(target, key) : target;
|
|
5622
5623
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
5623
|
-
if (kind && result) __defProp$
|
|
5624
|
+
if (kind && result) __defProp$k(target, key, result);
|
|
5624
5625
|
return result;
|
|
5625
5626
|
};
|
|
5626
5627
|
class CounterBadge extends FASTElement {
|
|
@@ -5651,27 +5652,27 @@ class CounterBadge extends FASTElement {
|
|
|
5651
5652
|
return;
|
|
5652
5653
|
}
|
|
5653
5654
|
}
|
|
5654
|
-
__decorateClass$
|
|
5655
|
-
__decorateClass$
|
|
5656
|
-
__decorateClass$
|
|
5657
|
-
__decorateClass$
|
|
5658
|
-
__decorateClass$
|
|
5655
|
+
__decorateClass$k([attr], CounterBadge.prototype, "appearance", 2);
|
|
5656
|
+
__decorateClass$k([attr], CounterBadge.prototype, "color", 2);
|
|
5657
|
+
__decorateClass$k([attr], CounterBadge.prototype, "shape", 2);
|
|
5658
|
+
__decorateClass$k([attr], CounterBadge.prototype, "size", 2);
|
|
5659
|
+
__decorateClass$k([attr({
|
|
5659
5660
|
converter: nullableNumberConverter
|
|
5660
5661
|
})], CounterBadge.prototype, "count", 2);
|
|
5661
|
-
__decorateClass$
|
|
5662
|
+
__decorateClass$k([attr({
|
|
5662
5663
|
attribute: "overflow-count",
|
|
5663
5664
|
converter: nullableNumberConverter
|
|
5664
5665
|
})], CounterBadge.prototype, "overflowCount", 2);
|
|
5665
|
-
__decorateClass$
|
|
5666
|
+
__decorateClass$k([attr({
|
|
5666
5667
|
attribute: "show-zero",
|
|
5667
5668
|
mode: "boolean"
|
|
5668
5669
|
})], CounterBadge.prototype, "showZero", 2);
|
|
5669
|
-
__decorateClass$
|
|
5670
|
+
__decorateClass$k([attr({
|
|
5670
5671
|
mode: "boolean"
|
|
5671
5672
|
})], CounterBadge.prototype, "dot", 2);
|
|
5672
5673
|
applyMixins(CounterBadge, StartEnd);
|
|
5673
5674
|
|
|
5674
|
-
const styles$
|
|
5675
|
+
const styles$k = css`
|
|
5675
5676
|
:host([shape='rounded']){border-radius:${borderRadiusMedium}}:host([shape='rounded'][size='tiny']),:host([shape='rounded'][size='extra-small']),:host([shape='rounded'][size='small']){border-radius:${borderRadiusSmall}}${badgeSizeStyles}
|
|
5676
5677
|
${badgeFilledStyles}
|
|
5677
5678
|
${badgeGhostStyles}
|
|
@@ -5684,707 +5685,135 @@ function composeTemplate(options = {}) {
|
|
|
5684
5685
|
defaultContent: html`${x => x.setCount()}`
|
|
5685
5686
|
});
|
|
5686
5687
|
}
|
|
5687
|
-
const template$
|
|
5688
|
+
const template$l = composeTemplate();
|
|
5688
5689
|
|
|
5689
|
-
const definition$
|
|
5690
|
+
const definition$l = CounterBadge.compose({
|
|
5690
5691
|
name: `${FluentDesignSystem.prefix}-counter-badge`,
|
|
5691
|
-
template: template$
|
|
5692
|
-
styles: styles$
|
|
5692
|
+
template: template$l,
|
|
5693
|
+
styles: styles$k
|
|
5693
5694
|
});
|
|
5694
5695
|
|
|
5695
|
-
definition$
|
|
5696
|
-
|
|
5697
|
-
/*!
|
|
5698
|
-
* tabbable 6.2.0
|
|
5699
|
-
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
5700
|
-
*/
|
|
5701
|
-
// NOTE: separate `:not()` selectors has broader browser support than the newer
|
|
5702
|
-
// `:not([inert], [inert] *)` (Feb 2023)
|
|
5703
|
-
// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes
|
|
5704
|
-
// the entire query to fail, resulting in no nodes found, which will break a lot
|
|
5705
|
-
// of things... so we have to rely on JS to identify nodes inside an inert container
|
|
5706
|
-
var candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable="false"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];
|
|
5707
|
-
var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
|
|
5708
|
-
var NoElement = typeof Element === 'undefined';
|
|
5709
|
-
var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
|
5710
|
-
var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
|
|
5711
|
-
var _element$getRootNode;
|
|
5712
|
-
return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);
|
|
5713
|
-
} : function (element) {
|
|
5714
|
-
return element === null || element === void 0 ? void 0 : element.ownerDocument;
|
|
5715
|
-
};
|
|
5716
|
-
|
|
5717
|
-
/**
|
|
5718
|
-
* Determines if a node is inert or in an inert ancestor.
|
|
5719
|
-
* @param {Element} [node]
|
|
5720
|
-
* @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to
|
|
5721
|
-
* see if any of them are inert. If false, only `node` itself is considered.
|
|
5722
|
-
* @returns {boolean} True if inert itself or by way of being in an inert ancestor.
|
|
5723
|
-
* False if `node` is falsy.
|
|
5724
|
-
*/
|
|
5725
|
-
var isInert = function isInert(node, lookUp) {
|
|
5726
|
-
var _node$getAttribute;
|
|
5727
|
-
if (lookUp === void 0) {
|
|
5728
|
-
lookUp = true;
|
|
5729
|
-
}
|
|
5730
|
-
// CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`
|
|
5731
|
-
// JS API property; we have to check the attribute, which can either be empty or 'true';
|
|
5732
|
-
// if it's `null` (not specified) or 'false', it's an active element
|
|
5733
|
-
var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');
|
|
5734
|
-
var inert = inertAtt === '' || inertAtt === 'true';
|
|
5735
|
-
|
|
5736
|
-
// NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`
|
|
5737
|
-
// if it weren't for `matches()` not being a function on shadow roots; the following
|
|
5738
|
-
// code works for any kind of node
|
|
5739
|
-
// CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`
|
|
5740
|
-
// so it likely would not support `:is([inert] *)` either...
|
|
5741
|
-
var result = inert || lookUp && node && isInert(node.parentNode); // recursive
|
|
5742
|
-
|
|
5743
|
-
return result;
|
|
5744
|
-
};
|
|
5745
|
-
|
|
5746
|
-
/**
|
|
5747
|
-
* Determines if a node's content is editable.
|
|
5748
|
-
* @param {Element} [node]
|
|
5749
|
-
* @returns True if it's content-editable; false if it's not or `node` is falsy.
|
|
5750
|
-
*/
|
|
5751
|
-
var isContentEditable = function isContentEditable(node) {
|
|
5752
|
-
var _node$getAttribute2;
|
|
5753
|
-
// CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have
|
|
5754
|
-
// to use the attribute directly to check for this, which can either be empty or 'true';
|
|
5755
|
-
// if it's `null` (not specified) or 'false', it's a non-editable element
|
|
5756
|
-
var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');
|
|
5757
|
-
return attValue === '' || attValue === 'true';
|
|
5758
|
-
};
|
|
5759
|
-
|
|
5760
|
-
/**
|
|
5761
|
-
* @private
|
|
5762
|
-
* Determines if the node has an explicitly specified `tabindex` attribute.
|
|
5763
|
-
* @param {HTMLElement} node
|
|
5764
|
-
* @returns {boolean} True if so; false if not.
|
|
5765
|
-
*/
|
|
5766
|
-
var hasTabIndex = function hasTabIndex(node) {
|
|
5767
|
-
return !isNaN(parseInt(node.getAttribute('tabindex'), 10));
|
|
5768
|
-
};
|
|
5769
|
-
|
|
5770
|
-
/**
|
|
5771
|
-
* Determine the tab index of a given node.
|
|
5772
|
-
* @param {HTMLElement} node
|
|
5773
|
-
* @returns {number} Tab order (negative, 0, or positive number).
|
|
5774
|
-
* @throws {Error} If `node` is falsy.
|
|
5775
|
-
*/
|
|
5776
|
-
var getTabIndex = function getTabIndex(node) {
|
|
5777
|
-
if (!node) {
|
|
5778
|
-
throw new Error('No node provided');
|
|
5779
|
-
}
|
|
5780
|
-
if (node.tabIndex < 0) {
|
|
5781
|
-
// in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
|
|
5782
|
-
// `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
|
|
5783
|
-
// yet they are still part of the regular tab order; in FF, they get a default
|
|
5784
|
-
// `tabIndex` of 0; since Chrome still puts those elements in the regular tab
|
|
5785
|
-
// order, consider their tab index to be 0.
|
|
5786
|
-
// Also browsers do not return `tabIndex` correctly for contentEditable nodes;
|
|
5787
|
-
// so if they don't have a tabindex attribute specifically set, assume it's 0.
|
|
5788
|
-
if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {
|
|
5789
|
-
return 0;
|
|
5790
|
-
}
|
|
5791
|
-
}
|
|
5792
|
-
return node.tabIndex;
|
|
5793
|
-
};
|
|
5794
|
-
var isInput = function isInput(node) {
|
|
5795
|
-
return node.tagName === 'INPUT';
|
|
5796
|
-
};
|
|
5797
|
-
var isHiddenInput = function isHiddenInput(node) {
|
|
5798
|
-
return isInput(node) && node.type === 'hidden';
|
|
5799
|
-
};
|
|
5800
|
-
var isDetailsWithSummary = function isDetailsWithSummary(node) {
|
|
5801
|
-
var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {
|
|
5802
|
-
return child.tagName === 'SUMMARY';
|
|
5803
|
-
});
|
|
5804
|
-
return r;
|
|
5805
|
-
};
|
|
5806
|
-
var getCheckedRadio = function getCheckedRadio(nodes, form) {
|
|
5807
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
5808
|
-
if (nodes[i].checked && nodes[i].form === form) {
|
|
5809
|
-
return nodes[i];
|
|
5810
|
-
}
|
|
5811
|
-
}
|
|
5812
|
-
};
|
|
5813
|
-
var isTabbableRadio = function isTabbableRadio(node) {
|
|
5814
|
-
if (!node.name) {
|
|
5815
|
-
return true;
|
|
5816
|
-
}
|
|
5817
|
-
var radioScope = node.form || getRootNode(node);
|
|
5818
|
-
var queryRadios = function queryRadios(name) {
|
|
5819
|
-
return radioScope.querySelectorAll('input[type="radio"][name="' + name + '"]');
|
|
5820
|
-
};
|
|
5821
|
-
var radioSet;
|
|
5822
|
-
if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {
|
|
5823
|
-
radioSet = queryRadios(window.CSS.escape(node.name));
|
|
5824
|
-
} else {
|
|
5825
|
-
try {
|
|
5826
|
-
radioSet = queryRadios(node.name);
|
|
5827
|
-
} catch (err) {
|
|
5828
|
-
// eslint-disable-next-line no-console
|
|
5829
|
-
console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);
|
|
5830
|
-
return false;
|
|
5831
|
-
}
|
|
5832
|
-
}
|
|
5833
|
-
var checked = getCheckedRadio(radioSet, node.form);
|
|
5834
|
-
return !checked || checked === node;
|
|
5835
|
-
};
|
|
5836
|
-
var isRadio = function isRadio(node) {
|
|
5837
|
-
return isInput(node) && node.type === 'radio';
|
|
5838
|
-
};
|
|
5839
|
-
var isNonTabbableRadio = function isNonTabbableRadio(node) {
|
|
5840
|
-
return isRadio(node) && !isTabbableRadio(node);
|
|
5841
|
-
};
|
|
5842
|
-
|
|
5843
|
-
// determines if a node is ultimately attached to the window's document
|
|
5844
|
-
var isNodeAttached = function isNodeAttached(node) {
|
|
5845
|
-
var _nodeRoot;
|
|
5846
|
-
// The root node is the shadow root if the node is in a shadow DOM; some document otherwise
|
|
5847
|
-
// (but NOT _the_ document; see second 'If' comment below for more).
|
|
5848
|
-
// If rootNode is shadow root, it'll have a host, which is the element to which the shadow
|
|
5849
|
-
// is attached, and the one we need to check if it's in the document or not (because the
|
|
5850
|
-
// shadow, and all nodes it contains, is never considered in the document since shadows
|
|
5851
|
-
// behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,
|
|
5852
|
-
// is hidden, or is not in the document itself but is detached, it will affect the shadow's
|
|
5853
|
-
// visibility, including all the nodes it contains). The host could be any normal node,
|
|
5854
|
-
// or a custom element (i.e. web component). Either way, that's the one that is considered
|
|
5855
|
-
// part of the document, not the shadow root, nor any of its children (i.e. the node being
|
|
5856
|
-
// tested).
|
|
5857
|
-
// To further complicate things, we have to look all the way up until we find a shadow HOST
|
|
5858
|
-
// that is attached (or find none) because the node might be in nested shadows...
|
|
5859
|
-
// If rootNode is not a shadow root, it won't have a host, and so rootNode should be the
|
|
5860
|
-
// document (per the docs) and while it's a Document-type object, that document does not
|
|
5861
|
-
// appear to be the same as the node's `ownerDocument` for some reason, so it's safer
|
|
5862
|
-
// to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,
|
|
5863
|
-
// using `rootNode.contains(node)` will _always_ be true we'll get false-positives when
|
|
5864
|
-
// node is actually detached.
|
|
5865
|
-
// NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible
|
|
5866
|
-
// if a tabbable/focusable node was quickly added to the DOM, focused, and then removed
|
|
5867
|
-
// from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then
|
|
5868
|
-
// `ownerDocument` will be `null`, hence the optional chaining on it.
|
|
5869
|
-
var nodeRoot = node && getRootNode(node);
|
|
5870
|
-
var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;
|
|
5871
|
-
|
|
5872
|
-
// in some cases, a detached node will return itself as the root instead of a document or
|
|
5873
|
-
// shadow root object, in which case, we shouldn't try to look further up the host chain
|
|
5874
|
-
var attached = false;
|
|
5875
|
-
if (nodeRoot && nodeRoot !== node) {
|
|
5876
|
-
var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;
|
|
5877
|
-
attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));
|
|
5878
|
-
while (!attached && nodeRootHost) {
|
|
5879
|
-
var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;
|
|
5880
|
-
// since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,
|
|
5881
|
-
// which means we need to get the host's host and check if that parent host is contained
|
|
5882
|
-
// in (i.e. attached to) the document
|
|
5883
|
-
nodeRoot = getRootNode(nodeRootHost);
|
|
5884
|
-
nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;
|
|
5885
|
-
attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));
|
|
5886
|
-
}
|
|
5887
|
-
}
|
|
5888
|
-
return attached;
|
|
5889
|
-
};
|
|
5890
|
-
var isZeroArea = function isZeroArea(node) {
|
|
5891
|
-
var _node$getBoundingClie = node.getBoundingClientRect(),
|
|
5892
|
-
width = _node$getBoundingClie.width,
|
|
5893
|
-
height = _node$getBoundingClie.height;
|
|
5894
|
-
return width === 0 && height === 0;
|
|
5895
|
-
};
|
|
5896
|
-
var isHidden = function isHidden(node, _ref) {
|
|
5897
|
-
var displayCheck = _ref.displayCheck,
|
|
5898
|
-
getShadowRoot = _ref.getShadowRoot;
|
|
5899
|
-
// NOTE: visibility will be `undefined` if node is detached from the document
|
|
5900
|
-
// (see notes about this further down), which means we will consider it visible
|
|
5901
|
-
// (this is legacy behavior from a very long way back)
|
|
5902
|
-
// NOTE: we check this regardless of `displayCheck="none"` because this is a
|
|
5903
|
-
// _visibility_ check, not a _display_ check
|
|
5904
|
-
if (getComputedStyle(node).visibility === 'hidden') {
|
|
5905
|
-
return true;
|
|
5906
|
-
}
|
|
5907
|
-
var isDirectSummary = matches.call(node, 'details>summary:first-of-type');
|
|
5908
|
-
var nodeUnderDetails = isDirectSummary ? node.parentElement : node;
|
|
5909
|
-
if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {
|
|
5910
|
-
return true;
|
|
5911
|
-
}
|
|
5912
|
-
if (!displayCheck || displayCheck === 'full' || displayCheck === 'legacy-full') {
|
|
5913
|
-
if (typeof getShadowRoot === 'function') {
|
|
5914
|
-
// figure out if we should consider the node to be in an undisclosed shadow and use the
|
|
5915
|
-
// 'non-zero-area' fallback
|
|
5916
|
-
var originalNode = node;
|
|
5917
|
-
while (node) {
|
|
5918
|
-
var parentElement = node.parentElement;
|
|
5919
|
-
var rootNode = getRootNode(node);
|
|
5920
|
-
if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow
|
|
5921
|
-
) {
|
|
5922
|
-
// node has an undisclosed shadow which means we can only treat it as a black box, so we
|
|
5923
|
-
// fall back to a non-zero-area test
|
|
5924
|
-
return isZeroArea(node);
|
|
5925
|
-
} else if (node.assignedSlot) {
|
|
5926
|
-
// iterate up slot
|
|
5927
|
-
node = node.assignedSlot;
|
|
5928
|
-
} else if (!parentElement && rootNode !== node.ownerDocument) {
|
|
5929
|
-
// cross shadow boundary
|
|
5930
|
-
node = rootNode.host;
|
|
5931
|
-
} else {
|
|
5932
|
-
// iterate up normal dom
|
|
5933
|
-
node = parentElement;
|
|
5934
|
-
}
|
|
5935
|
-
}
|
|
5936
|
-
node = originalNode;
|
|
5937
|
-
}
|
|
5938
|
-
// else, `getShadowRoot` might be true, but all that does is enable shadow DOM support
|
|
5939
|
-
// (i.e. it does not also presume that all nodes might have undisclosed shadows); or
|
|
5940
|
-
// it might be a falsy value, which means shadow DOM support is disabled
|
|
5941
|
-
|
|
5942
|
-
// Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)
|
|
5943
|
-
// now we can just test to see if it would normally be visible or not, provided it's
|
|
5944
|
-
// attached to the main document.
|
|
5945
|
-
// NOTE: We must consider case where node is inside a shadow DOM and given directly to
|
|
5946
|
-
// `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.
|
|
5947
|
-
|
|
5948
|
-
if (isNodeAttached(node)) {
|
|
5949
|
-
// this works wherever the node is: if there's at least one client rect, it's
|
|
5950
|
-
// somehow displayed; it also covers the CSS 'display: contents' case where the
|
|
5951
|
-
// node itself is hidden in place of its contents; and there's no need to search
|
|
5952
|
-
// up the hierarchy either
|
|
5953
|
-
return !node.getClientRects().length;
|
|
5954
|
-
}
|
|
5955
|
-
|
|
5956
|
-
// Else, the node isn't attached to the document, which means the `getClientRects()`
|
|
5957
|
-
// API will __always__ return zero rects (this can happen, for example, if React
|
|
5958
|
-
// is used to render nodes onto a detached tree, as confirmed in this thread:
|
|
5959
|
-
// https://github.com/facebook/react/issues/9117#issuecomment-284228870)
|
|
5960
|
-
//
|
|
5961
|
-
// It also means that even window.getComputedStyle(node).display will return `undefined`
|
|
5962
|
-
// because styles are only computed for nodes that are in the document.
|
|
5963
|
-
//
|
|
5964
|
-
// NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable
|
|
5965
|
-
// somehow. Though it was never stated officially, anyone who has ever used tabbable
|
|
5966
|
-
// APIs on nodes in detached containers has actually implicitly used tabbable in what
|
|
5967
|
-
// was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck="none"` mode -- essentially
|
|
5968
|
-
// considering __everything__ to be visible because of the innability to determine styles.
|
|
5969
|
-
//
|
|
5970
|
-
// v6.0.0: As of this major release, the default 'full' option __no longer treats detached
|
|
5971
|
-
// nodes as visible with the 'none' fallback.__
|
|
5972
|
-
if (displayCheck !== 'legacy-full') {
|
|
5973
|
-
return true; // hidden
|
|
5974
|
-
}
|
|
5975
|
-
// else, fallback to 'none' mode and consider the node visible
|
|
5976
|
-
} else if (displayCheck === 'non-zero-area') {
|
|
5977
|
-
// NOTE: Even though this tests that the node's client rect is non-zero to determine
|
|
5978
|
-
// whether it's displayed, and that a detached node will __always__ have a zero-area
|
|
5979
|
-
// client rect, we don't special-case for whether the node is attached or not. In
|
|
5980
|
-
// this mode, we do want to consider nodes that have a zero area to be hidden at all
|
|
5981
|
-
// times, and that includes attached or not.
|
|
5982
|
-
return isZeroArea(node);
|
|
5983
|
-
}
|
|
5984
|
-
|
|
5985
|
-
// visible, as far as we can tell, or per current `displayCheck=none` mode, we assume
|
|
5986
|
-
// it's visible
|
|
5987
|
-
return false;
|
|
5988
|
-
};
|
|
5989
|
-
|
|
5990
|
-
// form fields (nested) inside a disabled fieldset are not focusable/tabbable
|
|
5991
|
-
// unless they are in the _first_ <legend> element of the top-most disabled
|
|
5992
|
-
// fieldset
|
|
5993
|
-
var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
|
|
5994
|
-
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {
|
|
5995
|
-
var parentNode = node.parentElement;
|
|
5996
|
-
// check if `node` is contained in a disabled <fieldset>
|
|
5997
|
-
while (parentNode) {
|
|
5998
|
-
if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {
|
|
5999
|
-
// look for the first <legend> among the children of the disabled <fieldset>
|
|
6000
|
-
for (var i = 0; i < parentNode.children.length; i++) {
|
|
6001
|
-
var child = parentNode.children.item(i);
|
|
6002
|
-
// when the first <legend> (in document order) is found
|
|
6003
|
-
if (child.tagName === 'LEGEND') {
|
|
6004
|
-
// if its parent <fieldset> is not nested in another disabled <fieldset>,
|
|
6005
|
-
// return whether `node` is a descendant of its first <legend>
|
|
6006
|
-
return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);
|
|
6007
|
-
}
|
|
6008
|
-
}
|
|
6009
|
-
// the disabled <fieldset> containing `node` has no <legend>
|
|
6010
|
-
return true;
|
|
6011
|
-
}
|
|
6012
|
-
parentNode = parentNode.parentElement;
|
|
6013
|
-
}
|
|
6014
|
-
}
|
|
6015
|
-
|
|
6016
|
-
// else, node's tabbable/focusable state should not be affected by a fieldset's
|
|
6017
|
-
// enabled/disabled state
|
|
6018
|
-
return false;
|
|
6019
|
-
};
|
|
6020
|
-
var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
|
|
6021
|
-
if (node.disabled ||
|
|
6022
|
-
// we must do an inert look up to filter out any elements inside an inert ancestor
|
|
6023
|
-
// because we're limited in the type of selectors we can use in JSDom (see related
|
|
6024
|
-
// note related to `candidateSelectors`)
|
|
6025
|
-
isInert(node) || isHiddenInput(node) || isHidden(node, options) ||
|
|
6026
|
-
// For a details element with a summary, the summary element gets the focus
|
|
6027
|
-
isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
|
|
6028
|
-
return false;
|
|
6029
|
-
}
|
|
6030
|
-
return true;
|
|
6031
|
-
};
|
|
6032
|
-
var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
|
|
6033
|
-
if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
|
|
6034
|
-
return false;
|
|
6035
|
-
}
|
|
6036
|
-
return true;
|
|
6037
|
-
};
|
|
6038
|
-
var isTabbable = function isTabbable(node, options) {
|
|
6039
|
-
options = options || {};
|
|
6040
|
-
if (!node) {
|
|
6041
|
-
throw new Error('No node provided');
|
|
6042
|
-
}
|
|
6043
|
-
if (matches.call(node, candidateSelector) === false) {
|
|
6044
|
-
return false;
|
|
6045
|
-
}
|
|
6046
|
-
return isNodeMatchingSelectorTabbable(options, node);
|
|
6047
|
-
};
|
|
5696
|
+
definition$l.define(FluentDesignSystem.registry);
|
|
6048
5697
|
|
|
6049
|
-
const
|
|
5698
|
+
const DialogType = {
|
|
6050
5699
|
modal: "modal",
|
|
6051
5700
|
nonModal: "non-modal",
|
|
6052
5701
|
alert: "alert"
|
|
6053
5702
|
};
|
|
6054
5703
|
|
|
6055
|
-
var __defProp$
|
|
6056
|
-
var __getOwnPropDesc$
|
|
6057
|
-
var __decorateClass$
|
|
6058
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
5704
|
+
var __defProp$j = Object.defineProperty;
|
|
5705
|
+
var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
|
|
5706
|
+
var __decorateClass$j = (decorators, target, key, kind) => {
|
|
5707
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$j(target, key) : target;
|
|
6059
5708
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6060
|
-
if (kind && result) __defProp$
|
|
5709
|
+
if (kind && result) __defProp$j(target, key, result);
|
|
6061
5710
|
return result;
|
|
6062
5711
|
};
|
|
6063
|
-
|
|
5712
|
+
class Dialog extends FASTElement {
|
|
6064
5713
|
constructor() {
|
|
6065
5714
|
super(...arguments);
|
|
6066
|
-
|
|
6067
|
-
* @internal
|
|
6068
|
-
* Indicates whether focus is being trapped within the dialog
|
|
6069
|
-
*/
|
|
6070
|
-
this.isTrappingFocus = false;
|
|
6071
|
-
this.titleAction = [];
|
|
6072
|
-
this.modalType = DialogModalType.modal;
|
|
6073
|
-
this.open = false;
|
|
6074
|
-
this.noTitleAction = false;
|
|
6075
|
-
/**
|
|
6076
|
-
* @internal
|
|
6077
|
-
* Indicates whether focus should be trapped within the dialog
|
|
6078
|
-
*/
|
|
6079
|
-
this.trapFocus = false;
|
|
5715
|
+
this.type = DialogType.modal;
|
|
6080
5716
|
/**
|
|
6081
5717
|
* @public
|
|
6082
|
-
* Method to emit an event
|
|
6083
|
-
*
|
|
5718
|
+
* Method to emit an event before the dialog's open state changes
|
|
5719
|
+
* HTML spec proposal: https://github.com/whatwg/html/issues/9733
|
|
6084
5720
|
*/
|
|
6085
|
-
this.
|
|
6086
|
-
this.$emit("
|
|
6087
|
-
|
|
6088
|
-
|
|
5721
|
+
this.emitBeforeToggle = () => {
|
|
5722
|
+
this.$emit("beforetoggle", {
|
|
5723
|
+
oldState: this.dialog.open ? "open" : "closed",
|
|
5724
|
+
newState: this.dialog.open ? "closed" : "open"
|
|
6089
5725
|
});
|
|
6090
5726
|
};
|
|
6091
5727
|
/**
|
|
6092
5728
|
* @public
|
|
6093
|
-
*
|
|
6094
|
-
*
|
|
6095
|
-
* @returns boolean | void
|
|
6096
|
-
*/
|
|
6097
|
-
this.handleKeydown = e => {
|
|
6098
|
-
if (e.defaultPrevented) {
|
|
6099
|
-
return;
|
|
6100
|
-
}
|
|
6101
|
-
switch (e.key) {
|
|
6102
|
-
case keyEscape:
|
|
6103
|
-
if (this.modalType !== DialogModalType.alert) {
|
|
6104
|
-
this.hide(true);
|
|
6105
|
-
this.$emit("dismiss");
|
|
6106
|
-
}
|
|
6107
|
-
break;
|
|
6108
|
-
default:
|
|
6109
|
-
return true;
|
|
6110
|
-
}
|
|
6111
|
-
};
|
|
6112
|
-
/**
|
|
6113
|
-
* @internal
|
|
6114
|
-
* Handles keydown events on the document
|
|
6115
|
-
* @param e - The keydown event
|
|
6116
|
-
*/
|
|
6117
|
-
this.handleDocumentKeydown = e => {
|
|
6118
|
-
if (!e.defaultPrevented && this.dialog.open) {
|
|
6119
|
-
switch (e.key) {
|
|
6120
|
-
case keyTab:
|
|
6121
|
-
this.handleTabKeyDown(e);
|
|
6122
|
-
break;
|
|
6123
|
-
}
|
|
6124
|
-
}
|
|
6125
|
-
};
|
|
6126
|
-
/**
|
|
6127
|
-
* @internal
|
|
6128
|
-
* Handles tab keydown events
|
|
6129
|
-
* @param e - The keydown event
|
|
6130
|
-
*/
|
|
6131
|
-
this.handleTabKeyDown = e => {
|
|
6132
|
-
if (!this.trapFocus || !this.dialog.open) {
|
|
6133
|
-
return;
|
|
6134
|
-
}
|
|
6135
|
-
const bounds = this.getTabQueueBounds();
|
|
6136
|
-
if (bounds.length === 1) {
|
|
6137
|
-
bounds[0].focus();
|
|
6138
|
-
e.preventDefault();
|
|
6139
|
-
return;
|
|
6140
|
-
}
|
|
6141
|
-
if (e.shiftKey && e.target === bounds[0]) {
|
|
6142
|
-
bounds[bounds.length - 1].focus();
|
|
6143
|
-
e.preventDefault();
|
|
6144
|
-
} else if (!e.shiftKey && e.target === bounds[bounds.length - 1]) {
|
|
6145
|
-
bounds[0].focus();
|
|
6146
|
-
e.preventDefault();
|
|
6147
|
-
}
|
|
6148
|
-
return;
|
|
6149
|
-
};
|
|
6150
|
-
/**
|
|
6151
|
-
* @internal
|
|
6152
|
-
* Gets the bounds of the tab queue
|
|
6153
|
-
* @returns (HTMLElement | SVGElement)[]
|
|
6154
|
-
*/
|
|
6155
|
-
this.getTabQueueBounds = () => {
|
|
6156
|
-
const bounds = [];
|
|
6157
|
-
return _Dialog.reduceTabbableItems(bounds, this);
|
|
6158
|
-
};
|
|
6159
|
-
/**
|
|
6160
|
-
* @internal
|
|
6161
|
-
* Focuses the first element in the tab queue
|
|
6162
|
-
*/
|
|
6163
|
-
this.focusFirstElement = () => {
|
|
6164
|
-
const bounds = this.getTabQueueBounds();
|
|
6165
|
-
if (bounds.length > 0) {
|
|
6166
|
-
bounds[0].focus();
|
|
6167
|
-
} else {
|
|
6168
|
-
if (this.dialog instanceof HTMLElement) {
|
|
6169
|
-
this.dialog.focus();
|
|
6170
|
-
}
|
|
6171
|
-
}
|
|
6172
|
-
};
|
|
6173
|
-
/**
|
|
6174
|
-
* @internal
|
|
6175
|
-
* Determines if focus should be forced
|
|
6176
|
-
* @param currentFocusElement - The currently focused element
|
|
6177
|
-
* @returns boolean
|
|
5729
|
+
* Method to emit an event after the dialog's open state changes
|
|
5730
|
+
* HTML spec proposal: https://github.com/whatwg/html/issues/9733
|
|
6178
5731
|
*/
|
|
6179
|
-
this.
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
* Determines if focus should be trapped
|
|
6185
|
-
* @returns boolean
|
|
6186
|
-
*/
|
|
6187
|
-
this.shouldTrapFocus = () => {
|
|
6188
|
-
return this.trapFocus && this.dialog.open;
|
|
6189
|
-
};
|
|
6190
|
-
/**
|
|
6191
|
-
* @internal
|
|
6192
|
-
* Handles focus events on the document
|
|
6193
|
-
* @param e - The focus event
|
|
6194
|
-
*/
|
|
6195
|
-
this.handleDocumentFocus = e => {
|
|
6196
|
-
if (!e.defaultPrevented && this.shouldForceFocus(e.target)) {
|
|
6197
|
-
this.focusFirstElement();
|
|
6198
|
-
e.preventDefault();
|
|
6199
|
-
}
|
|
6200
|
-
};
|
|
6201
|
-
/**
|
|
6202
|
-
* @internal
|
|
6203
|
-
* Updates the state of focus trapping
|
|
6204
|
-
* @param shouldTrapFocusOverride - Optional override for whether focus should be trapped
|
|
6205
|
-
*/
|
|
6206
|
-
this.updateTrapFocus = shouldTrapFocusOverride => {
|
|
6207
|
-
const shouldTrapFocus = shouldTrapFocusOverride === void 0 ? this.shouldTrapFocus() : shouldTrapFocusOverride;
|
|
6208
|
-
if (shouldTrapFocus && !this.isTrappingFocus) {
|
|
6209
|
-
this.isTrappingFocus = true;
|
|
6210
|
-
document.addEventListener("focusin", this.handleDocumentFocus);
|
|
6211
|
-
Updates.enqueue(() => {
|
|
6212
|
-
if (this.shouldForceFocus(document.activeElement)) {
|
|
6213
|
-
this.focusFirstElement();
|
|
6214
|
-
}
|
|
6215
|
-
});
|
|
6216
|
-
} else if (!shouldTrapFocus && this.isTrappingFocus) {
|
|
6217
|
-
this.isTrappingFocus = false;
|
|
6218
|
-
document.removeEventListener("focusin", this.handleDocumentFocus);
|
|
6219
|
-
}
|
|
5732
|
+
this.emitToggle = () => {
|
|
5733
|
+
this.$emit("toggle", {
|
|
5734
|
+
oldState: this.dialog.open ? "closed" : "open",
|
|
5735
|
+
newState: this.dialog.open ? "open" : "closed"
|
|
5736
|
+
});
|
|
6220
5737
|
};
|
|
6221
5738
|
}
|
|
6222
|
-
/**
|
|
6223
|
-
* @public
|
|
6224
|
-
* Lifecycle method called when the element is connected to the DOM
|
|
6225
|
-
*/
|
|
6226
|
-
connectedCallback() {
|
|
6227
|
-
super.connectedCallback();
|
|
6228
|
-
document.addEventListener("keydown", this.handleDocumentKeydown);
|
|
6229
|
-
Updates.enqueue(() => {
|
|
6230
|
-
this.updateTrapFocus();
|
|
6231
|
-
this.setComponent();
|
|
6232
|
-
});
|
|
6233
|
-
}
|
|
6234
|
-
/**
|
|
6235
|
-
* @public
|
|
6236
|
-
* Lifecycle method called when the element is disconnected from the DOM
|
|
6237
|
-
*/
|
|
6238
|
-
disconnectedCallback() {
|
|
6239
|
-
super.disconnectedCallback();
|
|
6240
|
-
document.removeEventListener("keydown", this.handleDocumentKeydown);
|
|
6241
|
-
this.updateTrapFocus(false);
|
|
6242
|
-
}
|
|
6243
|
-
/**
|
|
6244
|
-
* @public
|
|
6245
|
-
* Method called when the 'open' attribute changes
|
|
6246
|
-
*/
|
|
6247
|
-
openChanged(oldValue, newValue) {
|
|
6248
|
-
if (newValue !== oldValue) {
|
|
6249
|
-
if (newValue && !oldValue) {
|
|
6250
|
-
this.show();
|
|
6251
|
-
} else if (!newValue && oldValue) {
|
|
6252
|
-
this.hide();
|
|
6253
|
-
}
|
|
6254
|
-
}
|
|
6255
|
-
}
|
|
6256
|
-
/**
|
|
6257
|
-
* @public
|
|
6258
|
-
* Method called when the 'modalType' attribute changes
|
|
6259
|
-
*/
|
|
6260
|
-
modalTypeChanged(oldValue, newValue) {
|
|
6261
|
-
if (newValue !== oldValue) {
|
|
6262
|
-
if (newValue == DialogModalType.alert || newValue == DialogModalType.modal) {
|
|
6263
|
-
this.trapFocus = true;
|
|
6264
|
-
} else {
|
|
6265
|
-
this.trapFocus = false;
|
|
6266
|
-
}
|
|
6267
|
-
}
|
|
6268
|
-
}
|
|
6269
|
-
/**
|
|
6270
|
-
* @public
|
|
6271
|
-
* Method to set the component's state based on its attributes
|
|
6272
|
-
*/
|
|
6273
|
-
setComponent() {
|
|
6274
|
-
if (this.modalType == DialogModalType.modal || this.modalType == DialogModalType.alert) {
|
|
6275
|
-
this.trapFocus = true;
|
|
6276
|
-
} else {
|
|
6277
|
-
this.trapFocus = false;
|
|
6278
|
-
}
|
|
6279
|
-
}
|
|
6280
5739
|
/**
|
|
6281
5740
|
* @public
|
|
6282
5741
|
* Method to show the dialog
|
|
6283
5742
|
*/
|
|
6284
5743
|
show() {
|
|
6285
5744
|
Updates.enqueue(() => {
|
|
6286
|
-
|
|
5745
|
+
this.emitBeforeToggle();
|
|
5746
|
+
if (this.type === DialogType.alert || this.type === DialogType.modal) {
|
|
6287
5747
|
this.dialog.showModal();
|
|
6288
|
-
|
|
6289
|
-
this.updateTrapFocus(true);
|
|
6290
|
-
} else if (this.modalType === DialogModalType.nonModal) {
|
|
5748
|
+
} else if (this.type === DialogType.nonModal) {
|
|
6291
5749
|
this.dialog.show();
|
|
6292
|
-
this.open = true;
|
|
6293
5750
|
}
|
|
6294
|
-
this.
|
|
5751
|
+
this.emitToggle();
|
|
6295
5752
|
});
|
|
6296
5753
|
}
|
|
6297
5754
|
/**
|
|
6298
5755
|
* @public
|
|
6299
5756
|
* Method to hide the dialog
|
|
6300
|
-
* @param dismissed - Indicates whether the dialog was dismissed
|
|
6301
5757
|
*/
|
|
6302
|
-
hide(
|
|
5758
|
+
hide() {
|
|
5759
|
+
this.emitBeforeToggle();
|
|
6303
5760
|
this.dialog.close();
|
|
6304
|
-
this.
|
|
6305
|
-
this.onOpenChangeEvent(dismissed);
|
|
5761
|
+
this.emitToggle();
|
|
6306
5762
|
}
|
|
6307
5763
|
/**
|
|
6308
5764
|
* @public
|
|
6309
|
-
*
|
|
6310
|
-
*/
|
|
6311
|
-
dismiss() {
|
|
6312
|
-
if (this.modalType === DialogModalType.alert) {
|
|
6313
|
-
return;
|
|
6314
|
-
}
|
|
6315
|
-
this.hide(true);
|
|
6316
|
-
}
|
|
6317
|
-
/**
|
|
6318
|
-
* @public
|
|
6319
|
-
* Handles click events on the dialog
|
|
5765
|
+
* Handles click events on the dialog overlay for light-dismiss
|
|
6320
5766
|
* @param event - The click event
|
|
6321
5767
|
* @returns boolean
|
|
6322
5768
|
*/
|
|
6323
|
-
|
|
5769
|
+
clickHandler(event) {
|
|
6324
5770
|
event.preventDefault();
|
|
6325
|
-
if (this.dialog.open && this.
|
|
6326
|
-
this.
|
|
5771
|
+
if (this.dialog.open && this.type !== DialogType.alert && event.target === this.dialog) {
|
|
5772
|
+
this.hide();
|
|
6327
5773
|
}
|
|
6328
5774
|
return true;
|
|
6329
5775
|
}
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
* @param elements - The current list of elements
|
|
6334
|
-
* @param element - The element to consider adding to the list
|
|
6335
|
-
* @returns HTMLElement[]
|
|
6336
|
-
*/
|
|
6337
|
-
static reduceTabbableItems(elements, element) {
|
|
6338
|
-
if (element.getAttribute("tabindex") === "-1") {
|
|
6339
|
-
return elements;
|
|
6340
|
-
}
|
|
6341
|
-
if (isTabbable(element) || _Dialog.isFocusableFastElement(element) && _Dialog.hasTabbableShadow(element)) {
|
|
6342
|
-
elements.push(element);
|
|
6343
|
-
return elements;
|
|
6344
|
-
}
|
|
6345
|
-
return Array.from(element.children).reduce((elements2, currentElement) => _Dialog.reduceTabbableItems(elements2, currentElement), elements);
|
|
6346
|
-
}
|
|
6347
|
-
/**
|
|
6348
|
-
* @internal
|
|
6349
|
-
* Determines if an element is a focusable FASTElement
|
|
6350
|
-
* @param element - The element to check
|
|
6351
|
-
* @returns boolean
|
|
6352
|
-
*/
|
|
6353
|
-
static isFocusableFastElement(element) {
|
|
6354
|
-
return !!element.$fastController?.definition.shadowOptions?.delegatesFocus;
|
|
6355
|
-
}
|
|
6356
|
-
/**
|
|
6357
|
-
* @internal
|
|
6358
|
-
* Determines if an element has a tabbable shadow
|
|
6359
|
-
* @param element - The element to check
|
|
6360
|
-
* @returns boolean
|
|
6361
|
-
*/
|
|
6362
|
-
static hasTabbableShadow(element) {
|
|
6363
|
-
return Array.from(element.shadowRoot?.querySelectorAll("*") ?? []).some(x => {
|
|
6364
|
-
return isTabbable(x);
|
|
6365
|
-
});
|
|
6366
|
-
}
|
|
6367
|
-
};
|
|
6368
|
-
__decorateClass$i([observable], _Dialog.prototype, "dialog", 2);
|
|
6369
|
-
__decorateClass$i([observable], _Dialog.prototype, "titleAction", 2);
|
|
6370
|
-
__decorateClass$i([observable], _Dialog.prototype, "defaultTitleAction", 2);
|
|
6371
|
-
__decorateClass$i([attr({
|
|
5776
|
+
}
|
|
5777
|
+
__decorateClass$j([observable], Dialog.prototype, "dialog", 2);
|
|
5778
|
+
__decorateClass$j([attr({
|
|
6372
5779
|
attribute: "aria-describedby"
|
|
6373
|
-
})],
|
|
6374
|
-
__decorateClass$
|
|
5780
|
+
})], Dialog.prototype, "ariaDescribedby", 2);
|
|
5781
|
+
__decorateClass$j([attr({
|
|
6375
5782
|
attribute: "aria-labelledby"
|
|
6376
|
-
})],
|
|
6377
|
-
__decorateClass$
|
|
6378
|
-
|
|
6379
|
-
}
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
})],
|
|
5783
|
+
})], Dialog.prototype, "ariaLabelledby", 2);
|
|
5784
|
+
__decorateClass$j([attr], Dialog.prototype, "type", 2);
|
|
5785
|
+
|
|
5786
|
+
const template$k = html`<dialog role="${x => x.type === DialogType.alert ? "alertdialog" : "dialog"}" type="${x => x.type}" class="dialog" part="dialog" aria-modal="${x => x.type === DialogType.modal || x.type === DialogType.alert ? "true" : void 0}" aria-describedby="${x => x.ariaDescribedby}" aria-labelledby="${x => x.ariaLabelledby}" aria-label="${x => x.ariaLabel}" @click="${(x, c) => x.clickHandler(c.event)}" @cancel="${(x, c) => x.type === DialogType.alert ? c.event.preventDefault() : x.hide()}" ${ref("dialog")}><slot></slot></dialog>`;
|
|
5787
|
+
|
|
5788
|
+
const styles$j = css`
|
|
5789
|
+
@layer base{:host{--dialog-backdrop:${colorBackgroundOverlay};--dialog-starting-scale:0.85}::backdrop{background:var(--dialog-backdrop,rgba(0,0,0,0.4))}dialog{background:${colorNeutralBackground1};border-radius:${borderRadiusXLarge};border:${strokeWidthThin} solid ${colorTransparentStroke};box-shadow:${shadow64};color:${colorNeutralForeground1};max-height:calc(-48px + 100vh);padding:0;width:100%;max-width:600px}:host([type='non-modal']) dialog{inset:0;position:fixed;z-index:2;overflow:auto}}@layer animations{@media (prefers-reduced-motion:no-preference){dialog,::backdrop{transition:display allow-discrete,opacity,overlay allow-discrete,scale;transition-duration:${durationGentle};transition-timing-function:${curveDecelerateMid};opacity:0}::backdrop{transition-timing-function:${curveLinear}}[open],[open]::backdrop{opacity:1}dialog:not([open]){scale:var(--dialog-starting-scale);transition-timing-function:${curveAccelerateMid}}}@starting-style{[open],[open]::backdrop{opacity:0}dialog{scale:var(--dialog-starting-scale)}}}`;
|
|
5790
|
+
|
|
5791
|
+
const definition$k = Dialog.compose({
|
|
5792
|
+
name: `${FluentDesignSystem.prefix}-dialog`,
|
|
5793
|
+
template: template$k,
|
|
5794
|
+
styles: styles$j
|
|
5795
|
+
});
|
|
5796
|
+
|
|
5797
|
+
definition$k.define(FluentDesignSystem.registry);
|
|
5798
|
+
|
|
5799
|
+
var __defProp$i = Object.defineProperty;
|
|
5800
|
+
var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
|
|
5801
|
+
var __decorateClass$i = (decorators, target, key, kind) => {
|
|
5802
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$i(target, key) : target;
|
|
5803
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
5804
|
+
if (kind && result) __defProp$i(target, key, result);
|
|
5805
|
+
return result;
|
|
5806
|
+
};
|
|
5807
|
+
class DialogBody extends FASTElement {
|
|
5808
|
+
constructor() {
|
|
5809
|
+
super(...arguments);
|
|
5810
|
+
this.noTitleAction = false;
|
|
5811
|
+
}
|
|
5812
|
+
}
|
|
6383
5813
|
__decorateClass$i([attr({
|
|
6384
5814
|
mode: "boolean",
|
|
6385
5815
|
attribute: "no-title-action"
|
|
6386
|
-
})],
|
|
6387
|
-
let Dialog = _Dialog;
|
|
5816
|
+
})], DialogBody.prototype, "noTitleAction", 2);
|
|
6388
5817
|
|
|
6389
5818
|
const dismissed16Regular = html.partial(`
|
|
6390
5819
|
<svg
|
|
@@ -6400,18 +5829,15 @@ const dismissed16Regular = html.partial(`
|
|
|
6400
5829
|
fill="currentColor"
|
|
6401
5830
|
></path>
|
|
6402
5831
|
</svg>`);
|
|
6403
|
-
const template$j = html`<
|
|
6404
|
-
property: "titleAction",
|
|
6405
|
-
filter: elements()
|
|
6406
|
-
})} name="title-action"></slot>${when(x => x.modalType === DialogModalType.nonModal && x.titleAction.length === 0 && !x.noTitleAction, html`<fluent-button tabindex="0" part="title-action" class="title-action" appearance="transparent" icon-only @click=${x => x.dismiss()} ${ref("defaultTitleAction")}>${dismissed16Regular}</fluent-button>`)}</div><div class="content" part="content"><slot></slot></div><div class="actions" part="actions"><slot name="action"></slot></div></div></dialog></template>`;
|
|
5832
|
+
const template$j = html`<div class="title" part="title"><slot name="title"></slot><slot name="title-action"><fluent-button ?hidden=${x => x.noTitleAction || x.parentNode?.type !== DialogType.nonModal} tabindex="0" part="title-action" class="title-action" appearance="transparent" icon-only @click=${x => x.parentNode?.hide()} ${ref("defaultTitleAction")}>${dismissed16Regular}</fluent-button></slot></div><div class="content" part="content"><slot></slot></div><div class="actions" part="actions"><slot name="action"></slot></div>`;
|
|
6407
5833
|
|
|
6408
5834
|
const styles$i = css`
|
|
6409
|
-
${display("
|
|
5835
|
+
${display("grid")}
|
|
6410
5836
|
|
|
6411
|
-
:host{
|
|
5837
|
+
:host{background:${colorNeutralBackground1};box-sizing:border-box;gap:${spacingVerticalS};padding:${spacingVerticalXXL} ${spacingHorizontalXXL};container:dialog-body / inline-size}.title{box-sizing:border-box;align-items:flex-start;background:${colorNeutralBackground1};color:${colorNeutralForeground1};column-gap:8px;display:flex;font-family:${fontFamilyBase};font-size:${fontSizeBase500};font-weight:${fontWeightSemibold};inset-block-start:0;justify-content:space-between;line-height:${lineHeightBase500};margin-block-end:calc(${spacingVerticalS} * -1);margin-block-start:calc(${spacingVerticalXXL} * -1);padding-block-end:${spacingVerticalS};padding-block-start:${spacingVerticalXXL};position:sticky;z-index:1}.content{box-sizing:border-box;color:${colorNeutralForeground1};font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};line-height:${lineHeightBase300};min-height:32px}.actions{box-sizing:border-box;background:${colorNeutralBackground1};display:flex;flex-direction:column;gap:${spacingVerticalS};inset-block-end:0;margin-block-end:calc(${spacingVerticalXXL} * -1);padding-block-end:${spacingVerticalXXL};padding-block-start:${spacingVerticalL};position:sticky;z-index:2}:not(:has(:is([slot='title'],[slot='title-action']))) .title:not(:has(.title-action)),:not(:has([slot='action'])) .actions{display:none}@container (min-width:480px){.actions{align-items:center;flex-direction:row;justify-content:flex-end;margin-block-start:calc(${spacingVerticalS} * -1);padding-block-start:${spacingVerticalS}}}`;
|
|
6412
5838
|
|
|
6413
|
-
const definition$j =
|
|
6414
|
-
name: `${FluentDesignSystem.prefix}-dialog`,
|
|
5839
|
+
const definition$j = DialogBody.compose({
|
|
5840
|
+
name: `${FluentDesignSystem.prefix}-dialog-body`,
|
|
6415
5841
|
template: template$j,
|
|
6416
5842
|
styles: styles$i
|
|
6417
5843
|
});
|
|
@@ -6564,7 +5990,7 @@ const template$f = buttonTemplate$1({
|
|
|
6564
5990
|
const definition$f = MenuButton.compose({
|
|
6565
5991
|
name: `${FluentDesignSystem.prefix}-menu-button`,
|
|
6566
5992
|
template: template$f,
|
|
6567
|
-
styles: styles$
|
|
5993
|
+
styles: styles$n
|
|
6568
5994
|
});
|
|
6569
5995
|
|
|
6570
5996
|
definition$f.define(FluentDesignSystem.registry);
|
|
@@ -9360,7 +8786,7 @@ function sliderTemplate(options = {}) {
|
|
|
9360
8786
|
return html`<template role="slider" tabindex="${x => x.disabled ? null : 0}" aria-valuetext="${x => x.valueTextFormatter(x.value)}" aria-valuenow="${x => x.value}" aria-valuemin="${x => x.min}" aria-valuemax="${x => x.max}" aria-disabled="${x => x.disabled ? true : void 0}" aria-readonly="${x => x.readOnly ? true : void 0}" aria-orientation="${x => x.orientation}" class="${x => x.orientation}"><div part="positioning-region" class="positioning-region"><div ${ref("track")} part="track-container" class="track"><slot name="track"></slot><div part="track-start" class="track-start" style="${x => x.position}"><slot name="track-start"></slot></div></div><slot></slot><div ${ref("thumb")} part="thumb-container" class="thumb-container" style="${x => x.position}" @mousedown="${(x, c) => x.handleThumbMouseDown(c.event)}" @touchstart="${(x, c) => x.handleThumbMouseDown(c.event)}"><slot name="thumb">${staticallyCompose(options.thumb)}</slot></div></div></template>`;
|
|
9361
8787
|
}
|
|
9362
8788
|
const template$8 = sliderTemplate({
|
|
9363
|
-
thumb: `<div class="thumb-cursor"
|
|
8789
|
+
thumb: `<div class="thumb-cursor"></div>`
|
|
9364
8790
|
});
|
|
9365
8791
|
|
|
9366
8792
|
const definition$8 = Slider.compose({
|
|
@@ -10432,7 +9858,7 @@ __decorateClass([attr({
|
|
|
10432
9858
|
})], ToggleButton.prototype, "mixed", 2);
|
|
10433
9859
|
|
|
10434
9860
|
const styles = css`
|
|
10435
|
-
${styles$
|
|
9861
|
+
${styles$n}
|
|
10436
9862
|
|
|
10437
9863
|
:host([aria-pressed='true']){border-color:${colorNeutralStroke1};background-color:${colorNeutralBackground1Selected};color:${colorNeutralForeground1};border-width:${strokeWidthThin}}:host([aria-pressed='true']:hover){border-color:${colorNeutralStroke1Hover};background-color:${colorNeutralBackground1Hover}}:host([aria-pressed='true']:active){border-color:${colorNeutralStroke1Pressed};background-color:${colorNeutralBackground1Pressed}}:host([aria-pressed='true'][appearance='primary']){border-color:transparent;background-color:${colorBrandBackgroundSelected};color:${colorNeutralForegroundOnBrand}}:host([aria-pressed='true'][appearance='primary']:hover){background-color:${colorBrandBackgroundHover}}:host([aria-pressed='true'][appearance='primary']:active){background-color:${colorBrandBackgroundPressed}}:host([aria-pressed='true'][appearance='subtle']){border-color:transparent;background-color:${colorSubtleBackgroundSelected};color:${colorNeutralForeground2Selected}}:host([aria-pressed='true'][appearance='subtle']:hover){background-color:${colorSubtleBackgroundHover};color:${colorNeutralForeground2Hover}}:host([aria-pressed='true'][appearance='subtle']:active){background-color:${colorSubtleBackgroundPressed};color:${colorNeutralForeground2Pressed}}:host([aria-pressed='true'][appearance='outline']),:host([aria-pressed='true'][appearance='transparent']){background-color:${colorTransparentBackgroundSelected}}:host([aria-pressed='true'][appearance='outline']:hover),:host([aria-pressed='true'][appearance='transparent']:hover){background-color:${colorTransparentBackgroundHover}}:host([aria-pressed='true'][appearance='outline']:active),:host([aria-pressed='true'][appearance='transparent']:active){background-color:${colorTransparentBackgroundPressed}}:host([aria-pressed='true'][appearance='transparent']){border-color:transparent;color:${colorNeutralForeground2BrandSelected}}:host([aria-pressed='true'][appearance='transparent']:hover){color:${colorNeutralForeground2BrandHover}}:host([aria-pressed='true'][appearance='transparent']:active){color:${colorNeutralForeground2BrandPressed}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
10438
9864
|
:host([aria-pressed='true']),:host([aria-pressed='true'][appearance='primary']),:host([aria-pressed='true'][appearance='subtle']),:host([aria-pressed='true'][appearance='outline']),:host([aria-pressed='true'][appearance='transparent']){background:SelectedItem;color:SelectedItemText}`));
|