@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
|
@@ -5474,7 +5474,7 @@ const styles$D = css`${baseButtonStyles} :host(:is(:disabled,[disabled],[disable
|
|
|
5474
5474
|
const styles$C = css`${baseButtonStyles} ::slotted(a){position:absolute;inset:0}@media (forced-colors:active){:host{border-color:LinkText;color:LinkText}}`;
|
|
5475
5475
|
|
|
5476
5476
|
function anchorTemplate$1(options = {}) {
|
|
5477
|
-
return html`<template
|
|
5477
|
+
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>`;
|
|
5478
5478
|
}
|
|
5479
5479
|
const template$D = anchorTemplate$1();
|
|
5480
5480
|
|
|
@@ -8855,7 +8855,7 @@ const tagName$l = `${FluentDesignSystem.prefix}-link`;
|
|
|
8855
8855
|
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}}`;
|
|
8856
8856
|
|
|
8857
8857
|
function anchorTemplate() {
|
|
8858
|
-
return html`<template
|
|
8858
|
+
return html`<template @click=${(x, c) => x.clickHandler(c.event)} @keydown=${(x, c) => x.keydownHandler(c.event)}><slot></slot></template>`;
|
|
8859
8859
|
}
|
|
8860
8860
|
const template$n = anchorTemplate();
|
|
8861
8861
|
|
|
@@ -9139,7 +9139,7 @@ const chevronRight16Filled = html.partial(
|
|
|
9139
9139
|
`<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>`
|
|
9140
9140
|
);
|
|
9141
9141
|
function menuItemTemplate(options = {}) {
|
|
9142
|
-
return html`<template
|
|
9142
|
+
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>`;
|
|
9143
9143
|
}
|
|
9144
9144
|
const template$k = menuItemTemplate({
|
|
9145
9145
|
indicator: Checkmark16Filled,
|
|
@@ -9355,6 +9355,9 @@ class MenuItem extends FASTElement {
|
|
|
9355
9355
|
}
|
|
9356
9356
|
connectedCallback() {
|
|
9357
9357
|
super.connectedCallback();
|
|
9358
|
+
if (!this.hasAttribute("tabindex")) {
|
|
9359
|
+
this.tabIndex = 0;
|
|
9360
|
+
}
|
|
9358
9361
|
this.elementInternals.role = this.role ?? MenuItemRole.menuitem;
|
|
9359
9362
|
this.elementInternals.ariaChecked = this.role !== MenuItemRole.menuitem ? `${!!this.checked}` : null;
|
|
9360
9363
|
maybeSetAutoFocus(this);
|
|
@@ -9387,7 +9390,7 @@ const tagName$i = `${FluentDesignSystem.prefix}-menu-list`;
|
|
|
9387
9390
|
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}`;
|
|
9388
9391
|
|
|
9389
9392
|
function menuTemplate$1() {
|
|
9390
|
-
return html`<template
|
|
9393
|
+
return html`<template><slot ${slotted("items")}></slot></template>`;
|
|
9391
9394
|
}
|
|
9392
9395
|
const template$j = menuTemplate$1();
|
|
9393
9396
|
|
|
@@ -9936,6 +9939,9 @@ const _BaseMenuList = class _BaseMenuList extends FASTElement {
|
|
|
9936
9939
|
*/
|
|
9937
9940
|
connectedCallback() {
|
|
9938
9941
|
super.connectedCallback();
|
|
9942
|
+
if (!this.hasAttribute("focusgroup")) {
|
|
9943
|
+
this.setAttribute("focusgroup", "menu");
|
|
9944
|
+
}
|
|
9939
9945
|
if (!this.slot && this.isNestedMenu()) {
|
|
9940
9946
|
this.slot = "submenu";
|
|
9941
9947
|
}
|
|
@@ -10823,7 +10829,7 @@ const tagName$e = `${FluentDesignSystem.prefix}-radio-group`;
|
|
|
10823
10829
|
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}}`;
|
|
10824
10830
|
|
|
10825
10831
|
function radioGroupTemplate() {
|
|
10826
|
-
return html`<template
|
|
10832
|
+
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>`;
|
|
10827
10833
|
}
|
|
10828
10834
|
const template$e = radioGroupTemplate();
|
|
10829
10835
|
|
|
@@ -10925,6 +10931,12 @@ class BaseRadioGroup extends FASTElement {
|
|
|
10925
10931
|
orientationChanged(prev, next) {
|
|
10926
10932
|
this.elementInternals.ariaOrientation = this.orientation ?? RadioGroupOrientation.horizontal;
|
|
10927
10933
|
}
|
|
10934
|
+
connectedCallback() {
|
|
10935
|
+
super.connectedCallback();
|
|
10936
|
+
if (!this.hasAttribute("focusgroup")) {
|
|
10937
|
+
this.setAttribute("focusgroup", "radiogroup wrap");
|
|
10938
|
+
}
|
|
10939
|
+
}
|
|
10928
10940
|
/**
|
|
10929
10941
|
* Updates the enabled radios collection when properties on the child radios change.
|
|
10930
10942
|
*
|
|
@@ -12275,7 +12287,7 @@ const tagName$8 = `${FluentDesignSystem.prefix}-tab`;
|
|
|
12275
12287
|
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}}`;
|
|
12276
12288
|
|
|
12277
12289
|
function tabTemplate(options = {}) {
|
|
12278
|
-
return html`<template
|
|
12290
|
+
return html`<template>${startSlotTemplate(options)} <span class=tab-content><slot></slot></span>${endSlotTemplate(options)}</template>`;
|
|
12279
12291
|
}
|
|
12280
12292
|
const template$8 = tabTemplate({});
|
|
12281
12293
|
|
|
@@ -12313,6 +12325,7 @@ class Tab extends FASTElement {
|
|
|
12313
12325
|
connectedCallback() {
|
|
12314
12326
|
super.connectedCallback();
|
|
12315
12327
|
this.slot || (this.slot = "tab");
|
|
12328
|
+
this.role ?? (this.role = "tab");
|
|
12316
12329
|
this.setDisabledSideEffect(this.disabled);
|
|
12317
12330
|
if (this.styles) {
|
|
12318
12331
|
this.$fastController.removeStyles(this.styles);
|
|
@@ -12351,7 +12364,7 @@ const tagName$7 = `${FluentDesignSystem.prefix}-tablist`;
|
|
|
12351
12364
|
|
|
12352
12365
|
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}}}`;
|
|
12353
12366
|
|
|
12354
|
-
const template$7 = html`<template
|
|
12367
|
+
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>`;
|
|
12355
12368
|
|
|
12356
12369
|
const definition$7 = {
|
|
12357
12370
|
name: tagName$7,
|
|
@@ -12508,6 +12521,10 @@ class BaseTablist extends FASTElement {
|
|
|
12508
12521
|
*/
|
|
12509
12522
|
connectedCallback() {
|
|
12510
12523
|
super.connectedCallback();
|
|
12524
|
+
this.role ?? (this.role = "tablist");
|
|
12525
|
+
if (!this.hasAttribute("focusgroup")) {
|
|
12526
|
+
this.setAttribute("focusgroup", "tablist inline block");
|
|
12527
|
+
}
|
|
12511
12528
|
waitForConnectedDescendants(
|
|
12512
12529
|
this,
|
|
12513
12530
|
() => {
|
|
@@ -13743,7 +13760,7 @@ const tagName$2 = `${FluentDesignSystem.prefix}-tooltip`;
|
|
|
13743
13760
|
|
|
13744
13761
|
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}`;
|
|
13745
13762
|
|
|
13746
|
-
const template$2 = html`<template
|
|
13763
|
+
const template$2 = html`<template><slot></slot></template>`;
|
|
13747
13764
|
|
|
13748
13765
|
const definition$2 = {
|
|
13749
13766
|
name: tagName$2,
|
|
@@ -13823,6 +13840,7 @@ class Tooltip extends FASTElement {
|
|
|
13823
13840
|
connectedCallback() {
|
|
13824
13841
|
super.connectedCallback();
|
|
13825
13842
|
this.popover ?? (this.popover = "auto");
|
|
13843
|
+
this.ariaHidden ?? (this.ariaHidden = "true");
|
|
13826
13844
|
if (!this.anchorElement) {
|
|
13827
13845
|
return;
|
|
13828
13846
|
}
|
|
@@ -13970,7 +13988,7 @@ const tagName$1 = `${FluentDesignSystem.prefix}-tree`;
|
|
|
13970
13988
|
|
|
13971
13989
|
const styles$1 = css`${display("block")} :host{outline:none}`;
|
|
13972
13990
|
|
|
13973
|
-
const template$1 = html`<template
|
|
13991
|
+
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>`;
|
|
13974
13992
|
|
|
13975
13993
|
const definition$1 = {
|
|
13976
13994
|
name: tagName$1,
|
|
@@ -14027,6 +14045,12 @@ class BaseTree extends FASTElement {
|
|
|
14027
14045
|
defaultSlotChanged() {
|
|
14028
14046
|
this.handleDefaultSlotChange();
|
|
14029
14047
|
}
|
|
14048
|
+
connectedCallback() {
|
|
14049
|
+
super.connectedCallback();
|
|
14050
|
+
if (!this.hasAttribute("focusgroup")) {
|
|
14051
|
+
this.setAttribute("focusgroup", "menu inline block nowrap nomemory");
|
|
14052
|
+
}
|
|
14053
|
+
}
|
|
14030
14054
|
/** @internal */
|
|
14031
14055
|
childTreeItemsChanged() {
|
|
14032
14056
|
this.updateCurrentSelected();
|
|
@@ -14232,7 +14256,7 @@ Tree.define(definition$1);
|
|
|
14232
14256
|
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)}`;
|
|
14233
14257
|
|
|
14234
14258
|
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>`;
|
|
14235
|
-
const template = html`<template
|
|
14259
|
+
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>`;
|
|
14236
14260
|
|
|
14237
14261
|
const definition = {
|
|
14238
14262
|
name: tagName,
|
|
@@ -14330,6 +14354,7 @@ class BaseTreeItem extends FASTElement {
|
|
|
14330
14354
|
toggleState(this.elementInternals, "selected", next);
|
|
14331
14355
|
this.elementInternals.ariaSelected = next ? "true" : "false";
|
|
14332
14356
|
}
|
|
14357
|
+
this.toggleAttribute("focusgroupstart", this.selected);
|
|
14333
14358
|
}
|
|
14334
14359
|
/**
|
|
14335
14360
|
* Handles changes to the child tree items
|