@fluentui/web-components 3.2.1 → 3.2.2
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/esm/anchor-button/anchor-button.template.html +1 -1
- package/dist/esm/anchor-button/anchor-button.template.js +0 -1
- package/dist/esm/anchor-button/anchor-button.template.js.map +1 -1
- package/dist/esm/link/link.template.html +1 -1
- package/dist/esm/link/link.template.js +0 -1
- package/dist/esm/link/link.template.js.map +1 -1
- package/dist/esm/menu-item/menu-item.js +3 -0
- package/dist/esm/menu-item/menu-item.js.map +1 -1
- package/dist/esm/menu-item/menu-item.template.html +0 -1
- package/dist/esm/menu-item/menu-item.template.js +0 -1
- package/dist/esm/menu-item/menu-item.template.js.map +1 -1
- package/dist/esm/menu-list/menu-list.base.js +3 -0
- package/dist/esm/menu-list/menu-list.base.js.map +1 -1
- package/dist/esm/menu-list/menu-list.template.html +1 -1
- package/dist/esm/menu-list/menu-list.template.js +1 -1
- package/dist/esm/radio-group/radio-group.base.d.ts +1 -0
- package/dist/esm/radio-group/radio-group.base.js +6 -0
- package/dist/esm/radio-group/radio-group.base.js.map +1 -1
- package/dist/esm/radio-group/radio-group.template.html +0 -1
- package/dist/esm/radio-group/radio-group.template.js +0 -1
- package/dist/esm/radio-group/radio-group.template.js.map +1 -1
- package/dist/esm/tab/tab.js +1 -0
- package/dist/esm/tab/tab.js.map +1 -1
- package/dist/esm/tab/tab.template.html +1 -1
- package/dist/esm/tab/tab.template.js +1 -1
- package/dist/esm/tablist/tablist.base.js +4 -0
- package/dist/esm/tablist/tablist.base.js.map +1 -1
- package/dist/esm/tablist/tablist.template.html +1 -1
- package/dist/esm/tablist/tablist.template.js +0 -2
- package/dist/esm/tablist/tablist.template.js.map +1 -1
- package/dist/esm/tooltip/tooltip.js +1 -0
- package/dist/esm/tooltip/tooltip.js.map +1 -1
- package/dist/esm/tooltip/tooltip.template.js +1 -1
- package/dist/esm/tree/tree.base.d.ts +1 -0
- package/dist/esm/tree/tree.base.js +6 -0
- package/dist/esm/tree/tree.base.js.map +1 -1
- package/dist/esm/tree/tree.template.html +0 -1
- package/dist/esm/tree/tree.template.js +0 -1
- package/dist/esm/tree/tree.template.js.map +1 -1
- package/dist/esm/tree-item/tree-item.base.js +2 -1
- package/dist/esm/tree-item/tree-item.base.js.map +1 -1
- package/dist/esm/tree-item/tree-item.template.html +1 -1
- package/dist/esm/tree-item/tree-item.template.js +1 -1
- package/dist/esm/tree-item/tree-item.template.js.map +1 -1
- package/dist/web-components-all.js +35 -10
- package/dist/web-components-all.min.js +3 -3
- package/dist/web-components.d.ts +2 -0
- package/dist/web-components.js +35 -10
- package/dist/web-components.min.js +3 -3
- package/package.json +1 -1
package/dist/web-components.d.ts
CHANGED
|
@@ -2469,6 +2469,7 @@ export declare class BaseRadioGroup extends FASTElement {
|
|
|
2469
2469
|
* @internal
|
|
2470
2470
|
*/
|
|
2471
2471
|
orientationChanged(prev: RadioGroupOrientation | undefined, next: RadioGroupOrientation | undefined): void;
|
|
2472
|
+
connectedCallback(): void;
|
|
2472
2473
|
/**
|
|
2473
2474
|
* The collection of all child radios.
|
|
2474
2475
|
*
|
|
@@ -3588,6 +3589,7 @@ export declare class BaseTree extends FASTElement {
|
|
|
3588
3589
|
*/
|
|
3589
3590
|
defaultSlotChanged(): void;
|
|
3590
3591
|
constructor();
|
|
3592
|
+
connectedCallback(): void;
|
|
3591
3593
|
/** @internal */
|
|
3592
3594
|
childTreeItems: BaseTreeItem[];
|
|
3593
3595
|
/** @internal */
|
package/dist/web-components.js
CHANGED
|
@@ -5211,7 +5211,7 @@ const styles$D = css`${baseButtonStyles} :host(:is(:disabled,[disabled],[disable
|
|
|
5211
5211
|
const styles$C = css`${baseButtonStyles} ::slotted(a){position:absolute;inset:0}@media (forced-colors:active){:host{border-color:LinkText;color:LinkText}}`;
|
|
5212
5212
|
|
|
5213
5213
|
function anchorTemplate$1(options = {}) {
|
|
5214
|
-
return html`<template
|
|
5214
|
+
return html`<template @click=${(x, c) => x.clickHandler(c.event)} @keydown=${(x, c) => x.keydownHandler(c.event)}>${startSlotTemplate(options)} <span class=content part=content><slot></slot></span>${endSlotTemplate(options)}</template>`;
|
|
5215
5215
|
}
|
|
5216
5216
|
const template$D = anchorTemplate$1();
|
|
5217
5217
|
|
|
@@ -8431,7 +8431,7 @@ const tagName$l = `${FluentDesignSystem.prefix}-link`;
|
|
|
8431
8431
|
const styles$n = css`${display("inline")} :host{position:relative;box-sizing:border-box;background-color:transparent;color:${colorBrandForegroundLink};cursor:pointer;font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};overflow:inherit;text-align:start;text-decoration:none;text-decoration-thickness:${strokeWidthThin};text-overflow:inherit;user-select:text}:host(:hover){outline:none;text-decoration-line:underline}@media (hover:hover){:host(:hover){color:${colorBrandForegroundLinkHover}}:host(:active){color:${colorBrandForegroundLinkPressed}}:host([appearance='subtle']:hover){color:${colorNeutralForeground2LinkHover}}:host([appearance='subtle']:active){color:${colorNeutralForeground2LinkPressed}}}:host([appearance='subtle']){color:${colorNeutralForeground2Link}}:host-context(:is(h1,h2,h3,h4,h5,h6,p,fluent-text)),:host([inline]){font:inherit;text-decoration:underline}:host(:focus-visible),:host-context(:is(h1,h2,h3,h4,h5,h6,p,fluent-text)):focus-visible,:host([inline]:focus-visible){outline-style:none;text-decoration-line:underline;text-decoration-style:double;text-decoration-color:${colorStrokeFocus2}}:host(:not([href])){color:inherit;text-decoration:none}::slotted(a){position:absolute;inset:0}@media (forced-colors:active){:host{color:LinkText}}`;
|
|
8432
8432
|
|
|
8433
8433
|
function anchorTemplate() {
|
|
8434
|
-
return html`<template
|
|
8434
|
+
return html`<template @click=${(x, c) => x.clickHandler(c.event)} @keydown=${(x, c) => x.keydownHandler(c.event)}><slot></slot></template>`;
|
|
8435
8435
|
}
|
|
8436
8436
|
const template$n = anchorTemplate();
|
|
8437
8437
|
|
|
@@ -8712,7 +8712,7 @@ const chevronRight16Filled = html.partial(
|
|
|
8712
8712
|
`<svg class=submenu-glyph fill=currentColor 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>`
|
|
8713
8713
|
);
|
|
8714
8714
|
function menuItemTemplate(options = {}) {
|
|
8715
|
-
return html`<template
|
|
8715
|
+
return html`<template @keydown=${(x, c) => x.handleMenuItemKeyDown(c.event)} @click=${(x, c) => x.handleMenuItemClick(c.event)} @mouseover=${(x, c) => x.handleMouseOver(c.event)} @mouseout=${(x, c) => x.handleMouseOut(c.event)} @toggle=${(x, c) => x.handleToggle(c.event)}><slot name=indicator>${staticallyCompose(options.indicator)}</slot>${startSlotTemplate(options)}<div part=content class=content><slot></slot></div>${endSlotTemplate(options)}<slot name=submenu-glyph>${staticallyCompose(options.submenuGlyph)}</slot><slot name=submenu ${slotted({ property: "slottedSubmenu" })}></slot></template>`;
|
|
8716
8716
|
}
|
|
8717
8717
|
const template$k = menuItemTemplate({
|
|
8718
8718
|
indicator: Checkmark16Filled,
|
|
@@ -8928,6 +8928,9 @@ class MenuItem extends FASTElement {
|
|
|
8928
8928
|
}
|
|
8929
8929
|
connectedCallback() {
|
|
8930
8930
|
super.connectedCallback();
|
|
8931
|
+
if (!this.hasAttribute("tabindex")) {
|
|
8932
|
+
this.tabIndex = 0;
|
|
8933
|
+
}
|
|
8931
8934
|
this.elementInternals.role = this.role ?? MenuItemRole.menuitem;
|
|
8932
8935
|
this.elementInternals.ariaChecked = this.role !== MenuItemRole.menuitem ? `${!!this.checked}` : null;
|
|
8933
8936
|
maybeSetAutoFocus(this);
|
|
@@ -8960,7 +8963,7 @@ const tagName$i = `${FluentDesignSystem.prefix}-menu-list`;
|
|
|
8960
8963
|
const styles$j = css`${display("grid")} :host{contain:layout style;block-size:auto;max-inline-size:300px;min-inline-size:160px;inline-size:auto;background-color:${colorNeutralBackground1};border:1px solid ${colorTransparentStroke};border-radius:${borderRadiusMedium};box-shadow:${shadow16};grid-template-columns:10px max-content max-content minmax(0,1fr) max-content max-content 10px;gap:2px 0;padding:4px}::slotted(*){grid-column:1/-1}`;
|
|
8961
8964
|
|
|
8962
8965
|
function menuTemplate$1() {
|
|
8963
|
-
return html`<template
|
|
8966
|
+
return html`<template><slot ${slotted("items")}></slot></template>`;
|
|
8964
8967
|
}
|
|
8965
8968
|
const template$j = menuTemplate$1();
|
|
8966
8969
|
|
|
@@ -9509,6 +9512,9 @@ const _BaseMenuList = class _BaseMenuList extends FASTElement {
|
|
|
9509
9512
|
*/
|
|
9510
9513
|
connectedCallback() {
|
|
9511
9514
|
super.connectedCallback();
|
|
9515
|
+
if (!this.hasAttribute("focusgroup")) {
|
|
9516
|
+
this.setAttribute("focusgroup", "menu");
|
|
9517
|
+
}
|
|
9512
9518
|
if (!this.slot && this.isNestedMenu()) {
|
|
9513
9519
|
this.slot = "submenu";
|
|
9514
9520
|
}
|
|
@@ -10369,7 +10375,7 @@ const tagName$e = `${FluentDesignSystem.prefix}-radio-group`;
|
|
|
10369
10375
|
const styles$e = css`${display("flex")} :host{-webkit-tap-highlight-color:transparent;cursor:pointer;gap:${spacingVerticalL}}:host([orientation='vertical']){flex-direction:column;justify-content:flex-start}:host([orientation='horizontal']){flex-direction:row}::slotted(*){color:${colorNeutralForeground3}}::slotted(:hover){color:${colorNeutralForeground2}}::slotted(:active){color:${colorNeutralForeground1}}::slotted(${disabledState}){color:${colorNeutralForegroundDisabled}}::slotted(${checkedState}){color:${colorNeutralForeground1}}:host([slot='input']){margin:${spacingVerticalS} ${spacingHorizontalS}}`;
|
|
10370
10376
|
|
|
10371
10377
|
function radioGroupTemplate() {
|
|
10372
|
-
return html`<template
|
|
10378
|
+
return html`<template @disabled=${(x, c) => x.disabledRadioHandler(c.event)} @change=${(x, c) => x.changeHandler(c.event)} @click=${(x, c) => x.clickHandler(c.event)} @focusin=${(x, c) => x.focusinHandler(c.event)} @keydown=${(x, c) => x.keydownHandler(c.event)}><slot ${slotted("slottedRadios")}></slot></template>`;
|
|
10373
10379
|
}
|
|
10374
10380
|
const template$e = radioGroupTemplate();
|
|
10375
10381
|
|
|
@@ -10471,6 +10477,12 @@ class BaseRadioGroup extends FASTElement {
|
|
|
10471
10477
|
orientationChanged(prev, next) {
|
|
10472
10478
|
this.elementInternals.ariaOrientation = this.orientation ?? RadioGroupOrientation.horizontal;
|
|
10473
10479
|
}
|
|
10480
|
+
connectedCallback() {
|
|
10481
|
+
super.connectedCallback();
|
|
10482
|
+
if (!this.hasAttribute("focusgroup")) {
|
|
10483
|
+
this.setAttribute("focusgroup", "radiogroup wrap");
|
|
10484
|
+
}
|
|
10485
|
+
}
|
|
10474
10486
|
/**
|
|
10475
10487
|
* Updates the enabled radios collection when properties on the child radios change.
|
|
10476
10488
|
*
|
|
@@ -11789,7 +11801,7 @@ const tagName$8 = `${FluentDesignSystem.prefix}-tab`;
|
|
|
11789
11801
|
const styles$8 = css`${display("inline-flex")} :host{position:relative;flex-direction:row;align-items:center;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};gap:4px}:host .tab-content{display:inline-flex;flex-direction:column;padding:0 2px;grid-column:3}: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}@supports (anchor-name:--a) and (text-size-adjust:auto){:host([aria-selected='true'])::after{background-color:transparent}:host([aria-selected='true']:hover)::after{background-color:${colorNeutralStroke1Hover}}}:host([aria-selected='true'][disabled])::after{background-color:${colorNeutralForegroundDisabled}}::slotted([slot='start']){grid-column:2}::slotted([slot='end']){grid-column:-1}::slotted([slot='start']),::slotted([slot='end']){display:flex}:host([disabled]){cursor:not-allowed;fill:${colorNeutralForegroundDisabled};color:${colorNeutralForegroundDisabled};pointer-events:none}: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}}@media (forced-colors:active){:host([aria-selected='true'])::after{background-color:Highlight}}`;
|
|
11790
11802
|
|
|
11791
11803
|
function tabTemplate(options = {}) {
|
|
11792
|
-
return html`<template
|
|
11804
|
+
return html`<template>${startSlotTemplate(options)} <span class=tab-content><slot></slot></span>${endSlotTemplate(options)}</template>`;
|
|
11793
11805
|
}
|
|
11794
11806
|
const template$8 = tabTemplate({});
|
|
11795
11807
|
|
|
@@ -11827,6 +11839,7 @@ class Tab extends FASTElement {
|
|
|
11827
11839
|
connectedCallback() {
|
|
11828
11840
|
super.connectedCallback();
|
|
11829
11841
|
this.slot || (this.slot = "tab");
|
|
11842
|
+
this.role ?? (this.role = "tab");
|
|
11830
11843
|
this.setDisabledSideEffect(this.disabled);
|
|
11831
11844
|
if (this.styles) {
|
|
11832
11845
|
this.$fastController.removeStyles(this.styles);
|
|
@@ -11856,7 +11869,7 @@ const tagName$7 = `${FluentDesignSystem.prefix}-tablist`;
|
|
|
11856
11869
|
|
|
11857
11870
|
const styles$7 = css`${display("flex")} :host{--tabPaddingInline:${spacingHorizontalMNudge};--tabPaddingBlock:${spacingHorizontalM};--tabIndicatorInsetInline:var(--tabPaddingInline);--tabIndicatorInsetBlock:0;box-sizing:border-box;color:${colorNeutralForeground2};flex-direction:row;position:relative}:host([size='small']){--tabPaddingBlock:${spacingVerticalSNudge};--tabPaddingInline:${spacingHorizontalSNudge}}:host([size='large']){--tabPaddingBlock:${spacingVerticalL};--tabPaddingInline:${spacingHorizontalMNudge}}:host([orientation='vertical']){--tabPaddingBlock:${spacingVerticalS};--tabIndicatorInsetBlock:${spacingVerticalS};--_col-start-width:0px;display:grid;grid-template-columns:${spacingHorizontalMNudge} var(--_col-start-width) 1fr auto ${spacingHorizontalMNudge}}:host(:has([slot='start'])){--_col-start-width:24px}@scope{:scope:has([slot='start']){--_col-start-width:24px}}:host([orientation='vertical'][size='small']){--tabPaddingBlock:${spacingVerticalXXS};--tabIndicatorInsetBlock:${spacingVerticalSNudge}}:host([orientation='vertical'][size='large']){--tabPaddingBlock:${spacingVerticalS};--tabIndicatorInsetBlock:${spacingVerticalMNudge}}::slotted([slot='tab']){padding-inline:var(--tabPaddingInline);padding-block:var(--tabPaddingBlock)}:host([orientation='vertical']) ::slotted([role='tab']){justify-content:flex-start;display:grid;gap:0;grid-column:1/-1;grid-template-columns:subgrid;grid-row:unset;padding-inline:0}:host ::slotted([slot='tab'])::after{height:${strokeWidthThicker};margin-block-start:auto}:host([orientation='vertical']) ::slotted([slot='tab'])::after{width:${strokeWidthThicker};height:unset;margin-block-start:unset}:host ::slotted([slot='tab'])::before{height:${strokeWidthThicker};border-radius:${borderRadiusCircular};content:'';inset-inline:var(--tabIndicatorInsetInline);inset-block:var(--tabIndicatorInsetBlock);position:absolute;margin-top:auto}:host ::slotted([slot='tab'])::before{inset-inline:var(--tabIndicatorInsetInline);inset-block:var(--tabIndicatorInsetBlock)}:host ::slotted([slot='tab'][aria-selected='true'])::before{background-color:${colorNeutralForegroundDisabled}}:host ::slotted([slot='tab'][aria-selected='false']:hover)::after{height:${strokeWidthThicker};margin-block-start:auto;transform-origin:left}:host([orientation='vertical']) ::slotted([slot='tab'])::before,:host([orientation='vertical']) ::slotted([slot='tab'][aria-selected='false']:hover)::after{height:unset;width:${strokeWidthThicker};margin-inline-end:auto;transform-origin:top}:host([size='small']) ::slotted([slot='tab']){font-size:${fontSizeBase300};line-height:${lineHeightBase300}}:host([size='large']) ::slotted([slot='tab']){font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host ::slotted([slot='tab'])::after,:host ::slotted([slot='tab'])::before,:host ::slotted([slot='tab']:hover)::after{inset-inline:var(--tabIndicatorInsetInline)}:host([orientation='vertical']) ::slotted([slot='tab'])::after,:host([orientation='vertical']) ::slotted([slot='tab'])::before,:host([orientation='vertical']) ::slotted([slot='tab']:hover)::after{inset-inline:0;inset-block:var(--tabIndicatorInsetBlock)}:host([disabled]){cursor:not-allowed;color:${colorNeutralForegroundDisabled}}:host([disabled]) ::slotted([slot='tab']){pointer-events:none;cursor:not-allowed;color:${colorNeutralForegroundDisabled}}:host([disabled]) ::slotted([slot='tab']:after){background-color:${colorNeutralForegroundDisabled}}:host([disabled]) ::slotted([slot='tab'][aria-selected='true'])::after{background-color:${colorNeutralForegroundDisabled}}:host([disabled]) ::slotted([slot='tab']:hover):before{content:unset}:host([appearance='subtle']) ::slotted([slot='tab']:hover){background-color:${colorSubtleBackgroundHover};color:${colorNeutralForeground1Hover};fill:${colorCompoundBrandForeground1Hover}}:host([appearance='subtle']) ::slotted([slot='tab']:active){background-color:${colorSubtleBackgroundPressed};fill:${colorSubtleBackgroundPressed};color:${colorNeutralForeground1}}@supports (anchor-name:--a) and (text-size-adjust:auto){::slotted([slot='tab'][aria-selected='true']){anchor-name:--tab}:host::after{background-color:${colorCompoundBrandStroke};content:'';inline-size:100%;inset-block:auto anchor(end);inset-inline:anchor(center) auto;position:fixed;position-anchor:--tab;transform:translateX(-50%);transition-property:inset-inline,width;transition-duration:${durationSlow};transition-timing-function:${curveDecelerateMax};z-index:3;border-radius:${borderRadiusCircular};width:calc(anchor-size() - var(--tabIndicatorInsetInline) * 2);height:${strokeWidthThicker}}:host(:dir(rtl))::after{transform:translateX(50%)}:host([orientation='vertical'])::after{inset-block:anchor(center) auto;inset-inline:anchor(start) auto;transform:translateY(-50%);transition-property:inset-block,height;width:${strokeWidthThicker};height:calc(anchor-size() - var(--tabIndicatorInsetBlock) * 2)}:host([disabled])::after{background-color:${colorNeutralForegroundDisabled}}}`;
|
|
11858
11871
|
|
|
11859
|
-
const template$7 = html`<template
|
|
11872
|
+
const template$7 = html`<template @click=${(x, c) => x.handleClick(c.event)} @focusin=${(x, c) => x.handleFocusIn(c.event)}><slot name=tab ${slotted("slottedTabs")}></slot></template>`;
|
|
11860
11873
|
|
|
11861
11874
|
const definition$7 = {
|
|
11862
11875
|
name: tagName$7,
|
|
@@ -12013,6 +12026,10 @@ class BaseTablist extends FASTElement {
|
|
|
12013
12026
|
*/
|
|
12014
12027
|
connectedCallback() {
|
|
12015
12028
|
super.connectedCallback();
|
|
12029
|
+
this.role ?? (this.role = "tablist");
|
|
12030
|
+
if (!this.hasAttribute("focusgroup")) {
|
|
12031
|
+
this.setAttribute("focusgroup", "tablist inline block");
|
|
12032
|
+
}
|
|
12016
12033
|
waitForConnectedDescendants(
|
|
12017
12034
|
this,
|
|
12018
12035
|
() => {
|
|
@@ -13167,7 +13184,7 @@ const tagName$2 = `${FluentDesignSystem.prefix}-tooltip`;
|
|
|
13167
13184
|
|
|
13168
13185
|
const styles$2 = css`${display("inline-flex")} :host(:not(:popover-open)){display:none}:host{--position-area:block-start;--position-try-options:flip-block;--block-offset:${spacingVerticalXS};--inline-offset:${spacingHorizontalXS};background:${colorNeutralBackground1};border-radius:${borderRadiusMedium};border:1px solid ${colorTransparentStroke};box-sizing:border-box;color:${colorNeutralForeground1};display:inline-flex;filter:drop-shadow(0 0 2px ${colorNeutralShadowAmbient}) drop-shadow(0 4px 8px ${colorNeutralShadowKey});font-family:${fontFamilyBase};font-size:${fontSizeBase200};inset:unset;line-height:${lineHeightBase200};margin:unset;max-width:240px;overflow:visible;padding:4px ${spacingHorizontalMNudge} 6px;position:absolute;position-area:var(--position-area);position-try-fallbacks:var(--position-try-options);width:auto;z-index:1}@supports (inset-area:block-start){:host{inset-area:var(--position-area);position-try-fallbacks:var(--position-try-options)}}:host(:is([positioning^='above'],[positioning^='below'],:not([positioning]))){margin-block:var(--block-offset)}:host(:is([positioning^='before'],[positioning^='after'])){margin-inline:var(--inline-offset);--position-try-options:flip-inline}:host([positioning='above-start']){--position-area:block-start span-inline-end}:host([positioning='above']){--position-area:block-start}:host([positioning='above-end']){--position-area:block-start span-inline-start}:host([positioning='below-start']){--position-area:block-end span-inline-end}:host([positioning='below']){--position-area:block-end}:host([positioning='below-end']){--position-area:block-end span-inline-start}:host([positioning='before-top']){--position-area:inline-start span-block-end}:host([positioning='before']){--position-area:inline-start}:host([positioning='before-bottom']){--position-area:inline-start span-block-start}:host([positioning='after-top']){--position-area:inline-end span-block-end}:host([positioning='after']){--position-area:inline-end}:host([positioning='after-bottom']){--position-area:inline-end span-block-start}`;
|
|
13169
13186
|
|
|
13170
|
-
const template$2 = html`<template
|
|
13187
|
+
const template$2 = html`<template><slot></slot></template>`;
|
|
13171
13188
|
|
|
13172
13189
|
const definition$2 = {
|
|
13173
13190
|
name: tagName$2,
|
|
@@ -13247,6 +13264,7 @@ class Tooltip extends FASTElement {
|
|
|
13247
13264
|
connectedCallback() {
|
|
13248
13265
|
super.connectedCallback();
|
|
13249
13266
|
this.popover ?? (this.popover = "auto");
|
|
13267
|
+
this.ariaHidden ?? (this.ariaHidden = "true");
|
|
13250
13268
|
if (!this.anchorElement) {
|
|
13251
13269
|
return;
|
|
13252
13270
|
}
|
|
@@ -13394,7 +13412,7 @@ const tagName$1 = `${FluentDesignSystem.prefix}-tree`;
|
|
|
13394
13412
|
|
|
13395
13413
|
const styles$1 = css`${display("block")} :host{outline:none}`;
|
|
13396
13414
|
|
|
13397
|
-
const template$1 = html`<template
|
|
13415
|
+
const template$1 = html`<template @click=${(x, c) => x.clickHandler(c.event)} @keydown=${(x, c) => x.keydownHandler(c.event)} @change=${(x, c) => x.changeHandler(c.event)} @toggle=${(x) => x.itemToggleHandler()}><slot ${ref("defaultSlot")} @slotchange=${(x) => x.handleDefaultSlotChange()}></slot></template>`;
|
|
13398
13416
|
|
|
13399
13417
|
const definition$1 = {
|
|
13400
13418
|
name: tagName$1,
|
|
@@ -13451,6 +13469,12 @@ class BaseTree extends FASTElement {
|
|
|
13451
13469
|
defaultSlotChanged() {
|
|
13452
13470
|
this.handleDefaultSlotChange();
|
|
13453
13471
|
}
|
|
13472
|
+
connectedCallback() {
|
|
13473
|
+
super.connectedCallback();
|
|
13474
|
+
if (!this.hasAttribute("focusgroup")) {
|
|
13475
|
+
this.setAttribute("focusgroup", "menu inline block nowrap nomemory");
|
|
13476
|
+
}
|
|
13477
|
+
}
|
|
13454
13478
|
/** @internal */
|
|
13455
13479
|
childTreeItemsChanged() {
|
|
13456
13480
|
this.updateCurrentSelected();
|
|
@@ -13656,7 +13680,7 @@ Tree.define(definition$1);
|
|
|
13656
13680
|
const styles = css`${display("block")} :host{--_subitem-padding-inline-start:${spacingHorizontalXXL};outline:none;font-size:${fontSizeBase300};line-height:${lineHeightBase300}}:host([size='small']){--_subitem-padding-inline-start:${spacingHorizontalM}}:host(:focus-visible) .positioning-region{box-shadow:${spacingVerticalNone} ${spacingVerticalNone} ${spacingVerticalNone} ${spacingVerticalXXS} ${colorStrokeFocus2} inset}.positioning-region{display:flex;align-items:center;justify-content:space-between;cursor:pointer;height:${spacingVerticalXXXL};padding-inline-end:${spacingVerticalS};border-radius:${borderRadiusMedium};background-color:${colorSubtleBackground};color:${colorNeutralForeground2};gap:${spacingHorizontalXS}}@media (prefers-contrast:more){:host(:focus-visible) .positioning-region{outline:1px solid ${colorStrokeFocus2}}}.content{display:flex;align-items:center;gap:${spacingHorizontalXS}}.chevron{display:flex;align-items:center;flex-shrink:0;justify-content:center;width:${spacingHorizontalXXL};height:${spacingVerticalXXL};transition:transform ${durationFaster} ${curveEasyEaseMax};transform:rotate(0deg)}.chevron:dir(rtl){transform:rotate(180deg)}.chevron svg{inline-size:12px;block-size:12px}.aside{display:flex;align-items:center}.positioning-region:hover{background-color:${colorSubtleBackgroundHover};color:${colorNeutralForeground2Hover}}.positioning-region:active{background-color:${colorSubtleBackgroundPressed};color:${colorNeutralForeground2Pressed}}::slotted([slot='start']),::slotted([slot='end']),::slotted(:not([slot])){display:flex;align-items:center;min-width:0}::slotted([slot='start']){flex-shrink:0}::slotted(:not([slot])){padding-inline:${spacingHorizontalXXS}}.items{display:none;padding-inline-start:var(--_subitem-padding-inline-start)}:host([expanded]) .items{display:block}:host([empty]) .chevron,:host([empty]) .items{visibility:hidden}:host([selected]) .positioning-region{background-color:${colorSubtleBackgroundSelected};color:${colorNeutralForeground2Selected}}:host([selected]) .content,:host([selected]) .chevron{color:${colorNeutralForeground3Selected}}:host([size='small']) .positioning-region{height:${spacingVerticalXXL};padding-inline-start:${spacingHorizontalM}}:host([appearance='subtle-alpha']) .positioning-region:hover{background-color:${colorSubtleBackgroundLightAlphaHover}}:host([appearance='subtle-alpha']) .positioning-region:active{background-color:${colorSubtleBackgroundLightAlphaPressed}}:host([appearance='subtle-alpha'][selected]) .positioning-region{background-color:${colorSubtleBackgroundLightAlphaSelected};color:${colorNeutralForeground2Selected}}:host([appearance='transparent']) .positioning-region{background-color:${colorTransparentBackground}}:host([appearance='transparent']) .positioning-region:hover{background-color:${colorTransparentBackgroundHover}}:host([appearance='transparent']) .positioning-region:active{background-color:${colorTransparentBackgroundPressed}}:host([appearance='transparent'][selected]) .positioning-region{background-color:${colorTransparentBackgroundSelected};color:${colorNeutralForeground2Selected}}:host([expanded]) .chevron{transform:rotate(90deg)}`;
|
|
13657
13681
|
|
|
13658
13682
|
const chevronIcon = html`<svg viewBox="0 0 12 12" fill=currentColor><path d="M4.65 2.15a.5.5 0 000 .7L7.79 6 4.65 9.15a.5.5 0 10.7.7l3.5-3.5a.5.5 0 000-.7l-3.5-3.5a.5.5 0 00-.7 0z"></path></svg>`;
|
|
13659
|
-
const template = html`<template
|
|
13683
|
+
const template = html`<template><div class=positioning-region part=positioning-region><div class=content part=content><span class=chevron part=chevron aria-hidden=true><slot name=chevron>${chevronIcon}</slot></span><slot name=start></slot><slot></slot><slot name=end></slot></div><div class=aside part=aside><slot name=aside></slot></div></div><div role=group class=items part=items><slot name=item ${ref("itemSlot")} @slotchange=${(x) => x.handleItemSlotChange()}></slot></div></template>`;
|
|
13660
13684
|
|
|
13661
13685
|
const definition = {
|
|
13662
13686
|
name: tagName,
|
|
@@ -13754,6 +13778,7 @@ class BaseTreeItem extends FASTElement {
|
|
|
13754
13778
|
toggleState(this.elementInternals, "selected", next);
|
|
13755
13779
|
this.elementInternals.ariaSelected = next ? "true" : "false";
|
|
13756
13780
|
}
|
|
13781
|
+
this.toggleAttribute("focusgroupstart", this.selected);
|
|
13757
13782
|
}
|
|
13758
13783
|
/**
|
|
13759
13784
|
* Handles changes to the child tree items
|