@fluentui/web-components 3.0.0-beta.40 → 3.0.0-beta.41
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 +12 -2
- package/dist/dts/index-rollup.d.ts +1 -0
- package/dist/dts/index.d.ts +1 -0
- package/dist/dts/menu-item/menu-item.d.ts +31 -2
- package/dist/dts/menu-item/menu-item.styles.d.ts +5 -0
- package/dist/dts/menu-item/menu-item.template.d.ts +1 -1
- package/dist/dts/menu-list/menu-list.d.ts +7 -0
- package/dist/esm/index-rollup.js +1 -0
- package/dist/esm/index-rollup.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/menu/menu.js +0 -4
- package/dist/esm/menu/menu.js.map +1 -1
- package/dist/esm/menu-item/menu-item.js +55 -4
- package/dist/esm/menu-item/menu-item.js.map +1 -1
- package/dist/esm/menu-item/menu-item.styles.js +19 -17
- package/dist/esm/menu-item/menu-item.styles.js.map +1 -1
- package/dist/esm/menu-item/menu-item.template.js +3 -7
- package/dist/esm/menu-item/menu-item.template.js.map +1 -1
- package/dist/esm/menu-list/menu-list.js +16 -9
- package/dist/esm/menu-list/menu-list.js.map +1 -1
- package/dist/esm/menu-list/menu-list.template.js +0 -1
- package/dist/esm/menu-list/menu-list.template.js.map +1 -1
- package/dist/web-components.d.ts +50 -1
- package/dist/web-components.js +163 -92
- package/dist/web-components.min.js +123 -121
- package/package.json +3 -1
package/dist/web-components.js
CHANGED
|
@@ -3979,6 +3979,7 @@ const spacingHorizontalS = "var(--spacingHorizontalS)";
|
|
|
3979
3979
|
const spacingHorizontalMNudge = "var(--spacingHorizontalMNudge)";
|
|
3980
3980
|
const spacingHorizontalM = "var(--spacingHorizontalM)";
|
|
3981
3981
|
const spacingHorizontalL = "var(--spacingHorizontalL)";
|
|
3982
|
+
const spacingHorizontalXL = "var(--spacingHorizontalXL)";
|
|
3982
3983
|
const spacingHorizontalXXL = "var(--spacingHorizontalXXL)";
|
|
3983
3984
|
const spacingVerticalXXS = "var(--spacingVerticalXXS)";
|
|
3984
3985
|
const spacingVerticalXS = "var(--spacingVerticalXS)";
|
|
@@ -4005,7 +4006,7 @@ const curveEasyEaseMax = "var(--curveEasyEaseMax)";
|
|
|
4005
4006
|
const curveEasyEase = "var(--curveEasyEase)";
|
|
4006
4007
|
const curveLinear = "var(--curveLinear)";
|
|
4007
4008
|
|
|
4008
|
-
const styles$
|
|
4009
|
+
const styles$y = css`
|
|
4009
4010
|
${display("block")}
|
|
4010
4011
|
|
|
4011
4012
|
:host{max-width:fit-content;contain:content}.heading{height:44px;display:grid;position:relative;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}.button{appearance:none;background:${colorTransparentBackground};border:none;box-sizing:border-box;color:${colorNeutralForeground1};cursor:pointer;font:inherit;grid-column:auto / span 2;grid-row:1;height:44px;outline:none;padding:0;text-align:start}.button::before{content:'';position:absolute;inset:0px;cursor:pointer;border-radius:${borderRadiusSmall}}:where(.default-marker-collapsed,.default-marker-expanded),::slotted(:is([slot='marker-collapsed'],[slot='marker-expanded'])){display:flex;align-items:center;justify-content:center;pointer-events:none;position:relative;height:100%;padding-inline-end:${spacingHorizontalS};grid-column:1 / span 1;grid-row:1}.content{margin:0 ${spacingHorizontalM}}::slotted([slot='start']){display:flex;justify-content:center;align-items:center;padding-right:${spacingHorizontalS};grid-column:2 / span 1;grid-row: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(${disabledState}) .button{color:${colorNeutralForegroundDisabled}}:host(${disabledState}) svg{filter:invert(89%) sepia(0%) saturate(569%) hue-rotate(155deg) brightness(88%) contrast(87%)}:host(${expandedState}) .content{display:block}:host(${expandedState}) .default-marker-collapsed,:host(${expandedState}) ::slotted([slot='marker-collapsed']),:host(:not(${expandedState})) :is(.default-marker-expanded,.content),:host(:not(${expandedState})) ::slotted([slot='marker-expanded']){display:none}:host(${expandedState}) ::slotted([slot='marker-expanded']),:host(:not(${expandedState})) ::slotted([slot='marker-collapsed']){display:flex}.heading{font-size:${fontSizeBase300};line-height:${lineHeightBase300}}:host(${smallState}) .heading{font-size:${fontSizeBase200};line-height:${lineHeightBase200}}:host(${largeState}) .heading{font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host(${extraLargeState}) .heading{font-size:${fontSizeBase500};line-height:${lineHeightBase500}}:host(${alignEndState}) :slotted([slot='start']){grid-column:1 / span 1}:host(${alignEndState}) :is(.default-marker-collapsed,.default-marker-expanded){grid-column:4 / span 1;padding-inline-start:${spacingHorizontalS};padding-inline-end:0}:host(${alignEndState}) .button{grid-column:2 / span 3}:host([block]){max-width:100%}:host(${alignEndState}) .heading{grid-template-columns:auto auto 28px;padding-inline:${spacingHorizontalM}}:host(${alignEndState}:has([slot='start'])) .heading{padding-inline:${spacingHorizontalMNudge} ${spacingHorizontalM}}:host(${blockState}${alignEndState}) .heading{grid-template-columns:auto 1fr}:host(${alignEndState}) :is(.default-marker-collapsed,.default-marker-expanded){grid-column:5 / span 1}`;
|
|
@@ -4041,18 +4042,18 @@ const chevronDown20Filled = html.partial(`<svg
|
|
|
4041
4042
|
function accordionItemTemplate(options = {}) {
|
|
4042
4043
|
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}"><slot name="heading"></slot></button>${startSlotTemplate(options)}<slot name="marker-expanded">${staticallyCompose(options.expandedIcon)}</slot><slot name="marker-collapsed">${staticallyCompose(options.collapsedIcon)}</slot></div><div class="content" part="content" id="${x => x.id}-panel" role="region" aria-labelledby="${x => x.id}"><slot></slot></div>`;
|
|
4043
4044
|
}
|
|
4044
|
-
const template$
|
|
4045
|
+
const template$z = accordionItemTemplate({
|
|
4045
4046
|
collapsedIcon: chevronRight20Filled,
|
|
4046
4047
|
expandedIcon: chevronDown20Filled
|
|
4047
4048
|
});
|
|
4048
4049
|
|
|
4049
|
-
const definition$
|
|
4050
|
+
const definition$z = AccordionItem.compose({
|
|
4050
4051
|
name: `${FluentDesignSystem.prefix}-accordion-item`,
|
|
4051
|
-
template: template$
|
|
4052
|
-
styles: styles$
|
|
4052
|
+
template: template$z,
|
|
4053
|
+
styles: styles$y
|
|
4053
4054
|
});
|
|
4054
4055
|
|
|
4055
|
-
definition$
|
|
4056
|
+
definition$z.define(FluentDesignSystem.registry);
|
|
4056
4057
|
|
|
4057
4058
|
const AccordionExpandMode = {
|
|
4058
4059
|
single: "single",
|
|
@@ -4208,7 +4209,7 @@ __decorateClass$s([attr({
|
|
|
4208
4209
|
})], Accordion.prototype, "expandmode", 2);
|
|
4209
4210
|
__decorateClass$s([observable], Accordion.prototype, "slottedAccordionItems", 2);
|
|
4210
4211
|
|
|
4211
|
-
const styles$
|
|
4212
|
+
const styles$x = css`
|
|
4212
4213
|
${display("flex")}
|
|
4213
4214
|
|
|
4214
4215
|
:host{flex-direction:column;width:100%;contain:content}`;
|
|
@@ -4219,15 +4220,15 @@ function accordionTemplate() {
|
|
|
4219
4220
|
filter: elements()
|
|
4220
4221
|
})}></slot></template>`;
|
|
4221
4222
|
}
|
|
4222
|
-
const template$
|
|
4223
|
+
const template$y = accordionTemplate();
|
|
4223
4224
|
|
|
4224
|
-
const definition$
|
|
4225
|
+
const definition$y = Accordion.compose({
|
|
4225
4226
|
name: `${FluentDesignSystem.prefix}-accordion`,
|
|
4226
|
-
template: template$
|
|
4227
|
-
styles: styles$
|
|
4227
|
+
template: template$y,
|
|
4228
|
+
styles: styles$x
|
|
4228
4229
|
});
|
|
4229
4230
|
|
|
4230
|
-
definition$
|
|
4231
|
+
definition$y.define(FluentDesignSystem.registry);
|
|
4231
4232
|
|
|
4232
4233
|
const ButtonType = {
|
|
4233
4234
|
submit: "submit",
|
|
@@ -4433,13 +4434,13 @@ const baseButtonStyles = css`
|
|
|
4433
4434
|
${display("inline-flex")}
|
|
4434
4435
|
|
|
4435
4436
|
:host{--icon-spacing:${spacingHorizontalSNudge};position:relative;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}:is([slot='start'],::slotted([slot='start'])){margin-inline-end:var(--icon-spacing)}:is([slot='end'],::slotted([slot='end'])){margin-inline-start:var(--icon-spacing)}:host(${iconOnlyState}){min-width:32px;max-width:32px}:host(${smallState}){--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(${smallState}${iconOnlyState}){min-width:24px;max-width:24px}:host(${largeState}){min-height:40px;border-radius:${borderRadiusLarge};padding:0 ${spacingHorizontalL};font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host(${largeState}${iconOnlyState}){min-width:40px;max-width:40px}:host(${largeState}) ::slotted(svg){font-size:24px;height:24px;width:24px}:host(:is(${circularState},${circularState}:focus-visible)){border-radius:${borderRadiusCircular}}:host(:is(${squareState},${squareState}:focus-visible)){border-radius:${borderRadiusNone}}:host(${primaryState}){background-color:${colorBrandBackground};color:${colorNeutralForegroundOnBrand};border-color:transparent}:host(${primaryState}:hover){background-color:${colorBrandBackgroundHover}}:host(${primaryState}:is(:hover,:hover:active)){border-color:transparent;color:${colorNeutralForegroundOnBrand}}:host(${primaryState}:hover:active){background-color:${colorBrandBackgroundPressed}}:host(${primaryState}:focus-visible){border-color:${colorNeutralForegroundOnBrand};box-shadow:${shadow2},0 0 0 2px ${colorStrokeFocus2}}:host(${outlineState}){background-color:${colorTransparentBackground}}:host(${outlineState}:hover){background-color:${colorTransparentBackgroundHover}}:host(${outlineState}:hover:active){background-color:${colorTransparentBackgroundPressed}}:host(${subtleState}){background-color:${colorSubtleBackground};color:${colorNeutralForeground2};border-color:transparent}:host(${subtleState}:hover){background-color:${colorSubtleBackgroundHover};color:${colorNeutralForeground2Hover};border-color:transparent}:host(${subtleState}:hover:active){background-color:${colorSubtleBackgroundPressed};color:${colorNeutralForeground2Pressed};border-color:transparent}:host(${subtleState}:hover) ::slotted(svg){fill:${colorNeutralForeground2BrandHover}}:host(${subtleState}:hover:active) ::slotted(svg){fill:${colorNeutralForeground2BrandPressed}}:host(${transparentState}){background-color:${colorTransparentBackground};color:${colorNeutralForeground2}}:host(${transparentState}:hover){background-color:${colorTransparentBackgroundHover};color:${colorNeutralForeground2BrandHover}}:host(${transparentState}:hover:active){background-color:${colorTransparentBackgroundPressed};color:${colorNeutralForeground2BrandPressed}}:host(:is(${transparentState},${transparentState}:is(:hover,:active))){border-color:transparent}`;
|
|
4436
|
-
const styles$
|
|
4437
|
+
const styles$w = css`
|
|
4437
4438
|
${baseButtonStyles}
|
|
4438
4439
|
|
|
4439
4440
|
:host(:is(:disabled,[disabled-focusable],[appearance]:disabled,[appearance][disabled-focusable])),:host(:is(:disabled,[disabled-focusable],[appearance]:disabled,[appearance][disabled-focusable]):hover),:host(:is(:disabled,[disabled-focusable],[appearance]:disabled,[appearance][disabled-focusable]):hover:active){background-color:${colorNeutralBackgroundDisabled};border-color:${colorNeutralStrokeDisabled};color:${colorNeutralForegroundDisabled};cursor:not-allowed}:host(${primaryState}:is(:disabled,[disabled-focusable])),:host(${primaryState}:is(:disabled,[disabled-focusable]):is(:hover,:hover:active)){border-color:transparent}:host(${outlineState}:is(:disabled,[disabled-focusable])),:host(${outlineState}:is(:disabled,[disabled-focusable]):is(:hover,:hover:active)){background-color:${colorTransparentBackground}}:host(${subtleState}:is(:disabled,[disabled-focusable])),:host(${subtleState}:is(:disabled,[disabled-focusable]):is(:hover,:hover:active)){background-color:${colorTransparentBackground};border-color:transparent}:host(${transparentState}:is(:disabled,[disabled-focusable])),:host(${transparentState}:is(:disabled,[disabled-focusable]):is(:hover,:hover:active)){border-color:transparent;background-color:${colorTransparentBackground}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
4440
4441
|
:host{background:ButtonFace;color:ButtonText}:host(:is(:hover,:focus-visible)){border-color:Highlight}`));
|
|
4441
4442
|
|
|
4442
|
-
const styles$
|
|
4443
|
+
const styles$v = css`
|
|
4443
4444
|
${baseButtonStyles}
|
|
4444
4445
|
|
|
4445
4446
|
::slotted(a){position:absolute;inset:0}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
@@ -4448,15 +4449,15 @@ const styles$u = css`
|
|
|
4448
4449
|
function anchorTemplate$1(options = {}) {
|
|
4449
4450
|
return html`<template tabindex="0" @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>`;
|
|
4450
4451
|
}
|
|
4451
|
-
const template$
|
|
4452
|
+
const template$x = anchorTemplate$1();
|
|
4452
4453
|
|
|
4453
|
-
const definition$
|
|
4454
|
+
const definition$x = AnchorButton.compose({
|
|
4454
4455
|
name: `${FluentDesignSystem.prefix}-anchor-button`,
|
|
4455
|
-
template: template$
|
|
4456
|
-
styles: styles$
|
|
4456
|
+
template: template$x,
|
|
4457
|
+
styles: styles$v
|
|
4457
4458
|
});
|
|
4458
4459
|
|
|
4459
|
-
definition$
|
|
4460
|
+
definition$x.define(FluentDesignSystem.registry);
|
|
4460
4461
|
|
|
4461
4462
|
const UNWANTED_ENCLOSURES_REGEX = /[\(\[\{][^\)\]\}]*[\)\]\}]/g;
|
|
4462
4463
|
const UNWANTED_CHARS_REGEX = /[\0-\u001F\!-/:-@\[-`\{-\u00BF\u0250-\u036F\uD800-\uFFFF]/g;
|
|
@@ -4643,22 +4644,22 @@ const animations = {
|
|
|
4643
4644
|
normalEase: curveEasyEase,
|
|
4644
4645
|
nullEasing: curveLinear
|
|
4645
4646
|
};
|
|
4646
|
-
const styles$
|
|
4647
|
+
const styles$u = css`
|
|
4647
4648
|
${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(:is([state--brand],:state(brand))){color:${colorNeutralForegroundStaticInverted};background-color:${colorBrandBackgroundStatic}}:host(:is([state--dark-red],:state(dark-red))){color:${colorPaletteDarkRedForeground2};background-color:${colorPaletteDarkRedBackground2}}:host(:is([state--cranberry],:state(cranberry))){color:${colorPaletteCranberryForeground2};background-color:${colorPaletteCranberryBackground2}}:host(:is([state--red],:state(red))){color:${colorPaletteRedForeground2};background-color:${colorPaletteRedBackground2}}:host(:is([state--pumpkin],:state(pumpkin))){color:${colorPalettePumpkinForeground2};background-color:${colorPalettePumpkinBackground2}}:host(:is([state--peach],:state(peach))){color:${colorPalettePeachForeground2};background-color:${colorPalettePeachBackground2}}:host(:is([state--marigold],:state(marigold))){color:${colorPaletteMarigoldForeground2};background-color:${colorPaletteMarigoldBackground2}}:host(:is([state--gold],:state(gold))){color:${colorPaletteGoldForeground2};background-color:${colorPaletteGoldBackground2}}:host(:is([state--brass],:state(brass))){color:${colorPaletteBrassForeground2};background-color:${colorPaletteBrassBackground2}}:host(:is([state--brown],:state(brown))){color:${colorPaletteBrownForeground2};background-color:${colorPaletteBrownBackground2}}:host(:is([state--forest],:state(forest))){color:${colorPaletteForestForeground2};background-color:${colorPaletteForestBackground2}}:host(:is([state--seafoam],:state(seafoam))){color:${colorPaletteSeafoamForeground2};background-color:${colorPaletteSeafoamBackground2}}:host(:is([state--dark-green],:state(dark-green))){color:${colorPaletteDarkGreenForeground2};background-color:${colorPaletteDarkGreenBackground2}}:host(:is([state--light-teal],:state(light-teal))){color:${colorPaletteLightTealForeground2};background-color:${colorPaletteLightTealBackground2}}:host(:is([state--teal],:state(teal))){color:${colorPaletteTealForeground2};background-color:${colorPaletteTealBackground2}}:host(:is([state--steel],:state(steel))){color:${colorPaletteSteelForeground2};background-color:${colorPaletteSteelBackground2}}:host(:is([state--blue],:state(blue))){color:${colorPaletteBlueForeground2};background-color:${colorPaletteBlueBackground2}}:host(:is([state--royal-blue],:state(royal-blue))){color:${colorPaletteRoyalBlueForeground2};background-color:${colorPaletteRoyalBlueBackground2}}:host(:is([state--cornflower],:state(cornflower))){color:${colorPaletteCornflowerForeground2};background-color:${colorPaletteCornflowerBackground2}}:host(:is([state--navy],:state(navy))){color:${colorPaletteNavyForeground2};background-color:${colorPaletteNavyBackground2}}:host(:is([state--lavender],:state(lavender))){color:${colorPaletteLavenderForeground2};background-color:${colorPaletteLavenderBackground2}}:host(:is([state--purple],:state(purple))){color:${colorPalettePurpleForeground2};background-color:${colorPalettePurpleBackground2}}:host(:is([state--grape],:state(grape))){color:${colorPaletteGrapeForeground2};background-color:${colorPaletteGrapeBackground2}}:host(:is([state--lilac],:state(lilac))){color:${colorPaletteLilacForeground2};background-color:${colorPaletteLilacBackground2}}:host(:is([state--pink],:state(pink))){color:${colorPalettePinkForeground2};background-color:${colorPalettePinkBackground2}}:host(:is([state--magenta],:state(magenta))){color:${colorPaletteMagentaForeground2};background-color:${colorPaletteMagentaBackground2}}:host(:is([state--plum],:state(plum))){color:${colorPalettePlumForeground2};background-color:${colorPalettePlumBackground2}}:host(:is([state--beige],:state(beige))){color:${colorPaletteBeigeForeground2};background-color:${colorPaletteBeigeBackground2}}:host(:is([state--mink],:state(mink))){color:${colorPaletteMinkForeground2};background-color:${colorPaletteMinkBackground2}}:host(:is([state--platinum],:state(platinum))){color:${colorPalettePlatinumForeground2};background-color:${colorPalettePlatinumBackground2}}:host(:is([state--anchor],:state(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}}`;
|
|
4648
4649
|
|
|
4649
4650
|
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>`;
|
|
4650
4651
|
function avatarTemplate() {
|
|
4651
4652
|
return html`<slot>${x => x.name || x.initials ? x.generateInitials() : defaultIconTemplate}</slot><slot name="badge"></slot>`;
|
|
4652
4653
|
}
|
|
4653
|
-
const template$
|
|
4654
|
+
const template$w = avatarTemplate();
|
|
4654
4655
|
|
|
4655
|
-
const definition$
|
|
4656
|
+
const definition$w = Avatar.compose({
|
|
4656
4657
|
name: `${FluentDesignSystem.prefix}-avatar`,
|
|
4657
|
-
template: template$
|
|
4658
|
-
styles: styles$
|
|
4658
|
+
template: template$w,
|
|
4659
|
+
styles: styles$u
|
|
4659
4660
|
});
|
|
4660
4661
|
|
|
4661
|
-
definition$
|
|
4662
|
+
definition$w.define(FluentDesignSystem.registry);
|
|
4662
4663
|
|
|
4663
4664
|
const BadgeAppearance = {
|
|
4664
4665
|
filled: "filled",
|
|
@@ -5058,7 +5059,7 @@ css.partial`
|
|
|
5058
5059
|
line-height: ${lineHeightBase100};
|
|
5059
5060
|
font-weight: ${fontWeightSemibold};
|
|
5060
5061
|
`;
|
|
5061
|
-
css.partial`
|
|
5062
|
+
const typographySubtitle1Styles = css.partial`
|
|
5062
5063
|
font-family: ${fontFamilyBase};
|
|
5063
5064
|
font-size: ${fontSizeBase500};
|
|
5064
5065
|
line-height: ${lineHeightBase500};
|
|
@@ -5107,7 +5108,7 @@ css.partial`
|
|
|
5107
5108
|
font-weight: ${fontWeightSemibold};
|
|
5108
5109
|
`;
|
|
5109
5110
|
|
|
5110
|
-
const styles$
|
|
5111
|
+
const styles$t = css`
|
|
5111
5112
|
:host(${squareState}){border-radius:${borderRadiusNone}}:host(${roundedState}){border-radius:${borderRadiusMedium}}:host(${roundedState}${tinyState}),:host(${roundedState}${extraSmallState}),:host(${roundedState}${smallState}){border-radius:${borderRadiusSmall}}${badgeSizeStyles}
|
|
5112
5113
|
${badgeFilledStyles}
|
|
5113
5114
|
${badgeGhostStyles}
|
|
@@ -5120,15 +5121,15 @@ const styles$s = css`
|
|
|
5120
5121
|
function badgeTemplate(options = {}) {
|
|
5121
5122
|
return html` ${startSlotTemplate(options)}<slot>${staticallyCompose(options.defaultContent)}</slot>${endSlotTemplate(options)} `;
|
|
5122
5123
|
}
|
|
5123
|
-
const template$
|
|
5124
|
+
const template$v = badgeTemplate();
|
|
5124
5125
|
|
|
5125
|
-
const definition$
|
|
5126
|
+
const definition$v = Badge.compose({
|
|
5126
5127
|
name: `${FluentDesignSystem.prefix}-badge`,
|
|
5127
|
-
template: template$
|
|
5128
|
-
styles: styles$
|
|
5128
|
+
template: template$v,
|
|
5129
|
+
styles: styles$t
|
|
5129
5130
|
});
|
|
5130
5131
|
|
|
5131
|
-
definition$
|
|
5132
|
+
definition$v.define(FluentDesignSystem.registry);
|
|
5132
5133
|
|
|
5133
5134
|
var __defProp$o = Object.defineProperty;
|
|
5134
5135
|
var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
|
|
@@ -5431,15 +5432,15 @@ applyMixins(Button, StartEnd);
|
|
|
5431
5432
|
function buttonTemplate$1(options = {}) {
|
|
5432
5433
|
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>`;
|
|
5433
5434
|
}
|
|
5434
|
-
const template$
|
|
5435
|
+
const template$u = buttonTemplate$1();
|
|
5435
5436
|
|
|
5436
|
-
const definition$
|
|
5437
|
+
const definition$u = Button.compose({
|
|
5437
5438
|
name: `${FluentDesignSystem.prefix}-button`,
|
|
5438
|
-
template: template$
|
|
5439
|
-
styles: styles$
|
|
5439
|
+
template: template$u,
|
|
5440
|
+
styles: styles$w
|
|
5440
5441
|
});
|
|
5441
5442
|
|
|
5442
|
-
definition$
|
|
5443
|
+
definition$u.define(FluentDesignSystem.registry);
|
|
5443
5444
|
|
|
5444
5445
|
var __defProp$n = Object.defineProperty;
|
|
5445
5446
|
var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
|
|
@@ -5878,7 +5879,7 @@ __decorateClass$n([attr], Checkbox.prototype, "shape", 2);
|
|
|
5878
5879
|
__decorateClass$n([attr], Checkbox.prototype, "size", 2);
|
|
5879
5880
|
|
|
5880
5881
|
const indeterminateState = css.partial`:is([state--indeterminate], :state(indeterminate))`;
|
|
5881
|
-
const styles$
|
|
5882
|
+
const styles$s = css`
|
|
5882
5883
|
${display("inline-flex")}
|
|
5883
5884
|
|
|
5884
5885
|
:host{--size:16px;background-color:${colorNeutralBackground1};border-radius:${borderRadiusSmall};border:${strokeWidthThin} solid ${colorNeutralStrokeAccessible};box-sizing:border-box;cursor:pointer;position:relative;width:var(--size)}:host,.indeterminate-indicator,.checked-indicator{aspect-ratio:1}:host(:hover){border-color:${colorNeutralStrokeAccessibleHover}}:host(:active){border-color:${colorNeutralStrokeAccessiblePressed}}:host(${checkedState}:hover){background-color:${colorCompoundBrandBackgroundHover};border-color:${colorCompoundBrandStrokeHover}}:host(${checkedState}:active){background-color:${colorCompoundBrandBackgroundPressed};border-color:${colorCompoundBrandStrokePressed}}:host(:focus-visible){outline:none}:host(:not([slot='input']))::after{content:'';position:absolute;inset:-8px;box-sizing:border-box;outline:none;border:${strokeWidthThick} solid ${colorTransparentStroke};border-radius:${borderRadiusMedium}}:host(:not([slot='input']):focus-visible)::after{border-color:${colorStrokeFocus2}}.indeterminate-indicator,.checked-indicator{color:${colorNeutralForegroundInverted};inset:0;margin:auto;position:absolute}::slotted([slot='checked-indicator']),.checked-indicator{fill:currentColor;display:inline-flex;flex:1 0 auto;width:12px}:host(:not(${checkedState})) *:is(::slotted([slot='checked-indicator']),.checked-indicator){display:none}:host(${checkedState}),:host(${indeterminateState}){border-color:${colorCompoundBrandStroke}}:host(${checkedState}),:host(${indeterminateState}) .indeterminate-indicator{background-color:${colorCompoundBrandBackground}}:host(${indeterminateState}) .indeterminate-indicator{border-radius:${borderRadiusSmall};position:absolute;width:calc(var(--size) / 2);inset:0}:host(${largeState}){--size:20px}:host(${largeState}) ::slotted([slot='checked-indicator']),:host(${largeState}) .checked-indicator{width:16px}:host(${circularState}),:host(${circularState}) .indeterminate-indicator{border-radius:${borderRadiusCircular}}:host([disabled]),:host([disabled]${checkedState}){background-color:${colorNeutralBackgroundDisabled};border-color:${colorNeutralStrokeDisabled}}:host([disabled]){cursor:unset}:host([disabled]${indeterminateState}) .indeterminate-indicator{background-color:${colorNeutralStrokeDisabled}}:host([disabled]${checkedState}) .checked-indicator{color:${colorNeutralStrokeDisabled}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
@@ -5904,23 +5905,23 @@ const indeterminateIndicator = html.partial( /* html */
|
|
|
5904
5905
|
function checkboxTemplate(options = {}) {
|
|
5905
5906
|
return html`<template tabindex="${x => !x.disabled ? 0 : void 0}" @click="${(x, c) => x.clickHandler(c.event)}" @input="${(x, c) => x.inputHandler(c.event)}" @keydown="${(x, c) => x.keydownHandler(c.event)}" @keyup="${(x, c) => x.keyupHandler(c.event)}"><slot name="checked-indicator">${staticallyCompose(options.checkedIndicator)}</slot><slot name="indeterminate-indicator">${staticallyCompose(options.indeterminateIndicator)}</slot></template>`;
|
|
5906
5907
|
}
|
|
5907
|
-
const template$
|
|
5908
|
+
const template$t = checkboxTemplate({
|
|
5908
5909
|
checkedIndicator: checkedIndicator$1,
|
|
5909
5910
|
indeterminateIndicator
|
|
5910
5911
|
});
|
|
5911
5912
|
|
|
5912
|
-
const definition$
|
|
5913
|
+
const definition$t = Checkbox.compose({
|
|
5913
5914
|
name: `${FluentDesignSystem.prefix}-checkbox`,
|
|
5914
|
-
template: template$
|
|
5915
|
-
styles: styles$
|
|
5915
|
+
template: template$t,
|
|
5916
|
+
styles: styles$s
|
|
5916
5917
|
});
|
|
5917
5918
|
|
|
5918
|
-
definition$
|
|
5919
|
+
definition$t.define(FluentDesignSystem.registry);
|
|
5919
5920
|
|
|
5920
5921
|
class CompoundButton extends Button {}
|
|
5921
5922
|
|
|
5922
|
-
const styles$
|
|
5923
|
-
${styles$
|
|
5923
|
+
const styles$r = css`
|
|
5924
|
+
${styles$w}
|
|
5924
5925
|
|
|
5925
5926
|
:host,:host(:is([size])){gap:12px;height:auto;padding-top:14px;padding-inline:12px;padding-bottom:16px;font-size:${fontSizeBase300};line-height:${lineHeightBase300}}.content{display:flex;flex-direction:column;text-align:start}::slotted([slot='description']){color:${colorNeutralForeground2};line-height:100%;font-size:${fontSizeBase200};font-weight:${fontWeightRegular}}::slotted(svg),:host(${largeState}) ::slotted(svg){font-size:40px;height:40px;width:40px}:host(:hover) ::slotted([slot='description']){color:${colorNeutralForeground2Hover}}:host(:active) ::slotted([slot='description']){color:${colorNeutralForeground2Pressed}}:host(:is(${primaryState},${primaryState}:hover,${primaryState}:active)) ::slotted([slot='description']){color:${colorNeutralForegroundOnBrand}}:host(:is(${subtleState},${subtleState}:hover,${subtleState}:active)) ::slotted([slot='description']),:host(${transparentState}) ::slotted([slot='description']){color:${colorNeutralForeground2}}:host(${transparentState}:hover) ::slotted([slot='description']){color:${colorNeutralForeground2BrandHover}}:host(${transparentState}:active) ::slotted([slot='description']){color:${colorNeutralForeground2BrandPressed}}:host(:is(:disabled,:disabled[appearance],[disabled-focusable],[disabled-focusable][appearance]))
|
|
5926
5927
|
::slotted([slot='description']){color:${colorNeutralForegroundDisabled}}:host(${smallState}){padding:8px;padding-bottom:10px}:host(${iconOnlyState}){min-width:52px;max-width:52px;padding:${spacingHorizontalSNudge}}:host(${iconOnlyState}${smallState}){min-width:48px;max-width:48px;padding:${spacingHorizontalXS}}:host(${iconOnlyState}${largeState}){min-width:56px;max-width:56px;padding:${spacingHorizontalS}}:host(${largeState}){padding-top:18px;padding-inline:16px;padding-bottom:20px;font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host(${largeState}) ::slotted([slot='description']){font-size:${fontSizeBase300}}`;
|
|
@@ -5928,15 +5929,15 @@ const styles$q = css`
|
|
|
5928
5929
|
function buttonTemplate(options = {}) {
|
|
5929
5930
|
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>`;
|
|
5930
5931
|
}
|
|
5931
|
-
const template$
|
|
5932
|
+
const template$s = buttonTemplate();
|
|
5932
5933
|
|
|
5933
|
-
const definition$
|
|
5934
|
+
const definition$s = CompoundButton.compose({
|
|
5934
5935
|
name: `${FluentDesignSystem.prefix}-compound-button`,
|
|
5935
|
-
template: template$
|
|
5936
|
-
styles: styles$
|
|
5936
|
+
template: template$s,
|
|
5937
|
+
styles: styles$r
|
|
5937
5938
|
});
|
|
5938
5939
|
|
|
5939
|
-
definition$
|
|
5940
|
+
definition$s.define(FluentDesignSystem.registry);
|
|
5940
5941
|
|
|
5941
5942
|
var __defProp$m = Object.defineProperty;
|
|
5942
5943
|
var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
|
|
@@ -6061,7 +6062,7 @@ __decorateClass$m([attr({
|
|
|
6061
6062
|
applyMixins(CounterBadge, StartEnd);
|
|
6062
6063
|
|
|
6063
6064
|
const dotState = css.partial`:is([state--dot], :state(dot))`;
|
|
6064
|
-
const styles$
|
|
6065
|
+
const styles$q = css`
|
|
6065
6066
|
:host(${roundedState}){border-radius:${borderRadiusMedium}}:host(${roundedState}${tinyState}),:host(${roundedState}${extraSmallState}),:host(${roundedState}${smallState}){border-radius:${borderRadiusSmall}}${badgeSizeStyles}
|
|
6066
6067
|
${badgeFilledStyles}
|
|
6067
6068
|
${badgeGhostStyles}
|
|
@@ -6074,15 +6075,15 @@ function composeTemplate(options = {}) {
|
|
|
6074
6075
|
defaultContent: html`${x => x.setCount()}`
|
|
6075
6076
|
});
|
|
6076
6077
|
}
|
|
6077
|
-
const template$
|
|
6078
|
+
const template$r = composeTemplate();
|
|
6078
6079
|
|
|
6079
|
-
const definition$
|
|
6080
|
+
const definition$r = CounterBadge.compose({
|
|
6080
6081
|
name: `${FluentDesignSystem.prefix}-counter-badge`,
|
|
6081
|
-
template: template$
|
|
6082
|
-
styles: styles$
|
|
6082
|
+
template: template$r,
|
|
6083
|
+
styles: styles$q
|
|
6083
6084
|
});
|
|
6084
6085
|
|
|
6085
|
-
definition$
|
|
6086
|
+
definition$r.define(FluentDesignSystem.registry);
|
|
6086
6087
|
|
|
6087
6088
|
const DialogType = {
|
|
6088
6089
|
modal: "modal",
|
|
@@ -6172,19 +6173,19 @@ __decorateClass$l([attr({
|
|
|
6172
6173
|
})], Dialog.prototype, "ariaLabelledby", 2);
|
|
6173
6174
|
__decorateClass$l([attr], Dialog.prototype, "type", 2);
|
|
6174
6175
|
|
|
6175
|
-
const template$
|
|
6176
|
+
const template$q = html`<dialog role="${x => x.type === DialogType.alert ? "alertdialog" : "dialog"}" type="${x => x.type}" class="dialog" part="dialog" aria-modal="${x => x.type === DialogType.modal || x.type === DialogType.alert ? "true" : void 0}" aria-describedby="${x => x.ariaDescribedby}" aria-labelledby="${x => x.ariaLabelledby}" aria-label="${x => x.ariaLabel}" @click="${(x, c) => x.clickHandler(c.event)}" @cancel="${(x, c) => x.type === DialogType.alert ? c.event.preventDefault() : x.hide()}" ${ref("dialog")}><slot></slot></dialog>`;
|
|
6176
6177
|
|
|
6177
|
-
const styles$
|
|
6178
|
+
const styles$p = css`
|
|
6178
6179
|
@layer base{:host{--dialog-backdrop:${colorBackgroundOverlay};--dialog-starting-scale:0.85}::backdrop{background:var(--dialog-backdrop,rgba(0,0,0,0.4))}dialog{background:${colorNeutralBackground1};border-radius:${borderRadiusXLarge};border:none;box-shadow:${shadow64};color:${colorNeutralForeground1};max-height:calc(-48px + 100vh);padding:0;width:100%;max-width:600px}:host([type='non-modal']) dialog{inset:0;position:fixed;z-index:2;overflow:auto}}@layer animations{@media (prefers-reduced-motion:no-preference){dialog,::backdrop{transition:display allow-discrete,opacity,overlay allow-discrete,scale;transition-duration:${durationGentle};transition-timing-function:${curveDecelerateMid};opacity:0}::backdrop{transition-timing-function:${curveLinear}}[open],[open]::backdrop{opacity:1}dialog:not([open]){scale:var(--dialog-starting-scale);transition-timing-function:${curveAccelerateMid}}}@starting-style{[open],[open]::backdrop{opacity:0}dialog{scale:var(--dialog-starting-scale)}}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
6179
6180
|
@layer base{dialog{border:${strokeWidthThin} solid ${colorTransparentStroke}}}`));
|
|
6180
6181
|
|
|
6181
|
-
const definition$
|
|
6182
|
+
const definition$q = Dialog.compose({
|
|
6182
6183
|
name: `${FluentDesignSystem.prefix}-dialog`,
|
|
6183
|
-
template: template$
|
|
6184
|
-
styles: styles$
|
|
6184
|
+
template: template$q,
|
|
6185
|
+
styles: styles$p
|
|
6185
6186
|
});
|
|
6186
6187
|
|
|
6187
|
-
definition$
|
|
6188
|
+
definition$q.define(FluentDesignSystem.registry);
|
|
6188
6189
|
|
|
6189
6190
|
var __defProp$k = Object.defineProperty;
|
|
6190
6191
|
var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
|
|
@@ -6219,20 +6220,20 @@ const dismissed16Regular = html.partial(`
|
|
|
6219
6220
|
fill="currentColor"
|
|
6220
6221
|
></path>
|
|
6221
6222
|
</svg>`);
|
|
6222
|
-
const template$
|
|
6223
|
+
const template$p = html`<div class="title" part="title"><slot name="title"></slot><slot name="title-action"><fluent-button ?hidden=${x => x.noTitleAction || x.parentNode?.type === DialogType.alert} tabindex="0" part="title-action" class="title-action" appearance="transparent" icon-only @click=${x => x.parentNode?.hide()} ${ref("defaultTitleAction")}>${dismissed16Regular}</fluent-button></slot></div><div class="content" part="content"><slot></slot></div><div class="actions" part="actions"><slot name="action"></slot></div>`;
|
|
6223
6224
|
|
|
6224
|
-
const styles$
|
|
6225
|
+
const styles$o = css`
|
|
6225
6226
|
${display("grid")}
|
|
6226
6227
|
|
|
6227
6228
|
:host{background:${colorNeutralBackground1};box-sizing:border-box;gap:${spacingVerticalS};padding:${spacingVerticalXXL} ${spacingHorizontalXXL};container:dialog-body / inline-size}.title{box-sizing:border-box;align-items:flex-start;background:${colorNeutralBackground1};color:${colorNeutralForeground1};column-gap:8px;display:flex;font-family:${fontFamilyBase};font-size:${fontSizeBase500};font-weight:${fontWeightSemibold};inset-block-start:0;justify-content:space-between;line-height:${lineHeightBase500};margin-block-end:calc(${spacingVerticalS} * -1);margin-block-start:calc(${spacingVerticalXXL} * -1);padding-block-end:${spacingVerticalS};padding-block-start:${spacingVerticalXXL};position:sticky;z-index:1}.content{box-sizing:border-box;color:${colorNeutralForeground1};font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};line-height:${lineHeightBase300};min-height:32px}.actions{box-sizing:border-box;background:${colorNeutralBackground1};display:flex;flex-direction:column;gap:${spacingVerticalS};inset-block-end:0;margin-block-end:calc(${spacingVerticalXXL} * -1);padding-block-end:${spacingVerticalXXL};padding-block-start:${spacingVerticalL};position:sticky;z-index:2}:not(:has(:is([slot='title'],[slot='title-action']))) .title:not(:has(.title-action)),:not(:has([slot='action'])) .actions{display:none}@container (min-width:480px){.actions{align-items:center;flex-direction:row;justify-content:flex-end;margin-block-start:calc(${spacingVerticalS} * -1);padding-block-start:${spacingVerticalS}}}`;
|
|
6228
6229
|
|
|
6229
|
-
const definition$
|
|
6230
|
+
const definition$p = DialogBody.compose({
|
|
6230
6231
|
name: `${FluentDesignSystem.prefix}-dialog-body`,
|
|
6231
|
-
template: template$
|
|
6232
|
-
styles: styles$
|
|
6232
|
+
template: template$p,
|
|
6233
|
+
styles: styles$o
|
|
6233
6234
|
});
|
|
6234
6235
|
|
|
6235
|
-
definition$
|
|
6236
|
+
definition$p.define(FluentDesignSystem.registry);
|
|
6236
6237
|
|
|
6237
6238
|
const DividerRole = {
|
|
6238
6239
|
/**
|
|
@@ -6351,21 +6352,21 @@ __decorateClass$j([attr({
|
|
|
6351
6352
|
function dividerTemplate() {
|
|
6352
6353
|
return html`<slot></slot>`;
|
|
6353
6354
|
}
|
|
6354
|
-
const template$
|
|
6355
|
+
const template$o = dividerTemplate();
|
|
6355
6356
|
|
|
6356
|
-
const styles$
|
|
6357
|
+
const styles$n = css`
|
|
6357
6358
|
${display("flex")}
|
|
6358
6359
|
|
|
6359
6360
|
:host{contain:content}:host::after,:host::before{align-self:center;background:${colorNeutralStroke2};box-sizing:border-box;content:'';display:flex;flex-grow:1;height:${strokeWidthThin}}:host(${insetState}){padding:0 12px}:host ::slotted(*){color:${colorNeutralForeground2};font-family:${fontFamilyBase};font-size:${fontSizeBase200};font-weight:${fontWeightRegular};margin:0;padding:0 12px}:host(${alignStartState})::before,:host(${alignEndState})::after{flex-basis:12px;flex-grow:0;flex-shrink:0}:host(${verticalState}){height:100%;min-height:84px}:host(${verticalState}):empty{min-height:20px}:host(${verticalState}){flex-direction:column;align-items:center}:host(${verticalState}${insetState})::before{margin-top:12px}:host(${verticalState}${insetState})::after{margin-bottom:12px}:host(${verticalState}):empty::before,:host(${verticalState}):empty::after{height:10px;min-height:10px;flex-grow:0}:host(${verticalState})::before,:host(${verticalState})::after{width:${strokeWidthThin};min-height:20px;height:100%}:host(${verticalState}) ::slotted(*){display:flex;flex-direction:column;padding:12px 0;line-height:20px}:host(${verticalState}${alignStartState})::before{min-height:8px}:host(${verticalState}${alignEndState})::after{min-height:8px}:host(${strongState})::before,:host(${strongState})::after{background:${colorNeutralStroke1}}:host(${strongState}) ::slotted(*){color:${colorNeutralForeground1}}:host(${brandState})::before,:host(${brandState})::after{background:${colorBrandStroke1}}:host(${brandState}) ::slotted(*){color:${colorBrandForeground1}}:host(${subtleState})::before,:host(${subtleState})::after{background:${colorNeutralStroke3}}:host(${subtleState}) ::slotted(*){color:${colorNeutralForeground3}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
6360
6361
|
:host(${strongState})::before,:host(${strongState})::after,:host(${brandState})::before,:host(${brandState})::after,:host(${subtleState})::before,:host(${subtleState})::after,:host::after,:host::before{background:WindowText;color:WindowText}`));
|
|
6361
6362
|
|
|
6362
|
-
const definition$
|
|
6363
|
+
const definition$o = Divider.compose({
|
|
6363
6364
|
name: `${FluentDesignSystem.prefix}-divider`,
|
|
6364
|
-
template: template$
|
|
6365
|
-
styles: styles$
|
|
6365
|
+
template: template$o,
|
|
6366
|
+
styles: styles$n
|
|
6366
6367
|
});
|
|
6367
6368
|
|
|
6368
|
-
definition$
|
|
6369
|
+
definition$o.define(FluentDesignSystem.registry);
|
|
6369
6370
|
|
|
6370
6371
|
const DrawerPosition = {
|
|
6371
6372
|
start: "start",
|
|
@@ -6471,7 +6472,7 @@ __decorateClass$i([attr({
|
|
|
6471
6472
|
})], Drawer.prototype, "size", 2);
|
|
6472
6473
|
__decorateClass$i([observable], Drawer.prototype, "dialog", 2);
|
|
6473
6474
|
|
|
6474
|
-
const styles$
|
|
6475
|
+
const styles$m = css`
|
|
6475
6476
|
${display("block")}
|
|
6476
6477
|
|
|
6477
6478
|
:host{--dialog-backdrop:${colorBackgroundOverlay}}:host([type='non-modal']) dialog[open]::backdrop{display:none}:host([type='non-modal']) dialog{position:fixed;top:0;bottom:0}:host([type='inline']){height:100%;width:fit-content}:host([type='inline']) dialog[open]{box-shadow:none;position:relative}:host([size='small']) dialog{width:320px;max-width:320px}:host([size='large']) dialog{width:940px;max-width:940px}:host([size='full']) dialog{width:100%;max-width:100%}:host([position='end']) dialog{margin-inline-start:auto;margin-inline-end:0}dialog{box-sizing:border-box;z-index:var(--drawer-elevation,1000);font-size:${fontSizeBase300};line-height:${lineHeightBase300};font-family:${fontFamilyBase};font-weight:${fontWeightRegular};color:${colorNeutralForeground1};max-width:var(--drawer-width,592px);max-height:100vh;height:100%;margin-inline-start:0;margin-inline-end:auto;border-inline-end-color:${colorTransparentStroke};border-inline-start-color:var(--drawer-separator,${colorTransparentStroke});outline:none;top:0;bottom:0;width:var(--drawer-width,592px);border-radius:0;padding:0;max-width:var(--drawer-width,592px);box-shadow:${shadow64};border:${strokeWidthThin} solid ${colorTransparentStroke};background:${colorNeutralBackground1}}dialog::backdrop{background:var(--dialog-backdrop)}@layer animations{@media (prefers-reduced-motion:no-preference){dialog{transition:display allow-discrete,opacity,overlay allow-discrete,transform;transition-duration:${durationGentle};transition-timing-function:${curveDecelerateMid}}:host dialog:not([open]){transform:translateX(-100%);transition-timing-function:${curveAccelerateMid}}:host([position='end']) dialog:not([open]){transform:translateX(100%);transition-timing-function:${curveAccelerateMid}}dialog[open]{transform:translateX(0)}dialog::backdrop{transition:display allow-discrete,opacity,overlay allow-discrete,scale;transition-duration:${durationGentle};transition-timing-function:${curveDecelerateMid};background:var(--dialog-backdrop,${colorBackgroundOverlay});opacity:0}dialog[open]::backdrop{opacity:1}dialog::backdrop{transition-timing-function:${curveLinear}}}@starting-style{dialog[open]{transform:translateX(-100%)}:host([position='end']) dialog[open]{transform:translateX(100%)}dialog[open]::backdrop{opacity:0}}}`;
|
|
@@ -6479,10 +6480,29 @@ const styles$l = css`
|
|
|
6479
6480
|
function drawerTemplate() {
|
|
6480
6481
|
return html`<dialog class="dialog" part="dialog" role="${x => x.type === "modal" ? "dialog" : x.role}" aria-modal="${x => x.type === "modal" ? "true" : void 0}" aria-describedby="${x => x.ariaDescribedby}" aria-labelledby="${x => x.ariaLabelledby}" aria-label="${x => x.ariaLabel}" size="${x => x.size}" position="${x => x.position}" type="${x => x.type}" @click="${(x, c) => x.clickHandler(c.event)}" @cancel="${(x, c) => x.hide()}" ${ref("dialog")}><slot></slot></dialog>`;
|
|
6481
6482
|
}
|
|
6482
|
-
const template$
|
|
6483
|
+
const template$n = drawerTemplate();
|
|
6483
6484
|
|
|
6484
|
-
const definition$
|
|
6485
|
+
const definition$n = Drawer.compose({
|
|
6485
6486
|
name: `${FluentDesignSystem.prefix}-drawer`,
|
|
6487
|
+
template: template$n,
|
|
6488
|
+
styles: styles$m
|
|
6489
|
+
});
|
|
6490
|
+
|
|
6491
|
+
definition$n.define(FluentDesignSystem.registry);
|
|
6492
|
+
|
|
6493
|
+
class DrawerBody extends FASTElement {}
|
|
6494
|
+
|
|
6495
|
+
const styles$l = css`
|
|
6496
|
+
${display("grid")}
|
|
6497
|
+
:host{box-sizing:border-box;grid-template-rows:min-content auto min-content;position:relative;height:100%;padding:${spacingHorizontalXL};max-height:100svh}.header{display:flex;justify-content:space-between;align-items:center;${typographySubtitle1Styles}}.footer{display:flex;justify-content:flex-start;gap:${spacingHorizontalM}}`;
|
|
6498
|
+
|
|
6499
|
+
function drawerBodyTemplate() {
|
|
6500
|
+
return html`<div class="header" part="header"><slot name="title"></slot><slot name="close"></slot></div><div class="content" part="content"><slot></slot></div><div class="footer" part="footer"><slot name="footer"></slot></div>`;
|
|
6501
|
+
}
|
|
6502
|
+
const template$m = drawerBodyTemplate();
|
|
6503
|
+
|
|
6504
|
+
const definition$m = DrawerBody.compose({
|
|
6505
|
+
name: `${FluentDesignSystem.prefix}-drawer-body`,
|
|
6486
6506
|
template: template$m,
|
|
6487
6507
|
styles: styles$l
|
|
6488
6508
|
});
|
|
@@ -6981,7 +7001,7 @@ const template$h = buttonTemplate$1({
|
|
|
6981
7001
|
const definition$h = MenuButton.compose({
|
|
6982
7002
|
name: `${FluentDesignSystem.prefix}-menu-button`,
|
|
6983
7003
|
template: template$h,
|
|
6984
|
-
styles: styles$
|
|
7004
|
+
styles: styles$w
|
|
6985
7005
|
});
|
|
6986
7006
|
|
|
6987
7007
|
definition$h.define(FluentDesignSystem.registry);
|
|
@@ -7014,9 +7034,16 @@ var __decorateClass$d = (decorators, target, key, kind) => {
|
|
|
7014
7034
|
if (kind && result) __defProp$d(target, key, result);
|
|
7015
7035
|
return result;
|
|
7016
7036
|
};
|
|
7037
|
+
const menuFilter = () => value => value.nodeType === 1 && value.elementInternals.role === "menu";
|
|
7017
7038
|
class MenuItem extends FASTElement {
|
|
7018
7039
|
constructor() {
|
|
7019
7040
|
super(...arguments);
|
|
7041
|
+
/**
|
|
7042
|
+
* The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
7043
|
+
*
|
|
7044
|
+
* @internal
|
|
7045
|
+
*/
|
|
7046
|
+
this.elementInternals = this.attachInternals();
|
|
7020
7047
|
this.role = MenuItemRole.menuitem;
|
|
7021
7048
|
this.checked = false;
|
|
7022
7049
|
/**
|
|
@@ -7040,6 +7067,7 @@ class MenuItem extends FASTElement {
|
|
|
7040
7067
|
case keyArrowLeft:
|
|
7041
7068
|
if (this.parentElement?.hasAttribute("popover")) {
|
|
7042
7069
|
this.parentElement.togglePopover(false);
|
|
7070
|
+
this.parentElement.parentElement?.focus();
|
|
7043
7071
|
}
|
|
7044
7072
|
return false;
|
|
7045
7073
|
}
|
|
@@ -7082,11 +7110,11 @@ class MenuItem extends FASTElement {
|
|
|
7082
7110
|
this.toggleHandler = e => {
|
|
7083
7111
|
if (e instanceof ToggleEvent && e.newState === "open") {
|
|
7084
7112
|
this.setAttribute("tabindex", "-1");
|
|
7085
|
-
this.
|
|
7113
|
+
this.elementInternals.ariaExpanded = "true";
|
|
7086
7114
|
this.setSubmenuPosition();
|
|
7087
7115
|
}
|
|
7088
7116
|
if (e instanceof ToggleEvent && e.newState === "closed") {
|
|
7089
|
-
this.
|
|
7117
|
+
this.elementInternals.ariaExpanded = "false";
|
|
7090
7118
|
this.setAttribute("tabindex", "0");
|
|
7091
7119
|
}
|
|
7092
7120
|
};
|
|
@@ -7137,7 +7165,32 @@ class MenuItem extends FASTElement {
|
|
|
7137
7165
|
}
|
|
7138
7166
|
};
|
|
7139
7167
|
}
|
|
7140
|
-
|
|
7168
|
+
/**
|
|
7169
|
+
* Handles changes to disabled attribute custom states and element internals
|
|
7170
|
+
* @param prev - the previous state
|
|
7171
|
+
* @param next - the next state
|
|
7172
|
+
*/
|
|
7173
|
+
disabledChanged(prev, next) {
|
|
7174
|
+
this.elementInternals.ariaDisabled = !!next ? `${next}` : null;
|
|
7175
|
+
toggleState(this.elementInternals, "disabled", next);
|
|
7176
|
+
}
|
|
7177
|
+
/**
|
|
7178
|
+
* Handles changes to role attribute element internals properties
|
|
7179
|
+
* @param prev - the previous state
|
|
7180
|
+
* @param next - the next state
|
|
7181
|
+
*/
|
|
7182
|
+
roleChanged(prev, next) {
|
|
7183
|
+
this.elementInternals.role = next ?? MenuItemRole.menuitem;
|
|
7184
|
+
}
|
|
7185
|
+
/**
|
|
7186
|
+
* Handles changes to checked attribute custom states and element internals
|
|
7187
|
+
* @param prev - the previous state
|
|
7188
|
+
* @param next - the next state
|
|
7189
|
+
*/
|
|
7190
|
+
checkedChanged(prev, next) {
|
|
7191
|
+
const checkableMenuItem = this.role !== MenuItemRole.menuitem;
|
|
7192
|
+
this.elementInternals.ariaChecked = checkableMenuItem ? `${!!next}` : null;
|
|
7193
|
+
toggleState(this.elementInternals, "checked", checkableMenuItem ? next : false);
|
|
7141
7194
|
if (this.$fastController.isConnected) {
|
|
7142
7195
|
this.$emit("change");
|
|
7143
7196
|
}
|
|
@@ -7153,8 +7206,18 @@ class MenuItem extends FASTElement {
|
|
|
7153
7206
|
this.submenu = next[0];
|
|
7154
7207
|
this.submenu.toggleAttribute("popover", true);
|
|
7155
7208
|
this.submenu.addEventListener("toggle", this.toggleHandler);
|
|
7209
|
+
this.elementInternals.ariaHasPopup = "menu";
|
|
7210
|
+
toggleState(this.elementInternals, "submenu", true);
|
|
7211
|
+
} else {
|
|
7212
|
+
this.elementInternals.ariaHasPopup = null;
|
|
7213
|
+
toggleState(this.elementInternals, "submenu", false);
|
|
7156
7214
|
}
|
|
7157
7215
|
}
|
|
7216
|
+
connectedCallback() {
|
|
7217
|
+
super.connectedCallback();
|
|
7218
|
+
this.elementInternals.role = this.role ?? MenuItemRole.menuitem;
|
|
7219
|
+
this.elementInternals.ariaChecked = this.role !== MenuItemRole.menuitem ? `${!!this.checked}` : null;
|
|
7220
|
+
}
|
|
7158
7221
|
}
|
|
7159
7222
|
__decorateClass$d([attr({
|
|
7160
7223
|
mode: "boolean"
|
|
@@ -7170,18 +7233,19 @@ __decorateClass$d([observable], MenuItem.prototype, "slottedSubmenu", 2);
|
|
|
7170
7233
|
__decorateClass$d([observable], MenuItem.prototype, "submenu", 2);
|
|
7171
7234
|
applyMixins(MenuItem, StartEnd);
|
|
7172
7235
|
|
|
7236
|
+
const submenuState = css.partial`:is([state--submenu], :state(submenu))`;
|
|
7173
7237
|
const styles$g = css`
|
|
7174
7238
|
${display("grid")}
|
|
7175
7239
|
|
|
7176
|
-
:host{--indent:0;align-items:center;background:${colorNeutralBackground1};border-radius:${borderRadiusMedium};color:${colorNeutralForeground2};contain:layout;cursor:pointer;flex-shrink:0;font:${fontWeightRegular} ${fontSizeBase300} / ${lineHeightBase300} ${fontFamilyBase};grid-gap:4px;grid-template-columns:20px 20px auto 20px;height:32px;overflow:visible;padding:0 10px}:host(:hover){background:${colorNeutralBackground1Hover};color:${colorNeutralForeground2Hover}}:host(
|
|
7177
|
-
:host(
|
|
7240
|
+
:host{--indent:0;align-items:center;background:${colorNeutralBackground1};border-radius:${borderRadiusMedium};color:${colorNeutralForeground2};contain:layout;cursor:pointer;flex-shrink:0;font:${fontWeightRegular} ${fontSizeBase300} / ${lineHeightBase300} ${fontFamilyBase};grid-gap:4px;grid-template-columns:20px 20px auto 20px;height:32px;overflow:visible;padding:0 10px}:host(:hover){background:${colorNeutralBackground1Hover};color:${colorNeutralForeground2Hover}}:host(:active){background-color:${colorNeutralBackground1Selected};color:${colorNeutralForeground2Pressed}}:host(:active) ::slotted([slot='start']){color:${colorCompoundBrandForeground1Pressed}}:host(${disabledState}){background-color:${colorNeutralBackgroundDisabled};color:${colorNeutralForegroundDisabled}}:host(${disabledState}) ::slotted([slot='start']),:host(${disabledState}) ::slotted([slot='end']){color:${colorNeutralForegroundDisabled}}:host(:focus-visible){border-radius:${borderRadiusMedium};outline:2px solid ${colorStrokeFocus2}}.content{white-space:nowrap;flex-grow:1;grid-column:auto / span 2;padding:0 2px}:host(:not(${checkedState})) .indicator,:host(:not(${checkedState})) ::slotted([slot='indicator']),:host(:not(${submenuState})) .submenu-glyph,:host(:not(${submenuState})) ::slotted([slot='submenu-glyph']){display:none}::slotted([slot='end']){color:${colorNeutralForeground3};font:${fontWeightRegular} ${fontSizeBase200} / ${lineHeightBase200} ${fontFamilyBase};white-space:nowrap}:host([data-indent='1']){--indent:1}:host([data-indent='2']){--indent:2;grid-template-columns:20px 20px auto auto}:host(${submenuState}){grid-template-columns:20px auto auto 20px}:host([data-indent='2']${submenuState}){grid-template-columns:20px 20px auto auto 20px}.indicator,::slotted([slot='indicator']){grid-column:1 / span 1;width:20px}::slotted([slot='start']){display:inline-flex;grid-column:calc(var(--indent)) / span 1}.content{grid-column:calc(var(--indent) + 1) / span 1}::slotted([slot='end']){grid-column:calc(var(--indent) + 2) / span 1;justify-self:end}.submenu-glyph,::slotted([slot='submenu-glyph']){grid-column:-2 / span 1;justify-self:end}@layer popover{:host{anchor-name:--menu-trigger;position:relative}::slotted([popover]){align-self:start;inset-area:inline-end span-block-end;margin:0;max-height:var(--menu-max-height,auto);position:absolute;position-anchor:--menu-trigger;position-try-options:flip-inline,inset-area(block-start);z-index:1}::slotted([popover]:not(:popover-open)){display:none}::slotted([popover]:popover-open){inset:unset}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
7241
|
+
:host(${disabledState}),:host(${disabledState}) ::slotted([slot='start']),:host(${disabledState}) ::slotted([slot='end']){color:GrayText}`));
|
|
7178
7242
|
|
|
7179
7243
|
const Checkmark16Filled = html.partial(`<svg class="indicator" fill="currentColor" 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>`);
|
|
7180
7244
|
const chevronRight16Filled = html.partial(`<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>`);
|
|
7181
7245
|
function menuItemTemplate(options = {}) {
|
|
7182
|
-
return html`<template
|
|
7246
|
+
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.toggleHandler(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({
|
|
7183
7247
|
property: "slottedSubmenu",
|
|
7184
|
-
filter:
|
|
7248
|
+
filter: menuFilter()
|
|
7185
7249
|
})}></slot></template>`;
|
|
7186
7250
|
}
|
|
7187
7251
|
const template$g = menuItemTemplate({
|
|
@@ -7207,7 +7271,13 @@ var __decorateClass$c = (decorators, target, key, kind) => {
|
|
|
7207
7271
|
};
|
|
7208
7272
|
const _MenuList = class _MenuList extends FASTElement {
|
|
7209
7273
|
constructor() {
|
|
7210
|
-
super(
|
|
7274
|
+
super();
|
|
7275
|
+
/**
|
|
7276
|
+
* The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
7277
|
+
*
|
|
7278
|
+
* @internal
|
|
7279
|
+
*/
|
|
7280
|
+
this.elementInternals = this.attachInternals();
|
|
7211
7281
|
/**
|
|
7212
7282
|
* The index of the focusable element in the items array
|
|
7213
7283
|
* defaults to -1
|
|
@@ -7287,6 +7357,7 @@ const _MenuList = class _MenuList extends FASTElement {
|
|
|
7287
7357
|
this.isFocusableElement = el => {
|
|
7288
7358
|
return this.isMenuItemElement(el);
|
|
7289
7359
|
};
|
|
7360
|
+
this.elementInternals.role = "menu";
|
|
7290
7361
|
}
|
|
7291
7362
|
itemsChanged(oldValue, newValue) {
|
|
7292
7363
|
if (this.$fastController.isConnected && this.menuItems !== void 0) {
|
|
@@ -7420,7 +7491,7 @@ const styles$f = css`
|
|
|
7420
7491
|
: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}`;
|
|
7421
7492
|
|
|
7422
7493
|
function menuTemplate$1() {
|
|
7423
|
-
return html`<template slot="${x => x.slot ? x.slot : x.isNestedMenu() ? "submenu" : void 0}"
|
|
7494
|
+
return html`<template slot="${x => x.slot ? x.slot : x.isNestedMenu() ? "submenu" : void 0}" @keydown="${(x, c) => x.handleMenuKeyDown(c.event)}" @focusout="${(x, c) => x.handleFocusOut(c.event)}"><slot ${slotted("items")}></slot></template>`;
|
|
7424
7495
|
}
|
|
7425
7496
|
const template$f = menuTemplate$1();
|
|
7426
7497
|
|
|
@@ -7721,19 +7792,19 @@ class Menu extends FASTElement {
|
|
|
7721
7792
|
}
|
|
7722
7793
|
}
|
|
7723
7794
|
}
|
|
7724
|
-
__decorateClass$b([
|
|
7795
|
+
__decorateClass$b([attr({
|
|
7725
7796
|
attribute: "open-on-hover",
|
|
7726
7797
|
mode: "boolean"
|
|
7727
7798
|
})], Menu.prototype, "openOnHover", 2);
|
|
7728
|
-
__decorateClass$b([
|
|
7799
|
+
__decorateClass$b([attr({
|
|
7729
7800
|
attribute: "open-on-context",
|
|
7730
7801
|
mode: "boolean"
|
|
7731
7802
|
})], Menu.prototype, "openOnContext", 2);
|
|
7732
|
-
__decorateClass$b([
|
|
7803
|
+
__decorateClass$b([attr({
|
|
7733
7804
|
attribute: "close-on-scroll",
|
|
7734
7805
|
mode: "boolean"
|
|
7735
7806
|
})], Menu.prototype, "closeOnScroll", 2);
|
|
7736
|
-
__decorateClass$b([
|
|
7807
|
+
__decorateClass$b([attr({
|
|
7737
7808
|
attribute: "persist-on-item-click",
|
|
7738
7809
|
mode: "boolean"
|
|
7739
7810
|
})], Menu.prototype, "persistOnItemClick", 2);
|
|
@@ -10621,7 +10692,7 @@ __decorateClass([attr({
|
|
|
10621
10692
|
})], ToggleButton.prototype, "mixed", 2);
|
|
10622
10693
|
|
|
10623
10694
|
const styles = css`
|
|
10624
|
-
${styles$
|
|
10695
|
+
${styles$w}
|
|
10625
10696
|
|
|
10626
10697
|
:host(${pressedState}){border-color:${colorNeutralStroke1};background-color:${colorNeutralBackground1Selected};color:${colorNeutralForeground1};border-width:${strokeWidthThin}}:host(${pressedState}:hover){border-color:${colorNeutralStroke1Hover};background-color:${colorNeutralBackground1Hover}}:host(${pressedState}:active){border-color:${colorNeutralStroke1Pressed};background-color:${colorNeutralBackground1Pressed}}:host(${pressedState}${primaryState}){border-color:transparent;background-color:${colorBrandBackgroundSelected};color:${colorNeutralForegroundOnBrand}}:host(${pressedState}${primaryState}:hover){background-color:${colorBrandBackgroundHover}}:host(${pressedState}${primaryState}:active){background-color:${colorBrandBackgroundPressed}}:host(${pressedState}${subtleState}){border-color:transparent;background-color:${colorSubtleBackgroundSelected};color:${colorNeutralForeground2Selected}}:host(${pressedState}${subtleState}:hover){background-color:${colorSubtleBackgroundHover};color:${colorNeutralForeground2Hover}}:host(${pressedState}${subtleState}:active){background-color:${colorSubtleBackgroundPressed};color:${colorNeutralForeground2Pressed}}:host(${pressedState}${outlineState}),:host(${pressedState}${transparentState}){background-color:${colorTransparentBackgroundSelected}}:host(${pressedState}${outlineState}:hover),:host(${pressedState}${transparentState}:hover){background-color:${colorTransparentBackgroundHover}}:host(${pressedState}${outlineState}:active),:host(${pressedState}${transparentState}:active){background-color:${colorTransparentBackgroundPressed}}:host(${pressedState}${transparentState}){border-color:transparent;color:${colorNeutralForeground2BrandSelected}}:host(${pressedState}${transparentState}:hover){color:${colorNeutralForeground2BrandHover}}:host(${pressedState}${transparentState}:active){color:${colorNeutralForeground2BrandPressed}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
10627
10698
|
:host(${pressedState}),:host(${pressedState}${primaryState}),:host(${pressedState}${subtleState}),:host(${pressedState}${outlineState}),:host(${pressedState}${transparentState}){background:SelectedItem;color:SelectedItemText}`));
|