@fluentui/web-components 3.0.0-beta.21 → 3.0.0-beta.22
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 +11 -2
- package/dist/dts/accordion/accordion.options.d.ts +2 -2
- package/dist/dts/accordion-item/accordion-item.d.ts +1 -4
- package/dist/dts/accordion-item/accordion-item.template.d.ts +1 -1
- package/dist/dts/accordion-item/index.d.ts +2 -1
- package/dist/dts/anchor-button/index.d.ts +3 -2
- package/dist/dts/button/index.d.ts +4 -3
- package/dist/dts/checkbox/checkbox.d.ts +0 -3
- package/dist/dts/checkbox/index.d.ts +4 -3
- package/dist/dts/dialog/dialog.d.ts +14 -15
- package/dist/dts/divider/divider.d.ts +4 -7
- package/dist/dts/index-rollup.d.ts +29 -35
- package/dist/dts/index.d.ts +49 -34
- package/dist/dts/label/label.d.ts +0 -2
- package/dist/dts/menu/menu.d.ts +27 -25
- package/dist/dts/menu-button/index.d.ts +4 -3
- package/dist/dts/menu-button/menu-button.options.d.ts +1 -1
- package/dist/dts/menu-item/index.d.ts +4 -3
- package/dist/dts/progress-bar/index.d.ts +3 -2
- package/dist/dts/radio/index.d.ts +2 -1
- package/dist/dts/slider/index.d.ts +3 -2
- package/dist/dts/spinner/spinner.d.ts +0 -2
- package/dist/dts/switch/index.d.ts +3 -2
- package/dist/dts/switch/switch.d.ts +0 -1
- package/dist/dts/tab/index.d.ts +4 -3
- package/dist/dts/tab/tab.template.d.ts +1 -1
- package/dist/dts/tabs/index.d.ts +4 -3
- package/dist/dts/tabs/tabs.d.ts +13 -9
- package/dist/dts/text-input/text-input.d.ts +0 -2
- package/dist/dts/theme/design-tokens.d.ts +1744 -0
- package/dist/dts/theme/set-theme.d.ts +5 -1
- package/dist/dts/toggle-button/index.d.ts +4 -3
- package/dist/dts/toggle-button/toggle-button.options.d.ts +1 -1
- package/dist/esm/accordion/accordion.options.js +1 -1
- package/dist/esm/accordion-item/accordion-item.js +0 -1
- package/dist/esm/accordion-item/accordion-item.js.map +1 -1
- package/dist/esm/accordion-item/index.js.map +1 -1
- package/dist/esm/anchor-button/index.js +2 -2
- package/dist/esm/anchor-button/index.js.map +1 -1
- package/dist/esm/button/index.js +3 -3
- package/dist/esm/button/index.js.map +1 -1
- package/dist/esm/checkbox/checkbox.js.map +1 -1
- package/dist/esm/checkbox/index.js +2 -2
- package/dist/esm/checkbox/index.js.map +1 -1
- package/dist/esm/dialog/dialog.js +14 -15
- package/dist/esm/dialog/dialog.js.map +1 -1
- package/dist/esm/divider/divider.js +1 -1
- package/dist/esm/divider/divider.js.map +1 -1
- package/dist/esm/index-rollup.js +29 -35
- package/dist/esm/index-rollup.js.map +1 -1
- package/dist/esm/index.js +33 -33
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/label/label.js.map +1 -1
- package/dist/esm/menu/menu.js +25 -23
- package/dist/esm/menu/menu.js.map +1 -1
- package/dist/esm/menu-button/index.js +2 -2
- package/dist/esm/menu-button/index.js.map +1 -1
- package/dist/esm/menu-item/index.js +2 -2
- package/dist/esm/menu-item/index.js.map +1 -1
- package/dist/esm/menu-list/menu-list.js +2 -1
- package/dist/esm/menu-list/menu-list.js.map +1 -1
- package/dist/esm/progress-bar/index.js +2 -2
- package/dist/esm/progress-bar/index.js.map +1 -1
- package/dist/esm/radio/index.js +1 -1
- package/dist/esm/radio/index.js.map +1 -1
- package/dist/esm/slider/index.js +1 -1
- package/dist/esm/slider/index.js.map +1 -1
- package/dist/esm/spinner/spinner.js.map +1 -1
- package/dist/esm/switch/index.js +1 -1
- package/dist/esm/switch/index.js.map +1 -1
- package/dist/esm/switch/switch.js.map +1 -1
- package/dist/esm/tab/index.js +2 -2
- package/dist/esm/tab/index.js.map +1 -1
- package/dist/esm/tabs/index.js +2 -2
- package/dist/esm/tabs/index.js.map +1 -1
- package/dist/esm/tabs/tabs.js +13 -9
- package/dist/esm/tabs/tabs.js.map +1 -1
- package/dist/esm/text-input/text-input.js.map +1 -1
- package/dist/esm/theme/design-tokens.js +1744 -0
- package/dist/esm/theme/design-tokens.js.map +1 -1
- package/dist/esm/theme/set-theme.js +5 -1
- package/dist/esm/theme/set-theme.js.map +1 -1
- package/dist/esm/toggle-button/index.js +3 -3
- package/dist/esm/toggle-button/index.js.map +1 -1
- package/dist/fluent-web-components.api.json +504 -659
- package/dist/web-components.d.ts +1813 -76
- package/dist/web-components.js +1178 -2026
- package/dist/web-components.min.js +263 -263
- package/docs/api-report.md +602 -448
- package/package.json +6 -3
- package/tsdoc.json +44 -0
package/dist/web-components.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
const FluentDesignSystem = Object.freeze({
|
|
2
|
+
prefix: "fluent",
|
|
3
|
+
shadowRootMode: "open",
|
|
4
|
+
registry: customElements
|
|
5
|
+
});
|
|
6
|
+
|
|
1
7
|
let kernelMode;
|
|
2
8
|
const kernelAttr = "fast-kernel";
|
|
3
9
|
try {
|
|
@@ -3519,8 +3525,8 @@ class MatchMediaStyleSheetBehavior extends MatchMediaBehavior {
|
|
|
3519
3525
|
}
|
|
3520
3526
|
}
|
|
3521
3527
|
const forcedColorsStylesheetBehavior = MatchMediaStyleSheetBehavior.with(window.matchMedia("(forced-colors)"));
|
|
3522
|
-
|
|
3523
|
-
|
|
3528
|
+
MatchMediaStyleSheetBehavior.with(window.matchMedia("(prefers-color-scheme: dark)"));
|
|
3529
|
+
MatchMediaStyleSheetBehavior.with(window.matchMedia("(prefers-color-scheme: light)"));
|
|
3524
3530
|
|
|
3525
3531
|
class StartEnd {}
|
|
3526
3532
|
function endSlotTemplate(options) {
|
|
@@ -3592,239 +3598,9 @@ __decorateClass$q([attr({
|
|
|
3592
3598
|
})], AccordionItem.prototype, "expandIconPosition", 2);
|
|
3593
3599
|
applyMixins(AccordionItem, StartEnd);
|
|
3594
3600
|
|
|
3595
|
-
const AccordionExpandMode = {
|
|
3596
|
-
single: "single",
|
|
3597
|
-
multi: "multi"
|
|
3598
|
-
};
|
|
3599
|
-
|
|
3600
|
-
var __defProp$p = Object.defineProperty;
|
|
3601
|
-
var __getOwnPropDesc$p = Object.getOwnPropertyDescriptor;
|
|
3602
|
-
var __decorateClass$p = (decorators, target, key, kind) => {
|
|
3603
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$p(target, key) : target;
|
|
3604
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
3605
|
-
if (kind && result) __defProp$p(target, key, result);
|
|
3606
|
-
return result;
|
|
3607
|
-
};
|
|
3608
|
-
class Accordion extends FASTElement {
|
|
3609
|
-
constructor() {
|
|
3610
|
-
super(...arguments);
|
|
3611
|
-
this.expandmode = AccordionExpandMode.multi;
|
|
3612
|
-
this.activeItemIndex = 0;
|
|
3613
|
-
this.change = () => {
|
|
3614
|
-
this.$emit("change", this.activeid);
|
|
3615
|
-
};
|
|
3616
|
-
this.setItems = () => {
|
|
3617
|
-
if (this.slottedAccordionItems.length === 0) {
|
|
3618
|
-
return;
|
|
3619
|
-
}
|
|
3620
|
-
const children = Array.from(this.children);
|
|
3621
|
-
this.removeItemListeners(children);
|
|
3622
|
-
children.forEach(child => Observable.getNotifier(child).subscribe(this, "disabled"));
|
|
3623
|
-
this.accordionItems = children.filter(child => !child.hasAttribute("disabled"));
|
|
3624
|
-
this.accordionIds = this.getItemIds();
|
|
3625
|
-
this.accordionItems.forEach((item, index) => {
|
|
3626
|
-
if (item instanceof AccordionItem) {
|
|
3627
|
-
item.addEventListener("click", this.activeItemChange);
|
|
3628
|
-
item.addEventListener("keydown", this.handleItemKeyDown);
|
|
3629
|
-
item.addEventListener("focus", this.handleItemFocus);
|
|
3630
|
-
Observable.getNotifier(item).subscribe(this, "expanded");
|
|
3631
|
-
}
|
|
3632
|
-
const itemId = this.accordionIds[index];
|
|
3633
|
-
item.setAttribute("id", typeof itemId !== "string" ? `accordion-${index + 1}` : itemId);
|
|
3634
|
-
this.activeid = this.accordionIds[this.activeItemIndex];
|
|
3635
|
-
});
|
|
3636
|
-
if (this.isSingleExpandMode()) {
|
|
3637
|
-
const expandedItem = this.findExpandedItem();
|
|
3638
|
-
this.setSingleExpandMode(expandedItem);
|
|
3639
|
-
}
|
|
3640
|
-
};
|
|
3641
|
-
this.removeItemListeners = oldValue => {
|
|
3642
|
-
oldValue.forEach((item, index) => {
|
|
3643
|
-
Observable.getNotifier(item).unsubscribe(this, "disabled");
|
|
3644
|
-
Observable.getNotifier(item).unsubscribe(this, "expanded");
|
|
3645
|
-
item.removeEventListener("click", this.activeItemChange);
|
|
3646
|
-
item.removeEventListener("keydown", this.handleItemKeyDown);
|
|
3647
|
-
item.removeEventListener("focus", this.handleItemFocus);
|
|
3648
|
-
});
|
|
3649
|
-
};
|
|
3650
|
-
this.activeItemChange = event => {
|
|
3651
|
-
if (event.defaultPrevented || event.target !== event.currentTarget) {
|
|
3652
|
-
return;
|
|
3653
|
-
}
|
|
3654
|
-
event.preventDefault();
|
|
3655
|
-
this.handleExpandedChange(event.target);
|
|
3656
|
-
};
|
|
3657
|
-
this.handleExpandedChange = item => {
|
|
3658
|
-
if (item instanceof AccordionItem) {
|
|
3659
|
-
this.activeid = item.getAttribute("id");
|
|
3660
|
-
if (!this.isSingleExpandMode()) {
|
|
3661
|
-
item.expanded = !item.expanded;
|
|
3662
|
-
this.activeItemIndex = this.accordionItems.indexOf(item);
|
|
3663
|
-
} else {
|
|
3664
|
-
this.setSingleExpandMode(item);
|
|
3665
|
-
}
|
|
3666
|
-
this.change();
|
|
3667
|
-
}
|
|
3668
|
-
};
|
|
3669
|
-
this.handleItemKeyDown = event => {
|
|
3670
|
-
if (event.target !== event.currentTarget) {
|
|
3671
|
-
return;
|
|
3672
|
-
}
|
|
3673
|
-
this.accordionIds = this.getItemIds();
|
|
3674
|
-
switch (event.key) {
|
|
3675
|
-
case keyArrowUp:
|
|
3676
|
-
event.preventDefault();
|
|
3677
|
-
this.adjust(-1);
|
|
3678
|
-
break;
|
|
3679
|
-
case keyArrowDown:
|
|
3680
|
-
event.preventDefault();
|
|
3681
|
-
this.adjust(1);
|
|
3682
|
-
break;
|
|
3683
|
-
case keyHome:
|
|
3684
|
-
this.activeItemIndex = 0;
|
|
3685
|
-
this.focusItem();
|
|
3686
|
-
break;
|
|
3687
|
-
case keyEnd:
|
|
3688
|
-
this.activeItemIndex = this.accordionItems.length - 1;
|
|
3689
|
-
this.focusItem();
|
|
3690
|
-
break;
|
|
3691
|
-
}
|
|
3692
|
-
};
|
|
3693
|
-
this.handleItemFocus = event => {
|
|
3694
|
-
if (event.target === event.currentTarget) {
|
|
3695
|
-
const focusedItem = event.target;
|
|
3696
|
-
const focusedIndex = this.activeItemIndex = Array.from(this.accordionItems).indexOf(focusedItem);
|
|
3697
|
-
if (this.activeItemIndex !== focusedIndex && focusedIndex !== -1) {
|
|
3698
|
-
this.activeItemIndex = focusedIndex;
|
|
3699
|
-
this.activeid = this.accordionIds[this.activeItemIndex];
|
|
3700
|
-
}
|
|
3701
|
-
}
|
|
3702
|
-
};
|
|
3703
|
-
}
|
|
3704
|
-
expandmodeChanged(prev, next) {
|
|
3705
|
-
if (!this.$fastController.isConnected) {
|
|
3706
|
-
return;
|
|
3707
|
-
}
|
|
3708
|
-
const expandedItem = this.findExpandedItem();
|
|
3709
|
-
if (!expandedItem) {
|
|
3710
|
-
return;
|
|
3711
|
-
}
|
|
3712
|
-
if (next !== AccordionExpandMode.single) {
|
|
3713
|
-
expandedItem?.expandbutton.removeAttribute("aria-disabled");
|
|
3714
|
-
} else {
|
|
3715
|
-
this.setSingleExpandMode(expandedItem);
|
|
3716
|
-
}
|
|
3717
|
-
}
|
|
3718
|
-
/**
|
|
3719
|
-
* @internal
|
|
3720
|
-
*/
|
|
3721
|
-
slottedAccordionItemsChanged(oldValue, newValue) {
|
|
3722
|
-
if (this.$fastController.isConnected) {
|
|
3723
|
-
this.setItems();
|
|
3724
|
-
}
|
|
3725
|
-
}
|
|
3726
|
-
/**
|
|
3727
|
-
* @internal
|
|
3728
|
-
*/
|
|
3729
|
-
handleChange(source, propertyName) {
|
|
3730
|
-
if (propertyName === "disabled") {
|
|
3731
|
-
this.setItems();
|
|
3732
|
-
} else if (propertyName === "expanded") {
|
|
3733
|
-
if (source.expanded && this.isSingleExpandMode()) {
|
|
3734
|
-
this.setSingleExpandMode(source);
|
|
3735
|
-
}
|
|
3736
|
-
}
|
|
3737
|
-
}
|
|
3738
|
-
findExpandedItem() {
|
|
3739
|
-
if (this.accordionItems.length === 0) {
|
|
3740
|
-
return null;
|
|
3741
|
-
}
|
|
3742
|
-
return this.accordionItems.find(item => item instanceof AccordionItem && item.expanded) ?? this.accordionItems[0];
|
|
3743
|
-
}
|
|
3744
|
-
setSingleExpandMode(expandedItem) {
|
|
3745
|
-
if (this.accordionItems.length === 0) {
|
|
3746
|
-
return;
|
|
3747
|
-
}
|
|
3748
|
-
const currentItems = Array.from(this.accordionItems);
|
|
3749
|
-
this.activeItemIndex = currentItems.indexOf(expandedItem);
|
|
3750
|
-
currentItems.forEach((item, index) => {
|
|
3751
|
-
if (item instanceof AccordionItem) {
|
|
3752
|
-
if (this.activeItemIndex === index) {
|
|
3753
|
-
item.expanded = true;
|
|
3754
|
-
item.expandbutton.setAttribute("aria-disabled", "true");
|
|
3755
|
-
} else {
|
|
3756
|
-
item.expanded = false;
|
|
3757
|
-
if (!item.hasAttribute("disabled")) {
|
|
3758
|
-
item.expandbutton.removeAttribute("aria-disabled");
|
|
3759
|
-
}
|
|
3760
|
-
}
|
|
3761
|
-
}
|
|
3762
|
-
});
|
|
3763
|
-
}
|
|
3764
|
-
getItemIds() {
|
|
3765
|
-
return this.slottedAccordionItems.map(accordionItem => {
|
|
3766
|
-
return accordionItem.id;
|
|
3767
|
-
});
|
|
3768
|
-
}
|
|
3769
|
-
isSingleExpandMode() {
|
|
3770
|
-
return this.expandmode === AccordionExpandMode.single;
|
|
3771
|
-
}
|
|
3772
|
-
adjust(adjustment) {
|
|
3773
|
-
this.activeItemIndex = wrapInBounds(0, this.accordionItems.length - 1, this.activeItemIndex + adjustment);
|
|
3774
|
-
this.focusItem();
|
|
3775
|
-
}
|
|
3776
|
-
focusItem() {
|
|
3777
|
-
const element = this.accordionItems[this.activeItemIndex];
|
|
3778
|
-
if (element instanceof AccordionItem) {
|
|
3779
|
-
element.expandbutton.focus();
|
|
3780
|
-
}
|
|
3781
|
-
}
|
|
3782
|
-
}
|
|
3783
|
-
__decorateClass$p([attr({
|
|
3784
|
-
attribute: "expand-mode"
|
|
3785
|
-
})], Accordion.prototype, "expandmode", 2);
|
|
3786
|
-
__decorateClass$p([observable], Accordion.prototype, "slottedAccordionItems", 2);
|
|
3787
|
-
|
|
3788
|
-
function accordionTemplate() {
|
|
3789
|
-
return html`<template><slot ${slotted({
|
|
3790
|
-
property: "slottedAccordionItems",
|
|
3791
|
-
filter: elements()
|
|
3792
|
-
})}></slot></template>`;
|
|
3793
|
-
}
|
|
3794
|
-
const template$s = accordionTemplate();
|
|
3795
|
-
|
|
3796
|
-
const styles$r = css`
|
|
3797
|
-
${display("flex")}
|
|
3798
|
-
|
|
3799
|
-
:host{flex-direction:column;width:100%;contain:content}`;
|
|
3800
|
-
|
|
3801
|
-
const FluentDesignSystem = Object.freeze({
|
|
3802
|
-
prefix: "fluent",
|
|
3803
|
-
shadowRootMode: "open",
|
|
3804
|
-
registry: customElements
|
|
3805
|
-
});
|
|
3806
|
-
|
|
3807
|
-
const definition$s = Accordion.compose({
|
|
3808
|
-
name: `${FluentDesignSystem.prefix}-accordion`,
|
|
3809
|
-
template: template$s,
|
|
3810
|
-
styles: styles$r
|
|
3811
|
-
});
|
|
3812
|
-
|
|
3813
|
-
const AccordionItemSize = {
|
|
3814
|
-
small: "small",
|
|
3815
|
-
medium: "medium",
|
|
3816
|
-
large: "large",
|
|
3817
|
-
extraLarge: "extra-large"
|
|
3818
|
-
};
|
|
3819
|
-
const AccordionItemExpandIconPosition = {
|
|
3820
|
-
start: "start",
|
|
3821
|
-
end: "end"
|
|
3822
|
-
};
|
|
3823
|
-
|
|
3824
3601
|
const colorNeutralForeground1 = "var(--colorNeutralForeground1)";
|
|
3825
3602
|
const colorNeutralForeground1Hover = "var(--colorNeutralForeground1Hover)";
|
|
3826
3603
|
const colorNeutralForeground1Pressed = "var(--colorNeutralForeground1Pressed)";
|
|
3827
|
-
const colorNeutralForeground1Selected = "var(--colorNeutralForeground1Selected)";
|
|
3828
3604
|
const colorNeutralForeground2 = "var(--colorNeutralForeground2)";
|
|
3829
3605
|
const colorNeutralForeground2Hover = "var(--colorNeutralForeground2Hover)";
|
|
3830
3606
|
const colorNeutralForeground2Pressed = "var(--colorNeutralForeground2Pressed)";
|
|
@@ -3835,20 +3611,8 @@ const colorNeutralForeground2BrandSelected = "var(--colorNeutralForeground2Brand
|
|
|
3835
3611
|
const colorNeutralForeground3 = "var(--colorNeutralForeground3)";
|
|
3836
3612
|
const colorNeutralForeground3Hover = "var(--colorNeutralForeground3Hover)";
|
|
3837
3613
|
const colorNeutralForeground3Pressed = "var(--colorNeutralForeground3Pressed)";
|
|
3838
|
-
const colorNeutralForeground3Selected = "var(--colorNeutralForeground3Selected)";
|
|
3839
|
-
const colorNeutralForeground3BrandHover = "var(--colorNeutralForeground3BrandHover)";
|
|
3840
|
-
const colorNeutralForeground3BrandPressed = "var(--colorNeutralForeground3BrandPressed)";
|
|
3841
|
-
const colorNeutralForeground3BrandSelected = "var(--colorNeutralForeground3BrandSelected)";
|
|
3842
3614
|
const colorNeutralForeground4 = "var(--colorNeutralForeground4)";
|
|
3843
3615
|
const colorNeutralForegroundDisabled = "var(--colorNeutralForegroundDisabled)";
|
|
3844
|
-
const colorBrandForegroundLink = "var(--colorBrandForegroundLink)";
|
|
3845
|
-
const colorBrandForegroundLinkHover = "var(--colorBrandForegroundLinkHover)";
|
|
3846
|
-
const colorBrandForegroundLinkPressed = "var(--colorBrandForegroundLinkPressed)";
|
|
3847
|
-
const colorBrandForegroundLinkSelected = "var(--colorBrandForegroundLinkSelected)";
|
|
3848
|
-
const colorNeutralForeground2Link = "var(--colorNeutralForeground2Link)";
|
|
3849
|
-
const colorNeutralForeground2LinkHover = "var(--colorNeutralForeground2LinkHover)";
|
|
3850
|
-
const colorNeutralForeground2LinkPressed = "var(--colorNeutralForeground2LinkPressed)";
|
|
3851
|
-
const colorNeutralForeground2LinkSelected = "var(--colorNeutralForeground2LinkSelected)";
|
|
3852
3616
|
const colorCompoundBrandForeground1 = "var(--colorCompoundBrandForeground1)";
|
|
3853
3617
|
const colorCompoundBrandForeground1Hover = "var(--colorCompoundBrandForeground1Hover)";
|
|
3854
3618
|
const colorCompoundBrandForeground1Pressed = "var(--colorCompoundBrandForeground1Pressed)";
|
|
@@ -3856,74 +3620,29 @@ const colorNeutralForegroundOnBrand = "var(--colorNeutralForegroundOnBrand)";
|
|
|
3856
3620
|
const colorNeutralForegroundInverted = "var(--colorNeutralForegroundInverted)";
|
|
3857
3621
|
const colorNeutralForegroundInvertedHover = "var(--colorNeutralForegroundInvertedHover)";
|
|
3858
3622
|
const colorNeutralForegroundInvertedPressed = "var(--colorNeutralForegroundInvertedPressed)";
|
|
3859
|
-
const colorNeutralForegroundInvertedSelected = "var(--colorNeutralForegroundInvertedSelected)";
|
|
3860
|
-
const colorNeutralForegroundInverted2 = "var(--colorNeutralForegroundInverted2)";
|
|
3861
3623
|
const colorNeutralForegroundStaticInverted = "var(--colorNeutralForegroundStaticInverted)";
|
|
3862
|
-
const colorNeutralForegroundInvertedLink = "var(--colorNeutralForegroundInvertedLink)";
|
|
3863
|
-
const colorNeutralForegroundInvertedLinkHover = "var(--colorNeutralForegroundInvertedLinkHover)";
|
|
3864
|
-
const colorNeutralForegroundInvertedLinkPressed = "var(--colorNeutralForegroundInvertedLinkPressed)";
|
|
3865
|
-
const colorNeutralForegroundInvertedLinkSelected = "var(--colorNeutralForegroundInvertedLinkSelected)";
|
|
3866
|
-
const colorNeutralForegroundInvertedDisabled = "var(--colorNeutralForegroundInvertedDisabled)";
|
|
3867
3624
|
const colorBrandForeground1 = "var(--colorBrandForeground1)";
|
|
3868
3625
|
const colorBrandForeground2 = "var(--colorBrandForeground2)";
|
|
3869
|
-
const colorBrandForeground2Hover = "var(--colorBrandForeground2Hover)";
|
|
3870
|
-
const colorBrandForeground2Pressed = "var(--colorBrandForeground2Pressed)";
|
|
3871
3626
|
const colorNeutralForeground1Static = "var(--colorNeutralForeground1Static)";
|
|
3872
|
-
const colorBrandForegroundInverted = "var(--colorBrandForegroundInverted)";
|
|
3873
|
-
const colorBrandForegroundInvertedHover = "var(--colorBrandForegroundInvertedHover)";
|
|
3874
|
-
const colorBrandForegroundInvertedPressed = "var(--colorBrandForegroundInvertedPressed)";
|
|
3875
|
-
const colorBrandForegroundOnLight = "var(--colorBrandForegroundOnLight)";
|
|
3876
|
-
const colorBrandForegroundOnLightHover = "var(--colorBrandForegroundOnLightHover)";
|
|
3877
|
-
const colorBrandForegroundOnLightPressed = "var(--colorBrandForegroundOnLightPressed)";
|
|
3878
|
-
const colorBrandForegroundOnLightSelected = "var(--colorBrandForegroundOnLightSelected)";
|
|
3879
3627
|
const colorNeutralBackground1 = "var(--colorNeutralBackground1)";
|
|
3880
3628
|
const colorNeutralBackground1Hover = "var(--colorNeutralBackground1Hover)";
|
|
3881
3629
|
const colorNeutralBackground1Pressed = "var(--colorNeutralBackground1Pressed)";
|
|
3882
3630
|
const colorNeutralBackground1Selected = "var(--colorNeutralBackground1Selected)";
|
|
3883
|
-
const colorNeutralBackground2 = "var(--colorNeutralBackground2)";
|
|
3884
|
-
const colorNeutralBackground2Hover = "var(--colorNeutralBackground2Hover)";
|
|
3885
|
-
const colorNeutralBackground2Pressed = "var(--colorNeutralBackground2Pressed)";
|
|
3886
|
-
const colorNeutralBackground2Selected = "var(--colorNeutralBackground2Selected)";
|
|
3887
3631
|
const colorNeutralBackground3 = "var(--colorNeutralBackground3)";
|
|
3888
|
-
const colorNeutralBackground3Hover = "var(--colorNeutralBackground3Hover)";
|
|
3889
|
-
const colorNeutralBackground3Pressed = "var(--colorNeutralBackground3Pressed)";
|
|
3890
|
-
const colorNeutralBackground3Selected = "var(--colorNeutralBackground3Selected)";
|
|
3891
3632
|
const colorNeutralBackground4 = "var(--colorNeutralBackground4)";
|
|
3892
|
-
const colorNeutralBackground4Hover = "var(--colorNeutralBackground4Hover)";
|
|
3893
|
-
const colorNeutralBackground4Pressed = "var(--colorNeutralBackground4Pressed)";
|
|
3894
|
-
const colorNeutralBackground4Selected = "var(--colorNeutralBackground4Selected)";
|
|
3895
3633
|
const colorNeutralBackground5 = "var(--colorNeutralBackground5)";
|
|
3896
|
-
const colorNeutralBackground5Hover = "var(--colorNeutralBackground5Hover)";
|
|
3897
|
-
const colorNeutralBackground5Pressed = "var(--colorNeutralBackground5Pressed)";
|
|
3898
|
-
const colorNeutralBackground5Selected = "var(--colorNeutralBackground5Selected)";
|
|
3899
3634
|
const colorNeutralBackground6 = "var(--colorNeutralBackground6)";
|
|
3900
3635
|
const colorNeutralBackgroundInverted = "var(--colorNeutralBackgroundInverted)";
|
|
3901
|
-
const colorNeutralBackgroundStatic = "var(--colorNeutralBackgroundStatic)";
|
|
3902
|
-
const colorNeutralBackgroundAlpha = "var(--colorNeutralBackgroundAlpha)";
|
|
3903
|
-
const colorNeutralBackgroundAlpha2 = "var(--colorNeutralBackgroundAlpha2)";
|
|
3904
3636
|
const colorSubtleBackground = "var(--colorSubtleBackground)";
|
|
3905
3637
|
const colorSubtleBackgroundHover = "var(--colorSubtleBackgroundHover)";
|
|
3906
3638
|
const colorSubtleBackgroundPressed = "var(--colorSubtleBackgroundPressed)";
|
|
3907
3639
|
const colorSubtleBackgroundSelected = "var(--colorSubtleBackgroundSelected)";
|
|
3908
|
-
const colorSubtleBackgroundLightAlphaHover = "var(--colorSubtleBackgroundLightAlphaHover)";
|
|
3909
|
-
const colorSubtleBackgroundLightAlphaPressed = "var(--colorSubtleBackgroundLightAlphaPressed)";
|
|
3910
|
-
const colorSubtleBackgroundLightAlphaSelected = "var(--colorSubtleBackgroundLightAlphaSelected)";
|
|
3911
|
-
const colorSubtleBackgroundInverted = "var(--colorSubtleBackgroundInverted)";
|
|
3912
|
-
const colorSubtleBackgroundInvertedHover = "var(--colorSubtleBackgroundInvertedHover)";
|
|
3913
|
-
const colorSubtleBackgroundInvertedPressed = "var(--colorSubtleBackgroundInvertedPressed)";
|
|
3914
|
-
const colorSubtleBackgroundInvertedSelected = "var(--colorSubtleBackgroundInvertedSelected)";
|
|
3915
3640
|
const colorTransparentBackground = "var(--colorTransparentBackground)";
|
|
3916
3641
|
const colorTransparentBackgroundHover = "var(--colorTransparentBackgroundHover)";
|
|
3917
3642
|
const colorTransparentBackgroundPressed = "var(--colorTransparentBackgroundPressed)";
|
|
3918
3643
|
const colorTransparentBackgroundSelected = "var(--colorTransparentBackgroundSelected)";
|
|
3919
3644
|
const colorNeutralBackgroundDisabled = "var(--colorNeutralBackgroundDisabled)";
|
|
3920
|
-
const colorNeutralBackgroundInvertedDisabled = "var(--colorNeutralBackgroundInvertedDisabled)";
|
|
3921
|
-
const colorNeutralStencil1 = "var(--colorNeutralStencil1)";
|
|
3922
|
-
const colorNeutralStencil2 = "var(--colorNeutralStencil2)";
|
|
3923
|
-
const colorNeutralStencil1Alpha = "var(--colorNeutralStencil1Alpha)";
|
|
3924
|
-
const colorNeutralStencil2Alpha = "var(--colorNeutralStencil2Alpha)";
|
|
3925
3645
|
const colorBackgroundOverlay = "var(--colorBackgroundOverlay)";
|
|
3926
|
-
const colorScrollbarOverlay = "var(--colorScrollbarOverlay)";
|
|
3927
3646
|
const colorBrandBackground = "var(--colorBrandBackground)";
|
|
3928
3647
|
const colorBrandBackgroundHover = "var(--colorBrandBackgroundHover)";
|
|
3929
3648
|
const colorBrandBackgroundPressed = "var(--colorBrandBackgroundPressed)";
|
|
@@ -3933,242 +3652,107 @@ const colorCompoundBrandBackgroundHover = "var(--colorCompoundBrandBackgroundHov
|
|
|
3933
3652
|
const colorCompoundBrandBackgroundPressed = "var(--colorCompoundBrandBackgroundPressed)";
|
|
3934
3653
|
const colorBrandBackgroundStatic = "var(--colorBrandBackgroundStatic)";
|
|
3935
3654
|
const colorBrandBackground2 = "var(--colorBrandBackground2)";
|
|
3936
|
-
const colorBrandBackground2Hover = "var(--colorBrandBackground2Hover)";
|
|
3937
|
-
const colorBrandBackground2Pressed = "var(--colorBrandBackground2Pressed)";
|
|
3938
|
-
const colorBrandBackground3Static = "var(--colorBrandBackground3Static)";
|
|
3939
|
-
const colorBrandBackground4Static = "var(--colorBrandBackground4Static)";
|
|
3940
|
-
const colorBrandBackgroundInverted = "var(--colorBrandBackgroundInverted)";
|
|
3941
|
-
const colorBrandBackgroundInvertedHover = "var(--colorBrandBackgroundInvertedHover)";
|
|
3942
|
-
const colorBrandBackgroundInvertedPressed = "var(--colorBrandBackgroundInvertedPressed)";
|
|
3943
|
-
const colorBrandBackgroundInvertedSelected = "var(--colorBrandBackgroundInvertedSelected)";
|
|
3944
|
-
const colorNeutralCardBackground = "var(--colorNeutralCardBackground)";
|
|
3945
|
-
const colorNeutralCardBackgroundHover = "var(--colorNeutralCardBackgroundHover)";
|
|
3946
|
-
const colorNeutralCardBackgroundPressed = "var(--colorNeutralCardBackgroundPressed)";
|
|
3947
|
-
const colorNeutralCardBackgroundSelected = "var(--colorNeutralCardBackgroundSelected)";
|
|
3948
|
-
const colorNeutralCardBackgroundDisabled = "var(--colorNeutralCardBackgroundDisabled)";
|
|
3949
3655
|
const colorNeutralStrokeAccessible = "var(--colorNeutralStrokeAccessible)";
|
|
3950
3656
|
const colorNeutralStrokeAccessibleHover = "var(--colorNeutralStrokeAccessibleHover)";
|
|
3951
3657
|
const colorNeutralStrokeAccessiblePressed = "var(--colorNeutralStrokeAccessiblePressed)";
|
|
3952
|
-
const colorNeutralStrokeAccessibleSelected = "var(--colorNeutralStrokeAccessibleSelected)";
|
|
3953
3658
|
const colorNeutralStroke1 = "var(--colorNeutralStroke1)";
|
|
3954
3659
|
const colorNeutralStroke1Hover = "var(--colorNeutralStroke1Hover)";
|
|
3955
3660
|
const colorNeutralStroke1Pressed = "var(--colorNeutralStroke1Pressed)";
|
|
3956
|
-
const colorNeutralStroke1Selected = "var(--colorNeutralStroke1Selected)";
|
|
3957
3661
|
const colorNeutralStroke2 = "var(--colorNeutralStroke2)";
|
|
3958
3662
|
const colorNeutralStroke3 = "var(--colorNeutralStroke3)";
|
|
3959
|
-
const colorNeutralStrokeSubtle = "var(--colorNeutralStrokeSubtle)";
|
|
3960
|
-
const colorNeutralStrokeOnBrand = "var(--colorNeutralStrokeOnBrand)";
|
|
3961
3663
|
const colorNeutralStrokeOnBrand2 = "var(--colorNeutralStrokeOnBrand2)";
|
|
3962
|
-
const colorNeutralStrokeOnBrand2Hover = "var(--colorNeutralStrokeOnBrand2Hover)";
|
|
3963
|
-
const colorNeutralStrokeOnBrand2Pressed = "var(--colorNeutralStrokeOnBrand2Pressed)";
|
|
3964
|
-
const colorNeutralStrokeOnBrand2Selected = "var(--colorNeutralStrokeOnBrand2Selected)";
|
|
3965
3664
|
const colorBrandStroke1 = "var(--colorBrandStroke1)";
|
|
3966
3665
|
const colorBrandStroke2 = "var(--colorBrandStroke2)";
|
|
3967
|
-
const colorBrandStroke2Hover = "var(--colorBrandStroke2Hover)";
|
|
3968
|
-
const colorBrandStroke2Pressed = "var(--colorBrandStroke2Pressed)";
|
|
3969
|
-
const colorBrandStroke2Contrast = "var(--colorBrandStroke2Contrast)";
|
|
3970
3666
|
const colorCompoundBrandStroke = "var(--colorCompoundBrandStroke)";
|
|
3971
3667
|
const colorCompoundBrandStrokeHover = "var(--colorCompoundBrandStrokeHover)";
|
|
3972
3668
|
const colorCompoundBrandStrokePressed = "var(--colorCompoundBrandStrokePressed)";
|
|
3973
3669
|
const colorNeutralStrokeDisabled = "var(--colorNeutralStrokeDisabled)";
|
|
3974
|
-
const colorNeutralStrokeInvertedDisabled = "var(--colorNeutralStrokeInvertedDisabled)";
|
|
3975
3670
|
const colorTransparentStroke = "var(--colorTransparentStroke)";
|
|
3976
3671
|
const colorTransparentStrokeInteractive = "var(--colorTransparentStrokeInteractive)";
|
|
3977
|
-
const colorTransparentStrokeDisabled = "var(--colorTransparentStrokeDisabled)";
|
|
3978
|
-
const colorNeutralStrokeAlpha = "var(--colorNeutralStrokeAlpha)";
|
|
3979
|
-
const colorNeutralStrokeAlpha2 = "var(--colorNeutralStrokeAlpha2)";
|
|
3980
3672
|
const colorStrokeFocus1 = "var(--colorStrokeFocus1)";
|
|
3981
3673
|
const colorStrokeFocus2 = "var(--colorStrokeFocus2)";
|
|
3982
|
-
const colorNeutralShadowAmbient = "var(--colorNeutralShadowAmbient)";
|
|
3983
|
-
const colorNeutralShadowKey = "var(--colorNeutralShadowKey)";
|
|
3984
|
-
const colorNeutralShadowAmbientLighter = "var(--colorNeutralShadowAmbientLighter)";
|
|
3985
|
-
const colorNeutralShadowKeyLighter = "var(--colorNeutralShadowKeyLighter)";
|
|
3986
|
-
const colorNeutralShadowAmbientDarker = "var(--colorNeutralShadowAmbientDarker)";
|
|
3987
|
-
const colorNeutralShadowKeyDarker = "var(--colorNeutralShadowKeyDarker)";
|
|
3988
|
-
const colorBrandShadowAmbient = "var(--colorBrandShadowAmbient)";
|
|
3989
|
-
const colorBrandShadowKey = "var(--colorBrandShadowKey)";
|
|
3990
3674
|
const colorPaletteRedBackground1 = "var(--colorPaletteRedBackground1)";
|
|
3991
3675
|
const colorPaletteRedBackground2 = "var(--colorPaletteRedBackground2)";
|
|
3992
3676
|
const colorPaletteRedBackground3 = "var(--colorPaletteRedBackground3)";
|
|
3993
|
-
const colorPaletteRedBorderActive = "var(--colorPaletteRedBorderActive)";
|
|
3994
3677
|
const colorPaletteRedBorder1 = "var(--colorPaletteRedBorder1)";
|
|
3995
|
-
const colorPaletteRedBorder2 = "var(--colorPaletteRedBorder2)";
|
|
3996
3678
|
const colorPaletteRedForeground1 = "var(--colorPaletteRedForeground1)";
|
|
3997
3679
|
const colorPaletteRedForeground2 = "var(--colorPaletteRedForeground2)";
|
|
3998
3680
|
const colorPaletteRedForeground3 = "var(--colorPaletteRedForeground3)";
|
|
3999
|
-
const colorPaletteRedForegroundInverted = "var(--colorPaletteRedForegroundInverted)";
|
|
4000
3681
|
const colorPaletteGreenBackground1 = "var(--colorPaletteGreenBackground1)";
|
|
4001
3682
|
const colorPaletteGreenBackground2 = "var(--colorPaletteGreenBackground2)";
|
|
4002
3683
|
const colorPaletteGreenBackground3 = "var(--colorPaletteGreenBackground3)";
|
|
4003
|
-
const colorPaletteGreenBorderActive = "var(--colorPaletteGreenBorderActive)";
|
|
4004
|
-
const colorPaletteGreenBorder1 = "var(--colorPaletteGreenBorder1)";
|
|
4005
3684
|
const colorPaletteGreenBorder2 = "var(--colorPaletteGreenBorder2)";
|
|
4006
3685
|
const colorPaletteGreenForeground1 = "var(--colorPaletteGreenForeground1)";
|
|
4007
3686
|
const colorPaletteGreenForeground2 = "var(--colorPaletteGreenForeground2)";
|
|
4008
3687
|
const colorPaletteGreenForeground3 = "var(--colorPaletteGreenForeground3)";
|
|
4009
|
-
const colorPaletteGreenForegroundInverted = "var(--colorPaletteGreenForegroundInverted)";
|
|
4010
3688
|
const colorPaletteDarkOrangeBackground1 = "var(--colorPaletteDarkOrangeBackground1)";
|
|
4011
3689
|
const colorPaletteDarkOrangeBackground2 = "var(--colorPaletteDarkOrangeBackground2)";
|
|
4012
3690
|
const colorPaletteDarkOrangeBackground3 = "var(--colorPaletteDarkOrangeBackground3)";
|
|
4013
|
-
const colorPaletteDarkOrangeBorderActive = "var(--colorPaletteDarkOrangeBorderActive)";
|
|
4014
3691
|
const colorPaletteDarkOrangeBorder1 = "var(--colorPaletteDarkOrangeBorder1)";
|
|
4015
|
-
const colorPaletteDarkOrangeBorder2 = "var(--colorPaletteDarkOrangeBorder2)";
|
|
4016
3692
|
const colorPaletteDarkOrangeForeground1 = "var(--colorPaletteDarkOrangeForeground1)";
|
|
4017
|
-
const colorPaletteDarkOrangeForeground2 = "var(--colorPaletteDarkOrangeForeground2)";
|
|
4018
3693
|
const colorPaletteDarkOrangeForeground3 = "var(--colorPaletteDarkOrangeForeground3)";
|
|
4019
3694
|
const colorPaletteYellowBackground1 = "var(--colorPaletteYellowBackground1)";
|
|
4020
|
-
const colorPaletteYellowBackground2 = "var(--colorPaletteYellowBackground2)";
|
|
4021
3695
|
const colorPaletteYellowBackground3 = "var(--colorPaletteYellowBackground3)";
|
|
4022
|
-
const colorPaletteYellowBorderActive = "var(--colorPaletteYellowBorderActive)";
|
|
4023
3696
|
const colorPaletteYellowBorder1 = "var(--colorPaletteYellowBorder1)";
|
|
4024
|
-
const colorPaletteYellowBorder2 = "var(--colorPaletteYellowBorder2)";
|
|
4025
|
-
const colorPaletteYellowForeground1 = "var(--colorPaletteYellowForeground1)";
|
|
4026
3697
|
const colorPaletteYellowForeground2 = "var(--colorPaletteYellowForeground2)";
|
|
4027
|
-
const colorPaletteYellowForeground3 = "var(--colorPaletteYellowForeground3)";
|
|
4028
|
-
const colorPaletteYellowForegroundInverted = "var(--colorPaletteYellowForegroundInverted)";
|
|
4029
|
-
const colorPaletteBerryBackground1 = "var(--colorPaletteBerryBackground1)";
|
|
4030
|
-
const colorPaletteBerryBackground2 = "var(--colorPaletteBerryBackground2)";
|
|
4031
|
-
const colorPaletteBerryBackground3 = "var(--colorPaletteBerryBackground3)";
|
|
4032
|
-
const colorPaletteBerryBorderActive = "var(--colorPaletteBerryBorderActive)";
|
|
4033
|
-
const colorPaletteBerryBorder1 = "var(--colorPaletteBerryBorder1)";
|
|
4034
|
-
const colorPaletteBerryBorder2 = "var(--colorPaletteBerryBorder2)";
|
|
4035
|
-
const colorPaletteBerryForeground1 = "var(--colorPaletteBerryForeground1)";
|
|
4036
|
-
const colorPaletteBerryForeground2 = "var(--colorPaletteBerryForeground2)";
|
|
4037
|
-
const colorPaletteBerryForeground3 = "var(--colorPaletteBerryForeground3)";
|
|
4038
|
-
const colorPaletteMarigoldBackground1 = "var(--colorPaletteMarigoldBackground1)";
|
|
4039
3698
|
const colorPaletteMarigoldBackground2 = "var(--colorPaletteMarigoldBackground2)";
|
|
4040
|
-
const colorPaletteMarigoldBackground3 = "var(--colorPaletteMarigoldBackground3)";
|
|
4041
|
-
const colorPaletteMarigoldBorderActive = "var(--colorPaletteMarigoldBorderActive)";
|
|
4042
|
-
const colorPaletteMarigoldBorder1 = "var(--colorPaletteMarigoldBorder1)";
|
|
4043
|
-
const colorPaletteMarigoldBorder2 = "var(--colorPaletteMarigoldBorder2)";
|
|
4044
|
-
const colorPaletteMarigoldForeground1 = "var(--colorPaletteMarigoldForeground1)";
|
|
4045
3699
|
const colorPaletteMarigoldForeground2 = "var(--colorPaletteMarigoldForeground2)";
|
|
4046
|
-
const colorPaletteMarigoldForeground3 = "var(--colorPaletteMarigoldForeground3)";
|
|
4047
|
-
const colorPaletteLightGreenBackground1 = "var(--colorPaletteLightGreenBackground1)";
|
|
4048
|
-
const colorPaletteLightGreenBackground2 = "var(--colorPaletteLightGreenBackground2)";
|
|
4049
|
-
const colorPaletteLightGreenBackground3 = "var(--colorPaletteLightGreenBackground3)";
|
|
4050
|
-
const colorPaletteLightGreenBorderActive = "var(--colorPaletteLightGreenBorderActive)";
|
|
4051
|
-
const colorPaletteLightGreenBorder1 = "var(--colorPaletteLightGreenBorder1)";
|
|
4052
|
-
const colorPaletteLightGreenBorder2 = "var(--colorPaletteLightGreenBorder2)";
|
|
4053
|
-
const colorPaletteLightGreenForeground1 = "var(--colorPaletteLightGreenForeground1)";
|
|
4054
|
-
const colorPaletteLightGreenForeground2 = "var(--colorPaletteLightGreenForeground2)";
|
|
4055
|
-
const colorPaletteLightGreenForeground3 = "var(--colorPaletteLightGreenForeground3)";
|
|
4056
3700
|
const colorPaletteAnchorBackground2 = "var(--colorPaletteAnchorBackground2)";
|
|
4057
|
-
const colorPaletteAnchorBorderActive = "var(--colorPaletteAnchorBorderActive)";
|
|
4058
3701
|
const colorPaletteAnchorForeground2 = "var(--colorPaletteAnchorForeground2)";
|
|
4059
3702
|
const colorPaletteBeigeBackground2 = "var(--colorPaletteBeigeBackground2)";
|
|
4060
|
-
const colorPaletteBeigeBorderActive = "var(--colorPaletteBeigeBorderActive)";
|
|
4061
3703
|
const colorPaletteBeigeForeground2 = "var(--colorPaletteBeigeForeground2)";
|
|
4062
3704
|
const colorPaletteBlueBackground2 = "var(--colorPaletteBlueBackground2)";
|
|
4063
|
-
const colorPaletteBlueBorderActive = "var(--colorPaletteBlueBorderActive)";
|
|
4064
3705
|
const colorPaletteBlueForeground2 = "var(--colorPaletteBlueForeground2)";
|
|
4065
3706
|
const colorPaletteBrassBackground2 = "var(--colorPaletteBrassBackground2)";
|
|
4066
|
-
const colorPaletteBrassBorderActive = "var(--colorPaletteBrassBorderActive)";
|
|
4067
3707
|
const colorPaletteBrassForeground2 = "var(--colorPaletteBrassForeground2)";
|
|
4068
3708
|
const colorPaletteBrownBackground2 = "var(--colorPaletteBrownBackground2)";
|
|
4069
|
-
const colorPaletteBrownBorderActive = "var(--colorPaletteBrownBorderActive)";
|
|
4070
3709
|
const colorPaletteBrownForeground2 = "var(--colorPaletteBrownForeground2)";
|
|
4071
3710
|
const colorPaletteCornflowerBackground2 = "var(--colorPaletteCornflowerBackground2)";
|
|
4072
|
-
const colorPaletteCornflowerBorderActive = "var(--colorPaletteCornflowerBorderActive)";
|
|
4073
3711
|
const colorPaletteCornflowerForeground2 = "var(--colorPaletteCornflowerForeground2)";
|
|
4074
3712
|
const colorPaletteCranberryBackground2 = "var(--colorPaletteCranberryBackground2)";
|
|
4075
|
-
const colorPaletteCranberryBorderActive = "var(--colorPaletteCranberryBorderActive)";
|
|
4076
3713
|
const colorPaletteCranberryForeground2 = "var(--colorPaletteCranberryForeground2)";
|
|
4077
3714
|
const colorPaletteDarkGreenBackground2 = "var(--colorPaletteDarkGreenBackground2)";
|
|
4078
|
-
const colorPaletteDarkGreenBorderActive = "var(--colorPaletteDarkGreenBorderActive)";
|
|
4079
3715
|
const colorPaletteDarkGreenForeground2 = "var(--colorPaletteDarkGreenForeground2)";
|
|
4080
3716
|
const colorPaletteDarkRedBackground2 = "var(--colorPaletteDarkRedBackground2)";
|
|
4081
|
-
const colorPaletteDarkRedBorderActive = "var(--colorPaletteDarkRedBorderActive)";
|
|
4082
3717
|
const colorPaletteDarkRedForeground2 = "var(--colorPaletteDarkRedForeground2)";
|
|
4083
3718
|
const colorPaletteForestBackground2 = "var(--colorPaletteForestBackground2)";
|
|
4084
|
-
const colorPaletteForestBorderActive = "var(--colorPaletteForestBorderActive)";
|
|
4085
3719
|
const colorPaletteForestForeground2 = "var(--colorPaletteForestForeground2)";
|
|
4086
3720
|
const colorPaletteGoldBackground2 = "var(--colorPaletteGoldBackground2)";
|
|
4087
|
-
const colorPaletteGoldBorderActive = "var(--colorPaletteGoldBorderActive)";
|
|
4088
3721
|
const colorPaletteGoldForeground2 = "var(--colorPaletteGoldForeground2)";
|
|
4089
3722
|
const colorPaletteGrapeBackground2 = "var(--colorPaletteGrapeBackground2)";
|
|
4090
|
-
const colorPaletteGrapeBorderActive = "var(--colorPaletteGrapeBorderActive)";
|
|
4091
3723
|
const colorPaletteGrapeForeground2 = "var(--colorPaletteGrapeForeground2)";
|
|
4092
3724
|
const colorPaletteLavenderBackground2 = "var(--colorPaletteLavenderBackground2)";
|
|
4093
|
-
const colorPaletteLavenderBorderActive = "var(--colorPaletteLavenderBorderActive)";
|
|
4094
3725
|
const colorPaletteLavenderForeground2 = "var(--colorPaletteLavenderForeground2)";
|
|
4095
3726
|
const colorPaletteLightTealBackground2 = "var(--colorPaletteLightTealBackground2)";
|
|
4096
|
-
const colorPaletteLightTealBorderActive = "var(--colorPaletteLightTealBorderActive)";
|
|
4097
3727
|
const colorPaletteLightTealForeground2 = "var(--colorPaletteLightTealForeground2)";
|
|
4098
3728
|
const colorPaletteLilacBackground2 = "var(--colorPaletteLilacBackground2)";
|
|
4099
|
-
const colorPaletteLilacBorderActive = "var(--colorPaletteLilacBorderActive)";
|
|
4100
3729
|
const colorPaletteLilacForeground2 = "var(--colorPaletteLilacForeground2)";
|
|
4101
3730
|
const colorPaletteMagentaBackground2 = "var(--colorPaletteMagentaBackground2)";
|
|
4102
|
-
const colorPaletteMagentaBorderActive = "var(--colorPaletteMagentaBorderActive)";
|
|
4103
3731
|
const colorPaletteMagentaForeground2 = "var(--colorPaletteMagentaForeground2)";
|
|
4104
3732
|
const colorPaletteMinkBackground2 = "var(--colorPaletteMinkBackground2)";
|
|
4105
|
-
const colorPaletteMinkBorderActive = "var(--colorPaletteMinkBorderActive)";
|
|
4106
3733
|
const colorPaletteMinkForeground2 = "var(--colorPaletteMinkForeground2)";
|
|
4107
3734
|
const colorPaletteNavyBackground2 = "var(--colorPaletteNavyBackground2)";
|
|
4108
|
-
const colorPaletteNavyBorderActive = "var(--colorPaletteNavyBorderActive)";
|
|
4109
3735
|
const colorPaletteNavyForeground2 = "var(--colorPaletteNavyForeground2)";
|
|
4110
3736
|
const colorPalettePeachBackground2 = "var(--colorPalettePeachBackground2)";
|
|
4111
|
-
const colorPalettePeachBorderActive = "var(--colorPalettePeachBorderActive)";
|
|
4112
3737
|
const colorPalettePeachForeground2 = "var(--colorPalettePeachForeground2)";
|
|
4113
3738
|
const colorPalettePinkBackground2 = "var(--colorPalettePinkBackground2)";
|
|
4114
|
-
const colorPalettePinkBorderActive = "var(--colorPalettePinkBorderActive)";
|
|
4115
3739
|
const colorPalettePinkForeground2 = "var(--colorPalettePinkForeground2)";
|
|
4116
3740
|
const colorPalettePlatinumBackground2 = "var(--colorPalettePlatinumBackground2)";
|
|
4117
|
-
const colorPalettePlatinumBorderActive = "var(--colorPalettePlatinumBorderActive)";
|
|
4118
3741
|
const colorPalettePlatinumForeground2 = "var(--colorPalettePlatinumForeground2)";
|
|
4119
3742
|
const colorPalettePlumBackground2 = "var(--colorPalettePlumBackground2)";
|
|
4120
|
-
const colorPalettePlumBorderActive = "var(--colorPalettePlumBorderActive)";
|
|
4121
3743
|
const colorPalettePlumForeground2 = "var(--colorPalettePlumForeground2)";
|
|
4122
3744
|
const colorPalettePumpkinBackground2 = "var(--colorPalettePumpkinBackground2)";
|
|
4123
|
-
const colorPalettePumpkinBorderActive = "var(--colorPalettePumpkinBorderActive)";
|
|
4124
3745
|
const colorPalettePumpkinForeground2 = "var(--colorPalettePumpkinForeground2)";
|
|
4125
3746
|
const colorPalettePurpleBackground2 = "var(--colorPalettePurpleBackground2)";
|
|
4126
|
-
const colorPalettePurpleBorderActive = "var(--colorPalettePurpleBorderActive)";
|
|
4127
3747
|
const colorPalettePurpleForeground2 = "var(--colorPalettePurpleForeground2)";
|
|
4128
3748
|
const colorPaletteRoyalBlueBackground2 = "var(--colorPaletteRoyalBlueBackground2)";
|
|
4129
|
-
const colorPaletteRoyalBlueBorderActive = "var(--colorPaletteRoyalBlueBorderActive)";
|
|
4130
3749
|
const colorPaletteRoyalBlueForeground2 = "var(--colorPaletteRoyalBlueForeground2)";
|
|
4131
3750
|
const colorPaletteSeafoamBackground2 = "var(--colorPaletteSeafoamBackground2)";
|
|
4132
|
-
const colorPaletteSeafoamBorderActive = "var(--colorPaletteSeafoamBorderActive)";
|
|
4133
3751
|
const colorPaletteSeafoamForeground2 = "var(--colorPaletteSeafoamForeground2)";
|
|
4134
3752
|
const colorPaletteSteelBackground2 = "var(--colorPaletteSteelBackground2)";
|
|
4135
|
-
const colorPaletteSteelBorderActive = "var(--colorPaletteSteelBorderActive)";
|
|
4136
3753
|
const colorPaletteSteelForeground2 = "var(--colorPaletteSteelForeground2)";
|
|
4137
3754
|
const colorPaletteTealBackground2 = "var(--colorPaletteTealBackground2)";
|
|
4138
|
-
const colorPaletteTealBorderActive = "var(--colorPaletteTealBorderActive)";
|
|
4139
3755
|
const colorPaletteTealForeground2 = "var(--colorPaletteTealForeground2)";
|
|
4140
|
-
const colorStatusSuccessBackground1 = "var(--colorStatusSuccessBackground1)";
|
|
4141
|
-
const colorStatusSuccessBackground2 = "var(--colorStatusSuccessBackground2)";
|
|
4142
|
-
const colorStatusSuccessBackground3 = "var(--colorStatusSuccessBackground3)";
|
|
4143
|
-
const colorStatusSuccessForeground1 = "var(--colorStatusSuccessForeground1)";
|
|
4144
|
-
const colorStatusSuccessForeground2 = "var(--colorStatusSuccessForeground2)";
|
|
4145
|
-
const colorStatusSuccessForeground3 = "var(--colorStatusSuccessForeground3)";
|
|
4146
|
-
const colorStatusSuccessForegroundInverted = "var(--colorStatusSuccessForegroundInverted)";
|
|
4147
|
-
const colorStatusSuccessBorderActive = "var(--colorStatusSuccessBorderActive)";
|
|
4148
|
-
const colorStatusSuccessBorder1 = "var(--colorStatusSuccessBorder1)";
|
|
4149
|
-
const colorStatusSuccessBorder2 = "var(--colorStatusSuccessBorder2)";
|
|
4150
|
-
const colorStatusWarningBackground1 = "var(--colorStatusWarningBackground1)";
|
|
4151
|
-
const colorStatusWarningBackground2 = "var(--colorStatusWarningBackground2)";
|
|
4152
|
-
const colorStatusWarningBackground3 = "var(--colorStatusWarningBackground3)";
|
|
4153
|
-
const colorStatusWarningForeground1 = "var(--colorStatusWarningForeground1)";
|
|
4154
|
-
const colorStatusWarningForeground2 = "var(--colorStatusWarningForeground2)";
|
|
4155
|
-
const colorStatusWarningForeground3 = "var(--colorStatusWarningForeground3)";
|
|
4156
|
-
const colorStatusWarningForegroundInverted = "var(--colorStatusWarningForegroundInverted)";
|
|
4157
|
-
const colorStatusWarningBorderActive = "var(--colorStatusWarningBorderActive)";
|
|
4158
|
-
const colorStatusWarningBorder1 = "var(--colorStatusWarningBorder1)";
|
|
4159
|
-
const colorStatusWarningBorder2 = "var(--colorStatusWarningBorder2)";
|
|
4160
|
-
const colorStatusDangerBackground1 = "var(--colorStatusDangerBackground1)";
|
|
4161
|
-
const colorStatusDangerBackground2 = "var(--colorStatusDangerBackground2)";
|
|
4162
|
-
const colorStatusDangerBackground3 = "var(--colorStatusDangerBackground3)";
|
|
4163
|
-
const colorStatusDangerBackground3Hover = "var(--colorStatusDangerBackground3Hover)";
|
|
4164
|
-
const colorStatusDangerBackground3Pressed = "var(--colorStatusDangerBackground3Pressed)";
|
|
4165
|
-
const colorStatusDangerForeground1 = "var(--colorStatusDangerForeground1)";
|
|
4166
|
-
const colorStatusDangerForeground2 = "var(--colorStatusDangerForeground2)";
|
|
4167
|
-
const colorStatusDangerForeground3 = "var(--colorStatusDangerForeground3)";
|
|
4168
|
-
const colorStatusDangerForegroundInverted = "var(--colorStatusDangerForegroundInverted)";
|
|
4169
|
-
const colorStatusDangerBorderActive = "var(--colorStatusDangerBorderActive)";
|
|
4170
|
-
const colorStatusDangerBorder1 = "var(--colorStatusDangerBorder1)";
|
|
4171
|
-
const colorStatusDangerBorder2 = "var(--colorStatusDangerBorder2)";
|
|
4172
3756
|
const borderRadiusNone = "var(--borderRadiusNone)";
|
|
4173
3757
|
const borderRadiusSmall = "var(--borderRadiusSmall)";
|
|
4174
3758
|
const borderRadiusMedium = "var(--borderRadiusMedium)";
|
|
@@ -4208,17 +3792,10 @@ const shadow8 = "var(--shadow8)";
|
|
|
4208
3792
|
const shadow16 = "var(--shadow16)";
|
|
4209
3793
|
const shadow28 = "var(--shadow28)";
|
|
4210
3794
|
const shadow64 = "var(--shadow64)";
|
|
4211
|
-
const shadow2Brand = "var(--shadow2Brand)";
|
|
4212
|
-
const shadow4Brand = "var(--shadow4Brand)";
|
|
4213
|
-
const shadow8Brand = "var(--shadow8Brand)";
|
|
4214
|
-
const shadow16Brand = "var(--shadow16Brand)";
|
|
4215
|
-
const shadow28Brand = "var(--shadow28Brand)";
|
|
4216
|
-
const shadow64Brand = "var(--shadow64Brand)";
|
|
4217
3795
|
const strokeWidthThin = "var(--strokeWidthThin)";
|
|
4218
3796
|
const strokeWidthThick = "var(--strokeWidthThick)";
|
|
4219
3797
|
const strokeWidthThicker = "var(--strokeWidthThicker)";
|
|
4220
3798
|
const strokeWidthThickest = "var(--strokeWidthThickest)";
|
|
4221
|
-
const spacingHorizontalNone = "var(--spacingHorizontalNone)";
|
|
4222
3799
|
const spacingHorizontalXXS = "var(--spacingHorizontalXXS)";
|
|
4223
3800
|
const spacingHorizontalXS = "var(--spacingHorizontalXS)";
|
|
4224
3801
|
const spacingHorizontalSNudge = "var(--spacingHorizontalSNudge)";
|
|
@@ -4226,25 +3803,17 @@ const spacingHorizontalS = "var(--spacingHorizontalS)";
|
|
|
4226
3803
|
const spacingHorizontalMNudge = "var(--spacingHorizontalMNudge)";
|
|
4227
3804
|
const spacingHorizontalM = "var(--spacingHorizontalM)";
|
|
4228
3805
|
const spacingHorizontalL = "var(--spacingHorizontalL)";
|
|
4229
|
-
const spacingHorizontalXL = "var(--spacingHorizontalXL)";
|
|
4230
3806
|
const spacingHorizontalXXL = "var(--spacingHorizontalXXL)";
|
|
4231
|
-
const spacingHorizontalXXXL = "var(--spacingHorizontalXXXL)";
|
|
4232
|
-
const spacingVerticalNone = "var(--spacingVerticalNone)";
|
|
4233
3807
|
const spacingVerticalXXS = "var(--spacingVerticalXXS)";
|
|
4234
3808
|
const spacingVerticalXS = "var(--spacingVerticalXS)";
|
|
4235
3809
|
const spacingVerticalSNudge = "var(--spacingVerticalSNudge)";
|
|
4236
3810
|
const spacingVerticalS = "var(--spacingVerticalS)";
|
|
4237
3811
|
const spacingVerticalMNudge = "var(--spacingVerticalMNudge)";
|
|
4238
|
-
const spacingVerticalM = "var(--spacingVerticalM)";
|
|
4239
3812
|
const spacingVerticalL = "var(--spacingVerticalL)";
|
|
4240
|
-
const spacingVerticalXL = "var(--spacingVerticalXL)";
|
|
4241
3813
|
const spacingVerticalXXL = "var(--spacingVerticalXXL)";
|
|
4242
|
-
const spacingVerticalXXXL = "var(--spacingVerticalXXXL)";
|
|
4243
3814
|
const durationUltraFast = "var(--durationUltraFast)";
|
|
4244
3815
|
const durationFaster = "var(--durationFaster)";
|
|
4245
|
-
const durationFast = "var(--durationFast)";
|
|
4246
3816
|
const durationNormal = "var(--durationNormal)";
|
|
4247
|
-
const durationGentle = "var(--durationGentle)";
|
|
4248
3817
|
const durationSlow = "var(--durationSlow)";
|
|
4249
3818
|
const durationSlower = "var(--durationSlower)";
|
|
4250
3819
|
const durationUltraSlow = "var(--durationUltraSlow)";
|
|
@@ -4258,447 +3827,7 @@ const curveEasyEaseMax = "var(--curveEasyEaseMax)";
|
|
|
4258
3827
|
const curveEasyEase = "var(--curveEasyEase)";
|
|
4259
3828
|
const curveLinear = "var(--curveLinear)";
|
|
4260
3829
|
|
|
4261
|
-
|
|
4262
|
-
__proto__: null,
|
|
4263
|
-
colorNeutralForeground1: colorNeutralForeground1,
|
|
4264
|
-
colorNeutralForeground1Hover: colorNeutralForeground1Hover,
|
|
4265
|
-
colorNeutralForeground1Pressed: colorNeutralForeground1Pressed,
|
|
4266
|
-
colorNeutralForeground1Selected: colorNeutralForeground1Selected,
|
|
4267
|
-
colorNeutralForeground2: colorNeutralForeground2,
|
|
4268
|
-
colorNeutralForeground2Hover: colorNeutralForeground2Hover,
|
|
4269
|
-
colorNeutralForeground2Pressed: colorNeutralForeground2Pressed,
|
|
4270
|
-
colorNeutralForeground2Selected: colorNeutralForeground2Selected,
|
|
4271
|
-
colorNeutralForeground2BrandHover: colorNeutralForeground2BrandHover,
|
|
4272
|
-
colorNeutralForeground2BrandPressed: colorNeutralForeground2BrandPressed,
|
|
4273
|
-
colorNeutralForeground2BrandSelected: colorNeutralForeground2BrandSelected,
|
|
4274
|
-
colorNeutralForeground3: colorNeutralForeground3,
|
|
4275
|
-
colorNeutralForeground3Hover: colorNeutralForeground3Hover,
|
|
4276
|
-
colorNeutralForeground3Pressed: colorNeutralForeground3Pressed,
|
|
4277
|
-
colorNeutralForeground3Selected: colorNeutralForeground3Selected,
|
|
4278
|
-
colorNeutralForeground3BrandHover: colorNeutralForeground3BrandHover,
|
|
4279
|
-
colorNeutralForeground3BrandPressed: colorNeutralForeground3BrandPressed,
|
|
4280
|
-
colorNeutralForeground3BrandSelected: colorNeutralForeground3BrandSelected,
|
|
4281
|
-
colorNeutralForeground4: colorNeutralForeground4,
|
|
4282
|
-
colorNeutralForegroundDisabled: colorNeutralForegroundDisabled,
|
|
4283
|
-
colorBrandForegroundLink: colorBrandForegroundLink,
|
|
4284
|
-
colorBrandForegroundLinkHover: colorBrandForegroundLinkHover,
|
|
4285
|
-
colorBrandForegroundLinkPressed: colorBrandForegroundLinkPressed,
|
|
4286
|
-
colorBrandForegroundLinkSelected: colorBrandForegroundLinkSelected,
|
|
4287
|
-
colorNeutralForeground2Link: colorNeutralForeground2Link,
|
|
4288
|
-
colorNeutralForeground2LinkHover: colorNeutralForeground2LinkHover,
|
|
4289
|
-
colorNeutralForeground2LinkPressed: colorNeutralForeground2LinkPressed,
|
|
4290
|
-
colorNeutralForeground2LinkSelected: colorNeutralForeground2LinkSelected,
|
|
4291
|
-
colorCompoundBrandForeground1: colorCompoundBrandForeground1,
|
|
4292
|
-
colorCompoundBrandForeground1Hover: colorCompoundBrandForeground1Hover,
|
|
4293
|
-
colorCompoundBrandForeground1Pressed: colorCompoundBrandForeground1Pressed,
|
|
4294
|
-
colorNeutralForegroundOnBrand: colorNeutralForegroundOnBrand,
|
|
4295
|
-
colorNeutralForegroundInverted: colorNeutralForegroundInverted,
|
|
4296
|
-
colorNeutralForegroundInvertedHover: colorNeutralForegroundInvertedHover,
|
|
4297
|
-
colorNeutralForegroundInvertedPressed: colorNeutralForegroundInvertedPressed,
|
|
4298
|
-
colorNeutralForegroundInvertedSelected: colorNeutralForegroundInvertedSelected,
|
|
4299
|
-
colorNeutralForegroundInverted2: colorNeutralForegroundInverted2,
|
|
4300
|
-
colorNeutralForegroundStaticInverted: colorNeutralForegroundStaticInverted,
|
|
4301
|
-
colorNeutralForegroundInvertedLink: colorNeutralForegroundInvertedLink,
|
|
4302
|
-
colorNeutralForegroundInvertedLinkHover: colorNeutralForegroundInvertedLinkHover,
|
|
4303
|
-
colorNeutralForegroundInvertedLinkPressed: colorNeutralForegroundInvertedLinkPressed,
|
|
4304
|
-
colorNeutralForegroundInvertedLinkSelected: colorNeutralForegroundInvertedLinkSelected,
|
|
4305
|
-
colorNeutralForegroundInvertedDisabled: colorNeutralForegroundInvertedDisabled,
|
|
4306
|
-
colorBrandForeground1: colorBrandForeground1,
|
|
4307
|
-
colorBrandForeground2: colorBrandForeground2,
|
|
4308
|
-
colorBrandForeground2Hover: colorBrandForeground2Hover,
|
|
4309
|
-
colorBrandForeground2Pressed: colorBrandForeground2Pressed,
|
|
4310
|
-
colorNeutralForeground1Static: colorNeutralForeground1Static,
|
|
4311
|
-
colorBrandForegroundInverted: colorBrandForegroundInverted,
|
|
4312
|
-
colorBrandForegroundInvertedHover: colorBrandForegroundInvertedHover,
|
|
4313
|
-
colorBrandForegroundInvertedPressed: colorBrandForegroundInvertedPressed,
|
|
4314
|
-
colorBrandForegroundOnLight: colorBrandForegroundOnLight,
|
|
4315
|
-
colorBrandForegroundOnLightHover: colorBrandForegroundOnLightHover,
|
|
4316
|
-
colorBrandForegroundOnLightPressed: colorBrandForegroundOnLightPressed,
|
|
4317
|
-
colorBrandForegroundOnLightSelected: colorBrandForegroundOnLightSelected,
|
|
4318
|
-
colorNeutralBackground1: colorNeutralBackground1,
|
|
4319
|
-
colorNeutralBackground1Hover: colorNeutralBackground1Hover,
|
|
4320
|
-
colorNeutralBackground1Pressed: colorNeutralBackground1Pressed,
|
|
4321
|
-
colorNeutralBackground1Selected: colorNeutralBackground1Selected,
|
|
4322
|
-
colorNeutralBackground2: colorNeutralBackground2,
|
|
4323
|
-
colorNeutralBackground2Hover: colorNeutralBackground2Hover,
|
|
4324
|
-
colorNeutralBackground2Pressed: colorNeutralBackground2Pressed,
|
|
4325
|
-
colorNeutralBackground2Selected: colorNeutralBackground2Selected,
|
|
4326
|
-
colorNeutralBackground3: colorNeutralBackground3,
|
|
4327
|
-
colorNeutralBackground3Hover: colorNeutralBackground3Hover,
|
|
4328
|
-
colorNeutralBackground3Pressed: colorNeutralBackground3Pressed,
|
|
4329
|
-
colorNeutralBackground3Selected: colorNeutralBackground3Selected,
|
|
4330
|
-
colorNeutralBackground4: colorNeutralBackground4,
|
|
4331
|
-
colorNeutralBackground4Hover: colorNeutralBackground4Hover,
|
|
4332
|
-
colorNeutralBackground4Pressed: colorNeutralBackground4Pressed,
|
|
4333
|
-
colorNeutralBackground4Selected: colorNeutralBackground4Selected,
|
|
4334
|
-
colorNeutralBackground5: colorNeutralBackground5,
|
|
4335
|
-
colorNeutralBackground5Hover: colorNeutralBackground5Hover,
|
|
4336
|
-
colorNeutralBackground5Pressed: colorNeutralBackground5Pressed,
|
|
4337
|
-
colorNeutralBackground5Selected: colorNeutralBackground5Selected,
|
|
4338
|
-
colorNeutralBackground6: colorNeutralBackground6,
|
|
4339
|
-
colorNeutralBackgroundInverted: colorNeutralBackgroundInverted,
|
|
4340
|
-
colorNeutralBackgroundStatic: colorNeutralBackgroundStatic,
|
|
4341
|
-
colorNeutralBackgroundAlpha: colorNeutralBackgroundAlpha,
|
|
4342
|
-
colorNeutralBackgroundAlpha2: colorNeutralBackgroundAlpha2,
|
|
4343
|
-
colorSubtleBackground: colorSubtleBackground,
|
|
4344
|
-
colorSubtleBackgroundHover: colorSubtleBackgroundHover,
|
|
4345
|
-
colorSubtleBackgroundPressed: colorSubtleBackgroundPressed,
|
|
4346
|
-
colorSubtleBackgroundSelected: colorSubtleBackgroundSelected,
|
|
4347
|
-
colorSubtleBackgroundLightAlphaHover: colorSubtleBackgroundLightAlphaHover,
|
|
4348
|
-
colorSubtleBackgroundLightAlphaPressed: colorSubtleBackgroundLightAlphaPressed,
|
|
4349
|
-
colorSubtleBackgroundLightAlphaSelected: colorSubtleBackgroundLightAlphaSelected,
|
|
4350
|
-
colorSubtleBackgroundInverted: colorSubtleBackgroundInverted,
|
|
4351
|
-
colorSubtleBackgroundInvertedHover: colorSubtleBackgroundInvertedHover,
|
|
4352
|
-
colorSubtleBackgroundInvertedPressed: colorSubtleBackgroundInvertedPressed,
|
|
4353
|
-
colorSubtleBackgroundInvertedSelected: colorSubtleBackgroundInvertedSelected,
|
|
4354
|
-
colorTransparentBackground: colorTransparentBackground,
|
|
4355
|
-
colorTransparentBackgroundHover: colorTransparentBackgroundHover,
|
|
4356
|
-
colorTransparentBackgroundPressed: colorTransparentBackgroundPressed,
|
|
4357
|
-
colorTransparentBackgroundSelected: colorTransparentBackgroundSelected,
|
|
4358
|
-
colorNeutralBackgroundDisabled: colorNeutralBackgroundDisabled,
|
|
4359
|
-
colorNeutralBackgroundInvertedDisabled: colorNeutralBackgroundInvertedDisabled,
|
|
4360
|
-
colorNeutralStencil1: colorNeutralStencil1,
|
|
4361
|
-
colorNeutralStencil2: colorNeutralStencil2,
|
|
4362
|
-
colorNeutralStencil1Alpha: colorNeutralStencil1Alpha,
|
|
4363
|
-
colorNeutralStencil2Alpha: colorNeutralStencil2Alpha,
|
|
4364
|
-
colorBackgroundOverlay: colorBackgroundOverlay,
|
|
4365
|
-
colorScrollbarOverlay: colorScrollbarOverlay,
|
|
4366
|
-
colorBrandBackground: colorBrandBackground,
|
|
4367
|
-
colorBrandBackgroundHover: colorBrandBackgroundHover,
|
|
4368
|
-
colorBrandBackgroundPressed: colorBrandBackgroundPressed,
|
|
4369
|
-
colorBrandBackgroundSelected: colorBrandBackgroundSelected,
|
|
4370
|
-
colorCompoundBrandBackground: colorCompoundBrandBackground,
|
|
4371
|
-
colorCompoundBrandBackgroundHover: colorCompoundBrandBackgroundHover,
|
|
4372
|
-
colorCompoundBrandBackgroundPressed: colorCompoundBrandBackgroundPressed,
|
|
4373
|
-
colorBrandBackgroundStatic: colorBrandBackgroundStatic,
|
|
4374
|
-
colorBrandBackground2: colorBrandBackground2,
|
|
4375
|
-
colorBrandBackground2Hover: colorBrandBackground2Hover,
|
|
4376
|
-
colorBrandBackground2Pressed: colorBrandBackground2Pressed,
|
|
4377
|
-
colorBrandBackground3Static: colorBrandBackground3Static,
|
|
4378
|
-
colorBrandBackground4Static: colorBrandBackground4Static,
|
|
4379
|
-
colorBrandBackgroundInverted: colorBrandBackgroundInverted,
|
|
4380
|
-
colorBrandBackgroundInvertedHover: colorBrandBackgroundInvertedHover,
|
|
4381
|
-
colorBrandBackgroundInvertedPressed: colorBrandBackgroundInvertedPressed,
|
|
4382
|
-
colorBrandBackgroundInvertedSelected: colorBrandBackgroundInvertedSelected,
|
|
4383
|
-
colorNeutralCardBackground: colorNeutralCardBackground,
|
|
4384
|
-
colorNeutralCardBackgroundHover: colorNeutralCardBackgroundHover,
|
|
4385
|
-
colorNeutralCardBackgroundPressed: colorNeutralCardBackgroundPressed,
|
|
4386
|
-
colorNeutralCardBackgroundSelected: colorNeutralCardBackgroundSelected,
|
|
4387
|
-
colorNeutralCardBackgroundDisabled: colorNeutralCardBackgroundDisabled,
|
|
4388
|
-
colorNeutralStrokeAccessible: colorNeutralStrokeAccessible,
|
|
4389
|
-
colorNeutralStrokeAccessibleHover: colorNeutralStrokeAccessibleHover,
|
|
4390
|
-
colorNeutralStrokeAccessiblePressed: colorNeutralStrokeAccessiblePressed,
|
|
4391
|
-
colorNeutralStrokeAccessibleSelected: colorNeutralStrokeAccessibleSelected,
|
|
4392
|
-
colorNeutralStroke1: colorNeutralStroke1,
|
|
4393
|
-
colorNeutralStroke1Hover: colorNeutralStroke1Hover,
|
|
4394
|
-
colorNeutralStroke1Pressed: colorNeutralStroke1Pressed,
|
|
4395
|
-
colorNeutralStroke1Selected: colorNeutralStroke1Selected,
|
|
4396
|
-
colorNeutralStroke2: colorNeutralStroke2,
|
|
4397
|
-
colorNeutralStroke3: colorNeutralStroke3,
|
|
4398
|
-
colorNeutralStrokeSubtle: colorNeutralStrokeSubtle,
|
|
4399
|
-
colorNeutralStrokeOnBrand: colorNeutralStrokeOnBrand,
|
|
4400
|
-
colorNeutralStrokeOnBrand2: colorNeutralStrokeOnBrand2,
|
|
4401
|
-
colorNeutralStrokeOnBrand2Hover: colorNeutralStrokeOnBrand2Hover,
|
|
4402
|
-
colorNeutralStrokeOnBrand2Pressed: colorNeutralStrokeOnBrand2Pressed,
|
|
4403
|
-
colorNeutralStrokeOnBrand2Selected: colorNeutralStrokeOnBrand2Selected,
|
|
4404
|
-
colorBrandStroke1: colorBrandStroke1,
|
|
4405
|
-
colorBrandStroke2: colorBrandStroke2,
|
|
4406
|
-
colorBrandStroke2Hover: colorBrandStroke2Hover,
|
|
4407
|
-
colorBrandStroke2Pressed: colorBrandStroke2Pressed,
|
|
4408
|
-
colorBrandStroke2Contrast: colorBrandStroke2Contrast,
|
|
4409
|
-
colorCompoundBrandStroke: colorCompoundBrandStroke,
|
|
4410
|
-
colorCompoundBrandStrokeHover: colorCompoundBrandStrokeHover,
|
|
4411
|
-
colorCompoundBrandStrokePressed: colorCompoundBrandStrokePressed,
|
|
4412
|
-
colorNeutralStrokeDisabled: colorNeutralStrokeDisabled,
|
|
4413
|
-
colorNeutralStrokeInvertedDisabled: colorNeutralStrokeInvertedDisabled,
|
|
4414
|
-
colorTransparentStroke: colorTransparentStroke,
|
|
4415
|
-
colorTransparentStrokeInteractive: colorTransparentStrokeInteractive,
|
|
4416
|
-
colorTransparentStrokeDisabled: colorTransparentStrokeDisabled,
|
|
4417
|
-
colorNeutralStrokeAlpha: colorNeutralStrokeAlpha,
|
|
4418
|
-
colorNeutralStrokeAlpha2: colorNeutralStrokeAlpha2,
|
|
4419
|
-
colorStrokeFocus1: colorStrokeFocus1,
|
|
4420
|
-
colorStrokeFocus2: colorStrokeFocus2,
|
|
4421
|
-
colorNeutralShadowAmbient: colorNeutralShadowAmbient,
|
|
4422
|
-
colorNeutralShadowKey: colorNeutralShadowKey,
|
|
4423
|
-
colorNeutralShadowAmbientLighter: colorNeutralShadowAmbientLighter,
|
|
4424
|
-
colorNeutralShadowKeyLighter: colorNeutralShadowKeyLighter,
|
|
4425
|
-
colorNeutralShadowAmbientDarker: colorNeutralShadowAmbientDarker,
|
|
4426
|
-
colorNeutralShadowKeyDarker: colorNeutralShadowKeyDarker,
|
|
4427
|
-
colorBrandShadowAmbient: colorBrandShadowAmbient,
|
|
4428
|
-
colorBrandShadowKey: colorBrandShadowKey,
|
|
4429
|
-
colorPaletteRedBackground1: colorPaletteRedBackground1,
|
|
4430
|
-
colorPaletteRedBackground2: colorPaletteRedBackground2,
|
|
4431
|
-
colorPaletteRedBackground3: colorPaletteRedBackground3,
|
|
4432
|
-
colorPaletteRedBorderActive: colorPaletteRedBorderActive,
|
|
4433
|
-
colorPaletteRedBorder1: colorPaletteRedBorder1,
|
|
4434
|
-
colorPaletteRedBorder2: colorPaletteRedBorder2,
|
|
4435
|
-
colorPaletteRedForeground1: colorPaletteRedForeground1,
|
|
4436
|
-
colorPaletteRedForeground2: colorPaletteRedForeground2,
|
|
4437
|
-
colorPaletteRedForeground3: colorPaletteRedForeground3,
|
|
4438
|
-
colorPaletteRedForegroundInverted: colorPaletteRedForegroundInverted,
|
|
4439
|
-
colorPaletteGreenBackground1: colorPaletteGreenBackground1,
|
|
4440
|
-
colorPaletteGreenBackground2: colorPaletteGreenBackground2,
|
|
4441
|
-
colorPaletteGreenBackground3: colorPaletteGreenBackground3,
|
|
4442
|
-
colorPaletteGreenBorderActive: colorPaletteGreenBorderActive,
|
|
4443
|
-
colorPaletteGreenBorder1: colorPaletteGreenBorder1,
|
|
4444
|
-
colorPaletteGreenBorder2: colorPaletteGreenBorder2,
|
|
4445
|
-
colorPaletteGreenForeground1: colorPaletteGreenForeground1,
|
|
4446
|
-
colorPaletteGreenForeground2: colorPaletteGreenForeground2,
|
|
4447
|
-
colorPaletteGreenForeground3: colorPaletteGreenForeground3,
|
|
4448
|
-
colorPaletteGreenForegroundInverted: colorPaletteGreenForegroundInverted,
|
|
4449
|
-
colorPaletteDarkOrangeBackground1: colorPaletteDarkOrangeBackground1,
|
|
4450
|
-
colorPaletteDarkOrangeBackground2: colorPaletteDarkOrangeBackground2,
|
|
4451
|
-
colorPaletteDarkOrangeBackground3: colorPaletteDarkOrangeBackground3,
|
|
4452
|
-
colorPaletteDarkOrangeBorderActive: colorPaletteDarkOrangeBorderActive,
|
|
4453
|
-
colorPaletteDarkOrangeBorder1: colorPaletteDarkOrangeBorder1,
|
|
4454
|
-
colorPaletteDarkOrangeBorder2: colorPaletteDarkOrangeBorder2,
|
|
4455
|
-
colorPaletteDarkOrangeForeground1: colorPaletteDarkOrangeForeground1,
|
|
4456
|
-
colorPaletteDarkOrangeForeground2: colorPaletteDarkOrangeForeground2,
|
|
4457
|
-
colorPaletteDarkOrangeForeground3: colorPaletteDarkOrangeForeground3,
|
|
4458
|
-
colorPaletteYellowBackground1: colorPaletteYellowBackground1,
|
|
4459
|
-
colorPaletteYellowBackground2: colorPaletteYellowBackground2,
|
|
4460
|
-
colorPaletteYellowBackground3: colorPaletteYellowBackground3,
|
|
4461
|
-
colorPaletteYellowBorderActive: colorPaletteYellowBorderActive,
|
|
4462
|
-
colorPaletteYellowBorder1: colorPaletteYellowBorder1,
|
|
4463
|
-
colorPaletteYellowBorder2: colorPaletteYellowBorder2,
|
|
4464
|
-
colorPaletteYellowForeground1: colorPaletteYellowForeground1,
|
|
4465
|
-
colorPaletteYellowForeground2: colorPaletteYellowForeground2,
|
|
4466
|
-
colorPaletteYellowForeground3: colorPaletteYellowForeground3,
|
|
4467
|
-
colorPaletteYellowForegroundInverted: colorPaletteYellowForegroundInverted,
|
|
4468
|
-
colorPaletteBerryBackground1: colorPaletteBerryBackground1,
|
|
4469
|
-
colorPaletteBerryBackground2: colorPaletteBerryBackground2,
|
|
4470
|
-
colorPaletteBerryBackground3: colorPaletteBerryBackground3,
|
|
4471
|
-
colorPaletteBerryBorderActive: colorPaletteBerryBorderActive,
|
|
4472
|
-
colorPaletteBerryBorder1: colorPaletteBerryBorder1,
|
|
4473
|
-
colorPaletteBerryBorder2: colorPaletteBerryBorder2,
|
|
4474
|
-
colorPaletteBerryForeground1: colorPaletteBerryForeground1,
|
|
4475
|
-
colorPaletteBerryForeground2: colorPaletteBerryForeground2,
|
|
4476
|
-
colorPaletteBerryForeground3: colorPaletteBerryForeground3,
|
|
4477
|
-
colorPaletteMarigoldBackground1: colorPaletteMarigoldBackground1,
|
|
4478
|
-
colorPaletteMarigoldBackground2: colorPaletteMarigoldBackground2,
|
|
4479
|
-
colorPaletteMarigoldBackground3: colorPaletteMarigoldBackground3,
|
|
4480
|
-
colorPaletteMarigoldBorderActive: colorPaletteMarigoldBorderActive,
|
|
4481
|
-
colorPaletteMarigoldBorder1: colorPaletteMarigoldBorder1,
|
|
4482
|
-
colorPaletteMarigoldBorder2: colorPaletteMarigoldBorder2,
|
|
4483
|
-
colorPaletteMarigoldForeground1: colorPaletteMarigoldForeground1,
|
|
4484
|
-
colorPaletteMarigoldForeground2: colorPaletteMarigoldForeground2,
|
|
4485
|
-
colorPaletteMarigoldForeground3: colorPaletteMarigoldForeground3,
|
|
4486
|
-
colorPaletteLightGreenBackground1: colorPaletteLightGreenBackground1,
|
|
4487
|
-
colorPaletteLightGreenBackground2: colorPaletteLightGreenBackground2,
|
|
4488
|
-
colorPaletteLightGreenBackground3: colorPaletteLightGreenBackground3,
|
|
4489
|
-
colorPaletteLightGreenBorderActive: colorPaletteLightGreenBorderActive,
|
|
4490
|
-
colorPaletteLightGreenBorder1: colorPaletteLightGreenBorder1,
|
|
4491
|
-
colorPaletteLightGreenBorder2: colorPaletteLightGreenBorder2,
|
|
4492
|
-
colorPaletteLightGreenForeground1: colorPaletteLightGreenForeground1,
|
|
4493
|
-
colorPaletteLightGreenForeground2: colorPaletteLightGreenForeground2,
|
|
4494
|
-
colorPaletteLightGreenForeground3: colorPaletteLightGreenForeground3,
|
|
4495
|
-
colorPaletteAnchorBackground2: colorPaletteAnchorBackground2,
|
|
4496
|
-
colorPaletteAnchorBorderActive: colorPaletteAnchorBorderActive,
|
|
4497
|
-
colorPaletteAnchorForeground2: colorPaletteAnchorForeground2,
|
|
4498
|
-
colorPaletteBeigeBackground2: colorPaletteBeigeBackground2,
|
|
4499
|
-
colorPaletteBeigeBorderActive: colorPaletteBeigeBorderActive,
|
|
4500
|
-
colorPaletteBeigeForeground2: colorPaletteBeigeForeground2,
|
|
4501
|
-
colorPaletteBlueBackground2: colorPaletteBlueBackground2,
|
|
4502
|
-
colorPaletteBlueBorderActive: colorPaletteBlueBorderActive,
|
|
4503
|
-
colorPaletteBlueForeground2: colorPaletteBlueForeground2,
|
|
4504
|
-
colorPaletteBrassBackground2: colorPaletteBrassBackground2,
|
|
4505
|
-
colorPaletteBrassBorderActive: colorPaletteBrassBorderActive,
|
|
4506
|
-
colorPaletteBrassForeground2: colorPaletteBrassForeground2,
|
|
4507
|
-
colorPaletteBrownBackground2: colorPaletteBrownBackground2,
|
|
4508
|
-
colorPaletteBrownBorderActive: colorPaletteBrownBorderActive,
|
|
4509
|
-
colorPaletteBrownForeground2: colorPaletteBrownForeground2,
|
|
4510
|
-
colorPaletteCornflowerBackground2: colorPaletteCornflowerBackground2,
|
|
4511
|
-
colorPaletteCornflowerBorderActive: colorPaletteCornflowerBorderActive,
|
|
4512
|
-
colorPaletteCornflowerForeground2: colorPaletteCornflowerForeground2,
|
|
4513
|
-
colorPaletteCranberryBackground2: colorPaletteCranberryBackground2,
|
|
4514
|
-
colorPaletteCranberryBorderActive: colorPaletteCranberryBorderActive,
|
|
4515
|
-
colorPaletteCranberryForeground2: colorPaletteCranberryForeground2,
|
|
4516
|
-
colorPaletteDarkGreenBackground2: colorPaletteDarkGreenBackground2,
|
|
4517
|
-
colorPaletteDarkGreenBorderActive: colorPaletteDarkGreenBorderActive,
|
|
4518
|
-
colorPaletteDarkGreenForeground2: colorPaletteDarkGreenForeground2,
|
|
4519
|
-
colorPaletteDarkRedBackground2: colorPaletteDarkRedBackground2,
|
|
4520
|
-
colorPaletteDarkRedBorderActive: colorPaletteDarkRedBorderActive,
|
|
4521
|
-
colorPaletteDarkRedForeground2: colorPaletteDarkRedForeground2,
|
|
4522
|
-
colorPaletteForestBackground2: colorPaletteForestBackground2,
|
|
4523
|
-
colorPaletteForestBorderActive: colorPaletteForestBorderActive,
|
|
4524
|
-
colorPaletteForestForeground2: colorPaletteForestForeground2,
|
|
4525
|
-
colorPaletteGoldBackground2: colorPaletteGoldBackground2,
|
|
4526
|
-
colorPaletteGoldBorderActive: colorPaletteGoldBorderActive,
|
|
4527
|
-
colorPaletteGoldForeground2: colorPaletteGoldForeground2,
|
|
4528
|
-
colorPaletteGrapeBackground2: colorPaletteGrapeBackground2,
|
|
4529
|
-
colorPaletteGrapeBorderActive: colorPaletteGrapeBorderActive,
|
|
4530
|
-
colorPaletteGrapeForeground2: colorPaletteGrapeForeground2,
|
|
4531
|
-
colorPaletteLavenderBackground2: colorPaletteLavenderBackground2,
|
|
4532
|
-
colorPaletteLavenderBorderActive: colorPaletteLavenderBorderActive,
|
|
4533
|
-
colorPaletteLavenderForeground2: colorPaletteLavenderForeground2,
|
|
4534
|
-
colorPaletteLightTealBackground2: colorPaletteLightTealBackground2,
|
|
4535
|
-
colorPaletteLightTealBorderActive: colorPaletteLightTealBorderActive,
|
|
4536
|
-
colorPaletteLightTealForeground2: colorPaletteLightTealForeground2,
|
|
4537
|
-
colorPaletteLilacBackground2: colorPaletteLilacBackground2,
|
|
4538
|
-
colorPaletteLilacBorderActive: colorPaletteLilacBorderActive,
|
|
4539
|
-
colorPaletteLilacForeground2: colorPaletteLilacForeground2,
|
|
4540
|
-
colorPaletteMagentaBackground2: colorPaletteMagentaBackground2,
|
|
4541
|
-
colorPaletteMagentaBorderActive: colorPaletteMagentaBorderActive,
|
|
4542
|
-
colorPaletteMagentaForeground2: colorPaletteMagentaForeground2,
|
|
4543
|
-
colorPaletteMinkBackground2: colorPaletteMinkBackground2,
|
|
4544
|
-
colorPaletteMinkBorderActive: colorPaletteMinkBorderActive,
|
|
4545
|
-
colorPaletteMinkForeground2: colorPaletteMinkForeground2,
|
|
4546
|
-
colorPaletteNavyBackground2: colorPaletteNavyBackground2,
|
|
4547
|
-
colorPaletteNavyBorderActive: colorPaletteNavyBorderActive,
|
|
4548
|
-
colorPaletteNavyForeground2: colorPaletteNavyForeground2,
|
|
4549
|
-
colorPalettePeachBackground2: colorPalettePeachBackground2,
|
|
4550
|
-
colorPalettePeachBorderActive: colorPalettePeachBorderActive,
|
|
4551
|
-
colorPalettePeachForeground2: colorPalettePeachForeground2,
|
|
4552
|
-
colorPalettePinkBackground2: colorPalettePinkBackground2,
|
|
4553
|
-
colorPalettePinkBorderActive: colorPalettePinkBorderActive,
|
|
4554
|
-
colorPalettePinkForeground2: colorPalettePinkForeground2,
|
|
4555
|
-
colorPalettePlatinumBackground2: colorPalettePlatinumBackground2,
|
|
4556
|
-
colorPalettePlatinumBorderActive: colorPalettePlatinumBorderActive,
|
|
4557
|
-
colorPalettePlatinumForeground2: colorPalettePlatinumForeground2,
|
|
4558
|
-
colorPalettePlumBackground2: colorPalettePlumBackground2,
|
|
4559
|
-
colorPalettePlumBorderActive: colorPalettePlumBorderActive,
|
|
4560
|
-
colorPalettePlumForeground2: colorPalettePlumForeground2,
|
|
4561
|
-
colorPalettePumpkinBackground2: colorPalettePumpkinBackground2,
|
|
4562
|
-
colorPalettePumpkinBorderActive: colorPalettePumpkinBorderActive,
|
|
4563
|
-
colorPalettePumpkinForeground2: colorPalettePumpkinForeground2,
|
|
4564
|
-
colorPalettePurpleBackground2: colorPalettePurpleBackground2,
|
|
4565
|
-
colorPalettePurpleBorderActive: colorPalettePurpleBorderActive,
|
|
4566
|
-
colorPalettePurpleForeground2: colorPalettePurpleForeground2,
|
|
4567
|
-
colorPaletteRoyalBlueBackground2: colorPaletteRoyalBlueBackground2,
|
|
4568
|
-
colorPaletteRoyalBlueBorderActive: colorPaletteRoyalBlueBorderActive,
|
|
4569
|
-
colorPaletteRoyalBlueForeground2: colorPaletteRoyalBlueForeground2,
|
|
4570
|
-
colorPaletteSeafoamBackground2: colorPaletteSeafoamBackground2,
|
|
4571
|
-
colorPaletteSeafoamBorderActive: colorPaletteSeafoamBorderActive,
|
|
4572
|
-
colorPaletteSeafoamForeground2: colorPaletteSeafoamForeground2,
|
|
4573
|
-
colorPaletteSteelBackground2: colorPaletteSteelBackground2,
|
|
4574
|
-
colorPaletteSteelBorderActive: colorPaletteSteelBorderActive,
|
|
4575
|
-
colorPaletteSteelForeground2: colorPaletteSteelForeground2,
|
|
4576
|
-
colorPaletteTealBackground2: colorPaletteTealBackground2,
|
|
4577
|
-
colorPaletteTealBorderActive: colorPaletteTealBorderActive,
|
|
4578
|
-
colorPaletteTealForeground2: colorPaletteTealForeground2,
|
|
4579
|
-
colorStatusSuccessBackground1: colorStatusSuccessBackground1,
|
|
4580
|
-
colorStatusSuccessBackground2: colorStatusSuccessBackground2,
|
|
4581
|
-
colorStatusSuccessBackground3: colorStatusSuccessBackground3,
|
|
4582
|
-
colorStatusSuccessForeground1: colorStatusSuccessForeground1,
|
|
4583
|
-
colorStatusSuccessForeground2: colorStatusSuccessForeground2,
|
|
4584
|
-
colorStatusSuccessForeground3: colorStatusSuccessForeground3,
|
|
4585
|
-
colorStatusSuccessForegroundInverted: colorStatusSuccessForegroundInverted,
|
|
4586
|
-
colorStatusSuccessBorderActive: colorStatusSuccessBorderActive,
|
|
4587
|
-
colorStatusSuccessBorder1: colorStatusSuccessBorder1,
|
|
4588
|
-
colorStatusSuccessBorder2: colorStatusSuccessBorder2,
|
|
4589
|
-
colorStatusWarningBackground1: colorStatusWarningBackground1,
|
|
4590
|
-
colorStatusWarningBackground2: colorStatusWarningBackground2,
|
|
4591
|
-
colorStatusWarningBackground3: colorStatusWarningBackground3,
|
|
4592
|
-
colorStatusWarningForeground1: colorStatusWarningForeground1,
|
|
4593
|
-
colorStatusWarningForeground2: colorStatusWarningForeground2,
|
|
4594
|
-
colorStatusWarningForeground3: colorStatusWarningForeground3,
|
|
4595
|
-
colorStatusWarningForegroundInverted: colorStatusWarningForegroundInverted,
|
|
4596
|
-
colorStatusWarningBorderActive: colorStatusWarningBorderActive,
|
|
4597
|
-
colorStatusWarningBorder1: colorStatusWarningBorder1,
|
|
4598
|
-
colorStatusWarningBorder2: colorStatusWarningBorder2,
|
|
4599
|
-
colorStatusDangerBackground1: colorStatusDangerBackground1,
|
|
4600
|
-
colorStatusDangerBackground2: colorStatusDangerBackground2,
|
|
4601
|
-
colorStatusDangerBackground3: colorStatusDangerBackground3,
|
|
4602
|
-
colorStatusDangerBackground3Hover: colorStatusDangerBackground3Hover,
|
|
4603
|
-
colorStatusDangerBackground3Pressed: colorStatusDangerBackground3Pressed,
|
|
4604
|
-
colorStatusDangerForeground1: colorStatusDangerForeground1,
|
|
4605
|
-
colorStatusDangerForeground2: colorStatusDangerForeground2,
|
|
4606
|
-
colorStatusDangerForeground3: colorStatusDangerForeground3,
|
|
4607
|
-
colorStatusDangerForegroundInverted: colorStatusDangerForegroundInverted,
|
|
4608
|
-
colorStatusDangerBorderActive: colorStatusDangerBorderActive,
|
|
4609
|
-
colorStatusDangerBorder1: colorStatusDangerBorder1,
|
|
4610
|
-
colorStatusDangerBorder2: colorStatusDangerBorder2,
|
|
4611
|
-
borderRadiusNone: borderRadiusNone,
|
|
4612
|
-
borderRadiusSmall: borderRadiusSmall,
|
|
4613
|
-
borderRadiusMedium: borderRadiusMedium,
|
|
4614
|
-
borderRadiusLarge: borderRadiusLarge,
|
|
4615
|
-
borderRadiusXLarge: borderRadiusXLarge,
|
|
4616
|
-
borderRadiusCircular: borderRadiusCircular,
|
|
4617
|
-
fontFamilyBase: fontFamilyBase,
|
|
4618
|
-
fontFamilyMonospace: fontFamilyMonospace,
|
|
4619
|
-
fontFamilyNumeric: fontFamilyNumeric,
|
|
4620
|
-
fontSizeBase100: fontSizeBase100,
|
|
4621
|
-
fontSizeBase200: fontSizeBase200,
|
|
4622
|
-
fontSizeBase300: fontSizeBase300,
|
|
4623
|
-
fontSizeBase400: fontSizeBase400,
|
|
4624
|
-
fontSizeBase500: fontSizeBase500,
|
|
4625
|
-
fontSizeBase600: fontSizeBase600,
|
|
4626
|
-
fontSizeHero700: fontSizeHero700,
|
|
4627
|
-
fontSizeHero800: fontSizeHero800,
|
|
4628
|
-
fontSizeHero900: fontSizeHero900,
|
|
4629
|
-
fontSizeHero1000: fontSizeHero1000,
|
|
4630
|
-
fontWeightRegular: fontWeightRegular,
|
|
4631
|
-
fontWeightMedium: fontWeightMedium,
|
|
4632
|
-
fontWeightSemibold: fontWeightSemibold,
|
|
4633
|
-
fontWeightBold: fontWeightBold,
|
|
4634
|
-
lineHeightBase100: lineHeightBase100,
|
|
4635
|
-
lineHeightBase200: lineHeightBase200,
|
|
4636
|
-
lineHeightBase300: lineHeightBase300,
|
|
4637
|
-
lineHeightBase400: lineHeightBase400,
|
|
4638
|
-
lineHeightBase500: lineHeightBase500,
|
|
4639
|
-
lineHeightBase600: lineHeightBase600,
|
|
4640
|
-
lineHeightHero700: lineHeightHero700,
|
|
4641
|
-
lineHeightHero800: lineHeightHero800,
|
|
4642
|
-
lineHeightHero900: lineHeightHero900,
|
|
4643
|
-
lineHeightHero1000: lineHeightHero1000,
|
|
4644
|
-
shadow2: shadow2,
|
|
4645
|
-
shadow4: shadow4,
|
|
4646
|
-
shadow8: shadow8,
|
|
4647
|
-
shadow16: shadow16,
|
|
4648
|
-
shadow28: shadow28,
|
|
4649
|
-
shadow64: shadow64,
|
|
4650
|
-
shadow2Brand: shadow2Brand,
|
|
4651
|
-
shadow4Brand: shadow4Brand,
|
|
4652
|
-
shadow8Brand: shadow8Brand,
|
|
4653
|
-
shadow16Brand: shadow16Brand,
|
|
4654
|
-
shadow28Brand: shadow28Brand,
|
|
4655
|
-
shadow64Brand: shadow64Brand,
|
|
4656
|
-
strokeWidthThin: strokeWidthThin,
|
|
4657
|
-
strokeWidthThick: strokeWidthThick,
|
|
4658
|
-
strokeWidthThicker: strokeWidthThicker,
|
|
4659
|
-
strokeWidthThickest: strokeWidthThickest,
|
|
4660
|
-
spacingHorizontalNone: spacingHorizontalNone,
|
|
4661
|
-
spacingHorizontalXXS: spacingHorizontalXXS,
|
|
4662
|
-
spacingHorizontalXS: spacingHorizontalXS,
|
|
4663
|
-
spacingHorizontalSNudge: spacingHorizontalSNudge,
|
|
4664
|
-
spacingHorizontalS: spacingHorizontalS,
|
|
4665
|
-
spacingHorizontalMNudge: spacingHorizontalMNudge,
|
|
4666
|
-
spacingHorizontalM: spacingHorizontalM,
|
|
4667
|
-
spacingHorizontalL: spacingHorizontalL,
|
|
4668
|
-
spacingHorizontalXL: spacingHorizontalXL,
|
|
4669
|
-
spacingHorizontalXXL: spacingHorizontalXXL,
|
|
4670
|
-
spacingHorizontalXXXL: spacingHorizontalXXXL,
|
|
4671
|
-
spacingVerticalNone: spacingVerticalNone,
|
|
4672
|
-
spacingVerticalXXS: spacingVerticalXXS,
|
|
4673
|
-
spacingVerticalXS: spacingVerticalXS,
|
|
4674
|
-
spacingVerticalSNudge: spacingVerticalSNudge,
|
|
4675
|
-
spacingVerticalS: spacingVerticalS,
|
|
4676
|
-
spacingVerticalMNudge: spacingVerticalMNudge,
|
|
4677
|
-
spacingVerticalM: spacingVerticalM,
|
|
4678
|
-
spacingVerticalL: spacingVerticalL,
|
|
4679
|
-
spacingVerticalXL: spacingVerticalXL,
|
|
4680
|
-
spacingVerticalXXL: spacingVerticalXXL,
|
|
4681
|
-
spacingVerticalXXXL: spacingVerticalXXXL,
|
|
4682
|
-
durationUltraFast: durationUltraFast,
|
|
4683
|
-
durationFaster: durationFaster,
|
|
4684
|
-
durationFast: durationFast,
|
|
4685
|
-
durationNormal: durationNormal,
|
|
4686
|
-
durationGentle: durationGentle,
|
|
4687
|
-
durationSlow: durationSlow,
|
|
4688
|
-
durationSlower: durationSlower,
|
|
4689
|
-
durationUltraSlow: durationUltraSlow,
|
|
4690
|
-
curveAccelerateMax: curveAccelerateMax,
|
|
4691
|
-
curveAccelerateMid: curveAccelerateMid,
|
|
4692
|
-
curveAccelerateMin: curveAccelerateMin,
|
|
4693
|
-
curveDecelerateMax: curveDecelerateMax,
|
|
4694
|
-
curveDecelerateMid: curveDecelerateMid,
|
|
4695
|
-
curveDecelerateMin: curveDecelerateMin,
|
|
4696
|
-
curveEasyEaseMax: curveEasyEaseMax,
|
|
4697
|
-
curveEasyEase: curveEasyEase,
|
|
4698
|
-
curveLinear: curveLinear
|
|
4699
|
-
});
|
|
4700
|
-
|
|
4701
|
-
const styles$q = css`
|
|
3830
|
+
const styles$r = css`
|
|
4702
3831
|
${display("block")}
|
|
4703
3832
|
|
|
4704
3833
|
: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}`;
|
|
@@ -4732,33 +3861,249 @@ const chevronDown20Filled = html.partial(`<svg
|
|
|
4732
3861
|
function accordionItemTemplate(options = {}) {
|
|
4733
3862
|
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>`;
|
|
4734
3863
|
}
|
|
4735
|
-
const template$
|
|
3864
|
+
const template$s = accordionItemTemplate({
|
|
4736
3865
|
collapsedIcon: chevronRight20Filled,
|
|
4737
3866
|
expandedIcon: chevronDown20Filled
|
|
4738
3867
|
});
|
|
4739
3868
|
|
|
4740
|
-
const definition$
|
|
3869
|
+
const definition$s = AccordionItem.compose({
|
|
4741
3870
|
name: `${FluentDesignSystem.prefix}-accordion-item`,
|
|
4742
|
-
template: template$
|
|
4743
|
-
styles: styles$
|
|
3871
|
+
template: template$s,
|
|
3872
|
+
styles: styles$r
|
|
4744
3873
|
});
|
|
4745
3874
|
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
3875
|
+
definition$s.define(FluentDesignSystem.registry);
|
|
3876
|
+
|
|
3877
|
+
const AccordionExpandMode = {
|
|
3878
|
+
single: "single",
|
|
3879
|
+
multi: "multi"
|
|
3880
|
+
};
|
|
3881
|
+
|
|
3882
|
+
var __defProp$p = Object.defineProperty;
|
|
3883
|
+
var __getOwnPropDesc$p = Object.getOwnPropertyDescriptor;
|
|
3884
|
+
var __decorateClass$p = (decorators, target, key, kind) => {
|
|
3885
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$p(target, key) : target;
|
|
4750
3886
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
4751
|
-
if (kind && result) __defProp$
|
|
3887
|
+
if (kind && result) __defProp$p(target, key, result);
|
|
4752
3888
|
return result;
|
|
4753
3889
|
};
|
|
4754
|
-
class
|
|
3890
|
+
class Accordion extends FASTElement {
|
|
4755
3891
|
constructor() {
|
|
4756
3892
|
super(...arguments);
|
|
4757
|
-
this.
|
|
4758
|
-
this.
|
|
4759
|
-
this.
|
|
4760
|
-
|
|
4761
|
-
|
|
3893
|
+
this.expandmode = AccordionExpandMode.multi;
|
|
3894
|
+
this.activeItemIndex = 0;
|
|
3895
|
+
this.change = () => {
|
|
3896
|
+
this.$emit("change", this.activeid);
|
|
3897
|
+
};
|
|
3898
|
+
this.setItems = () => {
|
|
3899
|
+
if (this.slottedAccordionItems.length === 0) {
|
|
3900
|
+
return;
|
|
3901
|
+
}
|
|
3902
|
+
const children = Array.from(this.children);
|
|
3903
|
+
this.removeItemListeners(children);
|
|
3904
|
+
children.forEach(child => Observable.getNotifier(child).subscribe(this, "disabled"));
|
|
3905
|
+
this.accordionItems = children.filter(child => !child.hasAttribute("disabled"));
|
|
3906
|
+
this.accordionIds = this.getItemIds();
|
|
3907
|
+
this.accordionItems.forEach((item, index) => {
|
|
3908
|
+
if (item instanceof AccordionItem) {
|
|
3909
|
+
item.addEventListener("click", this.activeItemChange);
|
|
3910
|
+
item.addEventListener("keydown", this.handleItemKeyDown);
|
|
3911
|
+
item.addEventListener("focus", this.handleItemFocus);
|
|
3912
|
+
Observable.getNotifier(item).subscribe(this, "expanded");
|
|
3913
|
+
}
|
|
3914
|
+
const itemId = this.accordionIds[index];
|
|
3915
|
+
item.setAttribute("id", typeof itemId !== "string" ? `accordion-${index + 1}` : itemId);
|
|
3916
|
+
this.activeid = this.accordionIds[this.activeItemIndex];
|
|
3917
|
+
});
|
|
3918
|
+
if (this.isSingleExpandMode()) {
|
|
3919
|
+
const expandedItem = this.findExpandedItem();
|
|
3920
|
+
this.setSingleExpandMode(expandedItem);
|
|
3921
|
+
}
|
|
3922
|
+
};
|
|
3923
|
+
this.removeItemListeners = oldValue => {
|
|
3924
|
+
oldValue.forEach((item, index) => {
|
|
3925
|
+
Observable.getNotifier(item).unsubscribe(this, "disabled");
|
|
3926
|
+
Observable.getNotifier(item).unsubscribe(this, "expanded");
|
|
3927
|
+
item.removeEventListener("click", this.activeItemChange);
|
|
3928
|
+
item.removeEventListener("keydown", this.handleItemKeyDown);
|
|
3929
|
+
item.removeEventListener("focus", this.handleItemFocus);
|
|
3930
|
+
});
|
|
3931
|
+
};
|
|
3932
|
+
this.activeItemChange = event => {
|
|
3933
|
+
if (event.defaultPrevented || event.target !== event.currentTarget) {
|
|
3934
|
+
return;
|
|
3935
|
+
}
|
|
3936
|
+
event.preventDefault();
|
|
3937
|
+
this.handleExpandedChange(event.target);
|
|
3938
|
+
};
|
|
3939
|
+
this.handleExpandedChange = item => {
|
|
3940
|
+
if (item instanceof AccordionItem) {
|
|
3941
|
+
this.activeid = item.getAttribute("id");
|
|
3942
|
+
if (!this.isSingleExpandMode()) {
|
|
3943
|
+
item.expanded = !item.expanded;
|
|
3944
|
+
this.activeItemIndex = this.accordionItems.indexOf(item);
|
|
3945
|
+
} else {
|
|
3946
|
+
this.setSingleExpandMode(item);
|
|
3947
|
+
}
|
|
3948
|
+
this.change();
|
|
3949
|
+
}
|
|
3950
|
+
};
|
|
3951
|
+
this.handleItemKeyDown = event => {
|
|
3952
|
+
if (event.target !== event.currentTarget) {
|
|
3953
|
+
return;
|
|
3954
|
+
}
|
|
3955
|
+
this.accordionIds = this.getItemIds();
|
|
3956
|
+
switch (event.key) {
|
|
3957
|
+
case keyArrowUp:
|
|
3958
|
+
event.preventDefault();
|
|
3959
|
+
this.adjust(-1);
|
|
3960
|
+
break;
|
|
3961
|
+
case keyArrowDown:
|
|
3962
|
+
event.preventDefault();
|
|
3963
|
+
this.adjust(1);
|
|
3964
|
+
break;
|
|
3965
|
+
case keyHome:
|
|
3966
|
+
this.activeItemIndex = 0;
|
|
3967
|
+
this.focusItem();
|
|
3968
|
+
break;
|
|
3969
|
+
case keyEnd:
|
|
3970
|
+
this.activeItemIndex = this.accordionItems.length - 1;
|
|
3971
|
+
this.focusItem();
|
|
3972
|
+
break;
|
|
3973
|
+
}
|
|
3974
|
+
};
|
|
3975
|
+
this.handleItemFocus = event => {
|
|
3976
|
+
if (event.target === event.currentTarget) {
|
|
3977
|
+
const focusedItem = event.target;
|
|
3978
|
+
const focusedIndex = this.activeItemIndex = Array.from(this.accordionItems).indexOf(focusedItem);
|
|
3979
|
+
if (this.activeItemIndex !== focusedIndex && focusedIndex !== -1) {
|
|
3980
|
+
this.activeItemIndex = focusedIndex;
|
|
3981
|
+
this.activeid = this.accordionIds[this.activeItemIndex];
|
|
3982
|
+
}
|
|
3983
|
+
}
|
|
3984
|
+
};
|
|
3985
|
+
}
|
|
3986
|
+
expandmodeChanged(prev, next) {
|
|
3987
|
+
if (!this.$fastController.isConnected) {
|
|
3988
|
+
return;
|
|
3989
|
+
}
|
|
3990
|
+
const expandedItem = this.findExpandedItem();
|
|
3991
|
+
if (!expandedItem) {
|
|
3992
|
+
return;
|
|
3993
|
+
}
|
|
3994
|
+
if (next !== AccordionExpandMode.single) {
|
|
3995
|
+
expandedItem?.expandbutton.removeAttribute("aria-disabled");
|
|
3996
|
+
} else {
|
|
3997
|
+
this.setSingleExpandMode(expandedItem);
|
|
3998
|
+
}
|
|
3999
|
+
}
|
|
4000
|
+
/**
|
|
4001
|
+
* @internal
|
|
4002
|
+
*/
|
|
4003
|
+
slottedAccordionItemsChanged(oldValue, newValue) {
|
|
4004
|
+
if (this.$fastController.isConnected) {
|
|
4005
|
+
this.setItems();
|
|
4006
|
+
}
|
|
4007
|
+
}
|
|
4008
|
+
/**
|
|
4009
|
+
* @internal
|
|
4010
|
+
*/
|
|
4011
|
+
handleChange(source, propertyName) {
|
|
4012
|
+
if (propertyName === "disabled") {
|
|
4013
|
+
this.setItems();
|
|
4014
|
+
} else if (propertyName === "expanded") {
|
|
4015
|
+
if (source.expanded && this.isSingleExpandMode()) {
|
|
4016
|
+
this.setSingleExpandMode(source);
|
|
4017
|
+
}
|
|
4018
|
+
}
|
|
4019
|
+
}
|
|
4020
|
+
findExpandedItem() {
|
|
4021
|
+
if (this.accordionItems.length === 0) {
|
|
4022
|
+
return null;
|
|
4023
|
+
}
|
|
4024
|
+
return this.accordionItems.find(item => item instanceof AccordionItem && item.expanded) ?? this.accordionItems[0];
|
|
4025
|
+
}
|
|
4026
|
+
setSingleExpandMode(expandedItem) {
|
|
4027
|
+
if (this.accordionItems.length === 0) {
|
|
4028
|
+
return;
|
|
4029
|
+
}
|
|
4030
|
+
const currentItems = Array.from(this.accordionItems);
|
|
4031
|
+
this.activeItemIndex = currentItems.indexOf(expandedItem);
|
|
4032
|
+
currentItems.forEach((item, index) => {
|
|
4033
|
+
if (item instanceof AccordionItem) {
|
|
4034
|
+
if (this.activeItemIndex === index) {
|
|
4035
|
+
item.expanded = true;
|
|
4036
|
+
item.expandbutton.setAttribute("aria-disabled", "true");
|
|
4037
|
+
} else {
|
|
4038
|
+
item.expanded = false;
|
|
4039
|
+
if (!item.hasAttribute("disabled")) {
|
|
4040
|
+
item.expandbutton.removeAttribute("aria-disabled");
|
|
4041
|
+
}
|
|
4042
|
+
}
|
|
4043
|
+
}
|
|
4044
|
+
});
|
|
4045
|
+
}
|
|
4046
|
+
getItemIds() {
|
|
4047
|
+
return this.slottedAccordionItems.map(accordionItem => {
|
|
4048
|
+
return accordionItem.id;
|
|
4049
|
+
});
|
|
4050
|
+
}
|
|
4051
|
+
isSingleExpandMode() {
|
|
4052
|
+
return this.expandmode === AccordionExpandMode.single;
|
|
4053
|
+
}
|
|
4054
|
+
adjust(adjustment) {
|
|
4055
|
+
this.activeItemIndex = wrapInBounds(0, this.accordionItems.length - 1, this.activeItemIndex + adjustment);
|
|
4056
|
+
this.focusItem();
|
|
4057
|
+
}
|
|
4058
|
+
focusItem() {
|
|
4059
|
+
const element = this.accordionItems[this.activeItemIndex];
|
|
4060
|
+
if (element instanceof AccordionItem) {
|
|
4061
|
+
element.expandbutton.focus();
|
|
4062
|
+
}
|
|
4063
|
+
}
|
|
4064
|
+
}
|
|
4065
|
+
__decorateClass$p([attr({
|
|
4066
|
+
attribute: "expand-mode"
|
|
4067
|
+
})], Accordion.prototype, "expandmode", 2);
|
|
4068
|
+
__decorateClass$p([observable], Accordion.prototype, "slottedAccordionItems", 2);
|
|
4069
|
+
|
|
4070
|
+
const styles$q = css`
|
|
4071
|
+
${display("flex")}
|
|
4072
|
+
|
|
4073
|
+
:host{flex-direction:column;width:100%;contain:content}`;
|
|
4074
|
+
|
|
4075
|
+
function accordionTemplate() {
|
|
4076
|
+
return html`<template><slot ${slotted({
|
|
4077
|
+
property: "slottedAccordionItems",
|
|
4078
|
+
filter: elements()
|
|
4079
|
+
})}></slot></template>`;
|
|
4080
|
+
}
|
|
4081
|
+
const template$r = accordionTemplate();
|
|
4082
|
+
|
|
4083
|
+
const definition$r = Accordion.compose({
|
|
4084
|
+
name: `${FluentDesignSystem.prefix}-accordion`,
|
|
4085
|
+
template: template$r,
|
|
4086
|
+
styles: styles$q
|
|
4087
|
+
});
|
|
4088
|
+
|
|
4089
|
+
definition$r.define(FluentDesignSystem.registry);
|
|
4090
|
+
|
|
4091
|
+
var __defProp$o = Object.defineProperty;
|
|
4092
|
+
var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
|
|
4093
|
+
var __decorateClass$o = (decorators, target, key, kind) => {
|
|
4094
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$o(target, key) : target;
|
|
4095
|
+
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$o(target, key, result);
|
|
4097
|
+
return result;
|
|
4098
|
+
};
|
|
4099
|
+
class AnchorButton extends FASTElement {
|
|
4100
|
+
constructor() {
|
|
4101
|
+
super(...arguments);
|
|
4102
|
+
this.iconOnly = false;
|
|
4103
|
+
this.disabled = false;
|
|
4104
|
+
this.disabledFocusable = false;
|
|
4105
|
+
/**
|
|
4106
|
+
* Prevents disabledFocusable click events
|
|
4762
4107
|
*/
|
|
4763
4108
|
this.handleDisabledFocusableClick = e => {
|
|
4764
4109
|
if (e && this.disabled || this.disabledFocusable) {
|
|
@@ -4825,44 +4170,6 @@ __decorateClass$o([attr({
|
|
|
4825
4170
|
applyMixins(DelegatesARIALink, ARIAGlobalStatesAndProperties);
|
|
4826
4171
|
applyMixins(AnchorButton, StartEnd, DelegatesARIALink);
|
|
4827
4172
|
|
|
4828
|
-
const ButtonAppearance = {
|
|
4829
|
-
primary: "primary",
|
|
4830
|
-
outline: "outline",
|
|
4831
|
-
subtle: "subtle",
|
|
4832
|
-
secondary: "secondary",
|
|
4833
|
-
transparent: "transparent"
|
|
4834
|
-
};
|
|
4835
|
-
const ButtonShape = {
|
|
4836
|
-
circular: "circular",
|
|
4837
|
-
rounded: "rounded",
|
|
4838
|
-
square: "square"
|
|
4839
|
-
};
|
|
4840
|
-
const ButtonSize = {
|
|
4841
|
-
small: "small",
|
|
4842
|
-
medium: "medium",
|
|
4843
|
-
large: "large"
|
|
4844
|
-
};
|
|
4845
|
-
const ButtonType = {
|
|
4846
|
-
submit: "submit",
|
|
4847
|
-
reset: "reset",
|
|
4848
|
-
button: "button"
|
|
4849
|
-
};
|
|
4850
|
-
|
|
4851
|
-
const AnchorButtonAppearance = ButtonAppearance;
|
|
4852
|
-
const AnchorButtonShape = ButtonShape;
|
|
4853
|
-
const AnchorButtonSize = ButtonSize;
|
|
4854
|
-
const AnchorTarget = {
|
|
4855
|
-
_self: "_self",
|
|
4856
|
-
_blank: "_blank",
|
|
4857
|
-
_parent: "_parent",
|
|
4858
|
-
_top: "_top"
|
|
4859
|
-
};
|
|
4860
|
-
|
|
4861
|
-
function anchorTemplate(options = {}) {
|
|
4862
|
-
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>`;
|
|
4863
|
-
}
|
|
4864
|
-
const template$q = anchorTemplate();
|
|
4865
|
-
|
|
4866
4173
|
const styles$p = css`
|
|
4867
4174
|
${display("inline-flex")}
|
|
4868
4175
|
|
|
@@ -4871,6 +4178,11 @@ const styles$p = css`
|
|
|
4871
4178
|
.control{background-color:${colorNeutralBackgroundDisabled};border-color:${colorNeutralStrokeDisabled};color:${colorNeutralForegroundDisabled};cursor:not-allowed}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
4872
4179
|
:host([appearance='transparent']:hover) .control{border-color:Highlight}`));
|
|
4873
4180
|
|
|
4181
|
+
function anchorTemplate(options = {}) {
|
|
4182
|
+
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
|
+
const template$q = anchorTemplate();
|
|
4185
|
+
|
|
4874
4186
|
const definition$q = AnchorButton.compose({
|
|
4875
4187
|
name: `${FluentDesignSystem.prefix}-anchor-button`,
|
|
4876
4188
|
template: template$q,
|
|
@@ -4880,6 +4192,8 @@ const definition$q = AnchorButton.compose({
|
|
|
4880
4192
|
}
|
|
4881
4193
|
});
|
|
4882
4194
|
|
|
4195
|
+
definition$q.define(FluentDesignSystem.registry);
|
|
4196
|
+
|
|
4883
4197
|
const UNWANTED_ENCLOSURES_REGEX = /[\(\[\{][^\)\]\}]*[\)\]\}]/g;
|
|
4884
4198
|
const UNWANTED_CHARS_REGEX = /[\0-\u001F\!-/:-@\[-`\{-\u00BF\u0250-\u036F\uD800-\uFFFF]/g;
|
|
4885
4199
|
const PHONENUMBER_REGEX = /^\d+[\d\s]*(:?ext|x|)\s*\d+$/i;
|
|
@@ -4921,19 +4235,6 @@ function getInitials(displayName, isRtl, options) {
|
|
|
4921
4235
|
return getInitialsLatin(displayName, isRtl, options?.firstInitialOnly);
|
|
4922
4236
|
}
|
|
4923
4237
|
|
|
4924
|
-
const AvatarActive = {
|
|
4925
|
-
active: "active",
|
|
4926
|
-
inactive: "inactive"
|
|
4927
|
-
};
|
|
4928
|
-
const AvatarShape = {
|
|
4929
|
-
circular: "circular",
|
|
4930
|
-
square: "square"
|
|
4931
|
-
};
|
|
4932
|
-
const AvatarAppearance = {
|
|
4933
|
-
ring: "ring",
|
|
4934
|
-
shadow: "shadow",
|
|
4935
|
-
ringShadow: "ring-shadow"
|
|
4936
|
-
};
|
|
4937
4238
|
const AvatarNamedColor = {
|
|
4938
4239
|
darkRed: "dark-red",
|
|
4939
4240
|
cranberry: "cranberry",
|
|
@@ -4972,22 +4273,6 @@ const AvatarColor = {
|
|
|
4972
4273
|
colorful: "colorful",
|
|
4973
4274
|
...AvatarNamedColor
|
|
4974
4275
|
};
|
|
4975
|
-
const AvatarSize = {
|
|
4976
|
-
_16: 16,
|
|
4977
|
-
_20: 20,
|
|
4978
|
-
_24: 24,
|
|
4979
|
-
_28: 28,
|
|
4980
|
-
_32: 32,
|
|
4981
|
-
_36: 36,
|
|
4982
|
-
_40: 40,
|
|
4983
|
-
_48: 48,
|
|
4984
|
-
_56: 56,
|
|
4985
|
-
_64: 64,
|
|
4986
|
-
_72: 72,
|
|
4987
|
-
_96: 96,
|
|
4988
|
-
_120: 120,
|
|
4989
|
-
_128: 128
|
|
4990
|
-
};
|
|
4991
4276
|
|
|
4992
4277
|
var __defProp$n = Object.defineProperty;
|
|
4993
4278
|
var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
|
|
@@ -5053,12 +4338,6 @@ const getHashCode = str => {
|
|
|
5053
4338
|
return hashCode;
|
|
5054
4339
|
};
|
|
5055
4340
|
|
|
5056
|
-
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>`;
|
|
5057
|
-
function avatarTemplate() {
|
|
5058
|
-
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>`;
|
|
5059
|
-
}
|
|
5060
|
-
const template$p = avatarTemplate();
|
|
5061
|
-
|
|
5062
4341
|
const animations = {
|
|
5063
4342
|
fastOutSlowInMax: curveDecelerateMax,
|
|
5064
4343
|
fastOutSlowInMid: curveDecelerateMid,
|
|
@@ -5073,12 +4352,20 @@ const animations = {
|
|
|
5073
4352
|
const styles$o = css`
|
|
5074
4353
|
${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}}`;
|
|
5075
4354
|
|
|
4355
|
+
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
|
+
function avatarTemplate() {
|
|
4357
|
+
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
|
+
const template$p = avatarTemplate();
|
|
4360
|
+
|
|
5076
4361
|
const definition$p = Avatar.compose({
|
|
5077
4362
|
name: `${FluentDesignSystem.prefix}-avatar`,
|
|
5078
4363
|
template: template$p,
|
|
5079
4364
|
styles: styles$o
|
|
5080
4365
|
});
|
|
5081
4366
|
|
|
4367
|
+
definition$p.define(FluentDesignSystem.registry);
|
|
4368
|
+
|
|
5082
4369
|
const BadgeAppearance = {
|
|
5083
4370
|
filled: "filled",
|
|
5084
4371
|
ghost: "ghost",
|
|
@@ -5095,19 +4382,6 @@ const BadgeColor = {
|
|
|
5095
4382
|
success: "success",
|
|
5096
4383
|
warning: "warning"
|
|
5097
4384
|
};
|
|
5098
|
-
const BadgeShape = {
|
|
5099
|
-
circular: "circular",
|
|
5100
|
-
rounded: "rounded",
|
|
5101
|
-
square: "square"
|
|
5102
|
-
};
|
|
5103
|
-
const BadgeSize = {
|
|
5104
|
-
tiny: "tiny",
|
|
5105
|
-
extraSmall: "extra-small",
|
|
5106
|
-
small: "small",
|
|
5107
|
-
medium: "medium",
|
|
5108
|
-
large: "large",
|
|
5109
|
-
extraLarge: "extra-large"
|
|
5110
|
-
};
|
|
5111
4385
|
|
|
5112
4386
|
var __defProp$m = Object.defineProperty;
|
|
5113
4387
|
var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
|
|
@@ -5130,11 +4404,6 @@ __decorateClass$m([attr], Badge.prototype, "shape", 2);
|
|
|
5130
4404
|
__decorateClass$m([attr], Badge.prototype, "size", 2);
|
|
5131
4405
|
applyMixins(Badge, StartEnd);
|
|
5132
4406
|
|
|
5133
|
-
function badgeTemplate(options = {}) {
|
|
5134
|
-
return html` ${startSlotTemplate(options)}<slot>${staticallyCompose(options.defaultContent)}</slot>${endSlotTemplate(options)} `;
|
|
5135
|
-
}
|
|
5136
|
-
const template$o = badgeTemplate();
|
|
5137
|
-
|
|
5138
4407
|
const textPadding = spacingHorizontalXXS;
|
|
5139
4408
|
const badgeBaseStyles = css.partial`
|
|
5140
4409
|
${display("inline-flex")} :host {
|
|
@@ -5497,12 +4766,25 @@ const styles$n = css`
|
|
|
5497
4766
|
`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
5498
4767
|
:host,:host([appearance='outline']),:host([appearance='tint']){border-color:CanvasText}`));
|
|
5499
4768
|
|
|
4769
|
+
function badgeTemplate(options = {}) {
|
|
4770
|
+
return html` ${startSlotTemplate(options)}<slot>${staticallyCompose(options.defaultContent)}</slot>${endSlotTemplate(options)} `;
|
|
4771
|
+
}
|
|
4772
|
+
const template$o = badgeTemplate();
|
|
4773
|
+
|
|
5500
4774
|
const definition$o = Badge.compose({
|
|
5501
4775
|
name: `${FluentDesignSystem.prefix}-badge`,
|
|
5502
4776
|
template: template$o,
|
|
5503
4777
|
styles: styles$n
|
|
5504
4778
|
});
|
|
5505
4779
|
|
|
4780
|
+
definition$o.define(FluentDesignSystem.registry);
|
|
4781
|
+
|
|
4782
|
+
const ButtonType = {
|
|
4783
|
+
submit: "submit",
|
|
4784
|
+
reset: "reset",
|
|
4785
|
+
button: "button"
|
|
4786
|
+
};
|
|
4787
|
+
|
|
5506
4788
|
var __defProp$l = Object.defineProperty;
|
|
5507
4789
|
var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
|
|
5508
4790
|
var __decorateClass$l = (decorators, target, key, kind) => {
|
|
@@ -5754,23 +5036,25 @@ __decorateClass$l([attr], Button.prototype, "type", 2);
|
|
|
5754
5036
|
__decorateClass$l([attr], Button.prototype, "value", 2);
|
|
5755
5037
|
applyMixins(Button, StartEnd);
|
|
5756
5038
|
|
|
5757
|
-
function buttonTemplate$1(options = {}) {
|
|
5758
|
-
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>`;
|
|
5759
|
-
}
|
|
5760
|
-
const template$n = buttonTemplate$1();
|
|
5761
|
-
|
|
5762
5039
|
const styles$m = css`
|
|
5763
5040
|
${display("inline-flex")}
|
|
5764
5041
|
|
|
5765
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}) 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(:is([disabled][appearance='primary'],[disabled-focusabale][appearance='primary'])),:host(:is([disabled][appearance='primary'],[disabled-focusabale][appearance='primary']):hover),:host(:is([disabled][appearance='primary'],[disabled-focusabale][appearance='primary']):hover:active){border-color:transparent}:host([appearance='outline']){background-color:${colorTransparentBackground}}:host([appearance='outline']:hover){background-color:${colorTransparentBackgroundHover}}:host([appearance='outline']:hover:active){background-color:${colorTransparentBackgroundPressed}}:host(:is([disabled][appearance='outline'],[disabled-focusabale][appearance='outline'])),:host(:is([disabled][appearance='outline'],[disabled-focusabale][appearance='outline']):hover),:host(:is([disabled][appearance='outline'],[disabled-focusabale][appearance='outline']):hover:active){background-color:${colorTransparentBackground}}: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(:is([disabled][appearance='subtle'],[disabled-focusabale][appearance='subtle'])),:host(:is([disabled][appearance='subtle'],[disabled-focusabale][appearance='subtle']):hover),:host(:is([disabled][appearance='subtle'],[disabled-focusabale][appearance='subtle']):hover:active){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']){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][appearance='transparent'],[disabled-focusabale][appearance='transparent'])),:host(:is([disabled][appearance='transparent'],[disabled-focusabale][appearance='transparent']):hover),:host(:is([disabled][appearance='transparent'],[disabled-focusabale][appearance='transparent']):hover:active){border-color:transparent;background-color:${colorTransparentBackground}}: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}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
5766
5043
|
:host([appearance='transparent']:hover){border-color:Highlight}`));
|
|
5767
5044
|
|
|
5045
|
+
function buttonTemplate$1(options = {}) {
|
|
5046
|
+
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
|
+
const template$n = buttonTemplate$1();
|
|
5049
|
+
|
|
5768
5050
|
const definition$n = Button.compose({
|
|
5769
5051
|
name: `${FluentDesignSystem.prefix}-button`,
|
|
5770
5052
|
template: template$n,
|
|
5771
5053
|
styles: styles$m
|
|
5772
5054
|
});
|
|
5773
5055
|
|
|
5056
|
+
definition$n.define(FluentDesignSystem.registry);
|
|
5057
|
+
|
|
5774
5058
|
const proxySlotName = "form-associated-proxy";
|
|
5775
5059
|
const ElementInternalsKey = "ElementInternals";
|
|
5776
5060
|
const supportsElementInternals = ElementInternalsKey in window && "setFormValue" in window[ElementInternalsKey].prototype;
|
|
@@ -6272,19 +5556,6 @@ __decorateClass$k([attr({
|
|
|
6272
5556
|
__decorateClass$k([observable], Checkbox.prototype, "defaultSlottedNodes", 2);
|
|
6273
5557
|
__decorateClass$k([observable], Checkbox.prototype, "indeterminate", 2);
|
|
6274
5558
|
|
|
6275
|
-
const CheckboxShape = {
|
|
6276
|
-
circular: "circular",
|
|
6277
|
-
square: "square"
|
|
6278
|
-
};
|
|
6279
|
-
const CheckboxSize = {
|
|
6280
|
-
medium: "medium",
|
|
6281
|
-
large: "large"
|
|
6282
|
-
};
|
|
6283
|
-
const CheckboxLabelPosition = {
|
|
6284
|
-
before: "before",
|
|
6285
|
-
after: "after"
|
|
6286
|
-
};
|
|
6287
|
-
|
|
6288
5559
|
const checkedIndicator = html.partial(`
|
|
6289
5560
|
<div class="checked-indicator">
|
|
6290
5561
|
<svg fill="currentColor"
|
|
@@ -6319,16 +5590,9 @@ const definition$m = Checkbox.compose({
|
|
|
6319
5590
|
styles: styles$l
|
|
6320
5591
|
});
|
|
6321
5592
|
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
const CompoundButtonAppearance = ButtonAppearance;
|
|
6325
|
-
const CompoundButtonShape = ButtonShape;
|
|
6326
|
-
const CompoundButtonSize = ButtonSize;
|
|
5593
|
+
definition$m.define(FluentDesignSystem.registry);
|
|
6327
5594
|
|
|
6328
|
-
|
|
6329
|
-
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>`;
|
|
6330
|
-
}
|
|
6331
|
-
const template$l = buttonTemplate();
|
|
5595
|
+
class CompoundButton extends Button {}
|
|
6332
5596
|
|
|
6333
5597
|
const styles$k = css`
|
|
6334
5598
|
${styles$m}
|
|
@@ -6338,12 +5602,19 @@ const styles$k = css`
|
|
|
6338
5602
|
::slotted([slot='description']),:host([appearance='transparent']) ::slotted([slot='description']){color:${colorNeutralForeground2}}:host([appearance='transparent']:hover) ::slotted([slot='description']){color:${colorNeutralForeground2BrandHover}}:host([appearance='transparent']:active) ::slotted([slot='description']){color:${colorNeutralForeground2BrandPressed}}:host(:is([disabled],[disabled][appearance],[disabled-focusable],[disabled-focusable][appearance]))
|
|
6339
5603
|
::slotted([slot='description']){color:${colorNeutralForegroundDisabled}}:host([size='small']){padding:8px;padding-bottom:10px}:host([icon-only]){min-width:52px;max-width:52px;padding:${spacingHorizontalSNudge}}:host([icon-only][size='small']){min-width:48px;max-width:48px;padding:${spacingHorizontalXS}}:host([icon-only][size='large']){min-width:56px;max-width:56px;padding:${spacingHorizontalS}}:host([size='large']){padding-top:18px;padding-inline:16px;padding-bottom:20px;font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host([size='large']) ::slotted([slot='description']){font-size:${fontSizeBase300}}`;
|
|
6340
5604
|
|
|
5605
|
+
function buttonTemplate(options = {}) {
|
|
5606
|
+
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
|
+
const template$l = buttonTemplate();
|
|
5609
|
+
|
|
6341
5610
|
const definition$l = CompoundButton.compose({
|
|
6342
5611
|
name: `${FluentDesignSystem.prefix}-compound-button`,
|
|
6343
5612
|
template: template$l,
|
|
6344
5613
|
styles: styles$k
|
|
6345
5614
|
});
|
|
6346
5615
|
|
|
5616
|
+
definition$l.define(FluentDesignSystem.registry);
|
|
5617
|
+
|
|
6347
5618
|
var __defProp$j = Object.defineProperty;
|
|
6348
5619
|
var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
|
|
6349
5620
|
var __decorateClass$j = (decorators, target, key, kind) => {
|
|
@@ -6400,40 +5671,6 @@ __decorateClass$j([attr({
|
|
|
6400
5671
|
})], CounterBadge.prototype, "dot", 2);
|
|
6401
5672
|
applyMixins(CounterBadge, StartEnd);
|
|
6402
5673
|
|
|
6403
|
-
const CounterBadgeAppearance = {
|
|
6404
|
-
filled: "filled",
|
|
6405
|
-
ghost: "ghost"
|
|
6406
|
-
};
|
|
6407
|
-
const CounterBadgeColor = {
|
|
6408
|
-
brand: "brand",
|
|
6409
|
-
danger: "danger",
|
|
6410
|
-
important: "important",
|
|
6411
|
-
informative: "informative",
|
|
6412
|
-
severe: "severe",
|
|
6413
|
-
subtle: "subtle",
|
|
6414
|
-
success: "success",
|
|
6415
|
-
warning: "warning"
|
|
6416
|
-
};
|
|
6417
|
-
const CounterBadgeShape = {
|
|
6418
|
-
circular: "circular",
|
|
6419
|
-
rounded: "rounded"
|
|
6420
|
-
};
|
|
6421
|
-
const CounterBadgeSize = {
|
|
6422
|
-
tiny: "tiny",
|
|
6423
|
-
extraSmall: "extra-small",
|
|
6424
|
-
small: "small",
|
|
6425
|
-
medium: "medium",
|
|
6426
|
-
large: "large",
|
|
6427
|
-
extraLarge: "extra-large"
|
|
6428
|
-
};
|
|
6429
|
-
|
|
6430
|
-
function composeTemplate(options = {}) {
|
|
6431
|
-
return badgeTemplate({
|
|
6432
|
-
defaultContent: html`${x => x.setCount()}`
|
|
6433
|
-
});
|
|
6434
|
-
}
|
|
6435
|
-
const template$k = composeTemplate();
|
|
6436
|
-
|
|
6437
5674
|
const styles$j = css`
|
|
6438
5675
|
: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}
|
|
6439
5676
|
${badgeFilledStyles}
|
|
@@ -6442,12 +5679,21 @@ const styles$j = css`
|
|
|
6442
5679
|
|
|
6443
5680
|
:host([dot]),:host([dot][appearance][size]){min-width:auto;width:6px;height:6px;padding:0}`;
|
|
6444
5681
|
|
|
5682
|
+
function composeTemplate(options = {}) {
|
|
5683
|
+
return badgeTemplate({
|
|
5684
|
+
defaultContent: html`${x => x.setCount()}`
|
|
5685
|
+
});
|
|
5686
|
+
}
|
|
5687
|
+
const template$k = composeTemplate();
|
|
5688
|
+
|
|
6445
5689
|
const definition$k = CounterBadge.compose({
|
|
6446
5690
|
name: `${FluentDesignSystem.prefix}-counter-badge`,
|
|
6447
5691
|
template: template$k,
|
|
6448
5692
|
styles: styles$j
|
|
6449
5693
|
});
|
|
6450
5694
|
|
|
5695
|
+
definition$k.define(FluentDesignSystem.registry);
|
|
5696
|
+
|
|
6451
5697
|
/*!
|
|
6452
5698
|
* tabbable 6.2.0
|
|
6453
5699
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
@@ -6818,7 +6064,7 @@ const _Dialog = class _Dialog extends FASTElement {
|
|
|
6818
6064
|
constructor() {
|
|
6819
6065
|
super(...arguments);
|
|
6820
6066
|
/**
|
|
6821
|
-
* @
|
|
6067
|
+
* @internal
|
|
6822
6068
|
* Indicates whether focus is being trapped within the dialog
|
|
6823
6069
|
*/
|
|
6824
6070
|
this.isTrappingFocus = false;
|
|
@@ -6827,7 +6073,7 @@ const _Dialog = class _Dialog extends FASTElement {
|
|
|
6827
6073
|
this.open = false;
|
|
6828
6074
|
this.noTitleAction = false;
|
|
6829
6075
|
/**
|
|
6830
|
-
* @
|
|
6076
|
+
* @internal
|
|
6831
6077
|
* Indicates whether focus should be trapped within the dialog
|
|
6832
6078
|
*/
|
|
6833
6079
|
this.trapFocus = false;
|
|
@@ -6864,7 +6110,7 @@ const _Dialog = class _Dialog extends FASTElement {
|
|
|
6864
6110
|
}
|
|
6865
6111
|
};
|
|
6866
6112
|
/**
|
|
6867
|
-
* @
|
|
6113
|
+
* @internal
|
|
6868
6114
|
* Handles keydown events on the document
|
|
6869
6115
|
* @param e - The keydown event
|
|
6870
6116
|
*/
|
|
@@ -6878,7 +6124,7 @@ const _Dialog = class _Dialog extends FASTElement {
|
|
|
6878
6124
|
}
|
|
6879
6125
|
};
|
|
6880
6126
|
/**
|
|
6881
|
-
* @
|
|
6127
|
+
* @internal
|
|
6882
6128
|
* Handles tab keydown events
|
|
6883
6129
|
* @param e - The keydown event
|
|
6884
6130
|
*/
|
|
@@ -6902,7 +6148,7 @@ const _Dialog = class _Dialog extends FASTElement {
|
|
|
6902
6148
|
return;
|
|
6903
6149
|
};
|
|
6904
6150
|
/**
|
|
6905
|
-
* @
|
|
6151
|
+
* @internal
|
|
6906
6152
|
* Gets the bounds of the tab queue
|
|
6907
6153
|
* @returns (HTMLElement | SVGElement)[]
|
|
6908
6154
|
*/
|
|
@@ -6911,7 +6157,7 @@ const _Dialog = class _Dialog extends FASTElement {
|
|
|
6911
6157
|
return _Dialog.reduceTabbableItems(bounds, this);
|
|
6912
6158
|
};
|
|
6913
6159
|
/**
|
|
6914
|
-
* @
|
|
6160
|
+
* @internal
|
|
6915
6161
|
* Focuses the first element in the tab queue
|
|
6916
6162
|
*/
|
|
6917
6163
|
this.focusFirstElement = () => {
|
|
@@ -6925,7 +6171,7 @@ const _Dialog = class _Dialog extends FASTElement {
|
|
|
6925
6171
|
}
|
|
6926
6172
|
};
|
|
6927
6173
|
/**
|
|
6928
|
-
* @
|
|
6174
|
+
* @internal
|
|
6929
6175
|
* Determines if focus should be forced
|
|
6930
6176
|
* @param currentFocusElement - The currently focused element
|
|
6931
6177
|
* @returns boolean
|
|
@@ -6934,7 +6180,7 @@ const _Dialog = class _Dialog extends FASTElement {
|
|
|
6934
6180
|
return this.isTrappingFocus && !this.contains(currentFocusElement);
|
|
6935
6181
|
};
|
|
6936
6182
|
/**
|
|
6937
|
-
* @
|
|
6183
|
+
* @internal
|
|
6938
6184
|
* Determines if focus should be trapped
|
|
6939
6185
|
* @returns boolean
|
|
6940
6186
|
*/
|
|
@@ -6942,7 +6188,7 @@ const _Dialog = class _Dialog extends FASTElement {
|
|
|
6942
6188
|
return this.trapFocus && this.dialog.open;
|
|
6943
6189
|
};
|
|
6944
6190
|
/**
|
|
6945
|
-
* @
|
|
6191
|
+
* @internal
|
|
6946
6192
|
* Handles focus events on the document
|
|
6947
6193
|
* @param e - The focus event
|
|
6948
6194
|
*/
|
|
@@ -6953,7 +6199,7 @@ const _Dialog = class _Dialog extends FASTElement {
|
|
|
6953
6199
|
}
|
|
6954
6200
|
};
|
|
6955
6201
|
/**
|
|
6956
|
-
* @
|
|
6202
|
+
* @internal
|
|
6957
6203
|
* Updates the state of focus trapping
|
|
6958
6204
|
* @param shouldTrapFocusOverride - Optional override for whether focus should be trapped
|
|
6959
6205
|
*/
|
|
@@ -7082,7 +6328,7 @@ const _Dialog = class _Dialog extends FASTElement {
|
|
|
7082
6328
|
return true;
|
|
7083
6329
|
}
|
|
7084
6330
|
/**
|
|
7085
|
-
* @
|
|
6331
|
+
* @internal
|
|
7086
6332
|
* Reduces the list of tabbable items
|
|
7087
6333
|
* @param elements - The current list of elements
|
|
7088
6334
|
* @param element - The element to consider adding to the list
|
|
@@ -7099,7 +6345,7 @@ const _Dialog = class _Dialog extends FASTElement {
|
|
|
7099
6345
|
return Array.from(element.children).reduce((elements2, currentElement) => _Dialog.reduceTabbableItems(elements2, currentElement), elements);
|
|
7100
6346
|
}
|
|
7101
6347
|
/**
|
|
7102
|
-
* @
|
|
6348
|
+
* @internal
|
|
7103
6349
|
* Determines if an element is a focusable FASTElement
|
|
7104
6350
|
* @param element - The element to check
|
|
7105
6351
|
* @returns boolean
|
|
@@ -7108,7 +6354,7 @@ const _Dialog = class _Dialog extends FASTElement {
|
|
|
7108
6354
|
return !!element.$fastController?.definition.shadowOptions?.delegatesFocus;
|
|
7109
6355
|
}
|
|
7110
6356
|
/**
|
|
7111
|
-
* @
|
|
6357
|
+
* @internal
|
|
7112
6358
|
* Determines if an element has a tabbable shadow
|
|
7113
6359
|
* @param element - The element to check
|
|
7114
6360
|
* @returns boolean
|
|
@@ -7170,6 +6416,8 @@ const definition$j = Dialog.compose({
|
|
|
7170
6416
|
styles: styles$i
|
|
7171
6417
|
});
|
|
7172
6418
|
|
|
6419
|
+
definition$j.define(FluentDesignSystem.registry);
|
|
6420
|
+
|
|
7173
6421
|
const DividerRole = {
|
|
7174
6422
|
/**
|
|
7175
6423
|
* The divider semantically separates content
|
|
@@ -7181,17 +6429,6 @@ const DividerRole = {
|
|
|
7181
6429
|
presentation: "presentation"
|
|
7182
6430
|
};
|
|
7183
6431
|
const DividerOrientation = Orientation;
|
|
7184
|
-
const DividerAlignContent = {
|
|
7185
|
-
center: "center",
|
|
7186
|
-
start: "start",
|
|
7187
|
-
end: "end"
|
|
7188
|
-
};
|
|
7189
|
-
const DividerAppearance = {
|
|
7190
|
-
strong: "strong",
|
|
7191
|
-
brand: "brand",
|
|
7192
|
-
subtle: "subtle",
|
|
7193
|
-
default: "default"
|
|
7194
|
-
};
|
|
7195
6432
|
|
|
7196
6433
|
var __defProp$h = Object.defineProperty;
|
|
7197
6434
|
var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
|
|
@@ -7235,6 +6472,8 @@ const definition$i = Divider.compose({
|
|
|
7235
6472
|
styles: styles$h
|
|
7236
6473
|
});
|
|
7237
6474
|
|
|
6475
|
+
definition$i.define(FluentDesignSystem.registry);
|
|
6476
|
+
|
|
7238
6477
|
var __defProp$g = Object.defineProperty;
|
|
7239
6478
|
var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
|
|
7240
6479
|
var __decorateClass$g = (decorators, target, key, kind) => {
|
|
@@ -7256,19 +6495,6 @@ __decorateClass$g([attr({
|
|
|
7256
6495
|
__decorateClass$g([attr], Image.prototype, "fit", 2);
|
|
7257
6496
|
__decorateClass$g([attr], Image.prototype, "shape", 2);
|
|
7258
6497
|
|
|
7259
|
-
const ImageFit = {
|
|
7260
|
-
none: "none",
|
|
7261
|
-
center: "center",
|
|
7262
|
-
contain: "contain",
|
|
7263
|
-
cover: "cover",
|
|
7264
|
-
default: "default"
|
|
7265
|
-
};
|
|
7266
|
-
const ImageShape = {
|
|
7267
|
-
circular: "circular",
|
|
7268
|
-
rounded: "rounded",
|
|
7269
|
-
square: "square"
|
|
7270
|
-
};
|
|
7271
|
-
|
|
7272
6498
|
const template$h = html`<slot></slot>`;
|
|
7273
6499
|
|
|
7274
6500
|
const styles$g = css`
|
|
@@ -7280,6 +6506,8 @@ const definition$h = Image.compose({
|
|
|
7280
6506
|
styles: styles$g
|
|
7281
6507
|
});
|
|
7282
6508
|
|
|
6509
|
+
definition$h.define(FluentDesignSystem.registry);
|
|
6510
|
+
|
|
7283
6511
|
var __defProp$f = Object.defineProperty;
|
|
7284
6512
|
var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
|
|
7285
6513
|
var __decorateClass$f = (decorators, target, key, kind) => {
|
|
@@ -7304,16 +6532,6 @@ __decorateClass$f([attr({
|
|
|
7304
6532
|
mode: "boolean"
|
|
7305
6533
|
})], Label.prototype, "required", 2);
|
|
7306
6534
|
|
|
7307
|
-
const LabelSize = {
|
|
7308
|
-
small: "small",
|
|
7309
|
-
medium: "medium",
|
|
7310
|
-
large: "large"
|
|
7311
|
-
};
|
|
7312
|
-
const LabelWeight = {
|
|
7313
|
-
regular: "regular",
|
|
7314
|
-
semibold: "semibold"
|
|
7315
|
-
};
|
|
7316
|
-
|
|
7317
6535
|
const styles$f = css`
|
|
7318
6536
|
${display("flex")}
|
|
7319
6537
|
|
|
@@ -7330,6 +6548,27 @@ const definition$g = Label.compose({
|
|
|
7330
6548
|
styles: styles$f
|
|
7331
6549
|
});
|
|
7332
6550
|
|
|
6551
|
+
definition$g.define(FluentDesignSystem.registry);
|
|
6552
|
+
|
|
6553
|
+
class MenuButton extends Button {}
|
|
6554
|
+
|
|
6555
|
+
const template$f = buttonTemplate$1({
|
|
6556
|
+
end: html.partial( /* html */
|
|
6557
|
+
`
|
|
6558
|
+
<svg slot="end" fill="currentColor" aria-hidden="true" width="1em" height="1em" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
|
6559
|
+
<path d="M15.85 7.65c.2.2.2.5 0 .7l-5.46 5.49a.55.55 0 0 1-.78 0L4.15 8.35a.5.5 0 1 1 .7-.7L10 12.8l5.15-5.16c.2-.2.5-.2.7 0Z" fill="currentColor"></path>
|
|
6560
|
+
</svg>
|
|
6561
|
+
`)
|
|
6562
|
+
});
|
|
6563
|
+
|
|
6564
|
+
const definition$f = MenuButton.compose({
|
|
6565
|
+
name: `${FluentDesignSystem.prefix}-menu-button`,
|
|
6566
|
+
template: template$f,
|
|
6567
|
+
styles: styles$m
|
|
6568
|
+
});
|
|
6569
|
+
|
|
6570
|
+
definition$f.define(FluentDesignSystem.registry);
|
|
6571
|
+
|
|
7333
6572
|
function t(t) {
|
|
7334
6573
|
return t.split("-")[1];
|
|
7335
6574
|
}
|
|
@@ -8245,6 +7484,26 @@ const z = (t, n, o) => {
|
|
|
8245
7484
|
});
|
|
8246
7485
|
};
|
|
8247
7486
|
|
|
7487
|
+
const MenuItemRole = {
|
|
7488
|
+
/**
|
|
7489
|
+
* The menu item has a "menuitem" role
|
|
7490
|
+
*/
|
|
7491
|
+
menuitem: "menuitem",
|
|
7492
|
+
/**
|
|
7493
|
+
* The menu item has a "menuitemcheckbox" role
|
|
7494
|
+
*/
|
|
7495
|
+
menuitemcheckbox: "menuitemcheckbox",
|
|
7496
|
+
/**
|
|
7497
|
+
* The menu item has a "menuitemradio" role
|
|
7498
|
+
*/
|
|
7499
|
+
menuitemradio: "menuitemradio"
|
|
7500
|
+
};
|
|
7501
|
+
({
|
|
7502
|
+
[MenuItemRole.menuitem]: "menuitem",
|
|
7503
|
+
[MenuItemRole.menuitemcheckbox]: "menuitemcheckbox",
|
|
7504
|
+
[MenuItemRole.menuitemradio]: "menuitemradio"
|
|
7505
|
+
});
|
|
7506
|
+
|
|
8248
7507
|
var __defProp$e = Object.defineProperty;
|
|
8249
7508
|
var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
|
|
8250
7509
|
var __decorateClass$e = (decorators, target, key, kind) => {
|
|
@@ -8253,512 +7512,90 @@ var __decorateClass$e = (decorators, target, key, kind) => {
|
|
|
8253
7512
|
if (kind && result) __defProp$e(target, key, result);
|
|
8254
7513
|
return result;
|
|
8255
7514
|
};
|
|
8256
|
-
class
|
|
7515
|
+
class MenuItem extends FASTElement {
|
|
8257
7516
|
constructor() {
|
|
8258
7517
|
super(...arguments);
|
|
8259
|
-
this.
|
|
8260
|
-
this.
|
|
8261
|
-
this.
|
|
8262
|
-
this.persistOnItemClick = false;
|
|
8263
|
-
this.open = false;
|
|
8264
|
-
this.slottedMenuList = [];
|
|
8265
|
-
this.slottedTriggers = [];
|
|
7518
|
+
this.role = MenuItemRole.menuitem;
|
|
7519
|
+
this.checked = false;
|
|
7520
|
+
this.focusSubmenuOnLoad = false;
|
|
8266
7521
|
/**
|
|
8267
|
-
*
|
|
8268
|
-
* @public
|
|
7522
|
+
* @internal
|
|
8269
7523
|
*/
|
|
8270
|
-
this.
|
|
8271
|
-
if (
|
|
8272
|
-
|
|
8273
|
-
}
|
|
8274
|
-
|
|
7524
|
+
this.handleMenuItemKeyDown = e => {
|
|
7525
|
+
if (e.defaultPrevented) {
|
|
7526
|
+
return false;
|
|
7527
|
+
}
|
|
7528
|
+
switch (e.key) {
|
|
7529
|
+
case keyEnter:
|
|
7530
|
+
case keySpace:
|
|
7531
|
+
this.invoke();
|
|
7532
|
+
return false;
|
|
7533
|
+
case keyArrowRight:
|
|
7534
|
+
this.expanded && this.submenu ? this.submenu.focus() : this.expandAndFocus();
|
|
7535
|
+
return false;
|
|
7536
|
+
case keyEscape:
|
|
7537
|
+
if (this.expanded) {
|
|
7538
|
+
this.closeSubMenu();
|
|
7539
|
+
return false;
|
|
7540
|
+
}
|
|
7541
|
+
break;
|
|
7542
|
+
case keyArrowLeft:
|
|
7543
|
+
if (this.expanded) {
|
|
7544
|
+
this.closeSubMenu();
|
|
7545
|
+
return false;
|
|
7546
|
+
}
|
|
8275
7547
|
}
|
|
7548
|
+
return true;
|
|
8276
7549
|
};
|
|
8277
7550
|
/**
|
|
8278
|
-
*
|
|
8279
|
-
* @public
|
|
7551
|
+
* @internal
|
|
8280
7552
|
*/
|
|
8281
|
-
this.
|
|
8282
|
-
this.
|
|
8283
|
-
|
|
8284
|
-
document.removeEventListener("scroll", this.closeMenu);
|
|
7553
|
+
this.handleMenuItemClick = e => {
|
|
7554
|
+
if (e.defaultPrevented || this.disabled) {
|
|
7555
|
+
return false;
|
|
8285
7556
|
}
|
|
7557
|
+
this.invoke();
|
|
7558
|
+
return false;
|
|
8286
7559
|
};
|
|
8287
7560
|
/**
|
|
8288
|
-
*
|
|
8289
|
-
* @public
|
|
7561
|
+
* @internal
|
|
8290
7562
|
*/
|
|
8291
|
-
this.
|
|
8292
|
-
this.
|
|
8293
|
-
|
|
8294
|
-
e.preventDefault();
|
|
7563
|
+
this.submenuLoaded = () => {
|
|
7564
|
+
if (!this.focusSubmenuOnLoad) {
|
|
7565
|
+
return;
|
|
8295
7566
|
}
|
|
8296
|
-
|
|
8297
|
-
|
|
7567
|
+
this.focusSubmenuOnLoad = false;
|
|
7568
|
+
if (this.submenu) {
|
|
7569
|
+
this.submenu.focus();
|
|
7570
|
+
this.setAttribute("tabindex", "-1");
|
|
8298
7571
|
}
|
|
8299
7572
|
};
|
|
8300
7573
|
/**
|
|
8301
|
-
*
|
|
8302
|
-
* @protected
|
|
7574
|
+
* @internal
|
|
8303
7575
|
*/
|
|
8304
|
-
this.
|
|
8305
|
-
this.
|
|
7576
|
+
this.handleMouseOver = e => {
|
|
7577
|
+
if (this.disabled || !this.hasSubmenu || this.expanded) {
|
|
7578
|
+
return false;
|
|
7579
|
+
}
|
|
7580
|
+
this.expanded = true;
|
|
7581
|
+
return false;
|
|
8306
7582
|
};
|
|
8307
7583
|
/**
|
|
8308
|
-
*
|
|
8309
|
-
* Toggles the menu when the Space or Enter key is pressed.
|
|
8310
|
-
* If the menu is open, focuses on the menu list.
|
|
8311
|
-
* @public
|
|
8312
|
-
* @param {KeyboardEvent} e - the keyboard event
|
|
7584
|
+
* @internal
|
|
8313
7585
|
*/
|
|
8314
|
-
this.
|
|
8315
|
-
if (
|
|
8316
|
-
return;
|
|
8317
|
-
}
|
|
8318
|
-
const key = e.key;
|
|
8319
|
-
switch (key) {
|
|
8320
|
-
case keySpace:
|
|
8321
|
-
case keyEnter:
|
|
8322
|
-
e.preventDefault();
|
|
8323
|
-
this.toggleMenu();
|
|
8324
|
-
if (this.open) {
|
|
8325
|
-
this.focusMenuList();
|
|
8326
|
-
}
|
|
8327
|
-
break;
|
|
8328
|
-
default:
|
|
8329
|
-
return true;
|
|
7586
|
+
this.handleMouseOut = e => {
|
|
7587
|
+
if (!this.expanded || this.contains(document.activeElement)) {
|
|
7588
|
+
return false;
|
|
8330
7589
|
}
|
|
7590
|
+
this.expanded = false;
|
|
7591
|
+
return false;
|
|
8331
7592
|
};
|
|
8332
7593
|
/**
|
|
8333
|
-
*
|
|
8334
|
-
* @private
|
|
8335
|
-
* @param {Event} e - The event triggered on document click.
|
|
7594
|
+
* @internal
|
|
8336
7595
|
*/
|
|
8337
|
-
this.
|
|
8338
|
-
|
|
8339
|
-
|
|
8340
|
-
}
|
|
8341
|
-
};
|
|
8342
|
-
}
|
|
8343
|
-
/**
|
|
8344
|
-
* Called when the element is connected to the DOM.
|
|
8345
|
-
* Sets up the component.
|
|
8346
|
-
* @public
|
|
8347
|
-
*/
|
|
8348
|
-
connectedCallback() {
|
|
8349
|
-
super.connectedCallback();
|
|
8350
|
-
Updates.enqueue(() => this.setComponent());
|
|
8351
|
-
}
|
|
8352
|
-
/**
|
|
8353
|
-
* Called when the element is disconnected from the DOM.
|
|
8354
|
-
* Removes event listeners.
|
|
8355
|
-
* @public
|
|
8356
|
-
*/
|
|
8357
|
-
disconnectedCallback() {
|
|
8358
|
-
super.disconnectedCallback();
|
|
8359
|
-
this.cleanup?.();
|
|
8360
|
-
this.removeListeners();
|
|
8361
|
-
}
|
|
8362
|
-
/**
|
|
8363
|
-
* Sets the component.
|
|
8364
|
-
* Sets the trigger and menu list elements and adds event listeners.
|
|
8365
|
-
* @public
|
|
8366
|
-
*/
|
|
8367
|
-
setComponent() {
|
|
8368
|
-
if (this.$fastController.isConnected && this.slottedMenuList.length && this.slottedTriggers.length) {
|
|
8369
|
-
this._trigger = this.slottedTriggers[0];
|
|
8370
|
-
this._menuList = this.slottedMenuList[0];
|
|
8371
|
-
this._trigger.setAttribute("aria-haspopup", "true");
|
|
8372
|
-
this._trigger.setAttribute("aria-expanded", `${this.open}`);
|
|
8373
|
-
this.addListeners();
|
|
8374
|
-
}
|
|
8375
|
-
}
|
|
8376
|
-
/**
|
|
8377
|
-
* Focuses on the menu list.
|
|
8378
|
-
* @public
|
|
8379
|
-
*/
|
|
8380
|
-
focusMenuList() {
|
|
8381
|
-
if (this.open && this._menuList) {
|
|
8382
|
-
Updates.enqueue(() => {
|
|
8383
|
-
this._menuList.focus();
|
|
8384
|
-
});
|
|
8385
|
-
}
|
|
8386
|
-
}
|
|
8387
|
-
/**
|
|
8388
|
-
* Focuses on the menu trigger.
|
|
8389
|
-
* @public
|
|
8390
|
-
*/
|
|
8391
|
-
focusTrigger() {
|
|
8392
|
-
if (!this.open && this._trigger) {
|
|
8393
|
-
Updates.enqueue(() => {
|
|
8394
|
-
this._trigger.focus();
|
|
8395
|
-
});
|
|
8396
|
-
}
|
|
8397
|
-
}
|
|
8398
|
-
/**
|
|
8399
|
-
* Called whenever the open state changes.
|
|
8400
|
-
* Updates the 'aria-expanded' attribute and sets the positioning of the menu.
|
|
8401
|
-
* Sets menu list position
|
|
8402
|
-
* emits openChanged event
|
|
8403
|
-
* @public
|
|
8404
|
-
* @param {boolean} oldValue - The previous value of 'open'.
|
|
8405
|
-
* @param {boolean} newValue - The new value of 'open'.
|
|
8406
|
-
*/
|
|
8407
|
-
openChanged(oldValue, newValue) {
|
|
8408
|
-
if (this.$fastController.isConnected && this._trigger instanceof HTMLElement) {
|
|
8409
|
-
this._trigger.setAttribute("aria-expanded", `${this.open}`);
|
|
8410
|
-
if (this._menuList && this.open) {
|
|
8411
|
-
Updates.enqueue(this.setPositioningTask);
|
|
8412
|
-
}
|
|
8413
|
-
}
|
|
8414
|
-
this.cleanup?.();
|
|
8415
|
-
this.$emit("onOpenChange", {
|
|
8416
|
-
open: newValue
|
|
8417
|
-
});
|
|
8418
|
-
}
|
|
8419
|
-
/**
|
|
8420
|
-
* Called whenever the 'openOnHover' property changes.
|
|
8421
|
-
* Adds or removes a 'mouseover' event listener to the trigger based on the new value.
|
|
8422
|
-
* @public
|
|
8423
|
-
* @param {boolean} oldValue - The previous value of 'openOnHover'.
|
|
8424
|
-
* @param {boolean} newValue - The new value of 'openOnHover'.
|
|
8425
|
-
*/
|
|
8426
|
-
openOnHoverChanged(oldValue, newValue) {
|
|
8427
|
-
if (newValue) {
|
|
8428
|
-
this._trigger?.addEventListener("mouseover", this.openMenu);
|
|
8429
|
-
} else {
|
|
8430
|
-
this._trigger?.removeEventListener("mouseover", this.openMenu);
|
|
8431
|
-
}
|
|
8432
|
-
}
|
|
8433
|
-
/**
|
|
8434
|
-
* Called whenever the 'persistOnItemClick' property changes.
|
|
8435
|
-
* Adds or removes a 'click' event listener to the menu list based on the new value.
|
|
8436
|
-
* @public
|
|
8437
|
-
* @param {boolean} oldValue - The previous value of 'persistOnItemClick'.
|
|
8438
|
-
* @param {boolean} newValue - The new value of 'persistOnItemClick'.
|
|
8439
|
-
*/
|
|
8440
|
-
persistOnItemClickChanged(oldValue, newValue) {
|
|
8441
|
-
if (!newValue) {
|
|
8442
|
-
this._menuList?.addEventListener("click", this.closeMenu);
|
|
8443
|
-
} else {
|
|
8444
|
-
this._menuList?.removeEventListener("click", this.closeMenu);
|
|
8445
|
-
}
|
|
8446
|
-
}
|
|
8447
|
-
/**
|
|
8448
|
-
* Called whenever the 'openOnContext' property changes.
|
|
8449
|
-
* Adds or removes a 'contextmenu' event listener to the trigger based on the new value.
|
|
8450
|
-
* @public
|
|
8451
|
-
* @param {boolean} oldValue - The previous value of 'openOnContext'.
|
|
8452
|
-
* @param {boolean} newValue - The new value of 'openOnContext'.
|
|
8453
|
-
*/
|
|
8454
|
-
openOnContextChanged(oldValue, newValue) {
|
|
8455
|
-
if (newValue) {
|
|
8456
|
-
this._trigger?.addEventListener("contextmenu", this.openMenu);
|
|
8457
|
-
} else {
|
|
8458
|
-
this._trigger?.removeEventListener("contextmenu", this.openMenu);
|
|
8459
|
-
}
|
|
8460
|
-
}
|
|
8461
|
-
/**
|
|
8462
|
-
* Called whenever the 'closeOnScroll' property changes.
|
|
8463
|
-
* Adds or removes a 'closeOnScroll' event listener to the trigger based on the new value.
|
|
8464
|
-
* @public
|
|
8465
|
-
* @param {boolean} oldValue - The previous value of 'closeOnScroll'.
|
|
8466
|
-
* @param {boolean} newValue - The new value of 'closeOnScroll'.
|
|
8467
|
-
*/
|
|
8468
|
-
closeOnScrollChanged(oldValue, newValue) {
|
|
8469
|
-
if (newValue) {
|
|
8470
|
-
document.addEventListener("scroll", this.closeMenu);
|
|
8471
|
-
} else {
|
|
8472
|
-
document.removeEventListener("scroll", this.closeMenu);
|
|
8473
|
-
}
|
|
8474
|
-
}
|
|
8475
|
-
/**
|
|
8476
|
-
* Sets the positioning of the menu.
|
|
8477
|
-
* @protected
|
|
8478
|
-
*/
|
|
8479
|
-
setPositioning() {
|
|
8480
|
-
if (this.$fastController.isConnected && this._menuList && this.open && this._trigger) {
|
|
8481
|
-
this.cleanup = P(this, this.positioningContainer, async () => {
|
|
8482
|
-
const {
|
|
8483
|
-
middlewareData,
|
|
8484
|
-
x,
|
|
8485
|
-
y
|
|
8486
|
-
} = await z(this._trigger, this.positioningContainer, {
|
|
8487
|
-
placement: "bottom",
|
|
8488
|
-
strategy: "fixed",
|
|
8489
|
-
middleware: [b$1(), k({
|
|
8490
|
-
apply: ({
|
|
8491
|
-
availableHeight,
|
|
8492
|
-
rects
|
|
8493
|
-
}) => {
|
|
8494
|
-
this.positioningContainer?.style && Object.assign(this.positioningContainer.style, {
|
|
8495
|
-
maxHeight: `${availableHeight}px`,
|
|
8496
|
-
width: `${rects.reference.width}px`
|
|
8497
|
-
});
|
|
8498
|
-
}
|
|
8499
|
-
}), P$1()]
|
|
8500
|
-
});
|
|
8501
|
-
if (middlewareData.hide?.referenceHidden) {
|
|
8502
|
-
this.open = false;
|
|
8503
|
-
return;
|
|
8504
|
-
}
|
|
8505
|
-
this.positioningContainer?.style && Object.assign(this.positioningContainer.style, {
|
|
8506
|
-
position: "fixed",
|
|
8507
|
-
top: "0",
|
|
8508
|
-
left: "0",
|
|
8509
|
-
transform: `translate(${x}px, ${y}px)`
|
|
8510
|
-
});
|
|
8511
|
-
});
|
|
8512
|
-
}
|
|
8513
|
-
}
|
|
8514
|
-
/**
|
|
8515
|
-
* Adds event listeners.
|
|
8516
|
-
* Adds click and keydown event listeners to the trigger and a click event listener to the document.
|
|
8517
|
-
* If 'openOnHover' is true, adds a 'mouseover' event listener to the trigger.
|
|
8518
|
-
* @public
|
|
8519
|
-
*/
|
|
8520
|
-
addListeners() {
|
|
8521
|
-
document.addEventListener("click", this.handleDocumentClick);
|
|
8522
|
-
this._trigger?.addEventListener("keydown", this.handleTriggerKeydown);
|
|
8523
|
-
if (!this.persistOnItemClick) {
|
|
8524
|
-
this._menuList?.addEventListener("click", this.closeMenu);
|
|
8525
|
-
}
|
|
8526
|
-
if (this.openOnHover) {
|
|
8527
|
-
this._trigger?.addEventListener("mouseover", this.openMenu);
|
|
8528
|
-
} else if (this.openOnContext) {
|
|
8529
|
-
this._trigger?.addEventListener("contextmenu", this.openMenu);
|
|
8530
|
-
} else {
|
|
8531
|
-
this._trigger?.addEventListener("click", this.toggleMenu);
|
|
8532
|
-
}
|
|
8533
|
-
}
|
|
8534
|
-
/**
|
|
8535
|
-
* Removes event listeners.
|
|
8536
|
-
* Removes click and keydown event listeners from the trigger and a click event listener from the document.
|
|
8537
|
-
* Also removes 'mouseover' event listeners from the trigger.
|
|
8538
|
-
* @private
|
|
8539
|
-
*/
|
|
8540
|
-
removeListeners() {
|
|
8541
|
-
document.removeEventListener("click", this.handleDocumentClick);
|
|
8542
|
-
this._trigger?.removeEventListener("keydown", this.handleTriggerKeydown);
|
|
8543
|
-
if (!this.persistOnItemClick) {
|
|
8544
|
-
this._menuList?.removeEventListener("click", this.closeMenu);
|
|
8545
|
-
}
|
|
8546
|
-
if (this.openOnHover) {
|
|
8547
|
-
this._trigger?.removeEventListener("mouseover", this.openMenu);
|
|
8548
|
-
}
|
|
8549
|
-
if (this.openOnContext) {
|
|
8550
|
-
this._trigger?.removeEventListener("contextmenu", this.openMenu);
|
|
8551
|
-
} else {
|
|
8552
|
-
this._trigger?.removeEventListener("click", this.toggleMenu);
|
|
8553
|
-
}
|
|
8554
|
-
}
|
|
8555
|
-
/**
|
|
8556
|
-
* Handles keyboard interaction for the menu.
|
|
8557
|
-
* Closes the menu and focuses on the trigger when the Escape key is pressed.
|
|
8558
|
-
* Closes the menu when the Tab key is pressed.
|
|
8559
|
-
* @public
|
|
8560
|
-
* @param {KeyboardEvent} e - the keyboard event
|
|
8561
|
-
*/
|
|
8562
|
-
handleMenuKeydown(e) {
|
|
8563
|
-
if (e.defaultPrevented) {
|
|
8564
|
-
return;
|
|
8565
|
-
}
|
|
8566
|
-
const key = e.key;
|
|
8567
|
-
switch (key) {
|
|
8568
|
-
case keyEscape:
|
|
8569
|
-
e.preventDefault();
|
|
8570
|
-
if (this.open) {
|
|
8571
|
-
this.closeMenu();
|
|
8572
|
-
this.focusTrigger();
|
|
8573
|
-
}
|
|
8574
|
-
break;
|
|
8575
|
-
case keyTab:
|
|
8576
|
-
if (this.open) {
|
|
8577
|
-
this.closeMenu();
|
|
8578
|
-
}
|
|
8579
|
-
if (e.shiftKey) {
|
|
8580
|
-
this.focusTrigger();
|
|
8581
|
-
}
|
|
8582
|
-
default:
|
|
8583
|
-
return true;
|
|
8584
|
-
}
|
|
8585
|
-
}
|
|
8586
|
-
}
|
|
8587
|
-
__decorateClass$e([observable, attr({
|
|
8588
|
-
attribute: "open-on-hover",
|
|
8589
|
-
mode: "boolean"
|
|
8590
|
-
})], Menu.prototype, "openOnHover", 2);
|
|
8591
|
-
__decorateClass$e([observable, attr({
|
|
8592
|
-
attribute: "open-on-context",
|
|
8593
|
-
mode: "boolean"
|
|
8594
|
-
})], Menu.prototype, "openOnContext", 2);
|
|
8595
|
-
__decorateClass$e([observable, attr({
|
|
8596
|
-
attribute: "close-on-scroll",
|
|
8597
|
-
mode: "boolean"
|
|
8598
|
-
})], Menu.prototype, "closeOnScroll", 2);
|
|
8599
|
-
__decorateClass$e([observable, attr({
|
|
8600
|
-
attribute: "persist-on-item-click",
|
|
8601
|
-
mode: "boolean"
|
|
8602
|
-
})], Menu.prototype, "persistOnItemClick", 2);
|
|
8603
|
-
__decorateClass$e([observable, attr({
|
|
8604
|
-
mode: "boolean"
|
|
8605
|
-
})], Menu.prototype, "open", 2);
|
|
8606
|
-
__decorateClass$e([observable], Menu.prototype, "slottedMenuList", 2);
|
|
8607
|
-
__decorateClass$e([observable], Menu.prototype, "slottedTriggers", 2);
|
|
8608
|
-
|
|
8609
|
-
function menuTemplate$1() {
|
|
8610
|
-
return html`<template ?open-on-hover="${x => x.openOnHover}" ?open-on-context="${x => x.openOnContext}" ?close-on-scroll="${x => x.closeOnScroll}" ?persist-on-item-click="${x => x.persistOnItemClick}" @keydown="${(x, c) => x.handleMenuKeydown(c.event)}"><slot name="trigger" ${slotted({
|
|
8611
|
-
property: "slottedTriggers",
|
|
8612
|
-
filter: elements()
|
|
8613
|
-
})}></slot><span ${ref("positioningContainer")} part="positioning-container" class="positioning-container" ?hidden="${x => !x.open}"><slot ${slotted({
|
|
8614
|
-
property: "slottedMenuList",
|
|
8615
|
-
filter: elements()
|
|
8616
|
-
})}></slot></span></template>`;
|
|
8617
|
-
}
|
|
8618
|
-
const template$f = menuTemplate$1();
|
|
8619
|
-
|
|
8620
|
-
const styles$e = css`
|
|
8621
|
-
:host{position:relative;z-index:var(--z-index-menu,1)}.positioning-container{position:fixed;top:0;left:0;transform:translate(0,0)}`;
|
|
8622
|
-
|
|
8623
|
-
const definition$f = Menu.compose({
|
|
8624
|
-
name: `${FluentDesignSystem.prefix}-menu`,
|
|
8625
|
-
template: template$f,
|
|
8626
|
-
styles: styles$e
|
|
8627
|
-
});
|
|
8628
|
-
|
|
8629
|
-
class MenuButton extends Button {}
|
|
8630
|
-
|
|
8631
|
-
const MenuButtonAppearance = ButtonAppearance;
|
|
8632
|
-
const MenuButtonShape = ButtonShape;
|
|
8633
|
-
const MenuButtonSize = ButtonSize;
|
|
8634
|
-
|
|
8635
|
-
const template$e = buttonTemplate$1({
|
|
8636
|
-
end: html.partial( /* html */
|
|
8637
|
-
`
|
|
8638
|
-
<svg slot="end" fill="currentColor" aria-hidden="true" width="1em" height="1em" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
|
8639
|
-
<path d="M15.85 7.65c.2.2.2.5 0 .7l-5.46 5.49a.55.55 0 0 1-.78 0L4.15 8.35a.5.5 0 1 1 .7-.7L10 12.8l5.15-5.16c.2-.2.5-.2.7 0Z" fill="currentColor"></path>
|
|
8640
|
-
</svg>
|
|
8641
|
-
`)
|
|
8642
|
-
});
|
|
8643
|
-
|
|
8644
|
-
const definition$e = MenuButton.compose({
|
|
8645
|
-
name: `${FluentDesignSystem.prefix}-menu-button`,
|
|
8646
|
-
template: template$e,
|
|
8647
|
-
styles: styles$m
|
|
8648
|
-
});
|
|
8649
|
-
|
|
8650
|
-
const MenuItemRole = {
|
|
8651
|
-
/**
|
|
8652
|
-
* The menu item has a "menuitem" role
|
|
8653
|
-
*/
|
|
8654
|
-
menuitem: "menuitem",
|
|
8655
|
-
/**
|
|
8656
|
-
* The menu item has a "menuitemcheckbox" role
|
|
8657
|
-
*/
|
|
8658
|
-
menuitemcheckbox: "menuitemcheckbox",
|
|
8659
|
-
/**
|
|
8660
|
-
* The menu item has a "menuitemradio" role
|
|
8661
|
-
*/
|
|
8662
|
-
menuitemradio: "menuitemradio"
|
|
8663
|
-
};
|
|
8664
|
-
const roleForMenuItem = {
|
|
8665
|
-
[MenuItemRole.menuitem]: "menuitem",
|
|
8666
|
-
[MenuItemRole.menuitemcheckbox]: "menuitemcheckbox",
|
|
8667
|
-
[MenuItemRole.menuitemradio]: "menuitemradio"
|
|
8668
|
-
};
|
|
8669
|
-
|
|
8670
|
-
var __defProp$d = Object.defineProperty;
|
|
8671
|
-
var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
|
|
8672
|
-
var __decorateClass$d = (decorators, target, key, kind) => {
|
|
8673
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$d(target, key) : target;
|
|
8674
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8675
|
-
if (kind && result) __defProp$d(target, key, result);
|
|
8676
|
-
return result;
|
|
8677
|
-
};
|
|
8678
|
-
class MenuItem extends FASTElement {
|
|
8679
|
-
constructor() {
|
|
8680
|
-
super(...arguments);
|
|
8681
|
-
this.role = MenuItemRole.menuitem;
|
|
8682
|
-
this.checked = false;
|
|
8683
|
-
this.focusSubmenuOnLoad = false;
|
|
8684
|
-
/**
|
|
8685
|
-
* @internal
|
|
8686
|
-
*/
|
|
8687
|
-
this.handleMenuItemKeyDown = e => {
|
|
8688
|
-
if (e.defaultPrevented) {
|
|
8689
|
-
return false;
|
|
8690
|
-
}
|
|
8691
|
-
switch (e.key) {
|
|
8692
|
-
case keyEnter:
|
|
8693
|
-
case keySpace:
|
|
8694
|
-
this.invoke();
|
|
8695
|
-
return false;
|
|
8696
|
-
case keyArrowRight:
|
|
8697
|
-
this.expanded && this.submenu ? this.submenu.focus() : this.expandAndFocus();
|
|
8698
|
-
return false;
|
|
8699
|
-
case keyEscape:
|
|
8700
|
-
if (this.expanded) {
|
|
8701
|
-
this.closeSubMenu();
|
|
8702
|
-
return false;
|
|
8703
|
-
}
|
|
8704
|
-
break;
|
|
8705
|
-
case keyArrowLeft:
|
|
8706
|
-
if (this.expanded) {
|
|
8707
|
-
this.closeSubMenu();
|
|
8708
|
-
return false;
|
|
8709
|
-
}
|
|
8710
|
-
}
|
|
8711
|
-
return true;
|
|
8712
|
-
};
|
|
8713
|
-
/**
|
|
8714
|
-
* @internal
|
|
8715
|
-
*/
|
|
8716
|
-
this.handleMenuItemClick = e => {
|
|
8717
|
-
if (e.defaultPrevented || this.disabled) {
|
|
8718
|
-
return false;
|
|
8719
|
-
}
|
|
8720
|
-
this.invoke();
|
|
8721
|
-
return false;
|
|
8722
|
-
};
|
|
8723
|
-
/**
|
|
8724
|
-
* @internal
|
|
8725
|
-
*/
|
|
8726
|
-
this.submenuLoaded = () => {
|
|
8727
|
-
if (!this.focusSubmenuOnLoad) {
|
|
8728
|
-
return;
|
|
8729
|
-
}
|
|
8730
|
-
this.focusSubmenuOnLoad = false;
|
|
8731
|
-
if (this.submenu) {
|
|
8732
|
-
this.submenu.focus();
|
|
8733
|
-
this.setAttribute("tabindex", "-1");
|
|
8734
|
-
}
|
|
8735
|
-
};
|
|
8736
|
-
/**
|
|
8737
|
-
* @internal
|
|
8738
|
-
*/
|
|
8739
|
-
this.handleMouseOver = e => {
|
|
8740
|
-
if (this.disabled || !this.hasSubmenu || this.expanded) {
|
|
8741
|
-
return false;
|
|
8742
|
-
}
|
|
8743
|
-
this.expanded = true;
|
|
8744
|
-
return false;
|
|
8745
|
-
};
|
|
8746
|
-
/**
|
|
8747
|
-
* @internal
|
|
8748
|
-
*/
|
|
8749
|
-
this.handleMouseOut = e => {
|
|
8750
|
-
if (!this.expanded || this.contains(document.activeElement)) {
|
|
8751
|
-
return false;
|
|
8752
|
-
}
|
|
8753
|
-
this.expanded = false;
|
|
8754
|
-
return false;
|
|
8755
|
-
};
|
|
8756
|
-
/**
|
|
8757
|
-
* @internal
|
|
8758
|
-
*/
|
|
8759
|
-
this.closeSubMenu = () => {
|
|
8760
|
-
this.expanded = false;
|
|
8761
|
-
this.focus();
|
|
7596
|
+
this.closeSubMenu = () => {
|
|
7597
|
+
this.expanded = false;
|
|
7598
|
+
this.focus();
|
|
8762
7599
|
};
|
|
8763
7600
|
/**
|
|
8764
7601
|
* @internal
|
|
@@ -8877,23 +7714,28 @@ class MenuItem extends FASTElement {
|
|
|
8877
7714
|
});
|
|
8878
7715
|
}
|
|
8879
7716
|
}
|
|
8880
|
-
__decorateClass$
|
|
7717
|
+
__decorateClass$e([attr({
|
|
8881
7718
|
mode: "boolean"
|
|
8882
7719
|
})], MenuItem.prototype, "disabled", 2);
|
|
8883
|
-
__decorateClass$
|
|
7720
|
+
__decorateClass$e([attr({
|
|
8884
7721
|
mode: "boolean"
|
|
8885
7722
|
})], MenuItem.prototype, "expanded", 2);
|
|
8886
|
-
__decorateClass$
|
|
8887
|
-
__decorateClass$
|
|
7723
|
+
__decorateClass$e([attr], MenuItem.prototype, "role", 2);
|
|
7724
|
+
__decorateClass$e([attr({
|
|
8888
7725
|
mode: "boolean"
|
|
8889
7726
|
})], MenuItem.prototype, "checked", 2);
|
|
8890
|
-
__decorateClass$
|
|
7727
|
+
__decorateClass$e([attr({
|
|
8891
7728
|
mode: "boolean"
|
|
8892
7729
|
})], MenuItem.prototype, "hidden", 2);
|
|
8893
|
-
__decorateClass$
|
|
8894
|
-
__decorateClass$
|
|
7730
|
+
__decorateClass$e([observable], MenuItem.prototype, "slottedSubmenu", 2);
|
|
7731
|
+
__decorateClass$e([observable], MenuItem.prototype, "submenu", 2);
|
|
8895
7732
|
applyMixins(MenuItem, StartEnd);
|
|
8896
7733
|
|
|
7734
|
+
const styles$e = css`
|
|
7735
|
+
${display("grid")}
|
|
7736
|
+
|
|
7737
|
+
:host{grid-template-columns:20px 20px auto 20px;align-items:center;grid-gap:4px;height:32px;background:${colorNeutralBackground1};font:${fontWeightRegular} ${fontSizeBase300} / ${lineHeightBase300} ${fontFamilyBase};border-radius:${borderRadiusMedium};color:${colorNeutralForeground2};padding:0 10px;cursor:pointer;overflow:visible;contain:layout}:host(:hover){background:${colorNeutralBackground1Hover}}.content{white-space:nowrap;flex-grow:1;grid-column:auto / span 2;padding:0 2px}.checkbox,.radio{display:none}.input-container,.expand-collapse-glyph-container,::slotted([slot='start']),::slotted([slot='end']),:host([checked]) .checkbox,:host([checked]) .radio{display:inline-flex;justify-content:center;align-items:center;color:${colorNeutralForeground2}}.expand-collapse-glyph-container,::slotted([slot='start']),::slotted([slot='end']){height:32px;font-size:${fontSizeBase500};width:fit-content}.input-container{width:20px}::slotted([slot='end']){color:${colorNeutralForeground3};font:${fontWeightRegular} ${fontSizeBase200} / ${lineHeightBase200} ${fontFamilyBase};white-space:nowrap;grid-column:4 / span 1;justify-self:flex-end}.expand-collapse-glyph-container{grid-column:4 / span 1;justify-self:flex-end}:host(:hover) .input-container,:host(:hover) .expand-collapse-glyph-container,:host(:hover) .content{color:${colorNeutralForeground2Hover}}:host([icon]:hover) ::slotted([slot='start']){color:${colorCompoundBrandForeground1Hover}}:host(:active){background-color:${colorNeutralBackground1Selected}}:host(:active) .input-container,:host(:active) .expand-collapse-glyph-container,:host(:active) .content{color:${colorNeutralForeground2Pressed}}:host(:active) ::slotted([slot='start']){color:${colorCompoundBrandForeground1Pressed}}:host([disabled]){background-color:${colorNeutralBackgroundDisabled}}:host([disabled]) .content,:host([disabled]) .expand-collapse-glyph-container,:host([disabled]) ::slotted([slot='end']),:host([disabled]) ::slotted([slot='start']){color:${colorNeutralForegroundDisabled}}:host([data-indent]){display:grid}:host([data-indent='1']) .content{grid-column:2 / span 1}:host([data-indent='1'][role='menuitemcheckbox']){display:grid}:host([data-indent='2'][aria-haspopup='menu']) ::slotted([slot='end']){grid-column:4 / span 1}:host([data-indent='2'][aria-haspopup='menu']) .expand-collapse-glyph-container{grid-column:5 / span 1}:host([data-indent='1']) .content{grid-column:2 / span 1}:host([data-indent='1'][role='menuitemcheckbox']) .content,:host([data-indent='1'][role='menuitemradio']) .content{grid-column:auto / span 1}:host([icon]) ::slotted([slot='end']),:host([data-indent='1']) ::slotted([slot='end']){grid-column:4 / span 1;justify-self:flex-end}:host([data-indent='2']){display:grid;grid-template-columns:20px 20px auto auto}:host([data-indent='2']) .content{grid-column:3 / span 1}:host([data-indent='2']) .input-container{grid-column:1 / span 1}:host([data-indent='2']) ::slotted([slot='start']){grid-column:2 / span 1}:host([aria-haspopup='menu']){grid-template-columns:20px auto auto 20px}:host([data-indent='2'][aria-haspopup='menu']){grid-template-columns:20px 20px auto auto 20px}:host([aria-haspopup='menu']) ::slotted([slot='end']){grid-column:3 / span 1;justify-self:flex-end}:host([data-indent='2'][aria-haspopup='menu']) ::slotted([slot='end']){grid-column:4 / span 1;justify-self:flex-end}`;
|
|
7738
|
+
|
|
8897
7739
|
const Checkmark16Filled = html.partial(`<svg fill="currentColor" class="___12fm75w f1w7gpdv fez10in fg4l7m0" aria-hidden="true" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.05 3.49c.28.3.27.77-.04 1.06l-7.93 7.47A.85.85 0 014.9 12L2.22 9.28a.75.75 0 111.06-1.06l2.24 2.27 7.47-7.04a.75.75 0 011.06.04z" fill="currentColor"></path></svg>`);
|
|
8898
7740
|
const chevronRight16Filled = html.partial(`<svg fill="currentColor" class="___12fm75w f1w7gpdv fez10in fg4l7m0" aria-hidden="true" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M5.74 3.2a.75.75 0 00-.04 1.06L9.23 8 5.7 11.74a.75.75 0 101.1 1.02l4-4.25a.75.75 0 000-1.02l-4-4.25a.75.75 0 00-1.06-.04z" fill="currentColor"></path></svg>`);
|
|
8899
7741
|
function menuItemTemplate(options = {}) {
|
|
@@ -8902,23 +7744,287 @@ function menuItemTemplate(options = {}) {
|
|
|
8902
7744
|
filter: elements("[role='menu']")
|
|
8903
7745
|
})}></slot></span></template>`;
|
|
8904
7746
|
}
|
|
8905
|
-
const template$
|
|
7747
|
+
const template$e = menuItemTemplate({
|
|
8906
7748
|
checkboxIndicator: Checkmark16Filled,
|
|
8907
7749
|
expandCollapseGlyph: chevronRight16Filled,
|
|
8908
7750
|
radioIndicator: Checkmark16Filled
|
|
8909
7751
|
});
|
|
8910
7752
|
|
|
7753
|
+
const definition$e = MenuItem.compose({
|
|
7754
|
+
name: `${FluentDesignSystem.prefix}-menu-item`,
|
|
7755
|
+
template: template$e,
|
|
7756
|
+
styles: styles$e
|
|
7757
|
+
});
|
|
7758
|
+
|
|
7759
|
+
definition$e.define(FluentDesignSystem.registry);
|
|
7760
|
+
|
|
7761
|
+
var __defProp$d = Object.defineProperty;
|
|
7762
|
+
var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
|
|
7763
|
+
var __decorateClass$d = (decorators, target, key, kind) => {
|
|
7764
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$d(target, key) : target;
|
|
7765
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7766
|
+
if (kind && result) __defProp$d(target, key, result);
|
|
7767
|
+
return result;
|
|
7768
|
+
};
|
|
7769
|
+
const _MenuList = class _MenuList extends FASTElement {
|
|
7770
|
+
constructor() {
|
|
7771
|
+
super(...arguments);
|
|
7772
|
+
this.expandedItem = null;
|
|
7773
|
+
/**
|
|
7774
|
+
* The index of the focusable element in the items array
|
|
7775
|
+
* defaults to -1
|
|
7776
|
+
*/
|
|
7777
|
+
this.focusIndex = -1;
|
|
7778
|
+
/**
|
|
7779
|
+
* @internal
|
|
7780
|
+
*/
|
|
7781
|
+
this.isNestedMenu = () => {
|
|
7782
|
+
return this.parentElement !== null && isHTMLElement(this.parentElement) && this.parentElement.getAttribute("role") === "menuitem";
|
|
7783
|
+
};
|
|
7784
|
+
/**
|
|
7785
|
+
* if focus is moving out of the menu, reset to a stable initial state
|
|
7786
|
+
* @internal
|
|
7787
|
+
*/
|
|
7788
|
+
this.handleFocusOut = e => {
|
|
7789
|
+
if (!this.contains(e.relatedTarget) && this.menuItems !== void 0) {
|
|
7790
|
+
this.collapseExpandedItem();
|
|
7791
|
+
const focusIndex = this.menuItems.findIndex(this.isFocusableElement);
|
|
7792
|
+
this.menuItems[this.focusIndex].setAttribute("tabindex", "-1");
|
|
7793
|
+
this.menuItems[focusIndex].setAttribute("tabindex", "0");
|
|
7794
|
+
this.focusIndex = focusIndex;
|
|
7795
|
+
}
|
|
7796
|
+
};
|
|
7797
|
+
this.handleItemFocus = e => {
|
|
7798
|
+
const targetItem = e.target;
|
|
7799
|
+
if (this.menuItems !== void 0 && targetItem !== this.menuItems[this.focusIndex]) {
|
|
7800
|
+
this.menuItems[this.focusIndex].setAttribute("tabindex", "-1");
|
|
7801
|
+
this.focusIndex = this.menuItems.indexOf(targetItem);
|
|
7802
|
+
targetItem.setAttribute("tabindex", "0");
|
|
7803
|
+
}
|
|
7804
|
+
};
|
|
7805
|
+
this.handleExpandedChanged = e => {
|
|
7806
|
+
if (e.defaultPrevented || e.target === null || this.menuItems === void 0 || this.menuItems.indexOf(e.target) < 0) {
|
|
7807
|
+
return;
|
|
7808
|
+
}
|
|
7809
|
+
e.preventDefault();
|
|
7810
|
+
const changedItem = e.target;
|
|
7811
|
+
if (this.expandedItem !== null && changedItem === this.expandedItem && changedItem.expanded === false) {
|
|
7812
|
+
this.expandedItem = null;
|
|
7813
|
+
return;
|
|
7814
|
+
}
|
|
7815
|
+
if (changedItem.expanded) {
|
|
7816
|
+
if (this.expandedItem !== null && this.expandedItem !== changedItem) {
|
|
7817
|
+
this.expandedItem.expanded = false;
|
|
7818
|
+
}
|
|
7819
|
+
this.menuItems[this.focusIndex].setAttribute("tabindex", "-1");
|
|
7820
|
+
this.expandedItem = changedItem;
|
|
7821
|
+
this.focusIndex = this.menuItems.indexOf(changedItem);
|
|
7822
|
+
changedItem.setAttribute("tabindex", "0");
|
|
7823
|
+
}
|
|
7824
|
+
};
|
|
7825
|
+
/**
|
|
7826
|
+
* handle change from child element
|
|
7827
|
+
*/
|
|
7828
|
+
this.changeHandler = e => {
|
|
7829
|
+
if (this.menuItems === void 0) {
|
|
7830
|
+
return;
|
|
7831
|
+
}
|
|
7832
|
+
const changedMenuItem = e.target;
|
|
7833
|
+
const changeItemIndex = this.menuItems.indexOf(changedMenuItem);
|
|
7834
|
+
if (changeItemIndex === -1) {
|
|
7835
|
+
return;
|
|
7836
|
+
}
|
|
7837
|
+
if (changedMenuItem.role === "menuitemradio" && changedMenuItem.checked === true) {
|
|
7838
|
+
for (let i = changeItemIndex - 1; i >= 0; --i) {
|
|
7839
|
+
const item = this.menuItems[i];
|
|
7840
|
+
const role = item.getAttribute("role");
|
|
7841
|
+
if (role === MenuItemRole.menuitemradio) {
|
|
7842
|
+
item.checked = false;
|
|
7843
|
+
}
|
|
7844
|
+
if (role === "separator") {
|
|
7845
|
+
break;
|
|
7846
|
+
}
|
|
7847
|
+
}
|
|
7848
|
+
const maxIndex = this.menuItems.length - 1;
|
|
7849
|
+
for (let i = changeItemIndex + 1; i <= maxIndex; ++i) {
|
|
7850
|
+
const item = this.menuItems[i];
|
|
7851
|
+
const role = item.getAttribute("role");
|
|
7852
|
+
if (role === MenuItemRole.menuitemradio) {
|
|
7853
|
+
item.checked = false;
|
|
7854
|
+
}
|
|
7855
|
+
if (role === "separator") {
|
|
7856
|
+
break;
|
|
7857
|
+
}
|
|
7858
|
+
}
|
|
7859
|
+
}
|
|
7860
|
+
};
|
|
7861
|
+
/**
|
|
7862
|
+
* check if the item is a menu item
|
|
7863
|
+
*/
|
|
7864
|
+
this.isMenuItemElement = el => {
|
|
7865
|
+
return el instanceof MenuItem || isHTMLElement(el) && el.getAttribute("role") in _MenuList.focusableElementRoles;
|
|
7866
|
+
};
|
|
7867
|
+
/**
|
|
7868
|
+
* check if the item is focusable
|
|
7869
|
+
*/
|
|
7870
|
+
this.isFocusableElement = el => {
|
|
7871
|
+
return this.isMenuItemElement(el);
|
|
7872
|
+
};
|
|
7873
|
+
}
|
|
7874
|
+
itemsChanged(oldValue, newValue) {
|
|
7875
|
+
if (this.$fastController.isConnected && this.menuItems !== void 0) {
|
|
7876
|
+
this.setItems();
|
|
7877
|
+
}
|
|
7878
|
+
}
|
|
7879
|
+
/**
|
|
7880
|
+
* @internal
|
|
7881
|
+
*/
|
|
7882
|
+
connectedCallback() {
|
|
7883
|
+
super.connectedCallback();
|
|
7884
|
+
Updates.enqueue(() => {
|
|
7885
|
+
this.setItems();
|
|
7886
|
+
});
|
|
7887
|
+
this.addEventListener("change", this.changeHandler);
|
|
7888
|
+
}
|
|
7889
|
+
/**
|
|
7890
|
+
* @internal
|
|
7891
|
+
*/
|
|
7892
|
+
disconnectedCallback() {
|
|
7893
|
+
super.disconnectedCallback();
|
|
7894
|
+
this.removeItemListeners();
|
|
7895
|
+
this.menuItems = void 0;
|
|
7896
|
+
this.removeEventListener("change", this.changeHandler);
|
|
7897
|
+
}
|
|
7898
|
+
/**
|
|
7899
|
+
* Focuses the first item in the menu.
|
|
7900
|
+
*
|
|
7901
|
+
* @public
|
|
7902
|
+
*/
|
|
7903
|
+
focus() {
|
|
7904
|
+
this.setFocus(0, 1);
|
|
7905
|
+
}
|
|
7906
|
+
/**
|
|
7907
|
+
* Collapses any expanded menu items.
|
|
7908
|
+
*
|
|
7909
|
+
* @public
|
|
7910
|
+
*/
|
|
7911
|
+
collapseExpandedItem() {
|
|
7912
|
+
if (this.expandedItem !== null) {
|
|
7913
|
+
this.expandedItem.expanded = false;
|
|
7914
|
+
this.expandedItem = null;
|
|
7915
|
+
}
|
|
7916
|
+
}
|
|
7917
|
+
/**
|
|
7918
|
+
* @internal
|
|
7919
|
+
*/
|
|
7920
|
+
handleMenuKeyDown(e) {
|
|
7921
|
+
if (e.defaultPrevented || this.menuItems === void 0) {
|
|
7922
|
+
return;
|
|
7923
|
+
}
|
|
7924
|
+
switch (e.key) {
|
|
7925
|
+
case keyArrowDown:
|
|
7926
|
+
this.setFocus(this.focusIndex + 1, 1);
|
|
7927
|
+
return;
|
|
7928
|
+
case keyArrowUp:
|
|
7929
|
+
this.setFocus(this.focusIndex - 1, -1);
|
|
7930
|
+
return;
|
|
7931
|
+
case keyEnd:
|
|
7932
|
+
this.setFocus(this.menuItems.length - 1, -1);
|
|
7933
|
+
return;
|
|
7934
|
+
case keyHome:
|
|
7935
|
+
this.setFocus(0, 1);
|
|
7936
|
+
return;
|
|
7937
|
+
default:
|
|
7938
|
+
return true;
|
|
7939
|
+
}
|
|
7940
|
+
}
|
|
7941
|
+
removeItemListeners(items = this.items) {
|
|
7942
|
+
items.forEach(item => {
|
|
7943
|
+
item.removeEventListener("focus", this.handleItemFocus);
|
|
7944
|
+
item.removeEventListener("expanded-changed", this.handleExpandedChanged);
|
|
7945
|
+
Observable.getNotifier(item).unsubscribe(this, "hidden");
|
|
7946
|
+
});
|
|
7947
|
+
}
|
|
7948
|
+
static elementIndent(el) {
|
|
7949
|
+
const role = el.getAttribute("role");
|
|
7950
|
+
const startSlot = el.querySelector("[slot=start]");
|
|
7951
|
+
if (role && role !== MenuItemRole.menuitem) {
|
|
7952
|
+
return startSlot ? 2 : 1;
|
|
7953
|
+
}
|
|
7954
|
+
return startSlot ? 1 : 0;
|
|
7955
|
+
}
|
|
7956
|
+
setItems() {
|
|
7957
|
+
const children = Array.from(this.children);
|
|
7958
|
+
this.removeItemListeners(children);
|
|
7959
|
+
children.forEach(child => Observable.getNotifier(child).subscribe(this, "hidden"));
|
|
7960
|
+
const newItems = children.filter(child => !child.hasAttribute("hidden"));
|
|
7961
|
+
this.menuItems = newItems;
|
|
7962
|
+
const menuItems = this.menuItems.filter(this.isMenuItemElement);
|
|
7963
|
+
if (menuItems.length) {
|
|
7964
|
+
this.focusIndex = 0;
|
|
7965
|
+
}
|
|
7966
|
+
menuItems.forEach((item, index) => {
|
|
7967
|
+
item.setAttribute("tabindex", index === 0 ? "0" : "-1");
|
|
7968
|
+
item.addEventListener("expanded-change", this.handleExpandedChanged);
|
|
7969
|
+
item.addEventListener("focus", this.handleItemFocus);
|
|
7970
|
+
});
|
|
7971
|
+
const filteredMenuListItems = this.menuItems?.filter(this.isMenuItemElement);
|
|
7972
|
+
filteredMenuListItems?.forEach((item, index) => {
|
|
7973
|
+
const indent = filteredMenuListItems?.reduce((accum, current) => {
|
|
7974
|
+
const elementValue = _MenuList.elementIndent(current);
|
|
7975
|
+
return Math.max(accum, elementValue);
|
|
7976
|
+
}, 0);
|
|
7977
|
+
if (item instanceof MenuItem) {
|
|
7978
|
+
item.setAttribute("data-indent", `${indent}`);
|
|
7979
|
+
}
|
|
7980
|
+
});
|
|
7981
|
+
}
|
|
7982
|
+
handleChange(source, propertyName) {
|
|
7983
|
+
if (propertyName === "hidden") {
|
|
7984
|
+
this.setItems();
|
|
7985
|
+
}
|
|
7986
|
+
}
|
|
7987
|
+
setFocus(focusIndex, adjustment) {
|
|
7988
|
+
if (this.menuItems === void 0) {
|
|
7989
|
+
return;
|
|
7990
|
+
}
|
|
7991
|
+
while (focusIndex >= 0 && focusIndex < this.menuItems.length) {
|
|
7992
|
+
const child = this.menuItems[focusIndex];
|
|
7993
|
+
if (this.isFocusableElement(child)) {
|
|
7994
|
+
if (this.focusIndex > -1 && this.menuItems.length >= this.focusIndex - 1) {
|
|
7995
|
+
this.menuItems[this.focusIndex].setAttribute("tabindex", "-1");
|
|
7996
|
+
}
|
|
7997
|
+
this.focusIndex = focusIndex;
|
|
7998
|
+
child.setAttribute("tabindex", "0");
|
|
7999
|
+
child.focus();
|
|
8000
|
+
break;
|
|
8001
|
+
}
|
|
8002
|
+
focusIndex += adjustment;
|
|
8003
|
+
}
|
|
8004
|
+
}
|
|
8005
|
+
};
|
|
8006
|
+
_MenuList.focusableElementRoles = MenuItemRole;
|
|
8007
|
+
__decorateClass$d([observable], _MenuList.prototype, "items", 2);
|
|
8008
|
+
let MenuList = _MenuList;
|
|
8009
|
+
|
|
8911
8010
|
const styles$d = css`
|
|
8912
|
-
${display("
|
|
8011
|
+
${display("flex")}
|
|
8913
8012
|
|
|
8914
|
-
:host{
|
|
8013
|
+
:host{flex-direction:column;height:fit-content;max-width:300px;min-width:160px;width:auto;background-color:${colorNeutralBackground1};border:1px solid ${colorTransparentStroke};border-radius:${borderRadiusMedium};box-shadow:${shadow16};padding:4px;row-gap:2px}`;
|
|
8915
8014
|
|
|
8916
|
-
|
|
8917
|
-
|
|
8015
|
+
function menuTemplate$1() {
|
|
8016
|
+
return html`<template slot="${x => x.slot ? x.slot : x.isNestedMenu() ? "submenu" : void 0}" role="menu" @keydown="${(x, c) => x.handleMenuKeyDown(c.event)}" @focusout="${(x, c) => x.handleFocusOut(c.event)}"><slot ${slotted("items")}></slot></template>`;
|
|
8017
|
+
}
|
|
8018
|
+
const template$d = menuTemplate$1();
|
|
8019
|
+
|
|
8020
|
+
const definition$d = MenuList.compose({
|
|
8021
|
+
name: `${FluentDesignSystem.prefix}-menu-list`,
|
|
8918
8022
|
template: template$d,
|
|
8919
8023
|
styles: styles$d
|
|
8920
8024
|
});
|
|
8921
8025
|
|
|
8026
|
+
definition$d.define(FluentDesignSystem.registry);
|
|
8027
|
+
|
|
8922
8028
|
var __defProp$c = Object.defineProperty;
|
|
8923
8029
|
var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
|
|
8924
8030
|
var __decorateClass$c = (decorators, target, key, kind) => {
|
|
@@ -8927,263 +8033,383 @@ var __decorateClass$c = (decorators, target, key, kind) => {
|
|
|
8927
8033
|
if (kind && result) __defProp$c(target, key, result);
|
|
8928
8034
|
return result;
|
|
8929
8035
|
};
|
|
8930
|
-
|
|
8036
|
+
class Menu extends FASTElement {
|
|
8931
8037
|
constructor() {
|
|
8932
8038
|
super(...arguments);
|
|
8933
|
-
this.
|
|
8039
|
+
this.openOnHover = false;
|
|
8040
|
+
this.openOnContext = false;
|
|
8041
|
+
this.closeOnScroll = false;
|
|
8042
|
+
this.persistOnItemClick = false;
|
|
8043
|
+
this.open = false;
|
|
8044
|
+
this.slottedMenuList = [];
|
|
8045
|
+
this.slottedTriggers = [];
|
|
8934
8046
|
/**
|
|
8935
|
-
*
|
|
8936
|
-
*
|
|
8047
|
+
* Toggles the open state of the menu.
|
|
8048
|
+
* @public
|
|
8937
8049
|
*/
|
|
8938
|
-
this.
|
|
8050
|
+
this.toggleMenu = () => {
|
|
8051
|
+
if (this.open) {
|
|
8052
|
+
this.closeMenu();
|
|
8053
|
+
} else {
|
|
8054
|
+
this.openMenu();
|
|
8055
|
+
}
|
|
8056
|
+
};
|
|
8939
8057
|
/**
|
|
8940
|
-
*
|
|
8058
|
+
* Closes the menu.
|
|
8059
|
+
* @public
|
|
8941
8060
|
*/
|
|
8942
|
-
this.
|
|
8943
|
-
|
|
8061
|
+
this.closeMenu = () => {
|
|
8062
|
+
this.open = false;
|
|
8063
|
+
if (this.closeOnScroll) {
|
|
8064
|
+
document.removeEventListener("scroll", this.closeMenu);
|
|
8065
|
+
}
|
|
8944
8066
|
};
|
|
8945
8067
|
/**
|
|
8946
|
-
*
|
|
8947
|
-
* @
|
|
8068
|
+
* Opens the menu.
|
|
8069
|
+
* @public
|
|
8948
8070
|
*/
|
|
8949
|
-
this.
|
|
8950
|
-
|
|
8951
|
-
|
|
8952
|
-
|
|
8953
|
-
this.menuItems[this.focusIndex].setAttribute("tabindex", "-1");
|
|
8954
|
-
this.menuItems[focusIndex].setAttribute("tabindex", "0");
|
|
8955
|
-
this.focusIndex = focusIndex;
|
|
8071
|
+
this.openMenu = e => {
|
|
8072
|
+
this.open = true;
|
|
8073
|
+
if (e && this.openOnContext) {
|
|
8074
|
+
e.preventDefault();
|
|
8956
8075
|
}
|
|
8957
|
-
|
|
8958
|
-
|
|
8959
|
-
const targetItem = e.target;
|
|
8960
|
-
if (this.menuItems !== void 0 && targetItem !== this.menuItems[this.focusIndex]) {
|
|
8961
|
-
this.menuItems[this.focusIndex].setAttribute("tabindex", "-1");
|
|
8962
|
-
this.focusIndex = this.menuItems.indexOf(targetItem);
|
|
8963
|
-
targetItem.setAttribute("tabindex", "0");
|
|
8076
|
+
if (this.closeOnScroll) {
|
|
8077
|
+
document.addEventListener("scroll", this.closeMenu);
|
|
8964
8078
|
}
|
|
8965
8079
|
};
|
|
8966
|
-
|
|
8967
|
-
|
|
8968
|
-
|
|
8969
|
-
|
|
8970
|
-
|
|
8971
|
-
|
|
8972
|
-
if (this.expandedItem !== null && changedItem === this.expandedItem && changedItem.expanded === false) {
|
|
8973
|
-
this.expandedItem = null;
|
|
8974
|
-
return;
|
|
8975
|
-
}
|
|
8976
|
-
if (changedItem.expanded) {
|
|
8977
|
-
if (this.expandedItem !== null && this.expandedItem !== changedItem) {
|
|
8978
|
-
this.expandedItem.expanded = false;
|
|
8979
|
-
}
|
|
8980
|
-
this.menuItems[this.focusIndex].setAttribute("tabindex", "-1");
|
|
8981
|
-
this.expandedItem = changedItem;
|
|
8982
|
-
this.focusIndex = this.menuItems.indexOf(changedItem);
|
|
8983
|
-
changedItem.setAttribute("tabindex", "0");
|
|
8984
|
-
}
|
|
8080
|
+
/**
|
|
8081
|
+
* The task to set the positioning of the menu.
|
|
8082
|
+
* @internal
|
|
8083
|
+
*/
|
|
8084
|
+
this.setPositioningTask = () => {
|
|
8085
|
+
this.setPositioning();
|
|
8985
8086
|
};
|
|
8986
8087
|
/**
|
|
8987
|
-
*
|
|
8088
|
+
* Handles keyboard interaction for the trigger. Toggles the menu when the Space or Enter key is pressed. If the menu
|
|
8089
|
+
* is open, focuses on the menu list.
|
|
8090
|
+
*
|
|
8091
|
+
* @param e - the keyboard event
|
|
8092
|
+
* @public
|
|
8988
8093
|
*/
|
|
8989
|
-
this.
|
|
8990
|
-
if (
|
|
8991
|
-
return;
|
|
8992
|
-
}
|
|
8993
|
-
const changedMenuItem = e.target;
|
|
8994
|
-
const changeItemIndex = this.menuItems.indexOf(changedMenuItem);
|
|
8995
|
-
if (changeItemIndex === -1) {
|
|
8094
|
+
this.handleTriggerKeydown = e => {
|
|
8095
|
+
if (e.defaultPrevented) {
|
|
8996
8096
|
return;
|
|
8997
8097
|
}
|
|
8998
|
-
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
break;
|
|
9007
|
-
}
|
|
9008
|
-
}
|
|
9009
|
-
const maxIndex = this.menuItems.length - 1;
|
|
9010
|
-
for (let i = changeItemIndex + 1; i <= maxIndex; ++i) {
|
|
9011
|
-
const item = this.menuItems[i];
|
|
9012
|
-
const role = item.getAttribute("role");
|
|
9013
|
-
if (role === MenuItemRole.menuitemradio) {
|
|
9014
|
-
item.checked = false;
|
|
9015
|
-
}
|
|
9016
|
-
if (role === "separator") {
|
|
9017
|
-
break;
|
|
8098
|
+
const key = e.key;
|
|
8099
|
+
switch (key) {
|
|
8100
|
+
case keySpace:
|
|
8101
|
+
case keyEnter:
|
|
8102
|
+
e.preventDefault();
|
|
8103
|
+
this.toggleMenu();
|
|
8104
|
+
if (this.open) {
|
|
8105
|
+
this.focusMenuList();
|
|
9018
8106
|
}
|
|
9019
|
-
|
|
8107
|
+
break;
|
|
8108
|
+
default:
|
|
8109
|
+
return true;
|
|
9020
8110
|
}
|
|
9021
8111
|
};
|
|
9022
8112
|
/**
|
|
9023
|
-
*
|
|
9024
|
-
|
|
9025
|
-
|
|
9026
|
-
return el instanceof MenuItem || isHTMLElement(el) && el.getAttribute("role") in _MenuList.focusableElementRoles;
|
|
9027
|
-
};
|
|
9028
|
-
/**
|
|
9029
|
-
* check if the item is focusable
|
|
8113
|
+
* Handles document click events to close the menu when a click occurs outside of the menu or the trigger.
|
|
8114
|
+
* @internal
|
|
8115
|
+
* @param e - The event triggered on document click.
|
|
9030
8116
|
*/
|
|
9031
|
-
this.
|
|
9032
|
-
|
|
8117
|
+
this.handleDocumentClick = e => {
|
|
8118
|
+
if (e && !e.composedPath().includes(this._menuList) && !e.composedPath().includes(this._trigger)) {
|
|
8119
|
+
this.closeMenu();
|
|
8120
|
+
}
|
|
9033
8121
|
};
|
|
9034
8122
|
}
|
|
9035
|
-
itemsChanged(oldValue, newValue) {
|
|
9036
|
-
if (this.$fastController.isConnected && this.menuItems !== void 0) {
|
|
9037
|
-
this.setItems();
|
|
9038
|
-
}
|
|
9039
|
-
}
|
|
9040
8123
|
/**
|
|
9041
|
-
*
|
|
8124
|
+
* Called when the element is connected to the DOM.
|
|
8125
|
+
* Sets up the component.
|
|
8126
|
+
* @public
|
|
9042
8127
|
*/
|
|
9043
8128
|
connectedCallback() {
|
|
9044
8129
|
super.connectedCallback();
|
|
9045
|
-
Updates.enqueue(() =>
|
|
9046
|
-
|
|
8130
|
+
Updates.enqueue(() => this.setComponent());
|
|
8131
|
+
}
|
|
8132
|
+
/**
|
|
8133
|
+
* Called when the element is disconnected from the DOM.
|
|
8134
|
+
* Removes event listeners.
|
|
8135
|
+
* @public
|
|
8136
|
+
*/
|
|
8137
|
+
disconnectedCallback() {
|
|
8138
|
+
super.disconnectedCallback();
|
|
8139
|
+
this.cleanup?.();
|
|
8140
|
+
this.removeListeners();
|
|
8141
|
+
}
|
|
8142
|
+
/**
|
|
8143
|
+
* Sets the component.
|
|
8144
|
+
* Sets the trigger and menu list elements and adds event listeners.
|
|
8145
|
+
* @public
|
|
8146
|
+
*/
|
|
8147
|
+
setComponent() {
|
|
8148
|
+
if (this.$fastController.isConnected && this.slottedMenuList.length && this.slottedTriggers.length) {
|
|
8149
|
+
this._trigger = this.slottedTriggers[0];
|
|
8150
|
+
this._menuList = this.slottedMenuList[0];
|
|
8151
|
+
this._trigger.setAttribute("aria-haspopup", "true");
|
|
8152
|
+
this._trigger.setAttribute("aria-expanded", `${this.open}`);
|
|
8153
|
+
this.addListeners();
|
|
8154
|
+
}
|
|
8155
|
+
}
|
|
8156
|
+
/**
|
|
8157
|
+
* Focuses on the menu list.
|
|
8158
|
+
* @public
|
|
8159
|
+
*/
|
|
8160
|
+
focusMenuList() {
|
|
8161
|
+
if (this.open && this._menuList) {
|
|
8162
|
+
Updates.enqueue(() => {
|
|
8163
|
+
this._menuList.focus();
|
|
8164
|
+
});
|
|
8165
|
+
}
|
|
8166
|
+
}
|
|
8167
|
+
/**
|
|
8168
|
+
* Focuses on the menu trigger.
|
|
8169
|
+
* @public
|
|
8170
|
+
*/
|
|
8171
|
+
focusTrigger() {
|
|
8172
|
+
if (!this.open && this._trigger) {
|
|
8173
|
+
Updates.enqueue(() => {
|
|
8174
|
+
this._trigger.focus();
|
|
8175
|
+
});
|
|
8176
|
+
}
|
|
8177
|
+
}
|
|
8178
|
+
/**
|
|
8179
|
+
* Called whenever the open state changes.
|
|
8180
|
+
* Updates the 'aria-expanded' attribute and sets the positioning of the menu.
|
|
8181
|
+
* Sets menu list position
|
|
8182
|
+
* emits openChanged event
|
|
8183
|
+
*
|
|
8184
|
+
* @param oldValue - The previous value of 'open'.
|
|
8185
|
+
* @param newValue - The new value of 'open'.
|
|
8186
|
+
* @public
|
|
8187
|
+
*/
|
|
8188
|
+
openChanged(oldValue, newValue) {
|
|
8189
|
+
if (this.$fastController.isConnected && this._trigger instanceof HTMLElement) {
|
|
8190
|
+
this._trigger.setAttribute("aria-expanded", `${this.open}`);
|
|
8191
|
+
if (this._menuList && this.open) {
|
|
8192
|
+
Updates.enqueue(this.setPositioningTask);
|
|
8193
|
+
}
|
|
8194
|
+
}
|
|
8195
|
+
this.cleanup?.();
|
|
8196
|
+
this.$emit("onOpenChange", {
|
|
8197
|
+
open: newValue
|
|
9047
8198
|
});
|
|
9048
|
-
this.addEventListener("change", this.changeHandler);
|
|
9049
8199
|
}
|
|
9050
8200
|
/**
|
|
9051
|
-
*
|
|
8201
|
+
* Called whenever the 'openOnHover' property changes.
|
|
8202
|
+
* Adds or removes a 'mouseover' event listener to the trigger based on the new value.
|
|
8203
|
+
*
|
|
8204
|
+
* @param oldValue - The previous value of 'openOnHover'.
|
|
8205
|
+
* @param newValue - The new value of 'openOnHover'.
|
|
8206
|
+
* @public
|
|
8207
|
+
*/
|
|
8208
|
+
openOnHoverChanged(oldValue, newValue) {
|
|
8209
|
+
if (newValue) {
|
|
8210
|
+
this._trigger?.addEventListener("mouseover", this.openMenu);
|
|
8211
|
+
} else {
|
|
8212
|
+
this._trigger?.removeEventListener("mouseover", this.openMenu);
|
|
8213
|
+
}
|
|
8214
|
+
}
|
|
8215
|
+
/**
|
|
8216
|
+
* Called whenever the 'persistOnItemClick' property changes.
|
|
8217
|
+
* Adds or removes a 'click' event listener to the menu list based on the new value.
|
|
8218
|
+
* @public
|
|
8219
|
+
* @param oldValue - The previous value of 'persistOnItemClick'.
|
|
8220
|
+
* @param newValue - The new value of 'persistOnItemClick'.
|
|
9052
8221
|
*/
|
|
9053
|
-
|
|
9054
|
-
|
|
9055
|
-
|
|
9056
|
-
|
|
9057
|
-
|
|
8222
|
+
persistOnItemClickChanged(oldValue, newValue) {
|
|
8223
|
+
if (!newValue) {
|
|
8224
|
+
this._menuList?.addEventListener("click", this.closeMenu);
|
|
8225
|
+
} else {
|
|
8226
|
+
this._menuList?.removeEventListener("click", this.closeMenu);
|
|
8227
|
+
}
|
|
9058
8228
|
}
|
|
9059
8229
|
/**
|
|
9060
|
-
*
|
|
9061
|
-
*
|
|
8230
|
+
* Called whenever the 'openOnContext' property changes.
|
|
8231
|
+
* Adds or removes a 'contextmenu' event listener to the trigger based on the new value.
|
|
9062
8232
|
* @public
|
|
8233
|
+
* @param oldValue - The previous value of 'openOnContext'.
|
|
8234
|
+
* @param newValue - The new value of 'openOnContext'.
|
|
9063
8235
|
*/
|
|
9064
|
-
|
|
9065
|
-
|
|
8236
|
+
openOnContextChanged(oldValue, newValue) {
|
|
8237
|
+
if (newValue) {
|
|
8238
|
+
this._trigger?.addEventListener("contextmenu", this.openMenu);
|
|
8239
|
+
} else {
|
|
8240
|
+
this._trigger?.removeEventListener("contextmenu", this.openMenu);
|
|
8241
|
+
}
|
|
9066
8242
|
}
|
|
9067
8243
|
/**
|
|
9068
|
-
*
|
|
9069
|
-
*
|
|
8244
|
+
* Called whenever the 'closeOnScroll' property changes.
|
|
8245
|
+
* Adds or removes a 'closeOnScroll' event listener to the trigger based on the new value.
|
|
9070
8246
|
* @public
|
|
8247
|
+
* @param oldValue - The previous value of 'closeOnScroll'.
|
|
8248
|
+
* @param newValue - The new value of 'closeOnScroll'.
|
|
9071
8249
|
*/
|
|
9072
|
-
|
|
9073
|
-
if (
|
|
9074
|
-
this.
|
|
9075
|
-
|
|
8250
|
+
closeOnScrollChanged(oldValue, newValue) {
|
|
8251
|
+
if (newValue) {
|
|
8252
|
+
document.addEventListener("scroll", this.closeMenu);
|
|
8253
|
+
} else {
|
|
8254
|
+
document.removeEventListener("scroll", this.closeMenu);
|
|
9076
8255
|
}
|
|
9077
8256
|
}
|
|
9078
8257
|
/**
|
|
8258
|
+
* Sets the positioning of the menu.
|
|
9079
8259
|
* @internal
|
|
9080
8260
|
*/
|
|
9081
|
-
|
|
9082
|
-
if (
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
|
|
9090
|
-
|
|
9091
|
-
|
|
9092
|
-
|
|
9093
|
-
|
|
9094
|
-
|
|
9095
|
-
|
|
9096
|
-
|
|
9097
|
-
|
|
9098
|
-
|
|
9099
|
-
|
|
8261
|
+
setPositioning() {
|
|
8262
|
+
if (this.$fastController.isConnected && this._menuList && this.open && this._trigger) {
|
|
8263
|
+
this.cleanup = P(this, this.positioningContainer, async () => {
|
|
8264
|
+
const {
|
|
8265
|
+
middlewareData,
|
|
8266
|
+
x,
|
|
8267
|
+
y
|
|
8268
|
+
} = await z(this._trigger, this.positioningContainer, {
|
|
8269
|
+
placement: "bottom",
|
|
8270
|
+
strategy: "fixed",
|
|
8271
|
+
middleware: [b$1(), k({
|
|
8272
|
+
apply: ({
|
|
8273
|
+
availableHeight,
|
|
8274
|
+
rects
|
|
8275
|
+
}) => {
|
|
8276
|
+
this.positioningContainer?.style && Object.assign(this.positioningContainer.style, {
|
|
8277
|
+
maxHeight: `${availableHeight}px`,
|
|
8278
|
+
width: `${rects.reference.width}px`
|
|
8279
|
+
});
|
|
8280
|
+
}
|
|
8281
|
+
}), P$1()]
|
|
8282
|
+
});
|
|
8283
|
+
if (middlewareData.hide?.referenceHidden) {
|
|
8284
|
+
this.open = false;
|
|
8285
|
+
return;
|
|
8286
|
+
}
|
|
8287
|
+
this.positioningContainer?.style && Object.assign(this.positioningContainer.style, {
|
|
8288
|
+
position: "fixed",
|
|
8289
|
+
top: "0",
|
|
8290
|
+
left: "0",
|
|
8291
|
+
transform: `translate(${x}px, ${y}px)`
|
|
8292
|
+
});
|
|
8293
|
+
});
|
|
9100
8294
|
}
|
|
9101
8295
|
}
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
return startSlot ? 2 : 1;
|
|
8296
|
+
/**
|
|
8297
|
+
* Adds event listeners.
|
|
8298
|
+
* Adds click and keydown event listeners to the trigger and a click event listener to the document.
|
|
8299
|
+
* If 'openOnHover' is true, adds a 'mouseover' event listener to the trigger.
|
|
8300
|
+
* @public
|
|
8301
|
+
*/
|
|
8302
|
+
addListeners() {
|
|
8303
|
+
document.addEventListener("click", this.handleDocumentClick);
|
|
8304
|
+
this._trigger?.addEventListener("keydown", this.handleTriggerKeydown);
|
|
8305
|
+
if (!this.persistOnItemClick) {
|
|
8306
|
+
this._menuList?.addEventListener("click", this.closeMenu);
|
|
9114
8307
|
}
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
const newItems = children.filter(child => !child.hasAttribute("hidden"));
|
|
9122
|
-
this.menuItems = newItems;
|
|
9123
|
-
const menuItems = this.menuItems.filter(this.isMenuItemElement);
|
|
9124
|
-
if (menuItems.length) {
|
|
9125
|
-
this.focusIndex = 0;
|
|
8308
|
+
if (this.openOnHover) {
|
|
8309
|
+
this._trigger?.addEventListener("mouseover", this.openMenu);
|
|
8310
|
+
} else if (this.openOnContext) {
|
|
8311
|
+
this._trigger?.addEventListener("contextmenu", this.openMenu);
|
|
8312
|
+
} else {
|
|
8313
|
+
this._trigger?.addEventListener("click", this.toggleMenu);
|
|
9126
8314
|
}
|
|
9127
|
-
menuItems.forEach((item, index) => {
|
|
9128
|
-
item.setAttribute("tabindex", index === 0 ? "0" : "-1");
|
|
9129
|
-
item.addEventListener("expanded-change", this.handleExpandedChanged);
|
|
9130
|
-
item.addEventListener("focus", this.handleItemFocus);
|
|
9131
|
-
});
|
|
9132
|
-
const filteredMenuListItems = this.menuItems?.filter(this.isMenuItemElement);
|
|
9133
|
-
filteredMenuListItems?.forEach((item, index) => {
|
|
9134
|
-
const indent = filteredMenuListItems?.reduce((accum, current) => {
|
|
9135
|
-
const elementValue = _MenuList.elementIndent(current);
|
|
9136
|
-
return Math.max(accum, elementValue);
|
|
9137
|
-
}, 0);
|
|
9138
|
-
if (item instanceof MenuItem) {
|
|
9139
|
-
item.setAttribute("data-indent", `${indent}`);
|
|
9140
|
-
}
|
|
9141
|
-
});
|
|
9142
8315
|
}
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
|
|
8316
|
+
/**
|
|
8317
|
+
* Removes event listeners.
|
|
8318
|
+
* Removes click and keydown event listeners from the trigger and a click event listener from the document.
|
|
8319
|
+
* Also removes 'mouseover' event listeners from the trigger.
|
|
8320
|
+
* @internal
|
|
8321
|
+
*/
|
|
8322
|
+
removeListeners() {
|
|
8323
|
+
document.removeEventListener("click", this.handleDocumentClick);
|
|
8324
|
+
this._trigger?.removeEventListener("keydown", this.handleTriggerKeydown);
|
|
8325
|
+
if (!this.persistOnItemClick) {
|
|
8326
|
+
this._menuList?.removeEventListener("click", this.closeMenu);
|
|
8327
|
+
}
|
|
8328
|
+
if (this.openOnHover) {
|
|
8329
|
+
this._trigger?.removeEventListener("mouseover", this.openMenu);
|
|
8330
|
+
}
|
|
8331
|
+
if (this.openOnContext) {
|
|
8332
|
+
this._trigger?.removeEventListener("contextmenu", this.openMenu);
|
|
8333
|
+
} else {
|
|
8334
|
+
this._trigger?.removeEventListener("click", this.toggleMenu);
|
|
9146
8335
|
}
|
|
9147
8336
|
}
|
|
9148
|
-
|
|
9149
|
-
|
|
8337
|
+
/**
|
|
8338
|
+
* Handles keyboard interaction for the menu. Closes the menu and focuses on the trigger when the Escape key is
|
|
8339
|
+
* pressed. Closes the menu when the Tab key is pressed.
|
|
8340
|
+
*
|
|
8341
|
+
* @param e - the keyboard event
|
|
8342
|
+
* @public
|
|
8343
|
+
*/
|
|
8344
|
+
handleMenuKeydown(e) {
|
|
8345
|
+
if (e.defaultPrevented) {
|
|
9150
8346
|
return;
|
|
9151
8347
|
}
|
|
9152
|
-
|
|
9153
|
-
|
|
9154
|
-
|
|
9155
|
-
|
|
9156
|
-
|
|
8348
|
+
const key = e.key;
|
|
8349
|
+
switch (key) {
|
|
8350
|
+
case keyEscape:
|
|
8351
|
+
e.preventDefault();
|
|
8352
|
+
if (this.open) {
|
|
8353
|
+
this.closeMenu();
|
|
8354
|
+
this.focusTrigger();
|
|
9157
8355
|
}
|
|
9158
|
-
this.focusIndex = focusIndex;
|
|
9159
|
-
child.setAttribute("tabindex", "0");
|
|
9160
|
-
child.focus();
|
|
9161
8356
|
break;
|
|
9162
|
-
|
|
9163
|
-
|
|
8357
|
+
case keyTab:
|
|
8358
|
+
if (this.open) {
|
|
8359
|
+
this.closeMenu();
|
|
8360
|
+
}
|
|
8361
|
+
if (e.shiftKey) {
|
|
8362
|
+
this.focusTrigger();
|
|
8363
|
+
}
|
|
8364
|
+
default:
|
|
8365
|
+
return true;
|
|
9164
8366
|
}
|
|
9165
8367
|
}
|
|
9166
|
-
};
|
|
9167
|
-
_MenuList.focusableElementRoles = MenuItemRole;
|
|
9168
|
-
__decorateClass$c([observable], _MenuList.prototype, "items", 2);
|
|
9169
|
-
let MenuList = _MenuList;
|
|
9170
|
-
|
|
9171
|
-
function menuTemplate() {
|
|
9172
|
-
return html`<template slot="${x => x.slot ? x.slot : x.isNestedMenu() ? "submenu" : void 0}" role="menu" @keydown="${(x, c) => x.handleMenuKeyDown(c.event)}" @focusout="${(x, c) => x.handleFocusOut(c.event)}"><slot ${slotted("items")}></slot></template>`;
|
|
9173
8368
|
}
|
|
9174
|
-
|
|
8369
|
+
__decorateClass$c([observable, attr({
|
|
8370
|
+
attribute: "open-on-hover",
|
|
8371
|
+
mode: "boolean"
|
|
8372
|
+
})], Menu.prototype, "openOnHover", 2);
|
|
8373
|
+
__decorateClass$c([observable, attr({
|
|
8374
|
+
attribute: "open-on-context",
|
|
8375
|
+
mode: "boolean"
|
|
8376
|
+
})], Menu.prototype, "openOnContext", 2);
|
|
8377
|
+
__decorateClass$c([observable, attr({
|
|
8378
|
+
attribute: "close-on-scroll",
|
|
8379
|
+
mode: "boolean"
|
|
8380
|
+
})], Menu.prototype, "closeOnScroll", 2);
|
|
8381
|
+
__decorateClass$c([observable, attr({
|
|
8382
|
+
attribute: "persist-on-item-click",
|
|
8383
|
+
mode: "boolean"
|
|
8384
|
+
})], Menu.prototype, "persistOnItemClick", 2);
|
|
8385
|
+
__decorateClass$c([observable, attr({
|
|
8386
|
+
mode: "boolean"
|
|
8387
|
+
})], Menu.prototype, "open", 2);
|
|
8388
|
+
__decorateClass$c([observable], Menu.prototype, "slottedMenuList", 2);
|
|
8389
|
+
__decorateClass$c([observable], Menu.prototype, "slottedTriggers", 2);
|
|
9175
8390
|
|
|
9176
8391
|
const styles$c = css`
|
|
9177
|
-
|
|
8392
|
+
:host{position:relative;z-index:var(--z-index-menu,1)}.positioning-container{position:fixed;top:0;left:0;transform:translate(0,0)}`;
|
|
9178
8393
|
|
|
9179
|
-
|
|
8394
|
+
function menuTemplate() {
|
|
8395
|
+
return html`<template ?open-on-hover="${x => x.openOnHover}" ?open-on-context="${x => x.openOnContext}" ?close-on-scroll="${x => x.closeOnScroll}" ?persist-on-item-click="${x => x.persistOnItemClick}" @keydown="${(x, c) => x.handleMenuKeydown(c.event)}"><slot name="trigger" ${slotted({
|
|
8396
|
+
property: "slottedTriggers",
|
|
8397
|
+
filter: elements()
|
|
8398
|
+
})}></slot><span ${ref("positioningContainer")} part="positioning-container" class="positioning-container" ?hidden="${x => !x.open}"><slot ${slotted({
|
|
8399
|
+
property: "slottedMenuList",
|
|
8400
|
+
filter: elements()
|
|
8401
|
+
})}></slot></span></template>`;
|
|
8402
|
+
}
|
|
8403
|
+
const template$c = menuTemplate();
|
|
9180
8404
|
|
|
9181
|
-
const definition$c =
|
|
9182
|
-
name: `${FluentDesignSystem.prefix}-menu
|
|
8405
|
+
const definition$c = Menu.compose({
|
|
8406
|
+
name: `${FluentDesignSystem.prefix}-menu`,
|
|
9183
8407
|
template: template$c,
|
|
9184
8408
|
styles: styles$c
|
|
9185
8409
|
});
|
|
9186
8410
|
|
|
8411
|
+
definition$c.define(FluentDesignSystem.registry);
|
|
8412
|
+
|
|
9187
8413
|
var __defProp$b = Object.defineProperty;
|
|
9188
8414
|
var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
|
|
9189
8415
|
var __decorateClass$b = (decorators, target, key, kind) => {
|
|
@@ -9251,24 +8477,10 @@ class ProgressBar extends BaseProgress {
|
|
|
9251
8477
|
}
|
|
9252
8478
|
}
|
|
9253
8479
|
__decorateClass$a([attr], ProgressBar.prototype, "thickness", 2);
|
|
9254
|
-
__decorateClass$a([attr], ProgressBar.prototype, "shape", 2);
|
|
9255
|
-
__decorateClass$a([attr({
|
|
9256
|
-
attribute: "validation-state"
|
|
9257
|
-
})], ProgressBar.prototype, "validationState", 2);
|
|
9258
|
-
|
|
9259
|
-
const ProgressBarThickness = {
|
|
9260
|
-
medium: "medium",
|
|
9261
|
-
large: "large"
|
|
9262
|
-
};
|
|
9263
|
-
const ProgressBarShape = {
|
|
9264
|
-
rounded: "rounded",
|
|
9265
|
-
square: "square"
|
|
9266
|
-
};
|
|
9267
|
-
const ProgressBarValidationState = {
|
|
9268
|
-
success: "success",
|
|
9269
|
-
warning: "warning",
|
|
9270
|
-
error: "error"
|
|
9271
|
-
};
|
|
8480
|
+
__decorateClass$a([attr], ProgressBar.prototype, "shape", 2);
|
|
8481
|
+
__decorateClass$a([attr({
|
|
8482
|
+
attribute: "validation-state"
|
|
8483
|
+
})], ProgressBar.prototype, "validationState", 2);
|
|
9272
8484
|
|
|
9273
8485
|
const styles$b = css`
|
|
9274
8486
|
${display("flex")}
|
|
@@ -9300,6 +8512,8 @@ const definition$b = ProgressBar.compose({
|
|
|
9300
8512
|
styles: styles$b
|
|
9301
8513
|
});
|
|
9302
8514
|
|
|
8515
|
+
definition$b.define(FluentDesignSystem.registry);
|
|
8516
|
+
|
|
9303
8517
|
class _Radio extends FASTElement {}
|
|
9304
8518
|
class FormAssociatedRadio extends CheckableFormAssociated(_Radio) {
|
|
9305
8519
|
constructor() {
|
|
@@ -9383,28 +8597,6 @@ class Radio extends FormAssociatedRadio {
|
|
|
9383
8597
|
__decorateClass$9([observable], Radio.prototype, "name", 2);
|
|
9384
8598
|
__decorateClass$9([observable], Radio.prototype, "defaultSlottedNodes", 2);
|
|
9385
8599
|
|
|
9386
|
-
const styles$a = css`
|
|
9387
|
-
${display("inline-grid")}
|
|
9388
|
-
|
|
9389
|
-
:host{grid-auto-flow:column;grid-template-columns:max-content;gap:${spacingHorizontalXS};align-items:center;height:32px;cursor:pointer;outline:none;position:relative;user-select:none;color:blue;color:var(--state-color,${colorNeutralForeground3});padding-inline-end:${spacingHorizontalS};--control-border-color:${colorNeutralStrokeAccessible};--checked-indicator-background-color:${colorCompoundBrandForeground1};--state-color:${colorNeutralForeground3}}:host([disabled]){--control-border-color:${colorNeutralForegroundDisabled};--checked-indicator-background-color:${colorNeutralForegroundDisabled};--state-color:${colorNeutralForegroundDisabled}}.label{cursor:pointer;font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};line-height:${lineHeightBase300}}.label__hidden{display:none}.control{box-sizing:border-box;align-items:center;border:1px solid var(--control-border-color,${colorNeutralStrokeAccessible});border-radius:${borderRadiusCircular};display:flex;height:16px;justify-content:center;margin:${spacingVerticalS} ${spacingHorizontalS};position:relative;width:16px;justify-self:center}.checked-indicator{border-radius:${borderRadiusCircular};height:10px;opacity:0;width:10px}:host([aria-checked='false']:hover) .control{color:${colorNeutralForeground2}}:host(:focus-visible){border-radius:${borderRadiusSmall};box-shadow:0 0 0 3px ${colorStrokeFocus2};outline:1px solid ${colorStrokeFocus1}}:host(:hover) .control{border-color:${colorNeutralStrokeAccessibleHover}}:host(:active) .control{border-color:${colorNeutralStrokeAccessiblePressed}}:host([aria-checked='true']) .checked-indicator{opacity:1}:host([aria-checked='true']) .control{border-color:var(--control-border-color,${colorNeutralStrokeAccessible})}:host([aria-checked='true']) .checked-indicator{background-color:var(--checked-indicator-background-color,${colorCompoundBrandForeground1})}:host([aria-checked='true']:hover) .control{border-color:${colorCompoundBrandStrokeHover}}:host([aria-checked='true']:hover) .checked-indicator{background-color:${colorCompoundBrandStrokeHover}}:host([aria-checked='true']:active) .control{border-color:${colorCompoundBrandStrokePressed}}:host([aria-checked='true']:active) .checked-indicator{background:${colorCompoundBrandForeground1Pressed}}:host([disabled]){color:${colorNeutralForegroundDisabled};pointer-events:none}:host([disabled]) .control{pointer-events:none;border-color:${colorNeutralForegroundDisabled}}:host([disabled]) .checked-indicator{background:${colorNeutralForegroundDisabled}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
9390
|
-
:host .control{border-color:InactiveBorder}:host([aria-checked='true']) .checked-indicator,:host([aria-checked='true']:active) .checked-indicator,:host([aria-checked='true']:hover) .checked-indicator{background-color:Highlight;border-color:ActiveBorder}`));
|
|
9391
|
-
|
|
9392
|
-
function radioTemplate(options = {}) {
|
|
9393
|
-
return html`<template role="radio" aria-checked="${x => x.checked}" aria-required="${x => x.required}" aria-disabled="${x => x.disabled}" @keypress="${(x, c) => x.keypressHandler(c.event)}"><div part="control" class="control"><slot name="checked-indicator">${staticallyCompose(options.checkedIndicator)}</slot></div><label part="label" class="${x => ["label", !x.defaultSlottedNodes?.length && "label__hidden"].filter(Boolean).join(" ")}"><slot ${slotted({
|
|
9394
|
-
property: "defaultSlottedNodes",
|
|
9395
|
-
filter: whitespaceFilter
|
|
9396
|
-
})}></slot></label></template>`;
|
|
9397
|
-
}
|
|
9398
|
-
const template$a = radioTemplate({
|
|
9399
|
-
checkedIndicator: html`<div part="checked-indicator" class="checked-indicator"></div>`
|
|
9400
|
-
});
|
|
9401
|
-
|
|
9402
|
-
const definition$a = Radio.compose({
|
|
9403
|
-
name: `${FluentDesignSystem.prefix}-radio`,
|
|
9404
|
-
template: template$a,
|
|
9405
|
-
styles: styles$a
|
|
9406
|
-
});
|
|
9407
|
-
|
|
9408
8600
|
const RadioGroupOrientation = Orientation;
|
|
9409
8601
|
|
|
9410
8602
|
var __defProp$8 = Object.defineProperty;
|
|
@@ -9732,7 +8924,7 @@ __decorateClass$8([attr], RadioGroup.prototype, "orientation", 2);
|
|
|
9732
8924
|
__decorateClass$8([observable], RadioGroup.prototype, "childItems", 2);
|
|
9733
8925
|
__decorateClass$8([observable], RadioGroup.prototype, "slottedRadioButtons", 2);
|
|
9734
8926
|
|
|
9735
|
-
const styles$
|
|
8927
|
+
const styles$a = css`
|
|
9736
8928
|
${display("flex")}
|
|
9737
8929
|
|
|
9738
8930
|
:host{align-items:flex-start;flex-direction:column;row-gap:${spacingVerticalS}}:host([disabled]) ::slotted([role='radio']){--control-border-color:${colorNeutralForegroundDisabled};--checked-indicator-background-color:${colorNeutralForegroundDisabled};--state-color:${colorNeutralForegroundDisabled}}::slotted([slot='label']){color:${colorNeutralForeground1};padding:${spacingVerticalS} ${spacingHorizontalS} ${spacingVerticalS} ${spacingHorizontalXS};font:${fontWeightRegular} ${fontSizeBase300} / ${lineHeightBase300} ${fontFamilyBase};cursor:default}.positioning-region{display:flex;flex-wrap:wrap}:host([orientation='vertical']) .positioning-region{flex-direction:column;justify-content:flex-start}:host([orientation='horizontal']) .positioning-region{flex-direction:row}:host([orientation='horizontal']) ::slotted([role='radio']){padding-inline-end:${spacingHorizontalS}}:host([orientation='horizontal'][stacked]) ::slotted([role='radio']){display:flex;flex-direction:column;padding-inline:${spacingHorizontalS};height:auto;align-items:center;justify-content:center}:host([disabled]) ::slotted([role='radio']){pointer-events:none}`;
|
|
@@ -9743,19 +8935,41 @@ function radioGroupTemplate() {
|
|
|
9743
8935
|
filter: elements("[role=radio]")
|
|
9744
8936
|
})}></slot></div></template>`;
|
|
9745
8937
|
}
|
|
9746
|
-
const template$
|
|
8938
|
+
const template$a = radioGroupTemplate();
|
|
9747
8939
|
|
|
9748
|
-
const definition$
|
|
8940
|
+
const definition$a = RadioGroup.compose({
|
|
9749
8941
|
name: `${FluentDesignSystem.prefix}-radio-group`,
|
|
8942
|
+
template: template$a,
|
|
8943
|
+
styles: styles$a
|
|
8944
|
+
});
|
|
8945
|
+
|
|
8946
|
+
definition$a.define(FluentDesignSystem.registry);
|
|
8947
|
+
|
|
8948
|
+
const styles$9 = css`
|
|
8949
|
+
${display("inline-grid")}
|
|
8950
|
+
|
|
8951
|
+
:host{grid-auto-flow:column;grid-template-columns:max-content;gap:${spacingHorizontalXS};align-items:center;height:32px;cursor:pointer;outline:none;position:relative;user-select:none;color:blue;color:var(--state-color,${colorNeutralForeground3});padding-inline-end:${spacingHorizontalS};--control-border-color:${colorNeutralStrokeAccessible};--checked-indicator-background-color:${colorCompoundBrandForeground1};--state-color:${colorNeutralForeground3}}:host([disabled]){--control-border-color:${colorNeutralForegroundDisabled};--checked-indicator-background-color:${colorNeutralForegroundDisabled};--state-color:${colorNeutralForegroundDisabled}}.label{cursor:pointer;font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};line-height:${lineHeightBase300}}.label__hidden{display:none}.control{box-sizing:border-box;align-items:center;border:1px solid var(--control-border-color,${colorNeutralStrokeAccessible});border-radius:${borderRadiusCircular};display:flex;height:16px;justify-content:center;margin:${spacingVerticalS} ${spacingHorizontalS};position:relative;width:16px;justify-self:center}.checked-indicator{border-radius:${borderRadiusCircular};height:10px;opacity:0;width:10px}:host([aria-checked='false']:hover) .control{color:${colorNeutralForeground2}}:host(:focus-visible){border-radius:${borderRadiusSmall};box-shadow:0 0 0 3px ${colorStrokeFocus2};outline:1px solid ${colorStrokeFocus1}}:host(:hover) .control{border-color:${colorNeutralStrokeAccessibleHover}}:host(:active) .control{border-color:${colorNeutralStrokeAccessiblePressed}}:host([aria-checked='true']) .checked-indicator{opacity:1}:host([aria-checked='true']) .control{border-color:var(--control-border-color,${colorNeutralStrokeAccessible})}:host([aria-checked='true']) .checked-indicator{background-color:var(--checked-indicator-background-color,${colorCompoundBrandForeground1})}:host([aria-checked='true']:hover) .control{border-color:${colorCompoundBrandStrokeHover}}:host([aria-checked='true']:hover) .checked-indicator{background-color:${colorCompoundBrandStrokeHover}}:host([aria-checked='true']:active) .control{border-color:${colorCompoundBrandStrokePressed}}:host([aria-checked='true']:active) .checked-indicator{background:${colorCompoundBrandForeground1Pressed}}:host([disabled]){color:${colorNeutralForegroundDisabled};pointer-events:none}:host([disabled]) .control{pointer-events:none;border-color:${colorNeutralForegroundDisabled}}:host([disabled]) .checked-indicator{background:${colorNeutralForegroundDisabled}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
8952
|
+
:host .control{border-color:InactiveBorder}:host([aria-checked='true']) .checked-indicator,:host([aria-checked='true']:active) .checked-indicator,:host([aria-checked='true']:hover) .checked-indicator{background-color:Highlight;border-color:ActiveBorder}`));
|
|
8953
|
+
|
|
8954
|
+
function radioTemplate(options = {}) {
|
|
8955
|
+
return html`<template role="radio" aria-checked="${x => x.checked}" aria-required="${x => x.required}" aria-disabled="${x => x.disabled}" @keypress="${(x, c) => x.keypressHandler(c.event)}"><div part="control" class="control"><slot name="checked-indicator">${staticallyCompose(options.checkedIndicator)}</slot></div><label part="label" class="${x => ["label", !x.defaultSlottedNodes?.length && "label__hidden"].filter(Boolean).join(" ")}"><slot ${slotted({
|
|
8956
|
+
property: "defaultSlottedNodes",
|
|
8957
|
+
filter: whitespaceFilter
|
|
8958
|
+
})}></slot></label></template>`;
|
|
8959
|
+
}
|
|
8960
|
+
const template$9 = radioTemplate({
|
|
8961
|
+
checkedIndicator: html`<div part="checked-indicator" class="checked-indicator"></div>`
|
|
8962
|
+
});
|
|
8963
|
+
|
|
8964
|
+
const definition$9 = Radio.compose({
|
|
8965
|
+
name: `${FluentDesignSystem.prefix}-radio`,
|
|
9750
8966
|
template: template$9,
|
|
9751
8967
|
styles: styles$9
|
|
9752
8968
|
});
|
|
9753
8969
|
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
|
|
9757
|
-
};
|
|
9758
|
-
const SliderOrientation = Orientation;
|
|
8970
|
+
definition$9.define(FluentDesignSystem.registry);
|
|
8971
|
+
|
|
8972
|
+
Orientation;
|
|
9759
8973
|
const SliderMode = {
|
|
9760
8974
|
singleValue: "single-value"
|
|
9761
8975
|
};
|
|
@@ -10155,6 +9369,8 @@ const definition$8 = Slider.compose({
|
|
|
10155
9369
|
styles: styles$8
|
|
10156
9370
|
});
|
|
10157
9371
|
|
|
9372
|
+
definition$8.define(FluentDesignSystem.registry);
|
|
9373
|
+
|
|
10158
9374
|
var __defProp$6 = Object.defineProperty;
|
|
10159
9375
|
var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
|
|
10160
9376
|
var __decorateClass$6 = (decorators, target, key, kind) => {
|
|
@@ -10178,33 +9394,21 @@ class Spinner extends FASTElement {
|
|
|
10178
9394
|
__decorateClass$6([attr], Spinner.prototype, "size", 2);
|
|
10179
9395
|
__decorateClass$6([attr], Spinner.prototype, "appearance", 2);
|
|
10180
9396
|
|
|
10181
|
-
const SpinnerAppearance = {
|
|
10182
|
-
primary: "primary",
|
|
10183
|
-
inverted: "inverted"
|
|
10184
|
-
};
|
|
10185
|
-
const SpinnerSize = {
|
|
10186
|
-
tiny: "tiny",
|
|
10187
|
-
extraSmall: "extra-small",
|
|
10188
|
-
small: "small",
|
|
10189
|
-
medium: "medium",
|
|
10190
|
-
large: "large",
|
|
10191
|
-
extraLarge: "extra-large",
|
|
10192
|
-
huge: "huge"
|
|
10193
|
-
};
|
|
10194
|
-
|
|
10195
|
-
const template$7 = html`<slot name="indicator"><svg class="progress" part="progress" viewBox="0 0 16 16"><circle class="background" cx="8px" cy="8px" r="7px"></circle><circle class="indicator" cx="8px" cy="8px" r="7px"></circle></svg></slot>`;
|
|
10196
|
-
|
|
10197
9397
|
const styles$7 = css`
|
|
10198
9398
|
${display("flex")}
|
|
10199
9399
|
|
|
10200
9400
|
:host{display:flex;align-items:center;height:32px;width:32px;contain:content}:host([size='tiny']){height:20px;width:20px}:host([size='extra-small']){height:24px;width:24px}:host([size='small']){height:28px;width:28px}:host([size='large']){height:36px;width:36px}:host([size='extra-large']){height:40px;width:40px}:host([size='huge']){height:44px;width:44px}.progress{height:100%;width:100%}.background{fill:none;stroke:${colorBrandStroke2};stroke-width:1.5px}:host([appearance='inverted']) .background{stroke:rgba(255,255,255,0.2)}.indicator{stroke:${colorBrandStroke1};fill:none;stroke-width:1.5px;stroke-linecap:round;transform-origin:50% 50%;transform:rotate(-90deg);transition:all 0.2s ease-in-out;animation:spin-infinite 3s cubic-bezier(0.53,0.21,0.29,0.67) infinite}:host([appearance='inverted']) .indicator{stroke:${colorNeutralStrokeOnBrand2}}@keyframes spin-infinite{0%{stroke-dasharray:0.01px 43.97px;transform:rotate(0deg)}50%{stroke-dasharray:21.99px 21.99px;transform:rotate(450deg)}100%{stroke-dasharray:0.01px 43.97px;transform:rotate(1080deg)}}`;
|
|
10201
9401
|
|
|
9402
|
+
const template$7 = html`<slot name="indicator"><svg class="progress" part="progress" viewBox="0 0 16 16"><circle class="background" cx="8px" cy="8px" r="7px"></circle><circle class="indicator" cx="8px" cy="8px" r="7px"></circle></svg></slot>`;
|
|
9403
|
+
|
|
10202
9404
|
const definition$7 = Spinner.compose({
|
|
10203
9405
|
name: `${FluentDesignSystem.prefix}-spinner`,
|
|
10204
9406
|
template: template$7,
|
|
10205
9407
|
styles: styles$7
|
|
10206
9408
|
});
|
|
10207
9409
|
|
|
9410
|
+
definition$7.define(FluentDesignSystem.registry);
|
|
9411
|
+
|
|
10208
9412
|
class _Switch extends FASTElement {}
|
|
10209
9413
|
class FormAssociatedSwitch extends CheckableFormAssociated(_Switch) {
|
|
10210
9414
|
constructor() {
|
|
@@ -10271,12 +9475,6 @@ __decorateClass$5([attr({
|
|
|
10271
9475
|
})], Switch.prototype, "readOnly", 2);
|
|
10272
9476
|
__decorateClass$5([observable], Switch.prototype, "defaultSlottedNodes", 2);
|
|
10273
9477
|
|
|
10274
|
-
const SwitchLabelPosition = {
|
|
10275
|
-
above: "above",
|
|
10276
|
-
after: "after",
|
|
10277
|
-
before: "before"
|
|
10278
|
-
};
|
|
10279
|
-
|
|
10280
9478
|
function switchTemplate(options = {}) {
|
|
10281
9479
|
return html`<template role="switch" aria-checked="${x => x.checked}" aria-disabled="${x => x.disabled}" aria-readonly="${x => x.readOnly}" tabindex="${x => x.disabled ? null : 0}" @keypress="${(x, c) => x.keypressHandler(c.event)}" @click="${(x, c) => x.clickHandler(c.event)}"><label part="label" class="${x => x.defaultSlottedNodes && x.defaultSlottedNodes.length ? "label" : "label label__hidden"}"><slot ${slotted("defaultSlottedNodes")}></slot></label><div part="switch" class="switch"><slot name="switch">${staticallyCompose(options.switch)}</slot></div></template>`;
|
|
10282
9480
|
}
|
|
@@ -10296,6 +9494,28 @@ const definition$6 = Switch.compose({
|
|
|
10296
9494
|
styles: styles$6
|
|
10297
9495
|
});
|
|
10298
9496
|
|
|
9497
|
+
definition$6.define(FluentDesignSystem.registry);
|
|
9498
|
+
|
|
9499
|
+
class TabPanel extends FASTElement {}
|
|
9500
|
+
|
|
9501
|
+
function tabPanelTemplate() {
|
|
9502
|
+
return html`<template slot="tabpanel" role="tabpanel"><slot></slot></template>`;
|
|
9503
|
+
}
|
|
9504
|
+
const template$5 = tabPanelTemplate();
|
|
9505
|
+
|
|
9506
|
+
const styles$5 = css`
|
|
9507
|
+
${display("block")}
|
|
9508
|
+
|
|
9509
|
+
:host{box-sizing:border-box;padding:${spacingHorizontalM} ${spacingHorizontalMNudge}}`;
|
|
9510
|
+
|
|
9511
|
+
const definition$5 = TabPanel.compose({
|
|
9512
|
+
name: `${FluentDesignSystem.prefix}-tab-panel`,
|
|
9513
|
+
template: template$5,
|
|
9514
|
+
styles: styles$5
|
|
9515
|
+
});
|
|
9516
|
+
|
|
9517
|
+
definition$5.define(FluentDesignSystem.registry);
|
|
9518
|
+
|
|
10299
9519
|
var __defProp$4 = Object.defineProperty;
|
|
10300
9520
|
var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
|
|
10301
9521
|
var __decorateClass$4 = (decorators, target, key, kind) => {
|
|
@@ -10323,47 +9543,26 @@ applyMixins(Tab, StartEnd);
|
|
|
10323
9543
|
function tabTemplate(options = {}) {
|
|
10324
9544
|
return html`<template slot="tab" role="tab" aria-disabled="${x => x.disabled}">${startSlotTemplate(options)}<span class="tab-content"><slot></slot></span>${endSlotTemplate(options)}</template>`;
|
|
10325
9545
|
}
|
|
10326
|
-
const template$
|
|
9546
|
+
const template$4 = tabTemplate({});
|
|
10327
9547
|
|
|
10328
|
-
const styles$
|
|
9548
|
+
const styles$4 = css`
|
|
10329
9549
|
${display("inline-flex")}
|
|
10330
9550
|
|
|
10331
9551
|
:host{position:relative;flex-direction:column;cursor:pointer;box-sizing:border-box;justify-content:center;line-height:${lineHeightBase300};font-family:${fontFamilyBase};font-size:${fontSizeBase300};color:${colorNeutralForeground2};fill:currentcolor;grid-row:1;padding:${spacingHorizontalM} ${spacingHorizontalMNudge};border-radius:${borderRadiusMedium}}:host .tab-content{display:inline-flex;flex-direction:column;padding:0 2px}:host([aria-selected='true']){color:${colorNeutralForeground1};font-weight:${fontWeightSemibold}}:host .tab-content::after{content:var(--textContent);visibility:hidden;height:0;line-height:${lineHeightBase300};font-weight:${fontWeightSemibold}}:host([aria-selected='true'])::after{background-color:${colorCompoundBrandStroke};border-radius:${borderRadiusCircular};content:'';inset:0;position:absolute;z-index:2}:host([aria-selected='false']:hover)::after{background-color:${colorNeutralStroke1Hover};border-radius:${borderRadiusCircular};content:'';inset:0;position:absolute;z-index:1}:host([aria-selected='true'][disabled])::after{background-color:${colorNeutralForegroundDisabled}}::slotted([slot='start']),::slotted([slot='end']){display:flex}::slotted([slot='start']){margin-inline-end:11px}::slotted([slot='end']){margin-inline-start:11px}:host([disabled]){cursor:not-allowed;fill:${colorNeutralForegroundDisabled};color:${colorNeutralForegroundDisabled}}:host([disabled]:hover)::after{background-color:unset}:host(:focus){outline:none}:host(:focus-visible){border-radius:${borderRadiusSmall};box-shadow:0 0 0 3px ${colorStrokeFocus2};outline:1px solid ${colorStrokeFocus1}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
10332
9552
|
:host([aria-selected='true'])::after{background-color:Highlight}`));
|
|
10333
9553
|
|
|
10334
|
-
const definition$
|
|
9554
|
+
const definition$4 = Tab.compose({
|
|
10335
9555
|
name: `${FluentDesignSystem.prefix}-tab`,
|
|
10336
|
-
template: template$5,
|
|
10337
|
-
styles: styles$5
|
|
10338
|
-
});
|
|
10339
|
-
|
|
10340
|
-
class TabPanel extends FASTElement {}
|
|
10341
|
-
|
|
10342
|
-
function tabPanelTemplate() {
|
|
10343
|
-
return html`<template slot="tabpanel" role="tabpanel"><slot></slot></template>`;
|
|
10344
|
-
}
|
|
10345
|
-
const template$4 = tabPanelTemplate();
|
|
10346
|
-
|
|
10347
|
-
const styles$4 = css`
|
|
10348
|
-
${display("block")}
|
|
10349
|
-
|
|
10350
|
-
:host{box-sizing:border-box;padding:${spacingHorizontalM} ${spacingHorizontalMNudge}}`;
|
|
10351
|
-
|
|
10352
|
-
const definition$4 = TabPanel.compose({
|
|
10353
|
-
name: `${FluentDesignSystem.prefix}-tab-panel`,
|
|
10354
9556
|
template: template$4,
|
|
10355
9557
|
styles: styles$4
|
|
10356
9558
|
});
|
|
10357
9559
|
|
|
9560
|
+
definition$4.define(FluentDesignSystem.registry);
|
|
9561
|
+
|
|
10358
9562
|
const TabsAppearance = {
|
|
10359
9563
|
subtle: "subtle",
|
|
10360
9564
|
transparent: "transparent"
|
|
10361
9565
|
};
|
|
10362
|
-
const TabsSize = {
|
|
10363
|
-
small: "small",
|
|
10364
|
-
medium: "medium",
|
|
10365
|
-
large: "large"
|
|
10366
|
-
};
|
|
10367
9566
|
const TabsOrientation = Orientation;
|
|
10368
9567
|
|
|
10369
9568
|
var __defProp$3 = Object.defineProperty;
|
|
@@ -10681,10 +9880,10 @@ class Tabs extends BaseTabs {
|
|
|
10681
9880
|
} else return this.previousActiveTabData.height / tab.getBoundingClientRect().height;
|
|
10682
9881
|
}
|
|
10683
9882
|
/**
|
|
10684
|
-
*
|
|
9883
|
+
* Calculates and applies updated values to CSS variables.
|
|
10685
9884
|
*
|
|
10686
|
-
*
|
|
10687
|
-
* @
|
|
9885
|
+
* @param tab - the tab element to apply the updated values to
|
|
9886
|
+
* @internal
|
|
10688
9887
|
*/
|
|
10689
9888
|
applyUpdatedCSSValues(tab) {
|
|
10690
9889
|
this.calculateAnimationProperties(tab);
|
|
@@ -10692,9 +9891,11 @@ class Tabs extends BaseTabs {
|
|
|
10692
9891
|
this.setTabOffsetCSSVar();
|
|
10693
9892
|
}
|
|
10694
9893
|
/**
|
|
10695
|
-
*
|
|
10696
|
-
*
|
|
10697
|
-
*
|
|
9894
|
+
* Runs through all the operations required for setting the tab active indicator to its starting location, ending
|
|
9895
|
+
* location, and applying the animated css class to the tab.
|
|
9896
|
+
*
|
|
9897
|
+
* @param tab - the tab element to apply the updated values to
|
|
9898
|
+
* @internal
|
|
10698
9899
|
*/
|
|
10699
9900
|
animationLoop(tab) {
|
|
10700
9901
|
tab.setAttribute("data-animate", "false");
|
|
@@ -10704,8 +9905,10 @@ class Tabs extends BaseTabs {
|
|
|
10704
9905
|
tab.setAttribute("data-animate", "true");
|
|
10705
9906
|
}
|
|
10706
9907
|
/**
|
|
10707
|
-
*
|
|
10708
|
-
*
|
|
9908
|
+
* Sets the data from the active tab onto the class. used for making all the animation calculations for the active
|
|
9909
|
+
* tab indicator.
|
|
9910
|
+
*
|
|
9911
|
+
* @internal
|
|
10709
9912
|
*/
|
|
10710
9913
|
setTabData() {
|
|
10711
9914
|
if (this.tabs && this.tabs.length > 0) {
|
|
@@ -10769,102 +9972,8 @@ const definition$3 = Tabs.compose({
|
|
|
10769
9972
|
styles: styles$3
|
|
10770
9973
|
});
|
|
10771
9974
|
|
|
10772
|
-
|
|
10773
|
-
var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
|
|
10774
|
-
var __decorateClass$2 = (decorators, target, key, kind) => {
|
|
10775
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target;
|
|
10776
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10777
|
-
if (kind && result) __defProp$2(target, key, result);
|
|
10778
|
-
return result;
|
|
10779
|
-
};
|
|
10780
|
-
class Text extends FASTElement {
|
|
10781
|
-
constructor() {
|
|
10782
|
-
super(...arguments);
|
|
10783
|
-
this.nowrap = false;
|
|
10784
|
-
this.truncate = false;
|
|
10785
|
-
this.italic = false;
|
|
10786
|
-
this.underline = false;
|
|
10787
|
-
this.strikethrough = false;
|
|
10788
|
-
this.block = false;
|
|
10789
|
-
}
|
|
10790
|
-
}
|
|
10791
|
-
__decorateClass$2([attr({
|
|
10792
|
-
mode: "boolean"
|
|
10793
|
-
})], Text.prototype, "nowrap", 2);
|
|
10794
|
-
__decorateClass$2([attr({
|
|
10795
|
-
mode: "boolean"
|
|
10796
|
-
})], Text.prototype, "truncate", 2);
|
|
10797
|
-
__decorateClass$2([attr({
|
|
10798
|
-
mode: "boolean"
|
|
10799
|
-
})], Text.prototype, "italic", 2);
|
|
10800
|
-
__decorateClass$2([attr({
|
|
10801
|
-
mode: "boolean"
|
|
10802
|
-
})], Text.prototype, "underline", 2);
|
|
10803
|
-
__decorateClass$2([attr({
|
|
10804
|
-
mode: "boolean"
|
|
10805
|
-
})], Text.prototype, "strikethrough", 2);
|
|
10806
|
-
__decorateClass$2([attr({
|
|
10807
|
-
mode: "boolean"
|
|
10808
|
-
})], Text.prototype, "block", 2);
|
|
10809
|
-
__decorateClass$2([attr], Text.prototype, "size", 2);
|
|
10810
|
-
__decorateClass$2([attr], Text.prototype, "font", 2);
|
|
10811
|
-
__decorateClass$2([attr], Text.prototype, "weight", 2);
|
|
10812
|
-
__decorateClass$2([attr], Text.prototype, "align", 2);
|
|
10813
|
-
|
|
10814
|
-
const TextSize = {
|
|
10815
|
-
_100: "100",
|
|
10816
|
-
_200: "200",
|
|
10817
|
-
_300: "300",
|
|
10818
|
-
_400: "400",
|
|
10819
|
-
_500: "500",
|
|
10820
|
-
_600: "600",
|
|
10821
|
-
_700: "700",
|
|
10822
|
-
_800: "800",
|
|
10823
|
-
_900: "900",
|
|
10824
|
-
_1000: "1000"
|
|
10825
|
-
};
|
|
10826
|
-
const TextFont = {
|
|
10827
|
-
base: "base",
|
|
10828
|
-
numeric: "numeric",
|
|
10829
|
-
monospace: "monospace"
|
|
10830
|
-
};
|
|
10831
|
-
const TextWeight = {
|
|
10832
|
-
medium: "medium",
|
|
10833
|
-
regular: "regular",
|
|
10834
|
-
semibold: "semibold",
|
|
10835
|
-
bold: "bold"
|
|
10836
|
-
};
|
|
10837
|
-
const TextAlign = {
|
|
10838
|
-
start: "start",
|
|
10839
|
-
end: "end",
|
|
10840
|
-
center: "center",
|
|
10841
|
-
justify: "justify"
|
|
10842
|
-
};
|
|
10843
|
-
|
|
10844
|
-
const template$2 = html`<slot></slot>`;
|
|
10845
|
-
|
|
10846
|
-
const styles$2 = css`
|
|
10847
|
-
${display("inline")}
|
|
10848
|
-
|
|
10849
|
-
:host{contain:content}::slotted(*){font-family:${fontFamilyBase};font-size:${fontSizeBase300};line-height:${lineHeightBase300};font-weight:${fontWeightRegular};text-align:start;white-space:normal;overflow:visible;text-overflow:clip;margin:0;display:inline}:host([nowrap]) ::slotted(*){white-space:nowrap;overflow:hidden}:host([truncate]) ::slotted(*){text-overflow:ellipsis}:host([block]),:host([block]) ::slotted(*){display:block}:host([italic]) ::slotted(*){font-style:italic}:host([underline]) ::slotted(*){text-decoration-line:underline}:host([strikethrough]) ::slotted(*){text-decoration-line:line-through}:host([underline][strikethrough]) ::slotted(*){text-decoration-line:line-through underline}:host([size='100']) ::slotted(*){font-size:${fontSizeBase100};line-height:${lineHeightBase100}}:host([size='200']) ::slotted(*){font-size:${fontSizeBase200};line-height:${lineHeightBase200}}:host([size='400']) ::slotted(*){font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host([size='500']) ::slotted(*){font-size:${fontSizeBase500};line-height:${lineHeightBase500}}:host([size='600']) ::slotted(*){font-size:${fontSizeBase600};line-height:${lineHeightBase600}}:host([size='700']) ::slotted(*){font-size:${fontSizeHero700};line-height:${lineHeightHero700}}:host([size='800']) ::slotted(*){font-size:${fontSizeHero800};line-height:${lineHeightHero800}}:host([size='900']) ::slotted(*){font-size:${fontSizeHero900};line-height:${lineHeightHero900}}:host([size='1000']) ::slotted(*){font-size:${fontSizeHero1000};line-height:${lineHeightHero1000}}:host([font='monospace']) ::slotted(*){font-family:${fontFamilyMonospace}}:host([font='numeric']) ::slotted(*){font-family:${fontFamilyNumeric}}:host([weight='medium']) ::slotted(*){font-weight:${fontWeightMedium}}:host([weight='semibold']) ::slotted(*){font-weight:${fontWeightSemibold}}:host([weight='bold']) ::slotted(*){font-weight:${fontWeightBold}}:host([align='center']) ::slotted(*){text-align:center}:host([align='end']) ::slotted(*){text-align:end}:host([align='justify']) ::slotted(*){text-align:justify}`;
|
|
10850
|
-
|
|
10851
|
-
const definition$2 = Text.compose({
|
|
10852
|
-
name: `${FluentDesignSystem.prefix}-text`,
|
|
10853
|
-
template: template$2,
|
|
10854
|
-
styles: styles$2
|
|
10855
|
-
});
|
|
9975
|
+
definition$3.define(FluentDesignSystem.registry);
|
|
10856
9976
|
|
|
10857
|
-
const TextInputControlSize = {
|
|
10858
|
-
small: "small",
|
|
10859
|
-
medium: "medium",
|
|
10860
|
-
large: "large"
|
|
10861
|
-
};
|
|
10862
|
-
const TextInputAppearance = {
|
|
10863
|
-
outline: "outline",
|
|
10864
|
-
underline: "underline",
|
|
10865
|
-
filledLighter: "filled-lighter",
|
|
10866
|
-
filledDarker: "filled-darker"
|
|
10867
|
-
};
|
|
10868
9977
|
const TextInputType = {
|
|
10869
9978
|
email: "email",
|
|
10870
9979
|
password: "password",
|
|
@@ -10874,12 +9983,12 @@ const TextInputType = {
|
|
|
10874
9983
|
};
|
|
10875
9984
|
const ImplicitSubmissionBlockingTypes = ["date", "datetime-local", "email", "month", "number", "password", "search", "tel", "text", "time", "url", "week"];
|
|
10876
9985
|
|
|
10877
|
-
var __defProp$
|
|
10878
|
-
var __getOwnPropDesc$
|
|
10879
|
-
var __decorateClass$
|
|
10880
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
9986
|
+
var __defProp$2 = Object.defineProperty;
|
|
9987
|
+
var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
|
|
9988
|
+
var __decorateClass$2 = (decorators, target, key, kind) => {
|
|
9989
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target;
|
|
10881
9990
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10882
|
-
if (kind && result) __defProp$
|
|
9991
|
+
if (kind && result) __defProp$2(target, key, result);
|
|
10883
9992
|
return result;
|
|
10884
9993
|
};
|
|
10885
9994
|
class TextInput extends FASTElement {
|
|
@@ -11132,60 +10241,60 @@ class TextInput extends FASTElement {
|
|
|
11132
10241
|
* @public
|
|
11133
10242
|
*/
|
|
11134
10243
|
TextInput.formAssociated = true;
|
|
11135
|
-
__decorateClass$
|
|
11136
|
-
__decorateClass$
|
|
11137
|
-
__decorateClass$
|
|
10244
|
+
__decorateClass$2([attr], TextInput.prototype, "appearance", 2);
|
|
10245
|
+
__decorateClass$2([attr], TextInput.prototype, "autocomplete", 2);
|
|
10246
|
+
__decorateClass$2([attr({
|
|
11138
10247
|
mode: "boolean"
|
|
11139
10248
|
})], TextInput.prototype, "autofocus", 2);
|
|
11140
|
-
__decorateClass$
|
|
10249
|
+
__decorateClass$2([attr({
|
|
11141
10250
|
attribute: "control-size"
|
|
11142
10251
|
})], TextInput.prototype, "controlSize", 2);
|
|
11143
|
-
__decorateClass$
|
|
11144
|
-
__decorateClass$
|
|
11145
|
-
__decorateClass$
|
|
10252
|
+
__decorateClass$2([observable], TextInput.prototype, "defaultSlottedNodes", 2);
|
|
10253
|
+
__decorateClass$2([attr], TextInput.prototype, "dirname", 2);
|
|
10254
|
+
__decorateClass$2([attr({
|
|
11146
10255
|
mode: "boolean"
|
|
11147
10256
|
})], TextInput.prototype, "disabled", 2);
|
|
11148
|
-
__decorateClass$
|
|
10257
|
+
__decorateClass$2([attr({
|
|
11149
10258
|
attribute: "form"
|
|
11150
10259
|
})], TextInput.prototype, "formAttribute", 2);
|
|
11151
|
-
__decorateClass$
|
|
10260
|
+
__decorateClass$2([attr({
|
|
11152
10261
|
attribute: "value",
|
|
11153
10262
|
mode: "fromView"
|
|
11154
10263
|
})], TextInput.prototype, "initialValue", 2);
|
|
11155
|
-
__decorateClass$
|
|
11156
|
-
__decorateClass$
|
|
10264
|
+
__decorateClass$2([attr], TextInput.prototype, "list", 2);
|
|
10265
|
+
__decorateClass$2([attr({
|
|
11157
10266
|
converter: nullableNumberConverter
|
|
11158
10267
|
})], TextInput.prototype, "maxlength", 2);
|
|
11159
|
-
__decorateClass$
|
|
10268
|
+
__decorateClass$2([attr({
|
|
11160
10269
|
converter: nullableNumberConverter
|
|
11161
10270
|
})], TextInput.prototype, "minlength", 2);
|
|
11162
|
-
__decorateClass$
|
|
10271
|
+
__decorateClass$2([attr({
|
|
11163
10272
|
mode: "boolean"
|
|
11164
10273
|
})], TextInput.prototype, "multiple", 2);
|
|
11165
|
-
__decorateClass$
|
|
11166
|
-
__decorateClass$
|
|
11167
|
-
__decorateClass$
|
|
11168
|
-
__decorateClass$
|
|
10274
|
+
__decorateClass$2([attr], TextInput.prototype, "name", 2);
|
|
10275
|
+
__decorateClass$2([attr], TextInput.prototype, "pattern", 2);
|
|
10276
|
+
__decorateClass$2([attr], TextInput.prototype, "placeholder", 2);
|
|
10277
|
+
__decorateClass$2([attr({
|
|
11169
10278
|
attribute: "readonly",
|
|
11170
10279
|
mode: "boolean"
|
|
11171
10280
|
})], TextInput.prototype, "readonly", 2);
|
|
11172
|
-
__decorateClass$
|
|
10281
|
+
__decorateClass$2([attr({
|
|
11173
10282
|
mode: "boolean"
|
|
11174
10283
|
})], TextInput.prototype, "required", 2);
|
|
11175
|
-
__decorateClass$
|
|
10284
|
+
__decorateClass$2([attr({
|
|
11176
10285
|
converter: nullableNumberConverter
|
|
11177
10286
|
})], TextInput.prototype, "size", 2);
|
|
11178
|
-
__decorateClass$
|
|
10287
|
+
__decorateClass$2([attr({
|
|
11179
10288
|
converter: {
|
|
11180
10289
|
fromView: value => typeof value === "string" ? ["true", ""].includes(value.trim().toLowerCase()) : null,
|
|
11181
10290
|
toView: value => value.toString()
|
|
11182
10291
|
}
|
|
11183
10292
|
})], TextInput.prototype, "spellcheck", 2);
|
|
11184
|
-
__decorateClass$
|
|
11185
|
-
__decorateClass$
|
|
10293
|
+
__decorateClass$2([attr], TextInput.prototype, "type", 2);
|
|
10294
|
+
__decorateClass$2([observable], TextInput.prototype, "controlLabel", 2);
|
|
11186
10295
|
applyMixins(TextInput, StartEnd);
|
|
11187
10296
|
|
|
11188
|
-
const styles$
|
|
10297
|
+
const styles$2 = css`
|
|
11189
10298
|
${display("block")}
|
|
11190
10299
|
|
|
11191
10300
|
:host{font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};line-height:${lineHeightBase300};max-width:400px}.label{display:flex;color:${colorNeutralForeground1};padding-bottom:${spacingVerticalXS};flex-shrink:0;padding-inline-end:${spacingHorizontalXS}}.label[hidden],:host(:empty) .label{display:none}.root{position:relative;box-sizing:border-box;height:32px;display:inline-flex;align-items:center;flex-direction:row;width:100%;padding:0 ${spacingHorizontalMNudge};border:${strokeWidthThin} solid ${colorNeutralStroke1};border-bottom-color:${colorNeutralStrokeAccessible};border-radius:${borderRadiusMedium};gap:${spacingHorizontalXXS}}.root::after{box-sizing:border-box;content:'';position:absolute;left:-1px;bottom:0px;right:-1px;height:max(2px,${borderRadiusMedium});border-radius:0 0 ${borderRadiusMedium} ${borderRadiusMedium};border-bottom:2px solid ${colorCompoundBrandStroke};clip-path:inset(calc(100% - 2px) 1px 0px);transform:scaleX(0);transition-property:transform;transition-duration:${durationUltraFast};transition-delay:${curveAccelerateMid}}.control{width:100%;height:100%;box-sizing:border-box;color:${colorNeutralForeground1};border-radius:${borderRadiusMedium};background:${colorTransparentBackground};font-family:${fontFamilyBase};font-weight:${fontWeightRegular};font-size:${fontSizeBase300};border:none;background:transparent;vertical-align:center}.control:focus-visible{outline:0;border:0}.control::placeholder{color:${colorNeutralForeground4}}:host ::slotted([slot='start']),:host ::slotted([slot='end']){display:flex;align-items:center;justify-content:center;color:${colorNeutralForeground3};font-size:${fontSizeBase500}}:host ::slotted([slot='start']){padding-right:${spacingHorizontalXXS}}:host ::slotted([slot='end']){padding-left:${spacingHorizontalXXS};gap:${spacingHorizontalXS}}:host(:hover) .root{border-color:${colorNeutralStroke1Hover};border-bottom-color:${colorNeutralStrokeAccessibleHover}}:host(:active) .root{border-color:${colorNeutralStroke1Pressed}}:host(:focus-within) .root{outline:transparent solid 2px;border-bottom:0}:host(:focus-within) .root::after{transform:scaleX(1);transition-property:transform;transition-duration:${durationNormal};transition-delay:${curveDecelerateMid}}:host(:focus-within:active) .root:after{border-bottom-color:${colorCompoundBrandStrokePressed}}:host([appearance='outline']:focus-within) .root{border:${strokeWidthThin} solid ${colorNeutralStroke1}}:host(:focus-within) .control{color:${colorNeutralForeground1}}:host([disabled]) .root{background:${colorTransparentBackground};border:${strokeWidthThin} solid ${colorNeutralStrokeDisabled}}:host([disabled]) .control::placeholder,:host([disabled]) ::slotted([slot='start']),:host([disabled]) ::slotted([slot='end']){color:${colorNeutralForegroundDisabled}}::selection{color:${colorNeutralForegroundInverted};background-color:${colorNeutralBackgroundInverted}}:host([control-size='small']) .control{font-size:${fontSizeBase200};font-weight:${fontWeightRegular};line-height:${lineHeightBase200}}:host([control-size='small']) .root{height:24px;gap:${spacingHorizontalXXS};padding:0 ${spacingHorizontalSNudge}}:host([control-size='small']) ::slotted([slot='start']),:host([control-size='small']) ::slotted([slot='end']){font-size:${fontSizeBase400}}:host([control-size='large']) .control{font-size:${fontSizeBase400};font-weight:${fontWeightRegular};line-height:${lineHeightBase400}}:host([control-size='large']) .root{height:40px;gap:${spacingHorizontalS};padding:0 ${spacingHorizontalM}}:host([control-size='large']) ::slotted([slot='start']),:host([control-size='large']) ::slotted([slot='end']){font-size:${fontSizeBase600}}:host([appearance='underline']) .root{background:${colorTransparentBackground};border:0;border-radius:0;border-bottom:${strokeWidthThin} solid ${colorNeutralStrokeAccessible}}:host([appearance='underline']:hover) .root{border-bottom-color:${colorNeutralStrokeAccessibleHover}}:host([appearance='underline']:active) .root{border-bottom-color:${colorNeutralStrokeAccessiblePressed}}:host([appearance='underline']:focus-within) .root{border:0;border-bottom-color:${colorNeutralStrokeAccessiblePressed}}:host([appearance='underline'][disabled]) .root{border-bottom-color:${colorNeutralStrokeDisabled}}:host([appearance='filled-lighter']) .root,:host([appearance='filled-darker']) .root{border:${strokeWidthThin} solid ${colorTransparentStroke};box-shadow:${shadow2}}:host([appearance='filled-lighter']) .root{background:${colorNeutralBackground1}}:host([appearance='filled-darker']) .root{background:${colorNeutralBackground3}}:host([appearance='filled-lighter']:hover) .root,:host([appearance='filled-darker']:hover) .root{border-color:${colorTransparentStrokeInteractive}}:host([appearance='filled-lighter']:active) .root,:host([appearance='filled-darker']:active) .root{border-color:${colorTransparentStrokeInteractive};background:${colorNeutralBackground3}}`;
|
|
@@ -11196,14 +10305,73 @@ function textInputTemplate(options = {}) {
|
|
|
11196
10305
|
filter: whitespaceFilter
|
|
11197
10306
|
})}></slot></label><div class="root" part="root">${startSlotTemplate(options)}<input class="control" part="control" id="control" @change="${(x, c) => x.changeHandler(c.event)}" @input="${(x, c) => x.inputHandler(c.event)}" ?autofocus="${x => x.autofocus}" autocomplete="${x => x.autocomplete}" ?disabled="${x => x.disabled}" list="${x => x.list}" maxlength="${x => x.maxlength}" minlength="${x => x.minlength}" ?multiple="${x => x.multiple}" name="${x => x.name}" pattern="${x => x.pattern}" placeholder="${x => x.placeholder}" ?readonly="${x => x.readonly}" ?required="${x => x.required}" size="${x => x.size}" spellcheck="${x => x.spellcheck}" type="${x => x.type}" value="${x => x.initialValue}" ${ref("control")} />${endSlotTemplate(options)}</div>`;
|
|
11198
10307
|
}
|
|
11199
|
-
const template$
|
|
10308
|
+
const template$2 = textInputTemplate();
|
|
11200
10309
|
|
|
11201
|
-
const definition$
|
|
10310
|
+
const definition$2 = TextInput.compose({
|
|
11202
10311
|
name: `${FluentDesignSystem.prefix}-text-input`,
|
|
10312
|
+
template: template$2,
|
|
10313
|
+
styles: styles$2
|
|
10314
|
+
});
|
|
10315
|
+
|
|
10316
|
+
definition$2.define(FluentDesignSystem.registry);
|
|
10317
|
+
|
|
10318
|
+
var __defProp$1 = Object.defineProperty;
|
|
10319
|
+
var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
|
|
10320
|
+
var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
10321
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
|
|
10322
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10323
|
+
if (kind && result) __defProp$1(target, key, result);
|
|
10324
|
+
return result;
|
|
10325
|
+
};
|
|
10326
|
+
class Text extends FASTElement {
|
|
10327
|
+
constructor() {
|
|
10328
|
+
super(...arguments);
|
|
10329
|
+
this.nowrap = false;
|
|
10330
|
+
this.truncate = false;
|
|
10331
|
+
this.italic = false;
|
|
10332
|
+
this.underline = false;
|
|
10333
|
+
this.strikethrough = false;
|
|
10334
|
+
this.block = false;
|
|
10335
|
+
}
|
|
10336
|
+
}
|
|
10337
|
+
__decorateClass$1([attr({
|
|
10338
|
+
mode: "boolean"
|
|
10339
|
+
})], Text.prototype, "nowrap", 2);
|
|
10340
|
+
__decorateClass$1([attr({
|
|
10341
|
+
mode: "boolean"
|
|
10342
|
+
})], Text.prototype, "truncate", 2);
|
|
10343
|
+
__decorateClass$1([attr({
|
|
10344
|
+
mode: "boolean"
|
|
10345
|
+
})], Text.prototype, "italic", 2);
|
|
10346
|
+
__decorateClass$1([attr({
|
|
10347
|
+
mode: "boolean"
|
|
10348
|
+
})], Text.prototype, "underline", 2);
|
|
10349
|
+
__decorateClass$1([attr({
|
|
10350
|
+
mode: "boolean"
|
|
10351
|
+
})], Text.prototype, "strikethrough", 2);
|
|
10352
|
+
__decorateClass$1([attr({
|
|
10353
|
+
mode: "boolean"
|
|
10354
|
+
})], Text.prototype, "block", 2);
|
|
10355
|
+
__decorateClass$1([attr], Text.prototype, "size", 2);
|
|
10356
|
+
__decorateClass$1([attr], Text.prototype, "font", 2);
|
|
10357
|
+
__decorateClass$1([attr], Text.prototype, "weight", 2);
|
|
10358
|
+
__decorateClass$1([attr], Text.prototype, "align", 2);
|
|
10359
|
+
|
|
10360
|
+
const styles$1 = css`
|
|
10361
|
+
${display("inline")}
|
|
10362
|
+
|
|
10363
|
+
:host{contain:content}::slotted(*){font-family:${fontFamilyBase};font-size:${fontSizeBase300};line-height:${lineHeightBase300};font-weight:${fontWeightRegular};text-align:start;white-space:normal;overflow:visible;text-overflow:clip;margin:0;display:inline}:host([nowrap]) ::slotted(*){white-space:nowrap;overflow:hidden}:host([truncate]) ::slotted(*){text-overflow:ellipsis}:host([block]),:host([block]) ::slotted(*){display:block}:host([italic]) ::slotted(*){font-style:italic}:host([underline]) ::slotted(*){text-decoration-line:underline}:host([strikethrough]) ::slotted(*){text-decoration-line:line-through}:host([underline][strikethrough]) ::slotted(*){text-decoration-line:line-through underline}:host([size='100']) ::slotted(*){font-size:${fontSizeBase100};line-height:${lineHeightBase100}}:host([size='200']) ::slotted(*){font-size:${fontSizeBase200};line-height:${lineHeightBase200}}:host([size='400']) ::slotted(*){font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host([size='500']) ::slotted(*){font-size:${fontSizeBase500};line-height:${lineHeightBase500}}:host([size='600']) ::slotted(*){font-size:${fontSizeBase600};line-height:${lineHeightBase600}}:host([size='700']) ::slotted(*){font-size:${fontSizeHero700};line-height:${lineHeightHero700}}:host([size='800']) ::slotted(*){font-size:${fontSizeHero800};line-height:${lineHeightHero800}}:host([size='900']) ::slotted(*){font-size:${fontSizeHero900};line-height:${lineHeightHero900}}:host([size='1000']) ::slotted(*){font-size:${fontSizeHero1000};line-height:${lineHeightHero1000}}:host([font='monospace']) ::slotted(*){font-family:${fontFamilyMonospace}}:host([font='numeric']) ::slotted(*){font-family:${fontFamilyNumeric}}:host([weight='medium']) ::slotted(*){font-weight:${fontWeightMedium}}:host([weight='semibold']) ::slotted(*){font-weight:${fontWeightSemibold}}:host([weight='bold']) ::slotted(*){font-weight:${fontWeightBold}}:host([align='center']) ::slotted(*){text-align:center}:host([align='end']) ::slotted(*){text-align:end}:host([align='justify']) ::slotted(*){text-align:justify}`;
|
|
10364
|
+
|
|
10365
|
+
const template$1 = html`<slot></slot>`;
|
|
10366
|
+
|
|
10367
|
+
const definition$1 = Text.compose({
|
|
10368
|
+
name: `${FluentDesignSystem.prefix}-text`,
|
|
11203
10369
|
template: template$1,
|
|
11204
10370
|
styles: styles$1
|
|
11205
10371
|
});
|
|
11206
10372
|
|
|
10373
|
+
definition$1.define(FluentDesignSystem.registry);
|
|
10374
|
+
|
|
11207
10375
|
var __defProp = Object.defineProperty;
|
|
11208
10376
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
11209
10377
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -11263,34 +10431,18 @@ __decorateClass([attr({
|
|
|
11263
10431
|
mode: "boolean"
|
|
11264
10432
|
})], ToggleButton.prototype, "mixed", 2);
|
|
11265
10433
|
|
|
11266
|
-
const ToggleButtonAppearance = ButtonAppearance;
|
|
11267
|
-
const ToggleButtonShape = ButtonShape;
|
|
11268
|
-
const ToggleButtonSize = ButtonSize;
|
|
11269
|
-
|
|
11270
|
-
const template = buttonTemplate$1();
|
|
11271
|
-
|
|
11272
10434
|
const styles = css`
|
|
11273
10435
|
${styles$m}
|
|
11274
10436
|
|
|
11275
10437
|
: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`
|
|
11276
10438
|
: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}`));
|
|
11277
10439
|
|
|
10440
|
+
const template = buttonTemplate$1();
|
|
10441
|
+
|
|
11278
10442
|
const definition = ToggleButton.compose({
|
|
11279
10443
|
name: `${FluentDesignSystem.prefix}-toggle-button`,
|
|
11280
10444
|
template,
|
|
11281
10445
|
styles
|
|
11282
10446
|
});
|
|
11283
10447
|
|
|
11284
|
-
|
|
11285
|
-
const setTheme = theme => {
|
|
11286
|
-
for (const t of tokenNames) {
|
|
11287
|
-
document.body.style.setProperty(`--${t}`, theme[t]);
|
|
11288
|
-
}
|
|
11289
|
-
};
|
|
11290
|
-
const setThemeFor = (element, theme) => {
|
|
11291
|
-
for (const t of tokenNames) {
|
|
11292
|
-
element.style.setProperty(`--${t}`, theme[t]);
|
|
11293
|
-
}
|
|
11294
|
-
};
|
|
11295
|
-
|
|
11296
|
-
export { Accordion, AccordionExpandMode, AccordionItem, AccordionItemExpandIconPosition, AccordionItemSize, AnchorButton, AnchorButtonAppearance, definition$q as AnchorButtonDefinition, AnchorButtonShape, AnchorButtonSize, template$q as AnchorButtonTemplate, AnchorTarget, Avatar, AvatarActive, AvatarAppearance, AvatarColor, definition$p as AvatarDefinition, AvatarNamedColor, AvatarShape, AvatarSize, styles$o as AvatarStyles, template$p as AvatarTemplate, Badge, BadgeAppearance, BadgeColor, definition$o as BadgeDefinition, BadgeShape, BadgeSize, styles$n as BadgeStyles, template$o as BadgeTemplate, Button, ButtonAppearance, definition$n as ButtonDefinition, ButtonShape, ButtonSize, styles$m as ButtonStyles, template$n as ButtonTemplate, ButtonType, Checkbox, definition$m as CheckboxDefinition, CheckboxLabelPosition, CheckboxShape, CheckboxSize, styles$l as CheckboxStyles, template$m as CheckboxTemplate, CompoundButton, CompoundButtonAppearance, definition$l as CompoundButtonDefinition, CompoundButtonShape, CompoundButtonSize, styles$k as CompoundButtonStyles, template$l as CompoundButtonTemplate, CounterBadge, CounterBadgeAppearance, CounterBadgeColor, definition$k as CounterBadgeDefinition, CounterBadgeShape, CounterBadgeSize, styles$j as CounterBadgeStyles, template$k as CounterBadgeTemplate, Dialog, definition$j as DialogDefinition, DialogModalType, styles$i as DialogStyles, template$j as DialogTemplate, Divider, DividerAlignContent, DividerAppearance, definition$i as DividerDefinition, DividerOrientation, DividerRole, styles$h as DividerStyles, template$i as DividerTemplate, FluentDesignSystem, Image, definition$h as ImageDefinition, ImageFit, ImageShape, styles$g as ImageStyles, template$h as ImageTemplate, Label, definition$g as LabelDefinition, LabelSize, styles$f as LabelStyles, template$g as LabelTemplate, LabelWeight, Menu, MenuButton, MenuButtonAppearance, definition$e as MenuButtonDefinition, MenuButtonShape, MenuButtonSize, styles$m as MenuButtonStyles, template$e as MenuButtonTemplate, definition$f as MenuDefinition, MenuItem, definition$d as MenuItemDefinition, MenuItemRole, styles$d as MenuItemStyles, template$d as MenuItemTemplate, MenuList, definition$c as MenuListDefinition, styles$c as MenuListStyles, template$c as MenuListTemplate, styles$e as MenuStyles, template$f as MenuTemplate, ProgressBar, definition$b as ProgressBarDefinition, ProgressBarShape, styles$b as ProgressBarStyles, template$b as ProgressBarTemplate, ProgressBarThickness, ProgressBarValidationState, Radio, definition$a as RadioDefinition, RadioGroup, definition$9 as RadioGroupDefinition, RadioGroupOrientation, styles$9 as RadioGroupStyles, template$9 as RadioGroupTemplate, styles$a as RadioStyles, template$a as RadioTemplate, Slider, definition$8 as SliderDefinition, SliderMode, SliderOrientation, SliderSize, styles$8 as SliderStyles, template$8 as SliderTemplate, Spinner, SpinnerAppearance, definition$7 as SpinnerDefinition, SpinnerSize, styles$7 as SpinnerStyles, template$7 as SpinnerTemplate, Switch, definition$6 as SwitchDefinition, SwitchLabelPosition, styles$6 as SwitchStyles, template$6 as SwitchTemplate, Tab, definition$5 as TabDefinition, TabPanel, definition$4 as TabPanelDefinition, styles$4 as TabPanelStyles, template$4 as TabPanelTemplate, styles$5 as TabStyles, template$5 as TabTemplate, Tabs, TabsAppearance, definition$3 as TabsDefinition, TabsOrientation, TabsSize, styles$3 as TabsStyles, template$3 as TabsTemplate, Text, TextAlign, definition$2 as TextDefinition, TextFont, TextInput, TextInputAppearance, TextInputControlSize, definition$1 as TextInputDefinition, styles$1 as TextInputStyles, template$1 as TextInputTemplate, TextInputType, TextSize, styles$2 as TextStyles, template$2 as TextTemplate, TextWeight, ToggleButton, ToggleButtonAppearance, definition as ToggleButtonDefinition, ToggleButtonShape, ToggleButtonSize, styles as ToggleButtonStyles, template as ToggleButtonTemplate, definition$s as accordionDefinition, definition$r as accordionItemDefinition, styles$q as accordionItemStyles, template$r as accordionItemTemplate, styles$r as accordionStyles, template$s as accordionTemplate, borderRadiusCircular, borderRadiusLarge, borderRadiusMedium, borderRadiusNone, borderRadiusSmall, borderRadiusXLarge, colorBackgroundOverlay, colorBrandBackground, colorBrandBackground2, colorBrandBackground2Hover, colorBrandBackground2Pressed, colorBrandBackground3Static, colorBrandBackground4Static, colorBrandBackgroundHover, colorBrandBackgroundInverted, colorBrandBackgroundInvertedHover, colorBrandBackgroundInvertedPressed, colorBrandBackgroundInvertedSelected, colorBrandBackgroundPressed, colorBrandBackgroundSelected, colorBrandBackgroundStatic, colorBrandForeground1, colorBrandForeground2, colorBrandForeground2Hover, colorBrandForeground2Pressed, colorBrandForegroundInverted, colorBrandForegroundInvertedHover, colorBrandForegroundInvertedPressed, colorBrandForegroundLink, colorBrandForegroundLinkHover, colorBrandForegroundLinkPressed, colorBrandForegroundLinkSelected, colorBrandForegroundOnLight, colorBrandForegroundOnLightHover, colorBrandForegroundOnLightPressed, colorBrandForegroundOnLightSelected, colorBrandShadowAmbient, colorBrandShadowKey, colorBrandStroke1, colorBrandStroke2, colorBrandStroke2Contrast, colorBrandStroke2Hover, colorBrandStroke2Pressed, colorCompoundBrandBackground, colorCompoundBrandBackgroundHover, colorCompoundBrandBackgroundPressed, colorCompoundBrandForeground1, colorCompoundBrandForeground1Hover, colorCompoundBrandForeground1Pressed, colorCompoundBrandStroke, colorCompoundBrandStrokeHover, colorCompoundBrandStrokePressed, colorNeutralBackground1, colorNeutralBackground1Hover, colorNeutralBackground1Pressed, colorNeutralBackground1Selected, colorNeutralBackground2, colorNeutralBackground2Hover, colorNeutralBackground2Pressed, colorNeutralBackground2Selected, colorNeutralBackground3, colorNeutralBackground3Hover, colorNeutralBackground3Pressed, colorNeutralBackground3Selected, colorNeutralBackground4, colorNeutralBackground4Hover, colorNeutralBackground4Pressed, colorNeutralBackground4Selected, colorNeutralBackground5, colorNeutralBackground5Hover, colorNeutralBackground5Pressed, colorNeutralBackground5Selected, colorNeutralBackground6, colorNeutralBackgroundAlpha, colorNeutralBackgroundAlpha2, colorNeutralBackgroundDisabled, colorNeutralBackgroundInverted, colorNeutralBackgroundInvertedDisabled, colorNeutralBackgroundStatic, colorNeutralCardBackground, colorNeutralCardBackgroundDisabled, colorNeutralCardBackgroundHover, colorNeutralCardBackgroundPressed, colorNeutralCardBackgroundSelected, colorNeutralForeground1, colorNeutralForeground1Hover, colorNeutralForeground1Pressed, colorNeutralForeground1Selected, colorNeutralForeground1Static, colorNeutralForeground2, colorNeutralForeground2BrandHover, colorNeutralForeground2BrandPressed, colorNeutralForeground2BrandSelected, colorNeutralForeground2Hover, colorNeutralForeground2Link, colorNeutralForeground2LinkHover, colorNeutralForeground2LinkPressed, colorNeutralForeground2LinkSelected, colorNeutralForeground2Pressed, colorNeutralForeground2Selected, colorNeutralForeground3, colorNeutralForeground3BrandHover, colorNeutralForeground3BrandPressed, colorNeutralForeground3BrandSelected, colorNeutralForeground3Hover, colorNeutralForeground3Pressed, colorNeutralForeground3Selected, colorNeutralForeground4, colorNeutralForegroundDisabled, colorNeutralForegroundInverted, colorNeutralForegroundInverted2, colorNeutralForegroundInvertedDisabled, colorNeutralForegroundInvertedHover, colorNeutralForegroundInvertedLink, colorNeutralForegroundInvertedLinkHover, colorNeutralForegroundInvertedLinkPressed, colorNeutralForegroundInvertedLinkSelected, colorNeutralForegroundInvertedPressed, colorNeutralForegroundInvertedSelected, colorNeutralForegroundOnBrand, colorNeutralForegroundStaticInverted, colorNeutralShadowAmbient, colorNeutralShadowAmbientDarker, colorNeutralShadowAmbientLighter, colorNeutralShadowKey, colorNeutralShadowKeyDarker, colorNeutralShadowKeyLighter, colorNeutralStencil1, colorNeutralStencil1Alpha, colorNeutralStencil2, colorNeutralStencil2Alpha, colorNeutralStroke1, colorNeutralStroke1Hover, colorNeutralStroke1Pressed, colorNeutralStroke1Selected, colorNeutralStroke2, colorNeutralStroke3, colorNeutralStrokeAccessible, colorNeutralStrokeAccessibleHover, colorNeutralStrokeAccessiblePressed, colorNeutralStrokeAccessibleSelected, colorNeutralStrokeAlpha, colorNeutralStrokeAlpha2, colorNeutralStrokeDisabled, colorNeutralStrokeInvertedDisabled, colorNeutralStrokeOnBrand, colorNeutralStrokeOnBrand2, colorNeutralStrokeOnBrand2Hover, colorNeutralStrokeOnBrand2Pressed, colorNeutralStrokeOnBrand2Selected, colorNeutralStrokeSubtle, colorPaletteAnchorBackground2, colorPaletteAnchorBorderActive, colorPaletteAnchorForeground2, colorPaletteBeigeBackground2, colorPaletteBeigeBorderActive, colorPaletteBeigeForeground2, colorPaletteBerryBackground1, colorPaletteBerryBackground2, colorPaletteBerryBackground3, colorPaletteBerryBorder1, colorPaletteBerryBorder2, colorPaletteBerryBorderActive, colorPaletteBerryForeground1, colorPaletteBerryForeground2, colorPaletteBerryForeground3, colorPaletteBlueBackground2, colorPaletteBlueBorderActive, colorPaletteBlueForeground2, colorPaletteBrassBackground2, colorPaletteBrassBorderActive, colorPaletteBrassForeground2, colorPaletteBrownBackground2, colorPaletteBrownBorderActive, colorPaletteBrownForeground2, colorPaletteCornflowerBackground2, colorPaletteCornflowerBorderActive, colorPaletteCornflowerForeground2, colorPaletteCranberryBackground2, colorPaletteCranberryBorderActive, colorPaletteCranberryForeground2, colorPaletteDarkGreenBackground2, colorPaletteDarkGreenBorderActive, colorPaletteDarkGreenForeground2, colorPaletteDarkOrangeBackground1, colorPaletteDarkOrangeBackground2, colorPaletteDarkOrangeBackground3, colorPaletteDarkOrangeBorder1, colorPaletteDarkOrangeBorder2, colorPaletteDarkOrangeBorderActive, colorPaletteDarkOrangeForeground1, colorPaletteDarkOrangeForeground2, colorPaletteDarkOrangeForeground3, colorPaletteDarkRedBackground2, colorPaletteDarkRedBorderActive, colorPaletteDarkRedForeground2, colorPaletteForestBackground2, colorPaletteForestBorderActive, colorPaletteForestForeground2, colorPaletteGoldBackground2, colorPaletteGoldBorderActive, colorPaletteGoldForeground2, colorPaletteGrapeBackground2, colorPaletteGrapeBorderActive, colorPaletteGrapeForeground2, colorPaletteGreenBackground1, colorPaletteGreenBackground2, colorPaletteGreenBackground3, colorPaletteGreenBorder1, colorPaletteGreenBorder2, colorPaletteGreenBorderActive, colorPaletteGreenForeground1, colorPaletteGreenForeground2, colorPaletteGreenForeground3, colorPaletteGreenForegroundInverted, colorPaletteLavenderBackground2, colorPaletteLavenderBorderActive, colorPaletteLavenderForeground2, colorPaletteLightGreenBackground1, colorPaletteLightGreenBackground2, colorPaletteLightGreenBackground3, colorPaletteLightGreenBorder1, colorPaletteLightGreenBorder2, colorPaletteLightGreenBorderActive, colorPaletteLightGreenForeground1, colorPaletteLightGreenForeground2, colorPaletteLightGreenForeground3, colorPaletteLightTealBackground2, colorPaletteLightTealBorderActive, colorPaletteLightTealForeground2, colorPaletteLilacBackground2, colorPaletteLilacBorderActive, colorPaletteLilacForeground2, colorPaletteMagentaBackground2, colorPaletteMagentaBorderActive, colorPaletteMagentaForeground2, colorPaletteMarigoldBackground1, colorPaletteMarigoldBackground2, colorPaletteMarigoldBackground3, colorPaletteMarigoldBorder1, colorPaletteMarigoldBorder2, colorPaletteMarigoldBorderActive, colorPaletteMarigoldForeground1, colorPaletteMarigoldForeground2, colorPaletteMarigoldForeground3, colorPaletteMinkBackground2, colorPaletteMinkBorderActive, colorPaletteMinkForeground2, colorPaletteNavyBackground2, colorPaletteNavyBorderActive, colorPaletteNavyForeground2, colorPalettePeachBackground2, colorPalettePeachBorderActive, colorPalettePeachForeground2, colorPalettePinkBackground2, colorPalettePinkBorderActive, colorPalettePinkForeground2, colorPalettePlatinumBackground2, colorPalettePlatinumBorderActive, colorPalettePlatinumForeground2, colorPalettePlumBackground2, colorPalettePlumBorderActive, colorPalettePlumForeground2, colorPalettePumpkinBackground2, colorPalettePumpkinBorderActive, colorPalettePumpkinForeground2, colorPalettePurpleBackground2, colorPalettePurpleBorderActive, colorPalettePurpleForeground2, colorPaletteRedBackground1, colorPaletteRedBackground2, colorPaletteRedBackground3, colorPaletteRedBorder1, colorPaletteRedBorder2, colorPaletteRedBorderActive, colorPaletteRedForeground1, colorPaletteRedForeground2, colorPaletteRedForeground3, colorPaletteRedForegroundInverted, colorPaletteRoyalBlueBackground2, colorPaletteRoyalBlueBorderActive, colorPaletteRoyalBlueForeground2, colorPaletteSeafoamBackground2, colorPaletteSeafoamBorderActive, colorPaletteSeafoamForeground2, colorPaletteSteelBackground2, colorPaletteSteelBorderActive, colorPaletteSteelForeground2, colorPaletteTealBackground2, colorPaletteTealBorderActive, colorPaletteTealForeground2, colorPaletteYellowBackground1, colorPaletteYellowBackground2, colorPaletteYellowBackground3, colorPaletteYellowBorder1, colorPaletteYellowBorder2, colorPaletteYellowBorderActive, colorPaletteYellowForeground1, colorPaletteYellowForeground2, colorPaletteYellowForeground3, colorPaletteYellowForegroundInverted, colorScrollbarOverlay, colorStatusDangerBackground1, colorStatusDangerBackground2, colorStatusDangerBackground3, colorStatusDangerBackground3Hover, colorStatusDangerBackground3Pressed, colorStatusDangerBorder1, colorStatusDangerBorder2, colorStatusDangerBorderActive, colorStatusDangerForeground1, colorStatusDangerForeground2, colorStatusDangerForeground3, colorStatusDangerForegroundInverted, colorStatusSuccessBackground1, colorStatusSuccessBackground2, colorStatusSuccessBackground3, colorStatusSuccessBorder1, colorStatusSuccessBorder2, colorStatusSuccessBorderActive, colorStatusSuccessForeground1, colorStatusSuccessForeground2, colorStatusSuccessForeground3, colorStatusSuccessForegroundInverted, colorStatusWarningBackground1, colorStatusWarningBackground2, colorStatusWarningBackground3, colorStatusWarningBorder1, colorStatusWarningBorder2, colorStatusWarningBorderActive, colorStatusWarningForeground1, colorStatusWarningForeground2, colorStatusWarningForeground3, colorStatusWarningForegroundInverted, colorStrokeFocus1, colorStrokeFocus2, colorSubtleBackground, colorSubtleBackgroundHover, colorSubtleBackgroundInverted, colorSubtleBackgroundInvertedHover, colorSubtleBackgroundInvertedPressed, colorSubtleBackgroundInvertedSelected, colorSubtleBackgroundLightAlphaHover, colorSubtleBackgroundLightAlphaPressed, colorSubtleBackgroundLightAlphaSelected, colorSubtleBackgroundPressed, colorSubtleBackgroundSelected, colorTransparentBackground, colorTransparentBackgroundHover, colorTransparentBackgroundPressed, colorTransparentBackgroundSelected, colorTransparentStroke, colorTransparentStrokeDisabled, colorTransparentStrokeInteractive, curveAccelerateMax, curveAccelerateMid, curveAccelerateMin, curveDecelerateMax, curveDecelerateMid, curveDecelerateMin, curveEasyEase, curveEasyEaseMax, curveLinear, darkModeStylesheetBehavior, display, durationFast, durationFaster, durationGentle, durationNormal, durationSlow, durationSlower, durationUltraFast, durationUltraSlow, fontFamilyBase, fontFamilyMonospace, fontFamilyNumeric, fontSizeBase100, fontSizeBase200, fontSizeBase300, fontSizeBase400, fontSizeBase500, fontSizeBase600, fontSizeHero1000, fontSizeHero700, fontSizeHero800, fontSizeHero900, fontWeightBold, fontWeightMedium, fontWeightRegular, fontWeightSemibold, forcedColorsStylesheetBehavior, getDirection, lightModeStylesheetBehavior, lineHeightBase100, lineHeightBase200, lineHeightBase300, lineHeightBase400, lineHeightBase500, lineHeightBase600, lineHeightHero1000, lineHeightHero700, lineHeightHero800, lineHeightHero900, roleForMenuItem, setTheme, setThemeFor, shadow16, shadow16Brand, shadow2, shadow28, shadow28Brand, shadow2Brand, shadow4, shadow4Brand, shadow64, shadow64Brand, shadow8, shadow8Brand, spacingHorizontalL, spacingHorizontalM, spacingHorizontalMNudge, spacingHorizontalNone, spacingHorizontalS, spacingHorizontalSNudge, spacingHorizontalXL, spacingHorizontalXS, spacingHorizontalXXL, spacingHorizontalXXS, spacingHorizontalXXXL, spacingVerticalL, spacingVerticalM, spacingVerticalMNudge, spacingVerticalNone, spacingVerticalS, spacingVerticalSNudge, spacingVerticalXL, spacingVerticalXS, spacingVerticalXXL, spacingVerticalXXS, spacingVerticalXXXL, strokeWidthThick, strokeWidthThicker, strokeWidthThickest, strokeWidthThin };
|
|
10448
|
+
definition.define(FluentDesignSystem.registry);
|