@fluentui/web-components 3.0.0-beta.35 → 3.0.0-beta.37
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 +24 -2
- package/dist/dts/drawer/define.d.ts +1 -0
- package/dist/dts/drawer/drawer.d.ts +93 -0
- package/dist/dts/drawer/drawer.definition.d.ts +8 -0
- package/dist/dts/drawer/drawer.options.d.ts +40 -0
- package/dist/dts/drawer/drawer.styles.d.ts +4 -0
- package/dist/dts/drawer/drawer.template.d.ts +8 -0
- package/dist/dts/drawer/index.d.ts +5 -0
- package/dist/dts/drawer-body/define.d.ts +1 -0
- package/dist/dts/drawer-body/drawer-body.d.ts +3 -0
- package/dist/dts/drawer-body/drawer-body.definition.d.ts +8 -0
- package/dist/dts/drawer-body/drawer-body.styles.d.ts +4 -0
- package/dist/dts/drawer-body/drawer-body.template.d.ts +8 -0
- package/dist/dts/drawer-body/index.d.ts +4 -0
- package/dist/dts/index-rollup.d.ts +3 -0
- package/dist/dts/index.d.ts +2 -0
- package/dist/dts/message-bar/define.d.ts +1 -0
- package/dist/dts/message-bar/index.d.ts +5 -0
- package/dist/dts/message-bar/message-bar.bench.d.ts +3 -0
- package/dist/dts/message-bar/message-bar.d.ts +66 -0
- package/dist/dts/message-bar/message-bar.definition.d.ts +9 -0
- package/dist/dts/message-bar/message-bar.options.d.ts +30 -0
- package/dist/dts/message-bar/message-bar.styles.d.ts +7 -0
- package/dist/dts/message-bar/message-bar.template.d.ts +14 -0
- package/dist/dts/rating-display/define.d.ts +1 -0
- package/dist/dts/rating-display/index.d.ts +5 -0
- package/dist/dts/rating-display/rating-display.d.ts +94 -0
- package/dist/dts/rating-display/rating-display.definition.d.ts +9 -0
- package/dist/dts/rating-display/rating-display.options.d.ts +29 -0
- package/dist/dts/rating-display/rating-display.styles.d.ts +6 -0
- package/dist/dts/rating-display/rating-display.template.d.ts +14 -0
- package/dist/dts/styles/states/index.d.ts +20 -0
- package/dist/dts/theme/set-theme.bench.d.ts +3 -0
- package/dist/esm/drawer/define.js +4 -0
- package/dist/esm/drawer/define.js.map +1 -0
- package/dist/esm/drawer/drawer.definition.js +16 -0
- package/dist/esm/drawer/drawer.definition.js.map +1 -0
- package/dist/esm/drawer/drawer.js +132 -0
- package/dist/esm/drawer/drawer.js.map +1 -0
- package/dist/esm/drawer/drawer.options.js +25 -0
- package/dist/esm/drawer/drawer.options.js.map +1 -0
- package/dist/esm/drawer/drawer.styles.js +138 -0
- package/dist/esm/drawer/drawer.styles.js.map +1 -0
- package/dist/esm/drawer/drawer.template.js +28 -0
- package/dist/esm/drawer/drawer.template.js.map +1 -0
- package/dist/esm/drawer/index.js +6 -0
- package/dist/esm/drawer/index.js.map +1 -0
- package/dist/esm/drawer-body/define.js +4 -0
- package/dist/esm/drawer-body/define.js.map +1 -0
- package/dist/esm/drawer-body/drawer-body.definition.js +16 -0
- package/dist/esm/drawer-body/drawer-body.definition.js.map +1 -0
- package/dist/esm/drawer-body/drawer-body.js +4 -0
- package/dist/esm/drawer-body/drawer-body.js.map +1 -0
- package/dist/esm/drawer-body/drawer-body.styles.js +31 -0
- package/dist/esm/drawer-body/drawer-body.styles.js.map +1 -0
- package/dist/esm/drawer-body/drawer-body.template.js +21 -0
- package/dist/esm/drawer-body/drawer-body.template.js.map +1 -0
- package/dist/esm/drawer-body/index.js +5 -0
- package/dist/esm/drawer-body/index.js.map +1 -0
- package/dist/esm/index-rollup.js +3 -0
- package/dist/esm/index-rollup.js.map +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/menu/menu.js +5 -1
- package/dist/esm/menu/menu.js.map +1 -1
- package/dist/esm/message-bar/define.js +4 -0
- package/dist/esm/message-bar/define.js.map +1 -0
- package/dist/esm/message-bar/index.js +6 -0
- package/dist/esm/message-bar/index.js.map +1 -0
- package/dist/esm/message-bar/message-bar.bench.js +56 -0
- package/dist/esm/message-bar/message-bar.bench.js.map +1 -0
- package/dist/esm/message-bar/message-bar.definition.js +20 -0
- package/dist/esm/message-bar/message-bar.definition.js.map +1 -0
- package/dist/esm/message-bar/message-bar.js +79 -0
- package/dist/esm/message-bar/message-bar.js.map +1 -0
- package/dist/esm/message-bar/message-bar.options.js +27 -0
- package/dist/esm/message-bar/message-bar.options.js.map +1 -0
- package/dist/esm/message-bar/message-bar.styles.js +108 -0
- package/dist/esm/message-bar/message-bar.styles.js.map +1 -0
- package/dist/esm/message-bar/message-bar.template.js +25 -0
- package/dist/esm/message-bar/message-bar.template.js.map +1 -0
- package/dist/esm/rating-display/define.js +4 -0
- package/dist/esm/rating-display/define.js.map +1 -0
- package/dist/esm/rating-display/index.js +6 -0
- package/dist/esm/rating-display/index.js.map +1 -0
- package/dist/esm/rating-display/rating-display.definition.js +17 -0
- package/dist/esm/rating-display/rating-display.definition.js.map +1 -0
- package/dist/esm/rating-display/rating-display.js +97 -0
- package/dist/esm/rating-display/rating-display.js.map +1 -0
- package/dist/esm/rating-display/rating-display.options.js +19 -0
- package/dist/esm/rating-display/rating-display.options.js.map +1 -0
- package/dist/esm/rating-display/rating-display.styles.js +120 -0
- package/dist/esm/rating-display/rating-display.styles.js.map +1 -0
- package/dist/esm/rating-display/rating-display.template.js +32 -0
- package/dist/esm/rating-display/rating-display.template.js.map +1 -0
- package/dist/esm/styles/partials/badge.partials.js +4 -5
- package/dist/esm/styles/partials/badge.partials.js.map +1 -1
- package/dist/esm/styles/states/index.js +20 -0
- package/dist/esm/styles/states/index.js.map +1 -1
- package/dist/esm/theme/set-theme.bench.js +23 -0
- package/dist/esm/theme/set-theme.bench.js.map +1 -0
- package/dist/esm/theme/set-theme.js +35 -19
- package/dist/esm/theme/set-theme.js.map +1 -1
- package/dist/web-components.d.ts +300 -0
- package/dist/web-components.js +713 -393
- package/dist/web-components.min.js +303 -294
- package/package.json +20 -3
package/dist/web-components.js
CHANGED
|
@@ -3381,70 +3381,70 @@ function uniqueId(prefix = "") {
|
|
|
3381
3381
|
return `${prefix}${uniqueIdCounter++}`;
|
|
3382
3382
|
}
|
|
3383
3383
|
|
|
3384
|
-
var __defProp$
|
|
3385
|
-
var __getOwnPropDesc$
|
|
3386
|
-
var __decorateClass$
|
|
3387
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
3384
|
+
var __defProp$v = Object.defineProperty;
|
|
3385
|
+
var __getOwnPropDesc$v = Object.getOwnPropertyDescriptor;
|
|
3386
|
+
var __decorateClass$v = (decorators, target, key, kind) => {
|
|
3387
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$v(target, key) : target;
|
|
3388
3388
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
3389
|
-
if (kind && result) __defProp$
|
|
3389
|
+
if (kind && result) __defProp$v(target, key, result);
|
|
3390
3390
|
return result;
|
|
3391
3391
|
};
|
|
3392
3392
|
class ARIAGlobalStatesAndProperties {}
|
|
3393
|
-
__decorateClass$
|
|
3393
|
+
__decorateClass$v([attr({
|
|
3394
3394
|
attribute: "aria-atomic"
|
|
3395
3395
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaAtomic", 2);
|
|
3396
|
-
__decorateClass$
|
|
3396
|
+
__decorateClass$v([attr({
|
|
3397
3397
|
attribute: "aria-busy"
|
|
3398
3398
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaBusy", 2);
|
|
3399
|
-
__decorateClass$
|
|
3399
|
+
__decorateClass$v([attr({
|
|
3400
3400
|
attribute: "aria-controls"
|
|
3401
3401
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaControls", 2);
|
|
3402
|
-
__decorateClass$
|
|
3402
|
+
__decorateClass$v([attr({
|
|
3403
3403
|
attribute: "aria-current"
|
|
3404
3404
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaCurrent", 2);
|
|
3405
|
-
__decorateClass$
|
|
3405
|
+
__decorateClass$v([attr({
|
|
3406
3406
|
attribute: "aria-describedby"
|
|
3407
3407
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaDescribedby", 2);
|
|
3408
|
-
__decorateClass$
|
|
3408
|
+
__decorateClass$v([attr({
|
|
3409
3409
|
attribute: "aria-details"
|
|
3410
3410
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaDetails", 2);
|
|
3411
|
-
__decorateClass$
|
|
3411
|
+
__decorateClass$v([attr({
|
|
3412
3412
|
attribute: "aria-disabled"
|
|
3413
3413
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaDisabled", 2);
|
|
3414
|
-
__decorateClass$
|
|
3414
|
+
__decorateClass$v([attr({
|
|
3415
3415
|
attribute: "aria-errormessage"
|
|
3416
3416
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaErrormessage", 2);
|
|
3417
|
-
__decorateClass$
|
|
3417
|
+
__decorateClass$v([attr({
|
|
3418
3418
|
attribute: "aria-flowto"
|
|
3419
3419
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaFlowto", 2);
|
|
3420
|
-
__decorateClass$
|
|
3420
|
+
__decorateClass$v([attr({
|
|
3421
3421
|
attribute: "aria-haspopup"
|
|
3422
3422
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaHaspopup", 2);
|
|
3423
|
-
__decorateClass$
|
|
3423
|
+
__decorateClass$v([attr({
|
|
3424
3424
|
attribute: "aria-hidden"
|
|
3425
3425
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaHidden", 2);
|
|
3426
|
-
__decorateClass$
|
|
3426
|
+
__decorateClass$v([attr({
|
|
3427
3427
|
attribute: "aria-invalid"
|
|
3428
3428
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaInvalid", 2);
|
|
3429
|
-
__decorateClass$
|
|
3429
|
+
__decorateClass$v([attr({
|
|
3430
3430
|
attribute: "aria-keyshortcuts"
|
|
3431
3431
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaKeyshortcuts", 2);
|
|
3432
|
-
__decorateClass$
|
|
3432
|
+
__decorateClass$v([attr({
|
|
3433
3433
|
attribute: "aria-label"
|
|
3434
3434
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaLabel", 2);
|
|
3435
|
-
__decorateClass$
|
|
3435
|
+
__decorateClass$v([attr({
|
|
3436
3436
|
attribute: "aria-labelledby"
|
|
3437
3437
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaLabelledby", 2);
|
|
3438
|
-
__decorateClass$
|
|
3438
|
+
__decorateClass$v([attr({
|
|
3439
3439
|
attribute: "aria-live"
|
|
3440
3440
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaLive", 2);
|
|
3441
|
-
__decorateClass$
|
|
3441
|
+
__decorateClass$v([attr({
|
|
3442
3442
|
attribute: "aria-owns"
|
|
3443
3443
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaOwns", 2);
|
|
3444
|
-
__decorateClass$
|
|
3444
|
+
__decorateClass$v([attr({
|
|
3445
3445
|
attribute: "aria-relevant"
|
|
3446
3446
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaRelevant", 2);
|
|
3447
|
-
__decorateClass$
|
|
3447
|
+
__decorateClass$v([attr({
|
|
3448
3448
|
attribute: "aria-roledescription"
|
|
3449
3449
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaRoledescription", 2);
|
|
3450
3450
|
|
|
@@ -3613,12 +3613,12 @@ function applyMixins(derivedCtor, ...baseCtors) {
|
|
|
3613
3613
|
});
|
|
3614
3614
|
}
|
|
3615
3615
|
|
|
3616
|
-
var __defProp$
|
|
3617
|
-
var __getOwnPropDesc$
|
|
3618
|
-
var __decorateClass$
|
|
3619
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
3616
|
+
var __defProp$u = Object.defineProperty;
|
|
3617
|
+
var __getOwnPropDesc$u = Object.getOwnPropertyDescriptor;
|
|
3618
|
+
var __decorateClass$u = (decorators, target, key, kind) => {
|
|
3619
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$u(target, key) : target;
|
|
3620
3620
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
3621
|
-
if (kind && result) __defProp$
|
|
3621
|
+
if (kind && result) __defProp$u(target, key, result);
|
|
3622
3622
|
return result;
|
|
3623
3623
|
};
|
|
3624
3624
|
class AccordionItem extends FASTElement {
|
|
@@ -3640,23 +3640,23 @@ class AccordionItem extends FASTElement {
|
|
|
3640
3640
|
};
|
|
3641
3641
|
}
|
|
3642
3642
|
}
|
|
3643
|
-
__decorateClass$
|
|
3643
|
+
__decorateClass$u([attr({
|
|
3644
3644
|
attribute: "heading-level",
|
|
3645
3645
|
mode: "fromView",
|
|
3646
3646
|
converter: nullableNumberConverter
|
|
3647
3647
|
})], AccordionItem.prototype, "headinglevel", 2);
|
|
3648
|
-
__decorateClass$
|
|
3648
|
+
__decorateClass$u([attr({
|
|
3649
3649
|
mode: "boolean"
|
|
3650
3650
|
})], AccordionItem.prototype, "expanded", 2);
|
|
3651
|
-
__decorateClass$
|
|
3651
|
+
__decorateClass$u([attr({
|
|
3652
3652
|
mode: "boolean"
|
|
3653
3653
|
})], AccordionItem.prototype, "disabled", 2);
|
|
3654
|
-
__decorateClass$
|
|
3655
|
-
__decorateClass$
|
|
3656
|
-
__decorateClass$
|
|
3654
|
+
__decorateClass$u([attr], AccordionItem.prototype, "id", 2);
|
|
3655
|
+
__decorateClass$u([attr], AccordionItem.prototype, "size", 2);
|
|
3656
|
+
__decorateClass$u([attr({
|
|
3657
3657
|
mode: "boolean"
|
|
3658
3658
|
})], AccordionItem.prototype, "block", 2);
|
|
3659
|
-
__decorateClass$
|
|
3659
|
+
__decorateClass$u([attr({
|
|
3660
3660
|
attribute: "expand-icon-position"
|
|
3661
3661
|
})], AccordionItem.prototype, "expandIconPosition", 2);
|
|
3662
3662
|
applyMixins(AccordionItem, StartEnd);
|
|
@@ -3750,6 +3750,7 @@ const colorPaletteRedForeground2 = "var(--colorPaletteRedForeground2)";
|
|
|
3750
3750
|
const colorPaletteRedForeground3 = "var(--colorPaletteRedForeground3)";
|
|
3751
3751
|
const colorPaletteGreenBackground1 = "var(--colorPaletteGreenBackground1)";
|
|
3752
3752
|
const colorPaletteGreenBackground3 = "var(--colorPaletteGreenBackground3)";
|
|
3753
|
+
const colorPaletteGreenBorder1 = "var(--colorPaletteGreenBorder1)";
|
|
3753
3754
|
const colorPaletteGreenBorder2 = "var(--colorPaletteGreenBorder2)";
|
|
3754
3755
|
const colorPaletteGreenForeground1 = "var(--colorPaletteGreenForeground1)";
|
|
3755
3756
|
const colorPaletteGreenForeground2 = "var(--colorPaletteGreenForeground2)";
|
|
@@ -3764,6 +3765,7 @@ const colorPaletteYellowBackground3 = "var(--colorPaletteYellowBackground3)";
|
|
|
3764
3765
|
const colorPaletteYellowBorder1 = "var(--colorPaletteYellowBorder1)";
|
|
3765
3766
|
const colorPaletteYellowForeground2 = "var(--colorPaletteYellowForeground2)";
|
|
3766
3767
|
const colorPaletteMarigoldBackground2 = "var(--colorPaletteMarigoldBackground2)";
|
|
3768
|
+
const colorPaletteMarigoldBackground3 = "var(--colorPaletteMarigoldBackground3)";
|
|
3767
3769
|
const colorPaletteMarigoldForeground2 = "var(--colorPaletteMarigoldForeground2)";
|
|
3768
3770
|
const colorPaletteAnchorBackground2 = "var(--colorPaletteAnchorBackground2)";
|
|
3769
3771
|
const colorPaletteAnchorForeground2 = "var(--colorPaletteAnchorForeground2)";
|
|
@@ -3896,7 +3898,7 @@ const curveEasyEaseMax = "var(--curveEasyEaseMax)";
|
|
|
3896
3898
|
const curveEasyEase = "var(--curveEasyEase)";
|
|
3897
3899
|
const curveLinear = "var(--curveLinear)";
|
|
3898
3900
|
|
|
3899
|
-
const styles$
|
|
3901
|
+
const styles$x = css`
|
|
3900
3902
|
${display("block")}
|
|
3901
3903
|
|
|
3902
3904
|
:host{max-width:fit-content;contain:content}.heading{height:44px;display:grid;position:relative;vertical-align:middle;padding-inline:${spacingHorizontalM} ${spacingHorizontalMNudge};border-radius:${borderRadiusMedium};font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};line-height:${lineHeightBase300};grid-template-columns:auto auto 1fr auto}.heading-content{height:100%;display:flex;align-items:center}.button{box-sizing:border-box;appearance:none;border:none;outline:none;text-align:start;cursor:pointer;font-family:inherit;height:44px;color:${colorNeutralForeground1};background:${colorTransparentBackground};line-height:${lineHeightBase300};height:auto;padding:0;font-size:inherit;grid-column:auto / span 2;grid-row:1}.button::before{content:'';position:absolute;inset:0px;cursor:pointer;border-radius:${borderRadiusSmall}}.icon{display:flex;align-items:center;justify-content:center;pointer-events:none;position:relative;height:100%;padding-right:${spacingHorizontalS};grid-column:1 / span 1;grid-row:1}.region{margin:0 ${spacingHorizontalM}}::slotted([slot='start']),::slotted([slot='end']){justify-content:center;align-items:center;padding-right:${spacingHorizontalS};grid-column:2 / span 1;grid-row:1 / span 1}button:focus-visible::after{content:'';position:absolute;inset:0px;cursor:pointer;border-radius:${borderRadiusSmall};outline:none;border:2px solid ${colorStrokeFocus1};box-shadow:inset 0 0 0 1px ${colorStrokeFocus2}}:host([disabled]) .button{color:${colorNeutralForegroundDisabled}}:host([disabled]) svg{filter:invert(89%) sepia(0%) saturate(569%) hue-rotate(155deg) brightness(88%) contrast(87%)}:host([expanded]) .region{display:block}:host([expanded]) .default-collapsed-icon,:host([expanded]) ::slotted([slot='collapsed-icon']),:host(:not([expanded])) .default-expanded-icon,:host(:not([expanded])) ::slotted([slot='expanded-icon']),:host([expanded]) ::slotted([slot='end']),::slotted([slot='start']),.region{display:none}:host([expanded]) ::slotted([slot='start']),:host([expanded]) ::slotted([slot='expanded-icon']),:host(:not([expanded])) ::slotted([slot='collapsed-icon']),::slotted([slot='end']){display:flex}.heading{font-size:${fontSizeBase300};line-height:${lineHeightBase300}}:host([size='small']) .heading{font-size:${fontSizeBase200};line-height:${lineHeightBase200}}:host([size='large']) .heading{font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host([size='extra-large']) .heading{font-size:${fontSizeBase500};line-height:${lineHeightBase500}}:host([expand-icon-position='end']) :slotted(span[slot='start']),:host([expand-icon-position='end']) ::slotted(span[slot='end']){grid-column:1 / span 1;grid-row:1}:host([expand-icon-position='end']) ::slotted(span[slot='start']),:host([expand-icon-position='end']) ::slotted(span[slot='end']){grid-column:1 / span 1;grid-row:1}:host([expand-icon-position='end']) .icon{grid-column:4 / span 1;grid-row:1;display:flex;padding-left:10px;padding-right:0}:host([expand-icon-position='end']) .button{grid-column:2 / span 3;grid-row:1}:host([block]){max-width:100%}:host([expand-icon-position='end']) .heading{grid-template-columns:auto auto 28px}:host([expand-icon-position='end']) .icon{grid-column:5 / span 1}:host([block][expand-icon-position='end']) .heading{grid-template-columns:auto 1fr}:host([block][expand-icon-position='end']) .icon{grid-column:5 / span 1}`;
|
|
@@ -3930,30 +3932,30 @@ const chevronDown20Filled = html.partial(`<svg
|
|
|
3930
3932
|
function accordionItemTemplate(options = {}) {
|
|
3931
3933
|
return html`<div class="heading" part="heading" role="heading" aria-level="${x => x.headinglevel}"><button class="button" part="button" ${ref("expandbutton")} ?disabled="${x => x.disabled ? "true" : void 0}" aria-expanded="${x => x.expanded}" aria-controls="${x => x.id}-panel" id="${x => x.id}" @click="${(x, c) => x.clickHandler(c.event)}"><span class="heading-content" part="heading-content"><slot name="heading"></slot></span></button>${startSlotTemplate(options)} ${endSlotTemplate(options)}<span class="icon" part="icon" aria-hidden="true"><slot name="expanded-icon">${staticallyCompose(options.expandedIcon)}</slot><slot name="collapsed-icon">${staticallyCompose(options.collapsedIcon)}</slot><span></div><div class="region" part="region" id="${x => x.id}-panel" role="region" aria-labelledby="${x => x.id}"><slot></slot></div>`;
|
|
3932
3934
|
}
|
|
3933
|
-
const template$
|
|
3935
|
+
const template$y = accordionItemTemplate({
|
|
3934
3936
|
collapsedIcon: chevronRight20Filled,
|
|
3935
3937
|
expandedIcon: chevronDown20Filled
|
|
3936
3938
|
});
|
|
3937
3939
|
|
|
3938
|
-
const definition$
|
|
3940
|
+
const definition$y = AccordionItem.compose({
|
|
3939
3941
|
name: `${FluentDesignSystem.prefix}-accordion-item`,
|
|
3940
|
-
template: template$
|
|
3941
|
-
styles: styles$
|
|
3942
|
+
template: template$y,
|
|
3943
|
+
styles: styles$x
|
|
3942
3944
|
});
|
|
3943
3945
|
|
|
3944
|
-
definition$
|
|
3946
|
+
definition$y.define(FluentDesignSystem.registry);
|
|
3945
3947
|
|
|
3946
3948
|
const AccordionExpandMode = {
|
|
3947
3949
|
single: "single",
|
|
3948
3950
|
multi: "multi"
|
|
3949
3951
|
};
|
|
3950
3952
|
|
|
3951
|
-
var __defProp$
|
|
3952
|
-
var __getOwnPropDesc$
|
|
3953
|
-
var __decorateClass$
|
|
3954
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
3953
|
+
var __defProp$t = Object.defineProperty;
|
|
3954
|
+
var __getOwnPropDesc$t = Object.getOwnPropertyDescriptor;
|
|
3955
|
+
var __decorateClass$t = (decorators, target, key, kind) => {
|
|
3956
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$t(target, key) : target;
|
|
3955
3957
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
3956
|
-
if (kind && result) __defProp$
|
|
3958
|
+
if (kind && result) __defProp$t(target, key, result);
|
|
3957
3959
|
return result;
|
|
3958
3960
|
};
|
|
3959
3961
|
class Accordion extends FASTElement {
|
|
@@ -4131,12 +4133,12 @@ class Accordion extends FASTElement {
|
|
|
4131
4133
|
}
|
|
4132
4134
|
}
|
|
4133
4135
|
}
|
|
4134
|
-
__decorateClass$
|
|
4136
|
+
__decorateClass$t([attr({
|
|
4135
4137
|
attribute: "expand-mode"
|
|
4136
4138
|
})], Accordion.prototype, "expandmode", 2);
|
|
4137
|
-
__decorateClass$
|
|
4139
|
+
__decorateClass$t([observable], Accordion.prototype, "slottedAccordionItems", 2);
|
|
4138
4140
|
|
|
4139
|
-
const styles$
|
|
4141
|
+
const styles$w = css`
|
|
4140
4142
|
${display("flex")}
|
|
4141
4143
|
|
|
4142
4144
|
:host{flex-direction:column;width:100%;contain:content}`;
|
|
@@ -4147,15 +4149,15 @@ function accordionTemplate() {
|
|
|
4147
4149
|
filter: elements()
|
|
4148
4150
|
})}></slot></template>`;
|
|
4149
4151
|
}
|
|
4150
|
-
const template$
|
|
4152
|
+
const template$x = accordionTemplate();
|
|
4151
4153
|
|
|
4152
|
-
const definition$
|
|
4154
|
+
const definition$x = Accordion.compose({
|
|
4153
4155
|
name: `${FluentDesignSystem.prefix}-accordion`,
|
|
4154
|
-
template: template$
|
|
4155
|
-
styles: styles$
|
|
4156
|
+
template: template$x,
|
|
4157
|
+
styles: styles$w
|
|
4156
4158
|
});
|
|
4157
4159
|
|
|
4158
|
-
definition$
|
|
4160
|
+
definition$x.define(FluentDesignSystem.registry);
|
|
4159
4161
|
|
|
4160
4162
|
const CustomStatesSetSupported = CSS.supports("selector(:state(g))");
|
|
4161
4163
|
function toggleState(elementInternals, state, force) {
|
|
@@ -4188,12 +4190,12 @@ const AnchorAttributes = {
|
|
|
4188
4190
|
type: "type"
|
|
4189
4191
|
};
|
|
4190
4192
|
|
|
4191
|
-
var __defProp$
|
|
4192
|
-
var __getOwnPropDesc$
|
|
4193
|
-
var __decorateClass$
|
|
4194
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
4193
|
+
var __defProp$s = Object.defineProperty;
|
|
4194
|
+
var __getOwnPropDesc$s = Object.getOwnPropertyDescriptor;
|
|
4195
|
+
var __decorateClass$s = (decorators, target, key, kind) => {
|
|
4196
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$s(target, key) : target;
|
|
4195
4197
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
4196
|
-
if (kind && result) __defProp$
|
|
4198
|
+
if (kind && result) __defProp$s(target, key, result);
|
|
4197
4199
|
return result;
|
|
4198
4200
|
};
|
|
4199
4201
|
class BaseAnchor extends FASTElement {
|
|
@@ -4301,14 +4303,14 @@ class BaseAnchor extends FASTElement {
|
|
|
4301
4303
|
return proxy;
|
|
4302
4304
|
}
|
|
4303
4305
|
}
|
|
4304
|
-
__decorateClass$
|
|
4305
|
-
__decorateClass$
|
|
4306
|
-
__decorateClass$
|
|
4307
|
-
__decorateClass$
|
|
4308
|
-
__decorateClass$
|
|
4309
|
-
__decorateClass$
|
|
4310
|
-
__decorateClass$
|
|
4311
|
-
__decorateClass$
|
|
4306
|
+
__decorateClass$s([attr], BaseAnchor.prototype, "download", 2);
|
|
4307
|
+
__decorateClass$s([attr], BaseAnchor.prototype, "href", 2);
|
|
4308
|
+
__decorateClass$s([attr], BaseAnchor.prototype, "hreflang", 2);
|
|
4309
|
+
__decorateClass$s([attr], BaseAnchor.prototype, "ping", 2);
|
|
4310
|
+
__decorateClass$s([attr], BaseAnchor.prototype, "referrerpolicy", 2);
|
|
4311
|
+
__decorateClass$s([attr], BaseAnchor.prototype, "rel", 2);
|
|
4312
|
+
__decorateClass$s([attr], BaseAnchor.prototype, "target", 2);
|
|
4313
|
+
__decorateClass$s([attr], BaseAnchor.prototype, "type", 2);
|
|
4312
4314
|
class AnchorButton extends BaseAnchor {
|
|
4313
4315
|
constructor() {
|
|
4314
4316
|
super(...arguments);
|
|
@@ -4362,10 +4364,10 @@ class AnchorButton extends BaseAnchor {
|
|
|
4362
4364
|
toggleState(this.elementInternals, "icon", !!next);
|
|
4363
4365
|
}
|
|
4364
4366
|
}
|
|
4365
|
-
__decorateClass$
|
|
4366
|
-
__decorateClass$
|
|
4367
|
-
__decorateClass$
|
|
4368
|
-
__decorateClass$
|
|
4367
|
+
__decorateClass$s([attr], AnchorButton.prototype, "appearance", 2);
|
|
4368
|
+
__decorateClass$s([attr], AnchorButton.prototype, "shape", 2);
|
|
4369
|
+
__decorateClass$s([attr], AnchorButton.prototype, "size", 2);
|
|
4370
|
+
__decorateClass$s([attr({
|
|
4369
4371
|
attribute: "icon-only",
|
|
4370
4372
|
mode: "boolean"
|
|
4371
4373
|
})], AnchorButton.prototype, "iconOnly", 2);
|
|
@@ -4401,23 +4403,27 @@ const errorState = css.partial`:is([state--error], :state(error))`;
|
|
|
4401
4403
|
const dangerState = css.partial`:is([state--danger], :state(danger))`;
|
|
4402
4404
|
const importantState = css.partial`:is([state--important], :state(important))`;
|
|
4403
4405
|
const informativeState = css.partial`:is([state--informative], :state(informative))`;
|
|
4406
|
+
css.partial`:is([state--marigold], :state(marigold))`;
|
|
4407
|
+
const neutralState = css.partial`:is([state--neutral], :state(neutral))`;
|
|
4404
4408
|
const severeState = css.partial`:is([state--severe], :state(severe))`;
|
|
4405
4409
|
const successState = css.partial`:is([state--success], :state(success))`;
|
|
4406
4410
|
const warningState = css.partial`:is([state--warning], :state(warning))`;
|
|
4407
4411
|
const verticalState = css.partial`:is([state--vertical], :state(vertical))`;
|
|
4408
4412
|
css.partial`:is([state--horizontal], :state(horizontal))`;
|
|
4413
|
+
css.partial`:is([state--singleline], :state(singleline))`;
|
|
4414
|
+
const multiLineState = css.partial`:is([state--multiline], :state(multiline))`;
|
|
4409
4415
|
|
|
4410
4416
|
const baseButtonStyles = css`
|
|
4411
4417
|
${display("inline-flex")}
|
|
4412
4418
|
|
|
4413
4419
|
: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}`;
|
|
4414
|
-
const styles$
|
|
4420
|
+
const styles$v = css`
|
|
4415
4421
|
${baseButtonStyles}
|
|
4416
4422
|
|
|
4417
4423
|
: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`
|
|
4418
4424
|
:host{background:ButtonFace;color:ButtonText}:host(:is(:hover,:focus-visible)){border-color:Highlight}`));
|
|
4419
4425
|
|
|
4420
|
-
const styles$
|
|
4426
|
+
const styles$u = css`
|
|
4421
4427
|
${baseButtonStyles}
|
|
4422
4428
|
|
|
4423
4429
|
::slotted(a){position:absolute;inset:0}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
@@ -4426,15 +4432,15 @@ const styles$r = css`
|
|
|
4426
4432
|
function anchorTemplate$1(options = {}) {
|
|
4427
4433
|
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>`;
|
|
4428
4434
|
}
|
|
4429
|
-
const template$
|
|
4435
|
+
const template$w = anchorTemplate$1();
|
|
4430
4436
|
|
|
4431
|
-
const definition$
|
|
4437
|
+
const definition$w = AnchorButton.compose({
|
|
4432
4438
|
name: `${FluentDesignSystem.prefix}-anchor-button`,
|
|
4433
|
-
template: template$
|
|
4434
|
-
styles: styles$
|
|
4439
|
+
template: template$w,
|
|
4440
|
+
styles: styles$u
|
|
4435
4441
|
});
|
|
4436
4442
|
|
|
4437
|
-
definition$
|
|
4443
|
+
definition$w.define(FluentDesignSystem.registry);
|
|
4438
4444
|
|
|
4439
4445
|
const UNWANTED_ENCLOSURES_REGEX = /[\(\[\{][^\)\]\}]*[\)\]\}]/g;
|
|
4440
4446
|
const UNWANTED_CHARS_REGEX = /[\0-\u001F\!-/:-@\[-`\{-\u00BF\u0250-\u036F\uD800-\uFFFF]/g;
|
|
@@ -4516,12 +4522,12 @@ const AvatarColor = {
|
|
|
4516
4522
|
...AvatarNamedColor
|
|
4517
4523
|
};
|
|
4518
4524
|
|
|
4519
|
-
var __defProp$
|
|
4520
|
-
var __getOwnPropDesc$
|
|
4521
|
-
var __decorateClass$
|
|
4522
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
4525
|
+
var __defProp$r = Object.defineProperty;
|
|
4526
|
+
var __getOwnPropDesc$r = Object.getOwnPropertyDescriptor;
|
|
4527
|
+
var __decorateClass$r = (decorators, target, key, kind) => {
|
|
4528
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$r(target, key) : target;
|
|
4523
4529
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
4524
|
-
if (kind && result) __defProp$
|
|
4530
|
+
if (kind && result) __defProp$r(target, key, result);
|
|
4525
4531
|
return result;
|
|
4526
4532
|
};
|
|
4527
4533
|
const _Avatar = class _Avatar extends FASTElement {
|
|
@@ -4587,16 +4593,16 @@ const _Avatar = class _Avatar extends FASTElement {
|
|
|
4587
4593
|
* An array of the available Avatar named colors
|
|
4588
4594
|
*/
|
|
4589
4595
|
_Avatar.colors = Object.values(AvatarNamedColor);
|
|
4590
|
-
__decorateClass$
|
|
4591
|
-
__decorateClass$
|
|
4592
|
-
__decorateClass$
|
|
4596
|
+
__decorateClass$r([attr], _Avatar.prototype, "name", 2);
|
|
4597
|
+
__decorateClass$r([attr], _Avatar.prototype, "initials", 2);
|
|
4598
|
+
__decorateClass$r([attr({
|
|
4593
4599
|
converter: nullableNumberConverter
|
|
4594
4600
|
})], _Avatar.prototype, "size", 2);
|
|
4595
|
-
__decorateClass$
|
|
4596
|
-
__decorateClass$
|
|
4597
|
-
__decorateClass$
|
|
4598
|
-
__decorateClass$
|
|
4599
|
-
__decorateClass$
|
|
4601
|
+
__decorateClass$r([attr], _Avatar.prototype, "shape", 2);
|
|
4602
|
+
__decorateClass$r([attr], _Avatar.prototype, "active", 2);
|
|
4603
|
+
__decorateClass$r([attr], _Avatar.prototype, "appearance", 2);
|
|
4604
|
+
__decorateClass$r([attr], _Avatar.prototype, "color", 2);
|
|
4605
|
+
__decorateClass$r([attr({
|
|
4600
4606
|
attribute: "color-id"
|
|
4601
4607
|
})], _Avatar.prototype, "colorId", 2);
|
|
4602
4608
|
let Avatar = _Avatar;
|
|
@@ -4621,22 +4627,22 @@ const animations = {
|
|
|
4621
4627
|
normalEase: curveEasyEase,
|
|
4622
4628
|
nullEasing: curveLinear
|
|
4623
4629
|
};
|
|
4624
|
-
const styles$
|
|
4630
|
+
const styles$t = css`
|
|
4625
4631
|
${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}}`;
|
|
4626
4632
|
|
|
4627
4633
|
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>`;
|
|
4628
4634
|
function avatarTemplate() {
|
|
4629
4635
|
return html`<slot>${x => x.name || x.initials ? x.generateInitials() : defaultIconTemplate}</slot><slot name="badge"></slot>`;
|
|
4630
4636
|
}
|
|
4631
|
-
const template$
|
|
4637
|
+
const template$v = avatarTemplate();
|
|
4632
4638
|
|
|
4633
|
-
const definition$
|
|
4639
|
+
const definition$v = Avatar.compose({
|
|
4634
4640
|
name: `${FluentDesignSystem.prefix}-avatar`,
|
|
4635
|
-
template: template$
|
|
4636
|
-
styles: styles$
|
|
4641
|
+
template: template$v,
|
|
4642
|
+
styles: styles$t
|
|
4637
4643
|
});
|
|
4638
4644
|
|
|
4639
|
-
definition$
|
|
4645
|
+
definition$v.define(FluentDesignSystem.registry);
|
|
4640
4646
|
|
|
4641
4647
|
const BadgeAppearance = {
|
|
4642
4648
|
filled: "filled",
|
|
@@ -4655,12 +4661,12 @@ const BadgeColor = {
|
|
|
4655
4661
|
warning: "warning"
|
|
4656
4662
|
};
|
|
4657
4663
|
|
|
4658
|
-
var __defProp$
|
|
4659
|
-
var __getOwnPropDesc$
|
|
4660
|
-
var __decorateClass$
|
|
4661
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
4664
|
+
var __defProp$q = Object.defineProperty;
|
|
4665
|
+
var __getOwnPropDesc$q = Object.getOwnPropertyDescriptor;
|
|
4666
|
+
var __decorateClass$q = (decorators, target, key, kind) => {
|
|
4667
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$q(target, key) : target;
|
|
4662
4668
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
4663
|
-
if (kind && result) __defProp$
|
|
4669
|
+
if (kind && result) __defProp$q(target, key, result);
|
|
4664
4670
|
return result;
|
|
4665
4671
|
};
|
|
4666
4672
|
class Badge extends FASTElement {
|
|
@@ -4728,13 +4734,12 @@ class Badge extends FASTElement {
|
|
|
4728
4734
|
}
|
|
4729
4735
|
}
|
|
4730
4736
|
}
|
|
4731
|
-
__decorateClass$
|
|
4732
|
-
__decorateClass$
|
|
4733
|
-
__decorateClass$
|
|
4734
|
-
__decorateClass$
|
|
4737
|
+
__decorateClass$q([attr], Badge.prototype, "appearance", 2);
|
|
4738
|
+
__decorateClass$q([attr], Badge.prototype, "color", 2);
|
|
4739
|
+
__decorateClass$q([attr], Badge.prototype, "shape", 2);
|
|
4740
|
+
__decorateClass$q([attr], Badge.prototype, "size", 2);
|
|
4735
4741
|
applyMixins(Badge, StartEnd);
|
|
4736
4742
|
|
|
4737
|
-
const textPadding = spacingHorizontalXXS;
|
|
4738
4743
|
const badgeBaseStyles = css.partial`
|
|
4739
4744
|
${display("inline-flex")} :host {
|
|
4740
4745
|
position: relative;
|
|
@@ -4747,7 +4752,7 @@ const badgeBaseStyles = css.partial`
|
|
|
4747
4752
|
line-height: ${lineHeightBase200};
|
|
4748
4753
|
min-width: 20px;
|
|
4749
4754
|
height: 20px;
|
|
4750
|
-
padding-inline: calc(${spacingHorizontalXS} + ${
|
|
4755
|
+
padding-inline: calc(${spacingHorizontalXS} + ${spacingHorizontalXXS});
|
|
4751
4756
|
border-radius: ${borderRadiusCircular};
|
|
4752
4757
|
border-color: ${colorTransparentStroke};
|
|
4753
4758
|
background-color: ${colorBrandBackground};
|
|
@@ -4800,7 +4805,7 @@ const badgeSizeStyles = css.partial`
|
|
|
4800
4805
|
height: 16px;
|
|
4801
4806
|
font-size: ${fontSizeBase100};
|
|
4802
4807
|
line-height: ${lineHeightBase100};
|
|
4803
|
-
padding-inline: calc(${spacingHorizontalXXS} + ${
|
|
4808
|
+
padding-inline: calc(${spacingHorizontalXXS} + ${spacingHorizontalXXS});
|
|
4804
4809
|
}
|
|
4805
4810
|
:host(${smallState}) ::slotted(svg) {
|
|
4806
4811
|
font-size: 12px;
|
|
@@ -4810,7 +4815,7 @@ const badgeSizeStyles = css.partial`
|
|
|
4810
4815
|
height: 24px;
|
|
4811
4816
|
font-size: ${fontSizeBase200};
|
|
4812
4817
|
line-height: ${lineHeightBase200};
|
|
4813
|
-
padding-inline: calc(${spacingHorizontalXS} + ${
|
|
4818
|
+
padding-inline: calc(${spacingHorizontalXS} + ${spacingHorizontalXXS});
|
|
4814
4819
|
}
|
|
4815
4820
|
:host(${largeState}) ::slotted(svg) {
|
|
4816
4821
|
font-size: 16px;
|
|
@@ -4820,7 +4825,7 @@ const badgeSizeStyles = css.partial`
|
|
|
4820
4825
|
height: 32px;
|
|
4821
4826
|
font-size: ${fontSizeBase200};
|
|
4822
4827
|
line-height: ${lineHeightBase200};
|
|
4823
|
-
padding-inline: calc(${spacingHorizontalSNudge} + ${
|
|
4828
|
+
padding-inline: calc(${spacingHorizontalSNudge} + ${spacingHorizontalXXS});
|
|
4824
4829
|
}
|
|
4825
4830
|
:host(${extraLargeState}) ::slotted(svg) {
|
|
4826
4831
|
font-size: 20px;
|
|
@@ -5086,7 +5091,7 @@ css.partial`
|
|
|
5086
5091
|
font-weight: ${fontWeightSemibold};
|
|
5087
5092
|
`;
|
|
5088
5093
|
|
|
5089
|
-
const styles$
|
|
5094
|
+
const styles$s = css`
|
|
5090
5095
|
:host(${squareState}){border-radius:${borderRadiusNone}}:host(${roundedState}){border-radius:${borderRadiusMedium}}:host(${roundedState}${tinyState}),:host(${roundedState}${extraSmallState}),:host(${roundedState}${smallState}){border-radius:${borderRadiusSmall}}${badgeSizeStyles}
|
|
5091
5096
|
${badgeFilledStyles}
|
|
5092
5097
|
${badgeGhostStyles}
|
|
@@ -5099,22 +5104,22 @@ const styles$p = css`
|
|
|
5099
5104
|
function badgeTemplate(options = {}) {
|
|
5100
5105
|
return html` ${startSlotTemplate(options)}<slot>${staticallyCompose(options.defaultContent)}</slot>${endSlotTemplate(options)} `;
|
|
5101
5106
|
}
|
|
5102
|
-
const template$
|
|
5107
|
+
const template$u = badgeTemplate();
|
|
5103
5108
|
|
|
5104
|
-
const definition$
|
|
5109
|
+
const definition$u = Badge.compose({
|
|
5105
5110
|
name: `${FluentDesignSystem.prefix}-badge`,
|
|
5106
|
-
template: template$
|
|
5107
|
-
styles: styles$
|
|
5111
|
+
template: template$u,
|
|
5112
|
+
styles: styles$s
|
|
5108
5113
|
});
|
|
5109
5114
|
|
|
5110
|
-
definition$
|
|
5115
|
+
definition$u.define(FluentDesignSystem.registry);
|
|
5111
5116
|
|
|
5112
|
-
var __defProp$
|
|
5113
|
-
var __getOwnPropDesc$
|
|
5114
|
-
var __decorateClass$
|
|
5115
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
5117
|
+
var __defProp$p = Object.defineProperty;
|
|
5118
|
+
var __getOwnPropDesc$p = Object.getOwnPropertyDescriptor;
|
|
5119
|
+
var __decorateClass$p = (decorators, target, key, kind) => {
|
|
5120
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$p(target, key) : target;
|
|
5116
5121
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
5117
|
-
if (kind && result) __defProp$
|
|
5122
|
+
if (kind && result) __defProp$p(target, key, result);
|
|
5118
5123
|
return result;
|
|
5119
5124
|
};
|
|
5120
5125
|
class Button extends FASTElement {
|
|
@@ -5365,67 +5370,67 @@ class Button extends FASTElement {
|
|
|
5365
5370
|
* @public
|
|
5366
5371
|
*/
|
|
5367
5372
|
Button.formAssociated = true;
|
|
5368
|
-
__decorateClass$
|
|
5369
|
-
__decorateClass$
|
|
5373
|
+
__decorateClass$p([attr], Button.prototype, "appearance", 2);
|
|
5374
|
+
__decorateClass$p([attr({
|
|
5370
5375
|
mode: "boolean"
|
|
5371
5376
|
})], Button.prototype, "autofocus", 2);
|
|
5372
|
-
__decorateClass$
|
|
5373
|
-
__decorateClass$
|
|
5377
|
+
__decorateClass$p([observable], Button.prototype, "defaultSlottedContent", 2);
|
|
5378
|
+
__decorateClass$p([attr({
|
|
5374
5379
|
mode: "boolean"
|
|
5375
5380
|
})], Button.prototype, "disabled", 2);
|
|
5376
|
-
__decorateClass$
|
|
5381
|
+
__decorateClass$p([attr({
|
|
5377
5382
|
attribute: "disabled-focusable",
|
|
5378
5383
|
mode: "boolean"
|
|
5379
5384
|
})], Button.prototype, "disabledFocusable", 2);
|
|
5380
|
-
__decorateClass$
|
|
5385
|
+
__decorateClass$p([attr({
|
|
5381
5386
|
attribute: "formaction"
|
|
5382
5387
|
})], Button.prototype, "formAction", 2);
|
|
5383
|
-
__decorateClass$
|
|
5388
|
+
__decorateClass$p([attr({
|
|
5384
5389
|
attribute: "form"
|
|
5385
5390
|
})], Button.prototype, "formAttribute", 2);
|
|
5386
|
-
__decorateClass$
|
|
5391
|
+
__decorateClass$p([attr({
|
|
5387
5392
|
attribute: "formenctype"
|
|
5388
5393
|
})], Button.prototype, "formEnctype", 2);
|
|
5389
|
-
__decorateClass$
|
|
5394
|
+
__decorateClass$p([attr({
|
|
5390
5395
|
attribute: "formmethod"
|
|
5391
5396
|
})], Button.prototype, "formMethod", 2);
|
|
5392
|
-
__decorateClass$
|
|
5397
|
+
__decorateClass$p([attr({
|
|
5393
5398
|
attribute: "formnovalidate",
|
|
5394
5399
|
mode: "boolean"
|
|
5395
5400
|
})], Button.prototype, "formNoValidate", 2);
|
|
5396
|
-
__decorateClass$
|
|
5401
|
+
__decorateClass$p([attr({
|
|
5397
5402
|
attribute: "formtarget"
|
|
5398
5403
|
})], Button.prototype, "formTarget", 2);
|
|
5399
|
-
__decorateClass$
|
|
5404
|
+
__decorateClass$p([attr({
|
|
5400
5405
|
attribute: "icon-only",
|
|
5401
5406
|
mode: "boolean"
|
|
5402
5407
|
})], Button.prototype, "iconOnly", 2);
|
|
5403
|
-
__decorateClass$
|
|
5404
|
-
__decorateClass$
|
|
5405
|
-
__decorateClass$
|
|
5406
|
-
__decorateClass$
|
|
5407
|
-
__decorateClass$
|
|
5408
|
+
__decorateClass$p([attr], Button.prototype, "name", 2);
|
|
5409
|
+
__decorateClass$p([attr], Button.prototype, "shape", 2);
|
|
5410
|
+
__decorateClass$p([attr], Button.prototype, "size", 2);
|
|
5411
|
+
__decorateClass$p([attr], Button.prototype, "type", 2);
|
|
5412
|
+
__decorateClass$p([attr], Button.prototype, "value", 2);
|
|
5408
5413
|
applyMixins(Button, StartEnd);
|
|
5409
5414
|
|
|
5410
5415
|
function buttonTemplate$1(options = {}) {
|
|
5411
5416
|
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>`;
|
|
5412
5417
|
}
|
|
5413
|
-
const template$
|
|
5418
|
+
const template$t = buttonTemplate$1();
|
|
5414
5419
|
|
|
5415
|
-
const definition$
|
|
5420
|
+
const definition$t = Button.compose({
|
|
5416
5421
|
name: `${FluentDesignSystem.prefix}-button`,
|
|
5417
|
-
template: template$
|
|
5418
|
-
styles: styles$
|
|
5422
|
+
template: template$t,
|
|
5423
|
+
styles: styles$v
|
|
5419
5424
|
});
|
|
5420
5425
|
|
|
5421
|
-
definition$
|
|
5426
|
+
definition$t.define(FluentDesignSystem.registry);
|
|
5422
5427
|
|
|
5423
|
-
var __defProp$
|
|
5424
|
-
var __getOwnPropDesc$
|
|
5425
|
-
var __decorateClass$
|
|
5426
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
5428
|
+
var __defProp$o = Object.defineProperty;
|
|
5429
|
+
var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
|
|
5430
|
+
var __decorateClass$o = (decorators, target, key, kind) => {
|
|
5431
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$o(target, key) : target;
|
|
5427
5432
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
5428
|
-
if (kind && result) __defProp$
|
|
5433
|
+
if (kind && result) __defProp$o(target, key, result);
|
|
5429
5434
|
return result;
|
|
5430
5435
|
};
|
|
5431
5436
|
class BaseCheckbox extends FASTElement {
|
|
@@ -5752,26 +5757,26 @@ class BaseCheckbox extends FASTElement {
|
|
|
5752
5757
|
* @public
|
|
5753
5758
|
*/
|
|
5754
5759
|
BaseCheckbox.formAssociated = true;
|
|
5755
|
-
__decorateClass$
|
|
5760
|
+
__decorateClass$o([attr({
|
|
5756
5761
|
mode: "boolean"
|
|
5757
5762
|
})], BaseCheckbox.prototype, "autofocus", 2);
|
|
5758
|
-
__decorateClass$
|
|
5763
|
+
__decorateClass$o([attr({
|
|
5759
5764
|
mode: "boolean"
|
|
5760
5765
|
})], BaseCheckbox.prototype, "disabled", 2);
|
|
5761
|
-
__decorateClass$
|
|
5766
|
+
__decorateClass$o([attr({
|
|
5762
5767
|
attribute: "form"
|
|
5763
5768
|
})], BaseCheckbox.prototype, "formAttribute", 2);
|
|
5764
|
-
__decorateClass$
|
|
5765
|
-
__decorateClass$
|
|
5769
|
+
__decorateClass$o([observable], BaseCheckbox.prototype, "indeterminate", 2);
|
|
5770
|
+
__decorateClass$o([attr({
|
|
5766
5771
|
attribute: "checked",
|
|
5767
5772
|
mode: "boolean"
|
|
5768
5773
|
})], BaseCheckbox.prototype, "initialChecked", 2);
|
|
5769
|
-
__decorateClass$
|
|
5774
|
+
__decorateClass$o([attr({
|
|
5770
5775
|
attribute: "value",
|
|
5771
5776
|
mode: "fromView"
|
|
5772
5777
|
})], BaseCheckbox.prototype, "initialValue", 2);
|
|
5773
|
-
__decorateClass$
|
|
5774
|
-
__decorateClass$
|
|
5778
|
+
__decorateClass$o([attr], BaseCheckbox.prototype, "name", 2);
|
|
5779
|
+
__decorateClass$o([attr({
|
|
5775
5780
|
mode: "boolean"
|
|
5776
5781
|
})], BaseCheckbox.prototype, "required", 2);
|
|
5777
5782
|
class Checkbox extends BaseCheckbox {
|
|
@@ -5802,12 +5807,12 @@ class Checkbox extends BaseCheckbox {
|
|
|
5802
5807
|
}
|
|
5803
5808
|
}
|
|
5804
5809
|
}
|
|
5805
|
-
__decorateClass$
|
|
5806
|
-
__decorateClass$
|
|
5810
|
+
__decorateClass$o([attr], Checkbox.prototype, "shape", 2);
|
|
5811
|
+
__decorateClass$o([attr], Checkbox.prototype, "size", 2);
|
|
5807
5812
|
|
|
5808
5813
|
const checkedState$1 = css.partial`:is([state--checked], :state(checked))`;
|
|
5809
5814
|
const indeterminateState = css.partial`:is([state--indeterminate], :state(indeterminate))`;
|
|
5810
|
-
const styles$
|
|
5815
|
+
const styles$r = css`
|
|
5811
5816
|
${display("inline-flex")}
|
|
5812
5817
|
|
|
5813
5818
|
: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$1}:hover){background-color:${colorCompoundBrandBackgroundHover};border-color:${colorCompoundBrandStrokeHover}}:host(${checkedState$1}: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$1})) *:is(::slotted([slot='checked-indicator']),.checked-indicator){display:none}:host(${checkedState$1}),:host(${indeterminateState}){border-color:${colorCompoundBrandStroke}}:host(${checkedState$1}),: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$1}){background-color:${colorNeutralBackgroundDisabled};border-color:${colorNeutralStrokeDisabled}}:host([disabled]){cursor:unset}:host([disabled]${indeterminateState}) .indeterminate-indicator{background-color:${colorNeutralStrokeDisabled}}:host([disabled]${checkedState$1}) .checked-indicator{color:${colorNeutralStrokeDisabled}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
@@ -5833,23 +5838,23 @@ const indeterminateIndicator = html.partial( /* html */
|
|
|
5833
5838
|
function checkboxTemplate(options = {}) {
|
|
5834
5839
|
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>`;
|
|
5835
5840
|
}
|
|
5836
|
-
const template$
|
|
5841
|
+
const template$s = checkboxTemplate({
|
|
5837
5842
|
checkedIndicator,
|
|
5838
5843
|
indeterminateIndicator
|
|
5839
5844
|
});
|
|
5840
5845
|
|
|
5841
|
-
const definition$
|
|
5846
|
+
const definition$s = Checkbox.compose({
|
|
5842
5847
|
name: `${FluentDesignSystem.prefix}-checkbox`,
|
|
5843
|
-
template: template$
|
|
5844
|
-
styles: styles$
|
|
5848
|
+
template: template$s,
|
|
5849
|
+
styles: styles$r
|
|
5845
5850
|
});
|
|
5846
5851
|
|
|
5847
|
-
definition$
|
|
5852
|
+
definition$s.define(FluentDesignSystem.registry);
|
|
5848
5853
|
|
|
5849
5854
|
class CompoundButton extends Button {}
|
|
5850
5855
|
|
|
5851
|
-
const styles$
|
|
5852
|
-
${styles$
|
|
5856
|
+
const styles$q = css`
|
|
5857
|
+
${styles$v}
|
|
5853
5858
|
|
|
5854
5859
|
: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]))
|
|
5855
5860
|
::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}}`;
|
|
@@ -5857,22 +5862,22 @@ const styles$n = css`
|
|
|
5857
5862
|
function buttonTemplate(options = {}) {
|
|
5858
5863
|
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>`;
|
|
5859
5864
|
}
|
|
5860
|
-
const template$
|
|
5865
|
+
const template$r = buttonTemplate();
|
|
5861
5866
|
|
|
5862
|
-
const definition$
|
|
5867
|
+
const definition$r = CompoundButton.compose({
|
|
5863
5868
|
name: `${FluentDesignSystem.prefix}-compound-button`,
|
|
5864
|
-
template: template$
|
|
5865
|
-
styles: styles$
|
|
5869
|
+
template: template$r,
|
|
5870
|
+
styles: styles$q
|
|
5866
5871
|
});
|
|
5867
5872
|
|
|
5868
|
-
definition$
|
|
5873
|
+
definition$r.define(FluentDesignSystem.registry);
|
|
5869
5874
|
|
|
5870
|
-
var __defProp$
|
|
5871
|
-
var __getOwnPropDesc$
|
|
5872
|
-
var __decorateClass$
|
|
5873
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
5875
|
+
var __defProp$n = Object.defineProperty;
|
|
5876
|
+
var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
|
|
5877
|
+
var __decorateClass$n = (decorators, target, key, kind) => {
|
|
5878
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$n(target, key) : target;
|
|
5874
5879
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
5875
|
-
if (kind && result) __defProp$
|
|
5880
|
+
if (kind && result) __defProp$n(target, key, result);
|
|
5876
5881
|
return result;
|
|
5877
5882
|
};
|
|
5878
5883
|
class CounterBadge extends FASTElement {
|
|
@@ -5969,28 +5974,28 @@ class CounterBadge extends FASTElement {
|
|
|
5969
5974
|
return;
|
|
5970
5975
|
}
|
|
5971
5976
|
}
|
|
5972
|
-
__decorateClass$
|
|
5973
|
-
__decorateClass$
|
|
5974
|
-
__decorateClass$
|
|
5975
|
-
__decorateClass$
|
|
5976
|
-
__decorateClass$
|
|
5977
|
+
__decorateClass$n([attr], CounterBadge.prototype, "appearance", 2);
|
|
5978
|
+
__decorateClass$n([attr], CounterBadge.prototype, "color", 2);
|
|
5979
|
+
__decorateClass$n([attr], CounterBadge.prototype, "shape", 2);
|
|
5980
|
+
__decorateClass$n([attr], CounterBadge.prototype, "size", 2);
|
|
5981
|
+
__decorateClass$n([attr({
|
|
5977
5982
|
converter: nullableNumberConverter
|
|
5978
5983
|
})], CounterBadge.prototype, "count", 2);
|
|
5979
|
-
__decorateClass$
|
|
5984
|
+
__decorateClass$n([attr({
|
|
5980
5985
|
attribute: "overflow-count",
|
|
5981
5986
|
converter: nullableNumberConverter
|
|
5982
5987
|
})], CounterBadge.prototype, "overflowCount", 2);
|
|
5983
|
-
__decorateClass$
|
|
5988
|
+
__decorateClass$n([attr({
|
|
5984
5989
|
attribute: "show-zero",
|
|
5985
5990
|
mode: "boolean"
|
|
5986
5991
|
})], CounterBadge.prototype, "showZero", 2);
|
|
5987
|
-
__decorateClass$
|
|
5992
|
+
__decorateClass$n([attr({
|
|
5988
5993
|
mode: "boolean"
|
|
5989
5994
|
})], CounterBadge.prototype, "dot", 2);
|
|
5990
5995
|
applyMixins(CounterBadge, StartEnd);
|
|
5991
5996
|
|
|
5992
5997
|
const dotState = css.partial`:is([state--dot], :state(dot))`;
|
|
5993
|
-
const styles$
|
|
5998
|
+
const styles$p = css`
|
|
5994
5999
|
:host(${roundedState}){border-radius:${borderRadiusMedium}}:host(${roundedState}${tinyState}),:host(${roundedState}${extraSmallState}),:host(${roundedState}${smallState}){border-radius:${borderRadiusSmall}}${badgeSizeStyles}
|
|
5995
6000
|
${badgeFilledStyles}
|
|
5996
6001
|
${badgeGhostStyles}
|
|
@@ -6003,15 +6008,15 @@ function composeTemplate(options = {}) {
|
|
|
6003
6008
|
defaultContent: html`${x => x.setCount()}`
|
|
6004
6009
|
});
|
|
6005
6010
|
}
|
|
6006
|
-
const template$
|
|
6011
|
+
const template$q = composeTemplate();
|
|
6007
6012
|
|
|
6008
|
-
const definition$
|
|
6013
|
+
const definition$q = CounterBadge.compose({
|
|
6009
6014
|
name: `${FluentDesignSystem.prefix}-counter-badge`,
|
|
6010
|
-
template: template$
|
|
6011
|
-
styles: styles$
|
|
6015
|
+
template: template$q,
|
|
6016
|
+
styles: styles$p
|
|
6012
6017
|
});
|
|
6013
6018
|
|
|
6014
|
-
definition$
|
|
6019
|
+
definition$q.define(FluentDesignSystem.registry);
|
|
6015
6020
|
|
|
6016
6021
|
const DialogType = {
|
|
6017
6022
|
modal: "modal",
|
|
@@ -6019,12 +6024,12 @@ const DialogType = {
|
|
|
6019
6024
|
alert: "alert"
|
|
6020
6025
|
};
|
|
6021
6026
|
|
|
6022
|
-
var __defProp$
|
|
6023
|
-
var __getOwnPropDesc$
|
|
6024
|
-
var __decorateClass$
|
|
6025
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6027
|
+
var __defProp$m = Object.defineProperty;
|
|
6028
|
+
var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
|
|
6029
|
+
var __decorateClass$m = (decorators, target, key, kind) => {
|
|
6030
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$m(target, key) : target;
|
|
6026
6031
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6027
|
-
if (kind && result) __defProp$
|
|
6032
|
+
if (kind && result) __defProp$m(target, key, result);
|
|
6028
6033
|
return result;
|
|
6029
6034
|
};
|
|
6030
6035
|
class Dialog extends FASTElement {
|
|
@@ -6092,35 +6097,35 @@ class Dialog extends FASTElement {
|
|
|
6092
6097
|
return true;
|
|
6093
6098
|
}
|
|
6094
6099
|
}
|
|
6095
|
-
__decorateClass$
|
|
6096
|
-
__decorateClass$
|
|
6100
|
+
__decorateClass$m([observable], Dialog.prototype, "dialog", 2);
|
|
6101
|
+
__decorateClass$m([attr({
|
|
6097
6102
|
attribute: "aria-describedby"
|
|
6098
6103
|
})], Dialog.prototype, "ariaDescribedby", 2);
|
|
6099
|
-
__decorateClass$
|
|
6104
|
+
__decorateClass$m([attr({
|
|
6100
6105
|
attribute: "aria-labelledby"
|
|
6101
6106
|
})], Dialog.prototype, "ariaLabelledby", 2);
|
|
6102
|
-
__decorateClass$
|
|
6107
|
+
__decorateClass$m([attr], Dialog.prototype, "type", 2);
|
|
6103
6108
|
|
|
6104
|
-
const template$
|
|
6109
|
+
const template$p = 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>`;
|
|
6105
6110
|
|
|
6106
|
-
const styles$
|
|
6111
|
+
const styles$o = css`
|
|
6107
6112
|
@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`
|
|
6108
6113
|
@layer base{dialog{border:${strokeWidthThin} solid ${colorTransparentStroke}}}`));
|
|
6109
6114
|
|
|
6110
|
-
const definition$
|
|
6115
|
+
const definition$p = Dialog.compose({
|
|
6111
6116
|
name: `${FluentDesignSystem.prefix}-dialog`,
|
|
6112
|
-
template: template$
|
|
6113
|
-
styles: styles$
|
|
6117
|
+
template: template$p,
|
|
6118
|
+
styles: styles$o
|
|
6114
6119
|
});
|
|
6115
6120
|
|
|
6116
|
-
definition$
|
|
6121
|
+
definition$p.define(FluentDesignSystem.registry);
|
|
6117
6122
|
|
|
6118
|
-
var __defProp$
|
|
6119
|
-
var __getOwnPropDesc$
|
|
6120
|
-
var __decorateClass$
|
|
6121
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6123
|
+
var __defProp$l = Object.defineProperty;
|
|
6124
|
+
var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
|
|
6125
|
+
var __decorateClass$l = (decorators, target, key, kind) => {
|
|
6126
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$l(target, key) : target;
|
|
6122
6127
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6123
|
-
if (kind && result) __defProp$
|
|
6128
|
+
if (kind && result) __defProp$l(target, key, result);
|
|
6124
6129
|
return result;
|
|
6125
6130
|
};
|
|
6126
6131
|
class DialogBody extends FASTElement {
|
|
@@ -6129,7 +6134,7 @@ class DialogBody extends FASTElement {
|
|
|
6129
6134
|
this.noTitleAction = false;
|
|
6130
6135
|
}
|
|
6131
6136
|
}
|
|
6132
|
-
__decorateClass$
|
|
6137
|
+
__decorateClass$l([attr({
|
|
6133
6138
|
mode: "boolean",
|
|
6134
6139
|
attribute: "no-title-action"
|
|
6135
6140
|
})], DialogBody.prototype, "noTitleAction", 2);
|
|
@@ -6148,20 +6153,20 @@ const dismissed16Regular = html.partial(`
|
|
|
6148
6153
|
fill="currentColor"
|
|
6149
6154
|
></path>
|
|
6150
6155
|
</svg>`);
|
|
6151
|
-
const template$
|
|
6156
|
+
const template$o = 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>`;
|
|
6152
6157
|
|
|
6153
|
-
const styles$
|
|
6158
|
+
const styles$n = css`
|
|
6154
6159
|
${display("grid")}
|
|
6155
6160
|
|
|
6156
6161
|
: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}}}`;
|
|
6157
6162
|
|
|
6158
|
-
const definition$
|
|
6163
|
+
const definition$o = DialogBody.compose({
|
|
6159
6164
|
name: `${FluentDesignSystem.prefix}-dialog-body`,
|
|
6160
|
-
template: template$
|
|
6161
|
-
styles: styles$
|
|
6165
|
+
template: template$o,
|
|
6166
|
+
styles: styles$n
|
|
6162
6167
|
});
|
|
6163
6168
|
|
|
6164
|
-
definition$
|
|
6169
|
+
definition$o.define(FluentDesignSystem.registry);
|
|
6165
6170
|
|
|
6166
6171
|
const DividerRole = {
|
|
6167
6172
|
/**
|
|
@@ -6175,12 +6180,12 @@ const DividerRole = {
|
|
|
6175
6180
|
};
|
|
6176
6181
|
const DividerOrientation = Orientation;
|
|
6177
6182
|
|
|
6178
|
-
var __defProp$
|
|
6179
|
-
var __getOwnPropDesc$
|
|
6180
|
-
var __decorateClass$
|
|
6181
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6183
|
+
var __defProp$k = Object.defineProperty;
|
|
6184
|
+
var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
|
|
6185
|
+
var __decorateClass$k = (decorators, target, key, kind) => {
|
|
6186
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$k(target, key) : target;
|
|
6182
6187
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6183
|
-
if (kind && result) __defProp$
|
|
6188
|
+
if (kind && result) __defProp$k(target, key, result);
|
|
6184
6189
|
return result;
|
|
6185
6190
|
};
|
|
6186
6191
|
class Divider extends FASTElement {
|
|
@@ -6267,34 +6272,156 @@ class Divider extends FASTElement {
|
|
|
6267
6272
|
}
|
|
6268
6273
|
}
|
|
6269
6274
|
}
|
|
6270
|
-
__decorateClass$
|
|
6271
|
-
__decorateClass$
|
|
6272
|
-
__decorateClass$
|
|
6275
|
+
__decorateClass$k([attr], Divider.prototype, "role", 2);
|
|
6276
|
+
__decorateClass$k([attr], Divider.prototype, "orientation", 2);
|
|
6277
|
+
__decorateClass$k([attr({
|
|
6273
6278
|
attribute: "align-content"
|
|
6274
6279
|
})], Divider.prototype, "alignContent", 2);
|
|
6275
|
-
__decorateClass$
|
|
6276
|
-
__decorateClass$
|
|
6280
|
+
__decorateClass$k([attr], Divider.prototype, "appearance", 2);
|
|
6281
|
+
__decorateClass$k([attr({
|
|
6277
6282
|
mode: "boolean"
|
|
6278
6283
|
})], Divider.prototype, "inset", 2);
|
|
6279
6284
|
|
|
6280
6285
|
function dividerTemplate() {
|
|
6281
6286
|
return html`<slot></slot>`;
|
|
6282
6287
|
}
|
|
6283
|
-
const template$
|
|
6288
|
+
const template$n = dividerTemplate();
|
|
6284
6289
|
|
|
6285
|
-
const styles$
|
|
6290
|
+
const styles$m = css`
|
|
6286
6291
|
${display("flex")}
|
|
6287
6292
|
|
|
6288
6293
|
: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`
|
|
6289
6294
|
: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}`));
|
|
6290
6295
|
|
|
6291
|
-
const definition$
|
|
6296
|
+
const definition$n = Divider.compose({
|
|
6292
6297
|
name: `${FluentDesignSystem.prefix}-divider`,
|
|
6293
|
-
template: template$
|
|
6294
|
-
styles: styles$
|
|
6298
|
+
template: template$n,
|
|
6299
|
+
styles: styles$m
|
|
6295
6300
|
});
|
|
6296
6301
|
|
|
6297
|
-
definition$
|
|
6302
|
+
definition$n.define(FluentDesignSystem.registry);
|
|
6303
|
+
|
|
6304
|
+
const DrawerPosition = {
|
|
6305
|
+
start: "start",
|
|
6306
|
+
end: "end"
|
|
6307
|
+
};
|
|
6308
|
+
const DrawerSize = {
|
|
6309
|
+
small: "small",
|
|
6310
|
+
medium: "medium",
|
|
6311
|
+
large: "large",
|
|
6312
|
+
full: "full"
|
|
6313
|
+
};
|
|
6314
|
+
const DrawerType = {
|
|
6315
|
+
nonModal: "non-modal",
|
|
6316
|
+
modal: "modal",
|
|
6317
|
+
inline: "inline"
|
|
6318
|
+
};
|
|
6319
|
+
|
|
6320
|
+
var __defProp$j = Object.defineProperty;
|
|
6321
|
+
var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
|
|
6322
|
+
var __decorateClass$j = (decorators, target, key, kind) => {
|
|
6323
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$j(target, key) : target;
|
|
6324
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6325
|
+
if (kind && result) __defProp$j(target, key, result);
|
|
6326
|
+
return result;
|
|
6327
|
+
};
|
|
6328
|
+
class Drawer extends FASTElement {
|
|
6329
|
+
constructor() {
|
|
6330
|
+
super(...arguments);
|
|
6331
|
+
this.type = DrawerType.modal;
|
|
6332
|
+
this.position = DrawerPosition.start;
|
|
6333
|
+
this.size = DrawerSize.medium;
|
|
6334
|
+
/**
|
|
6335
|
+
* @public
|
|
6336
|
+
* Method to emit an event after the dialog's open state changes
|
|
6337
|
+
* HTML spec proposal: https://github.com/whatwg/html/issues/9733
|
|
6338
|
+
*/
|
|
6339
|
+
this.emitToggle = () => {
|
|
6340
|
+
this.$emit("toggle", {
|
|
6341
|
+
oldState: this.dialog.open ? "closed" : "open",
|
|
6342
|
+
newState: this.dialog.open ? "open" : "closed"
|
|
6343
|
+
});
|
|
6344
|
+
};
|
|
6345
|
+
/**
|
|
6346
|
+
* @public
|
|
6347
|
+
* Method to emit an event before the dialog's open state changes
|
|
6348
|
+
* HTML spec proposal: https://github.com/whatwg/html/issues/9733
|
|
6349
|
+
*/
|
|
6350
|
+
this.emitBeforeToggle = () => {
|
|
6351
|
+
this.$emit("beforetoggle", {
|
|
6352
|
+
oldState: this.dialog.open ? "open" : "closed",
|
|
6353
|
+
newState: this.dialog.open ? "closed" : "open"
|
|
6354
|
+
});
|
|
6355
|
+
};
|
|
6356
|
+
}
|
|
6357
|
+
/**
|
|
6358
|
+
* @public
|
|
6359
|
+
* Method to show the drawer
|
|
6360
|
+
*/
|
|
6361
|
+
show() {
|
|
6362
|
+
Updates.enqueue(() => {
|
|
6363
|
+
this.emitBeforeToggle();
|
|
6364
|
+
if (this.type === DrawerType.inline || this.type === DrawerType.nonModal) {
|
|
6365
|
+
this.dialog.show();
|
|
6366
|
+
} else {
|
|
6367
|
+
this.dialog.showModal();
|
|
6368
|
+
}
|
|
6369
|
+
this.emitToggle();
|
|
6370
|
+
});
|
|
6371
|
+
}
|
|
6372
|
+
/**
|
|
6373
|
+
* @public
|
|
6374
|
+
* Method to hide the drawer
|
|
6375
|
+
*/
|
|
6376
|
+
hide() {
|
|
6377
|
+
this.emitBeforeToggle();
|
|
6378
|
+
this.dialog.close();
|
|
6379
|
+
this.emitToggle();
|
|
6380
|
+
}
|
|
6381
|
+
/**
|
|
6382
|
+
* @public
|
|
6383
|
+
* @param event - The click event
|
|
6384
|
+
* @returns boolean - Always returns true
|
|
6385
|
+
* Handles click events on the drawer.
|
|
6386
|
+
*/
|
|
6387
|
+
clickHandler(event) {
|
|
6388
|
+
event.preventDefault();
|
|
6389
|
+
if (this.dialog.open && event.target === this.dialog) {
|
|
6390
|
+
this.hide();
|
|
6391
|
+
}
|
|
6392
|
+
return true;
|
|
6393
|
+
}
|
|
6394
|
+
}
|
|
6395
|
+
__decorateClass$j([attr], Drawer.prototype, "type", 2);
|
|
6396
|
+
__decorateClass$j([attr({
|
|
6397
|
+
attribute: "aria-labelledby"
|
|
6398
|
+
})], Drawer.prototype, "ariaLabelledby", 2);
|
|
6399
|
+
__decorateClass$j([attr({
|
|
6400
|
+
attribute: "aria-describedby"
|
|
6401
|
+
})], Drawer.prototype, "ariaDescribedby", 2);
|
|
6402
|
+
__decorateClass$j([attr], Drawer.prototype, "position", 2);
|
|
6403
|
+
__decorateClass$j([attr({
|
|
6404
|
+
attribute: "size"
|
|
6405
|
+
})], Drawer.prototype, "size", 2);
|
|
6406
|
+
__decorateClass$j([observable], Drawer.prototype, "dialog", 2);
|
|
6407
|
+
|
|
6408
|
+
const styles$l = css`
|
|
6409
|
+
${display("block")}
|
|
6410
|
+
|
|
6411
|
+
: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}}}`;
|
|
6412
|
+
|
|
6413
|
+
function drawerTemplate() {
|
|
6414
|
+
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>`;
|
|
6415
|
+
}
|
|
6416
|
+
const template$m = drawerTemplate();
|
|
6417
|
+
|
|
6418
|
+
const definition$m = Drawer.compose({
|
|
6419
|
+
name: `${FluentDesignSystem.prefix}-drawer`,
|
|
6420
|
+
template: template$m,
|
|
6421
|
+
styles: styles$l
|
|
6422
|
+
});
|
|
6423
|
+
|
|
6424
|
+
definition$m.define(FluentDesignSystem.registry);
|
|
6298
6425
|
|
|
6299
6426
|
const LabelPosition = {
|
|
6300
6427
|
above: "above",
|
|
@@ -6315,12 +6442,12 @@ const ValidationFlags = {
|
|
|
6315
6442
|
valid: "valid"
|
|
6316
6443
|
};
|
|
6317
6444
|
|
|
6318
|
-
var __defProp$
|
|
6319
|
-
var __getOwnPropDesc$
|
|
6320
|
-
var __decorateClass$
|
|
6321
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6445
|
+
var __defProp$i = Object.defineProperty;
|
|
6446
|
+
var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
|
|
6447
|
+
var __decorateClass$i = (decorators, target, key, kind) => {
|
|
6448
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$i(target, key) : target;
|
|
6322
6449
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6323
|
-
if (kind && result) __defProp$
|
|
6450
|
+
if (kind && result) __defProp$i(target, key, result);
|
|
6324
6451
|
return result;
|
|
6325
6452
|
};
|
|
6326
6453
|
class Field extends FASTElement {
|
|
@@ -6440,11 +6567,11 @@ class Field extends FASTElement {
|
|
|
6440
6567
|
}
|
|
6441
6568
|
}
|
|
6442
6569
|
}
|
|
6443
|
-
__decorateClass$
|
|
6570
|
+
__decorateClass$i([attr({
|
|
6444
6571
|
attribute: "label-position"
|
|
6445
6572
|
})], Field.prototype, "labelPosition", 2);
|
|
6446
|
-
__decorateClass$
|
|
6447
|
-
__decorateClass$
|
|
6573
|
+
__decorateClass$i([observable], Field.prototype, "messageSlot", 2);
|
|
6574
|
+
__decorateClass$i([observable], Field.prototype, "slottedInputs", 2);
|
|
6448
6575
|
|
|
6449
6576
|
const disabledState = css.partial`:is([state--disabled], :state(disabled))`;
|
|
6450
6577
|
const focusVisibleState = css.partial`:is([state--focus-visible], :state(focus-visible))`;
|
|
@@ -6459,12 +6586,12 @@ const tooShortState = css.partial`:is([state--${ValidationFlags.tooShort}], :sta
|
|
|
6459
6586
|
const typeMismatchState = css.partial`:is([state--${ValidationFlags.typeMismatch}], :state(${ValidationFlags.typeMismatch}))`;
|
|
6460
6587
|
const validState = css.partial`:is([state-${ValidationFlags.valid}], :state(${ValidationFlags.valid}))`;
|
|
6461
6588
|
const valueMissingState = css.partial`:is([state--${ValidationFlags.valueMissing}], :state(${ValidationFlags.valueMissing}))`;
|
|
6462
|
-
const styles$
|
|
6589
|
+
const styles$k = css`
|
|
6463
6590
|
${display("inline-grid")}
|
|
6464
6591
|
|
|
6465
6592
|
:host{align-items:center;cursor:pointer;gap:0 ${spacingHorizontalM};justify-items:start;padding:${spacingVerticalS}}:has([slot='message']){color:${colorNeutralForeground1};row-gap:${spacingVerticalS}}:not(::slotted([slot='label'])){gap:0}:host([label-position='before']){grid-template-areas:'label input' 'label message'}:host([label-position='after']){gap:0;grid-template-areas:'input label' 'message message';grid-template-columns:auto 1fr}:host([label-position='after']) ::slotted([slot='input']){margin-inline-end:${spacingHorizontalM}}:host([label-position='above']){grid-template-areas:'label' 'input' 'message';row-gap:${spacingVerticalXXS}}:host([label-position='below']){grid-template-areas:'input' 'label' 'message'}::slotted([slot='label']){cursor:pointer;grid-area:label}::slotted([slot='input']){grid-area:input}::slotted([slot='message']){margin-block-start:${spacingVerticalXXS};grid-area:message}:host(${focusVisibleState}:focus-within){border-radius:${borderRadiusMedium};outline:${strokeWidthThick} solid ${colorStrokeFocus2}}::slotted(label){display:inline-flex;color:${colorNeutralForeground1};cursor:pointer;font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};line-height:${lineHeightBase300};user-select:none}:host([size='small']) ::slotted(label){font-size:${fontSizeBase200};line-height:${lineHeightBase200}}:host([size='large']) ::slotted(label){font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host([size='large']) ::slotted(label),:host([weight='semibold']) ::slotted(label){font-weight:${fontWeightSemibold}}:host(${disabledState}) ::slotted(label){color:${colorNeutralForeground1};cursor:default}::slotted([flag]){display:none}:host(${badInputState}) ::slotted([flag='${ValidationFlags.badInput}']),:host(${customErrorState}) ::slotted([flag='${ValidationFlags.customError}']),:host(${patternMismatchState}) ::slotted([flag='${ValidationFlags.patternMismatch}']),:host(${rangeOverflowState}) ::slotted([flag='${ValidationFlags.rangeOverflow}']),:host(${rangeUnderflowState}) ::slotted([flag='${ValidationFlags.rangeUnderflow}']),:host(${stepMismatchState}) ::slotted([flag='${ValidationFlags.stepMismatch}']),:host(${tooLongState}) ::slotted([flag='${ValidationFlags.tooLong}']),:host(${tooShortState}) ::slotted([flag='${ValidationFlags.tooShort}']),:host(${typeMismatchState}) ::slotted([flag='${ValidationFlags.typeMismatch}']),:host(${valueMissingState}) ::slotted([flag='${ValidationFlags.valueMissing}']),:host(${validState}) ::slotted([flag='${ValidationFlags.valid}']){display:block}`;
|
|
6466
6593
|
|
|
6467
|
-
const template$
|
|
6594
|
+
const template$l = html`<template @click="${(x, c) => x.clickHandler(c.event)}" @change="${(x, c) => x.changeHandler(c.event)}" @focusin="${(x, c) => x.focusinHandler(c.event)}" @focusout="${(x, c) => x.focusoutHandler(c.event)}" ${children({
|
|
6468
6595
|
property: "slottedInputs",
|
|
6469
6596
|
attributes: true,
|
|
6470
6597
|
attributeFilter: ["disabled", "required", "readonly"],
|
|
@@ -6476,23 +6603,23 @@ const template$j = html`<template @click="${(x, c) => x.clickHandler(c.event)}"
|
|
|
6476
6603
|
filter: elements("[flag]")
|
|
6477
6604
|
})}></slot></template>`;
|
|
6478
6605
|
|
|
6479
|
-
const definition$
|
|
6606
|
+
const definition$l = Field.compose({
|
|
6480
6607
|
name: `${FluentDesignSystem.prefix}-field`,
|
|
6481
|
-
template: template$
|
|
6482
|
-
styles: styles$
|
|
6608
|
+
template: template$l,
|
|
6609
|
+
styles: styles$k,
|
|
6483
6610
|
shadowOptions: {
|
|
6484
6611
|
delegatesFocus: true
|
|
6485
6612
|
}
|
|
6486
6613
|
});
|
|
6487
6614
|
|
|
6488
|
-
definition$
|
|
6615
|
+
definition$l.define(FluentDesignSystem.registry);
|
|
6489
6616
|
|
|
6490
|
-
var __defProp$
|
|
6491
|
-
var __getOwnPropDesc$
|
|
6492
|
-
var __decorateClass$
|
|
6493
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6617
|
+
var __defProp$h = Object.defineProperty;
|
|
6618
|
+
var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
|
|
6619
|
+
var __decorateClass$h = (decorators, target, key, kind) => {
|
|
6620
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$h(target, key) : target;
|
|
6494
6621
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6495
|
-
if (kind && result) __defProp$
|
|
6622
|
+
if (kind && result) __defProp$h(target, key, result);
|
|
6496
6623
|
return result;
|
|
6497
6624
|
};
|
|
6498
6625
|
class Image extends FASTElement {
|
|
@@ -6557,37 +6684,37 @@ class Image extends FASTElement {
|
|
|
6557
6684
|
}
|
|
6558
6685
|
}
|
|
6559
6686
|
}
|
|
6560
|
-
__decorateClass$
|
|
6687
|
+
__decorateClass$h([attr({
|
|
6561
6688
|
mode: "boolean"
|
|
6562
6689
|
})], Image.prototype, "block", 2);
|
|
6563
|
-
__decorateClass$
|
|
6690
|
+
__decorateClass$h([attr({
|
|
6564
6691
|
mode: "boolean"
|
|
6565
6692
|
})], Image.prototype, "bordered", 2);
|
|
6566
|
-
__decorateClass$
|
|
6693
|
+
__decorateClass$h([attr({
|
|
6567
6694
|
mode: "boolean"
|
|
6568
6695
|
})], Image.prototype, "shadow", 2);
|
|
6569
|
-
__decorateClass$
|
|
6570
|
-
__decorateClass$
|
|
6696
|
+
__decorateClass$h([attr], Image.prototype, "fit", 2);
|
|
6697
|
+
__decorateClass$h([attr], Image.prototype, "shape", 2);
|
|
6571
6698
|
|
|
6572
|
-
const template$
|
|
6699
|
+
const template$k = html`<slot></slot>`;
|
|
6573
6700
|
|
|
6574
|
-
const styles$
|
|
6701
|
+
const styles$j = css`
|
|
6575
6702
|
:host{contain:content}:host ::slotted(img){box-sizing:border-box;min-height:8px;min-width:8px;display:inline-block}:host(:is([state--block],:state(block))) ::slotted(img){width:100%;height:auto}:host(:is([state--bordered],:state(bordered))) ::slotted(img){border:${strokeWidthThin} solid ${colorNeutralStroke2}}:host(:is([state--fit-none],:state(fit-none))) ::slotted(img){object-fit:none;object-position:top left;height:100%;width:100%}:host(:is([state--fit-center],:state(fit-center))) ::slotted(img){object-fit:none;object-position:center;height:100%;width:100%}:host(:is([state--fit-contain],:state(fit-contain))) ::slotted(img){object-fit:contain;object-position:center;height:100%;width:100%}:host(:is([state--fit-cover],:state(fit-cover))) ::slotted(img){object-fit:cover;object-position:center;height:100%;width:100%}:host(:is([state--shadowed],:state(shadowed))) ::slotted(img){box-shadow:${shadow4}}:host(${circularState}) ::slotted(img){border-radius:${borderRadiusCircular}}:host(${roundedState}) ::slotted(img){border-radius:${borderRadiusMedium}}`;
|
|
6576
6703
|
|
|
6577
|
-
const definition$
|
|
6704
|
+
const definition$k = Image.compose({
|
|
6578
6705
|
name: `${FluentDesignSystem.prefix}-image`,
|
|
6579
|
-
template: template$
|
|
6580
|
-
styles: styles$
|
|
6706
|
+
template: template$k,
|
|
6707
|
+
styles: styles$j
|
|
6581
6708
|
});
|
|
6582
6709
|
|
|
6583
|
-
definition$
|
|
6710
|
+
definition$k.define(FluentDesignSystem.registry);
|
|
6584
6711
|
|
|
6585
|
-
var __defProp$
|
|
6586
|
-
var __getOwnPropDesc$
|
|
6587
|
-
var __decorateClass$
|
|
6588
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6712
|
+
var __defProp$g = Object.defineProperty;
|
|
6713
|
+
var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
|
|
6714
|
+
var __decorateClass$g = (decorators, target, key, kind) => {
|
|
6715
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$g(target, key) : target;
|
|
6589
6716
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6590
|
-
if (kind && result) __defProp$
|
|
6717
|
+
if (kind && result) __defProp$g(target, key, result);
|
|
6591
6718
|
return result;
|
|
6592
6719
|
};
|
|
6593
6720
|
class Label extends FASTElement {
|
|
@@ -6637,16 +6764,16 @@ class Label extends FASTElement {
|
|
|
6637
6764
|
toggleState(this.elementInternals, "disabled", next);
|
|
6638
6765
|
}
|
|
6639
6766
|
}
|
|
6640
|
-
__decorateClass$
|
|
6641
|
-
__decorateClass$
|
|
6642
|
-
__decorateClass$
|
|
6767
|
+
__decorateClass$g([attr], Label.prototype, "size", 2);
|
|
6768
|
+
__decorateClass$g([attr], Label.prototype, "weight", 2);
|
|
6769
|
+
__decorateClass$g([attr({
|
|
6643
6770
|
mode: "boolean"
|
|
6644
6771
|
})], Label.prototype, "disabled", 2);
|
|
6645
|
-
__decorateClass$
|
|
6772
|
+
__decorateClass$g([attr({
|
|
6646
6773
|
mode: "boolean"
|
|
6647
6774
|
})], Label.prototype, "required", 2);
|
|
6648
6775
|
|
|
6649
|
-
const styles$
|
|
6776
|
+
const styles$i = css`
|
|
6650
6777
|
${display("inline-flex")}
|
|
6651
6778
|
|
|
6652
6779
|
:host{color:${colorNeutralForeground1};cursor:pointer;font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};line-height:${lineHeightBase300};user-select:none}.asterisk{color:${colorPaletteRedForeground1};margin-inline-start:${spacingHorizontalXS}}:host(${smallState}){font-size:${fontSizeBase200};line-height:${lineHeightBase200}}:host(${largeState}){font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host(${largeState}),:host(:is([state--semibold],:state(semibold))){font-weight:${fontWeightSemibold}}:host(:is([state--disabled],:state(disabled))),:host(:is([state--disabled],:state(disabled))) .asterisk{color:${colorNeutralForegroundDisabled}}`;
|
|
@@ -6654,22 +6781,22 @@ const styles$g = css`
|
|
|
6654
6781
|
function labelTemplate() {
|
|
6655
6782
|
return html`<slot></slot><span part="asterisk" class="asterisk" ?hidden="${x => !x.required}">*</span>`;
|
|
6656
6783
|
}
|
|
6657
|
-
const template$
|
|
6784
|
+
const template$j = labelTemplate();
|
|
6658
6785
|
|
|
6659
|
-
const definition$
|
|
6786
|
+
const definition$j = Label.compose({
|
|
6660
6787
|
name: `${FluentDesignSystem.prefix}-label`,
|
|
6661
|
-
template: template$
|
|
6662
|
-
styles: styles$
|
|
6788
|
+
template: template$j,
|
|
6789
|
+
styles: styles$i
|
|
6663
6790
|
});
|
|
6664
6791
|
|
|
6665
|
-
definition$
|
|
6792
|
+
definition$j.define(FluentDesignSystem.registry);
|
|
6666
6793
|
|
|
6667
|
-
var __defProp$
|
|
6668
|
-
var __getOwnPropDesc$
|
|
6669
|
-
var __decorateClass$
|
|
6670
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6794
|
+
var __defProp$f = Object.defineProperty;
|
|
6795
|
+
var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
|
|
6796
|
+
var __decorateClass$f = (decorators, target, key, kind) => {
|
|
6797
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$f(target, key) : target;
|
|
6671
6798
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6672
|
-
if (kind && result) __defProp$
|
|
6799
|
+
if (kind && result) __defProp$f(target, key, result);
|
|
6673
6800
|
return result;
|
|
6674
6801
|
};
|
|
6675
6802
|
class Link extends BaseAnchor {
|
|
@@ -6699,12 +6826,12 @@ class Link extends BaseAnchor {
|
|
|
6699
6826
|
toggleState(this.elementInternals, "inline", next);
|
|
6700
6827
|
}
|
|
6701
6828
|
}
|
|
6702
|
-
__decorateClass$
|
|
6703
|
-
__decorateClass$
|
|
6829
|
+
__decorateClass$f([attr], Link.prototype, "appearance", 2);
|
|
6830
|
+
__decorateClass$f([attr({
|
|
6704
6831
|
mode: "boolean"
|
|
6705
6832
|
})], Link.prototype, "inline", 2);
|
|
6706
6833
|
|
|
6707
|
-
const styles$
|
|
6834
|
+
const styles$h = css`
|
|
6708
6835
|
${display("inline")}
|
|
6709
6836
|
|
|
6710
6837
|
:host{position:relative;box-sizing:border-box;background-color:transparent;color:${colorBrandForegroundLink};cursor:pointer;font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};margin:0;padding:0;overflow:inherit;text-align:left;text-decoration:none;text-decoration-thinkness:${strokeWidthThin};text-overflow:inherit;user-select:text}:host(:is(:hover,:focus-visible)){outline:none;text-decoration-line:underline}@media (hover:hover){:host(:hover){color:${colorBrandForegroundLinkHover}}:host(:active){color:${colorBrandForegroundLinkPressed}}:host(${subtleState}:hover){color:${colorNeutralForeground2LinkHover}}:host(${subtleState}:active){color:${colorNeutralForeground2LinkPressed}}}:host(${subtleState}){color:${colorNeutralForeground2Link}}:host-context(:is(h1,h2,h3,h4,h5,h6,p,fluent-text)),:host(:is([state--inline],:state(inline))){font:inherit;text-decoration:underline}:host(:not([href])){color:inherit;text-decoration:none}::slotted(a){position:absolute;inset:0}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
@@ -6713,19 +6840,19 @@ const styles$f = css`
|
|
|
6713
6840
|
function anchorTemplate() {
|
|
6714
6841
|
return html`<template tabindex="0" @click="${(x, c) => x.clickHandler(c.event)}" @keydown="${(x, c) => x.keydownHandler(c.event)}"><slot></slot></template>`;
|
|
6715
6842
|
}
|
|
6716
|
-
const template$
|
|
6843
|
+
const template$i = anchorTemplate();
|
|
6717
6844
|
|
|
6718
|
-
const definition$
|
|
6845
|
+
const definition$i = Link.compose({
|
|
6719
6846
|
name: `${FluentDesignSystem.prefix}-link`,
|
|
6720
|
-
template: template$
|
|
6721
|
-
styles: styles$
|
|
6847
|
+
template: template$i,
|
|
6848
|
+
styles: styles$h
|
|
6722
6849
|
});
|
|
6723
6850
|
|
|
6724
|
-
definition$
|
|
6851
|
+
definition$i.define(FluentDesignSystem.registry);
|
|
6725
6852
|
|
|
6726
6853
|
class MenuButton extends Button {}
|
|
6727
6854
|
|
|
6728
|
-
const template$
|
|
6855
|
+
const template$h = buttonTemplate$1({
|
|
6729
6856
|
end: html.partial( /* html */
|
|
6730
6857
|
`
|
|
6731
6858
|
<svg slot="end" fill="currentColor" aria-hidden="true" width="1em" height="1em" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -6734,13 +6861,13 @@ const template$f = buttonTemplate$1({
|
|
|
6734
6861
|
`)
|
|
6735
6862
|
});
|
|
6736
6863
|
|
|
6737
|
-
const definition$
|
|
6864
|
+
const definition$h = MenuButton.compose({
|
|
6738
6865
|
name: `${FluentDesignSystem.prefix}-menu-button`,
|
|
6739
|
-
template: template$
|
|
6740
|
-
styles: styles$
|
|
6866
|
+
template: template$h,
|
|
6867
|
+
styles: styles$v
|
|
6741
6868
|
});
|
|
6742
6869
|
|
|
6743
|
-
definition$
|
|
6870
|
+
definition$h.define(FluentDesignSystem.registry);
|
|
6744
6871
|
|
|
6745
6872
|
const MenuItemRole = {
|
|
6746
6873
|
/**
|
|
@@ -6762,12 +6889,12 @@ const MenuItemRole = {
|
|
|
6762
6889
|
[MenuItemRole.menuitemradio]: "menuitemradio"
|
|
6763
6890
|
});
|
|
6764
6891
|
|
|
6765
|
-
var __defProp$
|
|
6766
|
-
var __getOwnPropDesc$
|
|
6767
|
-
var __decorateClass$
|
|
6768
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6892
|
+
var __defProp$e = Object.defineProperty;
|
|
6893
|
+
var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
|
|
6894
|
+
var __decorateClass$e = (decorators, target, key, kind) => {
|
|
6895
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$e(target, key) : target;
|
|
6769
6896
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6770
|
-
if (kind && result) __defProp$
|
|
6897
|
+
if (kind && result) __defProp$e(target, key, result);
|
|
6771
6898
|
return result;
|
|
6772
6899
|
};
|
|
6773
6900
|
class MenuItem extends FASTElement {
|
|
@@ -6912,21 +7039,21 @@ class MenuItem extends FASTElement {
|
|
|
6912
7039
|
}
|
|
6913
7040
|
}
|
|
6914
7041
|
}
|
|
6915
|
-
__decorateClass$
|
|
7042
|
+
__decorateClass$e([attr({
|
|
6916
7043
|
mode: "boolean"
|
|
6917
7044
|
})], MenuItem.prototype, "disabled", 2);
|
|
6918
|
-
__decorateClass$
|
|
6919
|
-
__decorateClass$
|
|
7045
|
+
__decorateClass$e([attr], MenuItem.prototype, "role", 2);
|
|
7046
|
+
__decorateClass$e([attr({
|
|
6920
7047
|
mode: "boolean"
|
|
6921
7048
|
})], MenuItem.prototype, "checked", 2);
|
|
6922
|
-
__decorateClass$
|
|
7049
|
+
__decorateClass$e([attr({
|
|
6923
7050
|
mode: "boolean"
|
|
6924
7051
|
})], MenuItem.prototype, "hidden", 2);
|
|
6925
|
-
__decorateClass$
|
|
6926
|
-
__decorateClass$
|
|
7052
|
+
__decorateClass$e([observable], MenuItem.prototype, "slottedSubmenu", 2);
|
|
7053
|
+
__decorateClass$e([observable], MenuItem.prototype, "submenu", 2);
|
|
6927
7054
|
applyMixins(MenuItem, StartEnd);
|
|
6928
7055
|
|
|
6929
|
-
const styles$
|
|
7056
|
+
const styles$g = css`
|
|
6930
7057
|
${display("grid")}
|
|
6931
7058
|
|
|
6932
7059
|
: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([icon]:hover) ::slotted([slot='start']){color:${colorCompoundBrandForeground1Hover}}:host(:active){background-color:${colorNeutralBackground1Selected};color:${colorNeutralForeground2Pressed}}:host(:active) ::slotted([slot='start']){color:${colorCompoundBrandForeground1Pressed}}:host([disabled]){background-color:${colorNeutralBackgroundDisabled};color:${colorNeutralForegroundDisabled}}:host([disabled]) ::slotted([slot='start']),:host([disabled]) ::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([checked])) .indicator,:host(:not([checked])) ::slotted([slot='indicator']),:host(:not([aria-haspopup='menu'])) .submenu-glyph,:host(:not([aria-haspopup='menu'])) ::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([aria-haspopup='menu']){grid-template-columns:20px auto auto 20px}:host([data-indent='2'][aria-haspopup='menu']){grid-template-columns:20px 20px auto auto 20px}.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]){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`
|
|
@@ -6940,25 +7067,25 @@ function menuItemTemplate(options = {}) {
|
|
|
6940
7067
|
filter: elements("[role='menu']")
|
|
6941
7068
|
})}></slot></template>`;
|
|
6942
7069
|
}
|
|
6943
|
-
const template$
|
|
7070
|
+
const template$g = menuItemTemplate({
|
|
6944
7071
|
indicator: Checkmark16Filled,
|
|
6945
7072
|
submenuGlyph: chevronRight16Filled
|
|
6946
7073
|
});
|
|
6947
7074
|
|
|
6948
|
-
const definition$
|
|
7075
|
+
const definition$g = MenuItem.compose({
|
|
6949
7076
|
name: `${FluentDesignSystem.prefix}-menu-item`,
|
|
6950
|
-
template: template$
|
|
6951
|
-
styles: styles$
|
|
7077
|
+
template: template$g,
|
|
7078
|
+
styles: styles$g
|
|
6952
7079
|
});
|
|
6953
7080
|
|
|
6954
|
-
definition$
|
|
7081
|
+
definition$g.define(FluentDesignSystem.registry);
|
|
6955
7082
|
|
|
6956
|
-
var __defProp$
|
|
6957
|
-
var __getOwnPropDesc$
|
|
6958
|
-
var __decorateClass$
|
|
6959
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
7083
|
+
var __defProp$d = Object.defineProperty;
|
|
7084
|
+
var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
|
|
7085
|
+
var __decorateClass$d = (decorators, target, key, kind) => {
|
|
7086
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$d(target, key) : target;
|
|
6960
7087
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6961
|
-
if (kind && result) __defProp$
|
|
7088
|
+
if (kind && result) __defProp$d(target, key, result);
|
|
6962
7089
|
return result;
|
|
6963
7090
|
};
|
|
6964
7091
|
const _MenuList = class _MenuList extends FASTElement {
|
|
@@ -7167,10 +7294,10 @@ const _MenuList = class _MenuList extends FASTElement {
|
|
|
7167
7294
|
}
|
|
7168
7295
|
};
|
|
7169
7296
|
_MenuList.focusableElementRoles = MenuItemRole;
|
|
7170
|
-
__decorateClass$
|
|
7297
|
+
__decorateClass$d([observable], _MenuList.prototype, "items", 2);
|
|
7171
7298
|
let MenuList = _MenuList;
|
|
7172
7299
|
|
|
7173
|
-
const styles$
|
|
7300
|
+
const styles$f = css`
|
|
7174
7301
|
${display("flex")}
|
|
7175
7302
|
|
|
7176
7303
|
: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}`;
|
|
@@ -7178,22 +7305,22 @@ const styles$d = css`
|
|
|
7178
7305
|
function menuTemplate$1() {
|
|
7179
7306
|
return html`<template slot="${x => x.slot ? x.slot : x.isNestedMenu() ? "submenu" : void 0}" role="menu" @keydown="${(x, c) => x.handleMenuKeyDown(c.event)}" @focusout="${(x, c) => x.handleFocusOut(c.event)}"><slot ${slotted("items")}></slot></template>`;
|
|
7180
7307
|
}
|
|
7181
|
-
const template$
|
|
7308
|
+
const template$f = menuTemplate$1();
|
|
7182
7309
|
|
|
7183
|
-
const definition$
|
|
7310
|
+
const definition$f = MenuList.compose({
|
|
7184
7311
|
name: `${FluentDesignSystem.prefix}-menu-list`,
|
|
7185
|
-
template: template$
|
|
7186
|
-
styles: styles$
|
|
7312
|
+
template: template$f,
|
|
7313
|
+
styles: styles$f
|
|
7187
7314
|
});
|
|
7188
7315
|
|
|
7189
|
-
definition$
|
|
7316
|
+
definition$f.define(FluentDesignSystem.registry);
|
|
7190
7317
|
|
|
7191
|
-
var __defProp$
|
|
7192
|
-
var __getOwnPropDesc$
|
|
7193
|
-
var __decorateClass$
|
|
7194
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
7318
|
+
var __defProp$c = Object.defineProperty;
|
|
7319
|
+
var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
|
|
7320
|
+
var __decorateClass$c = (decorators, target, key, kind) => {
|
|
7321
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$c(target, key) : target;
|
|
7195
7322
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7196
|
-
if (kind && result) __defProp$
|
|
7323
|
+
if (kind && result) __defProp$c(target, key, result);
|
|
7197
7324
|
return result;
|
|
7198
7325
|
};
|
|
7199
7326
|
class Menu extends FASTElement {
|
|
@@ -7464,32 +7591,36 @@ class Menu extends FASTElement {
|
|
|
7464
7591
|
break;
|
|
7465
7592
|
case keyTab:
|
|
7466
7593
|
if (this._open) this.closeMenu();
|
|
7467
|
-
if (e.shiftKey) this.
|
|
7594
|
+
if (e.shiftKey && e.composedPath()[0] !== this._trigger) {
|
|
7595
|
+
this.focusTrigger();
|
|
7596
|
+
} else if (e.shiftKey) {
|
|
7597
|
+
return true;
|
|
7598
|
+
}
|
|
7468
7599
|
default:
|
|
7469
7600
|
return true;
|
|
7470
7601
|
}
|
|
7471
7602
|
}
|
|
7472
7603
|
}
|
|
7473
|
-
__decorateClass$
|
|
7604
|
+
__decorateClass$c([observable, attr({
|
|
7474
7605
|
attribute: "open-on-hover",
|
|
7475
7606
|
mode: "boolean"
|
|
7476
7607
|
})], Menu.prototype, "openOnHover", 2);
|
|
7477
|
-
__decorateClass$
|
|
7608
|
+
__decorateClass$c([observable, attr({
|
|
7478
7609
|
attribute: "open-on-context",
|
|
7479
7610
|
mode: "boolean"
|
|
7480
7611
|
})], Menu.prototype, "openOnContext", 2);
|
|
7481
|
-
__decorateClass$
|
|
7612
|
+
__decorateClass$c([observable, attr({
|
|
7482
7613
|
attribute: "close-on-scroll",
|
|
7483
7614
|
mode: "boolean"
|
|
7484
7615
|
})], Menu.prototype, "closeOnScroll", 2);
|
|
7485
|
-
__decorateClass$
|
|
7616
|
+
__decorateClass$c([observable, attr({
|
|
7486
7617
|
attribute: "persist-on-item-click",
|
|
7487
7618
|
mode: "boolean"
|
|
7488
7619
|
})], Menu.prototype, "persistOnItemClick", 2);
|
|
7489
|
-
__decorateClass$
|
|
7490
|
-
__decorateClass$
|
|
7620
|
+
__decorateClass$c([observable], Menu.prototype, "slottedMenuList", 2);
|
|
7621
|
+
__decorateClass$c([observable], Menu.prototype, "slottedTriggers", 2);
|
|
7491
7622
|
|
|
7492
|
-
const styles$
|
|
7623
|
+
const styles$e = css`
|
|
7493
7624
|
${display("inline-block")}
|
|
7494
7625
|
|
|
7495
7626
|
::slotted([slot='trigger']){anchor-name:--menu-trigger}::slotted([popover]){inset-area:block-end span-inline-end;margin:0;max-height:var(--menu-max-height,auto);position-anchor:--menu-trigger;position-try-options:flip-block;position:absolute;z-index:1}::slotted([popover]:popover-open){inset:unset}::slotted([popover]:not(:popover-open)){display:none}`;
|
|
@@ -7503,22 +7634,112 @@ function menuTemplate() {
|
|
|
7503
7634
|
filter: elements()
|
|
7504
7635
|
})}></slot></template>`;
|
|
7505
7636
|
}
|
|
7506
|
-
const template$
|
|
7637
|
+
const template$e = menuTemplate();
|
|
7507
7638
|
|
|
7508
|
-
const definition$
|
|
7639
|
+
const definition$e = Menu.compose({
|
|
7509
7640
|
name: `${FluentDesignSystem.prefix}-menu`,
|
|
7510
|
-
template: template$
|
|
7511
|
-
styles: styles$
|
|
7641
|
+
template: template$e,
|
|
7642
|
+
styles: styles$e
|
|
7512
7643
|
});
|
|
7513
7644
|
|
|
7514
|
-
definition$
|
|
7645
|
+
definition$e.define(FluentDesignSystem.registry);
|
|
7515
7646
|
|
|
7516
|
-
var __defProp$
|
|
7517
|
-
var __getOwnPropDesc$
|
|
7518
|
-
var __decorateClass$
|
|
7519
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
7647
|
+
var __defProp$b = Object.defineProperty;
|
|
7648
|
+
var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
|
|
7649
|
+
var __decorateClass$b = (decorators, target, key, kind) => {
|
|
7650
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$b(target, key) : target;
|
|
7520
7651
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7521
|
-
if (kind && result) __defProp$
|
|
7652
|
+
if (kind && result) __defProp$b(target, key, result);
|
|
7653
|
+
return result;
|
|
7654
|
+
};
|
|
7655
|
+
class MessageBar extends FASTElement {
|
|
7656
|
+
constructor() {
|
|
7657
|
+
super();
|
|
7658
|
+
/**
|
|
7659
|
+
* The internal {@link https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
7660
|
+
*
|
|
7661
|
+
* @internal
|
|
7662
|
+
*/
|
|
7663
|
+
this.elementInternals = this.attachInternals();
|
|
7664
|
+
/**
|
|
7665
|
+
* @public
|
|
7666
|
+
* Method to emit a `dismiss` event when the message bar is dismissed
|
|
7667
|
+
*/
|
|
7668
|
+
this.dismissMessageBar = () => {
|
|
7669
|
+
this.$emit("dismiss", {});
|
|
7670
|
+
};
|
|
7671
|
+
this.elementInternals.role = "status";
|
|
7672
|
+
}
|
|
7673
|
+
/**
|
|
7674
|
+
* Handles changes to shape attribute custom states
|
|
7675
|
+
* @param prev - the previous state
|
|
7676
|
+
* @param next - the next state
|
|
7677
|
+
*/
|
|
7678
|
+
shapeChanged(prev, next) {
|
|
7679
|
+
if (prev) {
|
|
7680
|
+
toggleState(this.elementInternals, prev, false);
|
|
7681
|
+
}
|
|
7682
|
+
if (next) {
|
|
7683
|
+
toggleState(this.elementInternals, next, true);
|
|
7684
|
+
}
|
|
7685
|
+
}
|
|
7686
|
+
/**
|
|
7687
|
+
* Handles changes to the layout attribute custom states
|
|
7688
|
+
* @param prev - the previous state
|
|
7689
|
+
* @param next - the next state
|
|
7690
|
+
*/
|
|
7691
|
+
layoutChanged(prev, next) {
|
|
7692
|
+
if (prev) {
|
|
7693
|
+
toggleState(this.elementInternals, prev, false);
|
|
7694
|
+
}
|
|
7695
|
+
if (next) {
|
|
7696
|
+
toggleState(this.elementInternals, next, true);
|
|
7697
|
+
}
|
|
7698
|
+
}
|
|
7699
|
+
/**
|
|
7700
|
+
* Handles changes to the intent attribute custom states
|
|
7701
|
+
* @param prev - the previous state
|
|
7702
|
+
* @param next - the next state
|
|
7703
|
+
*/
|
|
7704
|
+
intentChanged(prev, next) {
|
|
7705
|
+
if (prev) {
|
|
7706
|
+
toggleState(this.elementInternals, prev, false);
|
|
7707
|
+
}
|
|
7708
|
+
if (next) {
|
|
7709
|
+
toggleState(this.elementInternals, next, true);
|
|
7710
|
+
}
|
|
7711
|
+
}
|
|
7712
|
+
}
|
|
7713
|
+
__decorateClass$b([attr], MessageBar.prototype, "shape", 2);
|
|
7714
|
+
__decorateClass$b([attr], MessageBar.prototype, "layout", 2);
|
|
7715
|
+
__decorateClass$b([attr], MessageBar.prototype, "intent", 2);
|
|
7716
|
+
|
|
7717
|
+
const styles$d = css`
|
|
7718
|
+
:host{display:grid;box-sizing:border-box;font-family:${fontFamilyBase};font-size:${fontSizeBase200};line-height:${lineHeightBase200};width:100%;background:${colorNeutralBackground3};border:1px solid ${colorNeutralStroke1};padding-inline:${spacingHorizontalM};border-radius:${borderRadiusMedium};min-height:36px;align-items:center;grid-template:'icon body actions dismiss' / auto 1fr auto auto;contain:layout style paint}:host(${squareState}){border-radius:0}:host(${successState}){background-color:${colorPaletteGreenBackground1};border-color:${colorPaletteGreenBorder1}}:host(${warningState}){background-color:${colorPaletteDarkOrangeBackground1};border-color:${colorPaletteDarkOrangeBorder1}}:host(${errorState}){background-color:${colorPaletteRedBackground1};border-color:${colorPaletteRedBorder1}}:host(${multiLineState}){grid-template-areas:'icon body dismiss'
|
|
7719
|
+
'actions actions actions';grid-template-columns:auto 1fr auto;grid-template-rows:auto auto 1fr;padding-block:${spacingVerticalMNudge};padding-inline:${spacingHorizontalM}}.content{grid-area:body;max-width:520px;padding-block:${spacingVerticalMNudge};padding-inline:0}:host(${multiLineState}) .content{padding:0}::slotted([slot='icon']){display:flex;grid-area:icon;flex-direction:column;align-items:center;color:${colorNeutralForeground3};margin-inline-end:${spacingHorizontalS}}:host(${multiLineState}) ::slotted([slot='icon']){align-items:start;height:100%}::slotted([slot='dismiss']){grid-area:dismiss}.actions{grid-area:actions;display:flex;justify-self:end;margin-inline-end:${spacingHorizontalS};gap:${spacingHorizontalS}}:host(${multiLineState}) .actions{margin-block-start:${spacingVerticalMNudge};margin-inline-end:0}:host(${multiLineState}) ::slotted([slot='dismiss']){align-items:start;height:100%;padding-block-start:${spacingVerticalS}}::slotted(*){font-size:inherit}`;
|
|
7720
|
+
|
|
7721
|
+
function messageBarTemplate() {
|
|
7722
|
+
return html`<slot name="icon"></slot><div class="content"><slot></slot></div><div class="actions"><slot name="actions"></slot></div><slot name="dismiss"></slot>`;
|
|
7723
|
+
}
|
|
7724
|
+
const template$d = messageBarTemplate();
|
|
7725
|
+
|
|
7726
|
+
const definition$d = MessageBar.compose({
|
|
7727
|
+
name: `${FluentDesignSystem.prefix}-message-bar`,
|
|
7728
|
+
template: template$d,
|
|
7729
|
+
styles: styles$d,
|
|
7730
|
+
shadowOptions: {
|
|
7731
|
+
mode: FluentDesignSystem.shadowRootMode
|
|
7732
|
+
}
|
|
7733
|
+
});
|
|
7734
|
+
|
|
7735
|
+
definition$d.define(FluentDesignSystem.registry);
|
|
7736
|
+
|
|
7737
|
+
var __defProp$a = Object.defineProperty;
|
|
7738
|
+
var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
|
|
7739
|
+
var __decorateClass$a = (decorators, target, key, kind) => {
|
|
7740
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$a(target, key) : target;
|
|
7741
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7742
|
+
if (kind && result) __defProp$a(target, key, result);
|
|
7522
7743
|
return result;
|
|
7523
7744
|
};
|
|
7524
7745
|
class ProgressBar extends FASTElement {
|
|
@@ -7607,23 +7828,23 @@ class ProgressBar extends FASTElement {
|
|
|
7607
7828
|
return range === 0 ? 0 : Math.fround((value - min) / range * 100);
|
|
7608
7829
|
}
|
|
7609
7830
|
}
|
|
7610
|
-
__decorateClass$
|
|
7611
|
-
__decorateClass$
|
|
7612
|
-
__decorateClass$
|
|
7831
|
+
__decorateClass$a([attr], ProgressBar.prototype, "thickness", 2);
|
|
7832
|
+
__decorateClass$a([attr], ProgressBar.prototype, "shape", 2);
|
|
7833
|
+
__decorateClass$a([attr({
|
|
7613
7834
|
attribute: "validation-state"
|
|
7614
7835
|
})], ProgressBar.prototype, "validationState", 2);
|
|
7615
|
-
__decorateClass$
|
|
7836
|
+
__decorateClass$a([attr({
|
|
7616
7837
|
converter: nullableNumberConverter
|
|
7617
7838
|
})], ProgressBar.prototype, "value", 2);
|
|
7618
|
-
__decorateClass$
|
|
7839
|
+
__decorateClass$a([attr({
|
|
7619
7840
|
converter: nullableNumberConverter
|
|
7620
7841
|
})], ProgressBar.prototype, "min", 2);
|
|
7621
|
-
__decorateClass$
|
|
7842
|
+
__decorateClass$a([attr({
|
|
7622
7843
|
converter: nullableNumberConverter
|
|
7623
7844
|
})], ProgressBar.prototype, "max", 2);
|
|
7624
|
-
__decorateClass$
|
|
7845
|
+
__decorateClass$a([volatile], ProgressBar.prototype, "percentComplete", 1);
|
|
7625
7846
|
|
|
7626
|
-
const styles$
|
|
7847
|
+
const styles$c = css`
|
|
7627
7848
|
${display("block")}
|
|
7628
7849
|
|
|
7629
7850
|
:host{width:100%;height:2px;overflow-x:hidden;background-color:${colorNeutralBackground6};border-radius:${borderRadiusMedium};contain:content}:host(${largeState}){height:4px}:host(${squareState}){border-radius:${borderRadiusNone}}.indicator{background-color:${colorCompoundBrandBackground};border-radius:inherit;height:100%}:host([value]) .indicator{transition:all 0.2s ease-in-out}:host(:not([value])) .indicator{position:relative;width:33%;background-image:linear-gradient(
|
|
@@ -7634,15 +7855,15 @@ const styles$b = css`
|
|
|
7634
7855
|
function progressTemplate() {
|
|
7635
7856
|
return html`<div class="indicator" part="indicator" style="${x => typeof x.value === "number" ? `width: ${x.percentComplete}%` : void 0}"></div>`;
|
|
7636
7857
|
}
|
|
7637
|
-
const template$
|
|
7858
|
+
const template$c = progressTemplate();
|
|
7638
7859
|
|
|
7639
|
-
const definition$
|
|
7860
|
+
const definition$c = ProgressBar.compose({
|
|
7640
7861
|
name: `${FluentDesignSystem.prefix}-progress-bar`,
|
|
7641
|
-
template: template$
|
|
7642
|
-
styles: styles$
|
|
7862
|
+
template: template$c,
|
|
7863
|
+
styles: styles$c
|
|
7643
7864
|
});
|
|
7644
7865
|
|
|
7645
|
-
definition$
|
|
7866
|
+
definition$c.define(FluentDesignSystem.registry);
|
|
7646
7867
|
|
|
7647
7868
|
const proxySlotName = "form-associated-proxy";
|
|
7648
7869
|
const ElementInternalsKey = "ElementInternals";
|
|
@@ -8088,12 +8309,12 @@ class FormAssociatedRadio extends CheckableFormAssociated(_Radio) {
|
|
|
8088
8309
|
}
|
|
8089
8310
|
}
|
|
8090
8311
|
|
|
8091
|
-
var __defProp$
|
|
8092
|
-
var __getOwnPropDesc$
|
|
8093
|
-
var __decorateClass$
|
|
8094
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
8312
|
+
var __defProp$9 = Object.defineProperty;
|
|
8313
|
+
var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
|
|
8314
|
+
var __decorateClass$9 = (decorators, target, key, kind) => {
|
|
8315
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$9(target, key) : target;
|
|
8095
8316
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8096
|
-
if (kind && result) __defProp$
|
|
8317
|
+
if (kind && result) __defProp$9(target, key, result);
|
|
8097
8318
|
return result;
|
|
8098
8319
|
};
|
|
8099
8320
|
class Radio extends FormAssociatedRadio {
|
|
@@ -8160,17 +8381,17 @@ class Radio extends FormAssociatedRadio {
|
|
|
8160
8381
|
return true;
|
|
8161
8382
|
}
|
|
8162
8383
|
}
|
|
8163
|
-
__decorateClass$
|
|
8164
|
-
__decorateClass$
|
|
8384
|
+
__decorateClass$9([observable], Radio.prototype, "name", 2);
|
|
8385
|
+
__decorateClass$9([observable], Radio.prototype, "defaultSlottedNodes", 2);
|
|
8165
8386
|
|
|
8166
8387
|
const RadioGroupOrientation = Orientation;
|
|
8167
8388
|
|
|
8168
|
-
var __defProp$
|
|
8169
|
-
var __getOwnPropDesc$
|
|
8170
|
-
var __decorateClass$
|
|
8171
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
8389
|
+
var __defProp$8 = Object.defineProperty;
|
|
8390
|
+
var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
|
|
8391
|
+
var __decorateClass$8 = (decorators, target, key, kind) => {
|
|
8392
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$8(target, key) : target;
|
|
8172
8393
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8173
|
-
if (kind && result) __defProp$
|
|
8394
|
+
if (kind && result) __defProp$8(target, key, result);
|
|
8174
8395
|
return result;
|
|
8175
8396
|
};
|
|
8176
8397
|
class RadioGroup extends FASTElement {
|
|
@@ -8473,24 +8694,24 @@ class RadioGroup extends FASTElement {
|
|
|
8473
8694
|
}
|
|
8474
8695
|
}
|
|
8475
8696
|
}
|
|
8476
|
-
__decorateClass$
|
|
8697
|
+
__decorateClass$8([attr({
|
|
8477
8698
|
mode: "boolean"
|
|
8478
8699
|
})], RadioGroup.prototype, "stacked", 2);
|
|
8479
|
-
__decorateClass$
|
|
8700
|
+
__decorateClass$8([attr({
|
|
8480
8701
|
attribute: "readonly",
|
|
8481
8702
|
mode: "boolean"
|
|
8482
8703
|
})], RadioGroup.prototype, "readOnly", 2);
|
|
8483
|
-
__decorateClass$
|
|
8704
|
+
__decorateClass$8([attr({
|
|
8484
8705
|
attribute: "disabled",
|
|
8485
8706
|
mode: "boolean"
|
|
8486
8707
|
})], RadioGroup.prototype, "disabled", 2);
|
|
8487
|
-
__decorateClass$
|
|
8488
|
-
__decorateClass$
|
|
8489
|
-
__decorateClass$
|
|
8490
|
-
__decorateClass$
|
|
8491
|
-
__decorateClass$
|
|
8708
|
+
__decorateClass$8([attr], RadioGroup.prototype, "name", 2);
|
|
8709
|
+
__decorateClass$8([attr], RadioGroup.prototype, "value", 2);
|
|
8710
|
+
__decorateClass$8([attr], RadioGroup.prototype, "orientation", 2);
|
|
8711
|
+
__decorateClass$8([observable], RadioGroup.prototype, "childItems", 2);
|
|
8712
|
+
__decorateClass$8([observable], RadioGroup.prototype, "slottedRadioButtons", 2);
|
|
8492
8713
|
|
|
8493
|
-
const styles$
|
|
8714
|
+
const styles$b = css`
|
|
8494
8715
|
${display("flex")}
|
|
8495
8716
|
|
|
8496
8717
|
:host{align-items:flex-start;flex-direction:column;row-gap:${spacingVerticalS}}:host([disabled]) ::slotted([role='radio']){--control-border-color:${colorNeutralForegroundDisabled};--checked-indicator-background-color:${colorNeutralForegroundDisabled};--state-color:${colorNeutralForegroundDisabled}}::slotted([slot='label']){color:${colorNeutralForeground1};padding:${spacingVerticalS} ${spacingHorizontalS} ${spacingVerticalS} ${spacingHorizontalXS};font:${fontWeightRegular} ${fontSizeBase300} / ${lineHeightBase300} ${fontFamilyBase};cursor:default}.positioning-region{display:flex;flex-wrap:wrap}:host([orientation='vertical']) .positioning-region{flex-direction:column;justify-content:flex-start}:host([orientation='horizontal']) .positioning-region{flex-direction:row}:host([orientation='horizontal']) ::slotted([role='radio']){padding-inline-end:${spacingHorizontalS}}:host([orientation='horizontal'][stacked]) ::slotted([role='radio']){display:flex;flex-direction:column;padding-inline:${spacingHorizontalS};height:auto;align-items:center;justify-content:center}:host([disabled]) ::slotted([role='radio']){pointer-events:none}`;
|
|
@@ -8501,17 +8722,17 @@ function radioGroupTemplate() {
|
|
|
8501
8722
|
filter: elements("[role=radio]")
|
|
8502
8723
|
})}></slot></div></template>`;
|
|
8503
8724
|
}
|
|
8504
|
-
const template$
|
|
8725
|
+
const template$b = radioGroupTemplate();
|
|
8505
8726
|
|
|
8506
|
-
const definition$
|
|
8727
|
+
const definition$b = RadioGroup.compose({
|
|
8507
8728
|
name: `${FluentDesignSystem.prefix}-radio-group`,
|
|
8508
|
-
template: template$
|
|
8509
|
-
styles: styles$
|
|
8729
|
+
template: template$b,
|
|
8730
|
+
styles: styles$b
|
|
8510
8731
|
});
|
|
8511
8732
|
|
|
8512
|
-
definition$
|
|
8733
|
+
definition$b.define(FluentDesignSystem.registry);
|
|
8513
8734
|
|
|
8514
|
-
const styles$
|
|
8735
|
+
const styles$a = css`
|
|
8515
8736
|
${display("inline-grid")}
|
|
8516
8737
|
|
|
8517
8738
|
:host{grid-auto-flow:column;grid-template-columns:max-content;gap:${spacingHorizontalXS};align-items:center;height:32px;cursor:pointer;outline:none;position:relative;user-select:none;color:blue;color:var(--state-color,${colorNeutralForeground3});padding-inline-end:${spacingHorizontalS};--control-border-color:${colorNeutralStrokeAccessible};--checked-indicator-background-color:${colorCompoundBrandForeground1};--state-color:${colorNeutralForeground3}}:host([disabled]){--control-border-color:${colorNeutralForegroundDisabled};--checked-indicator-background-color:${colorNeutralForegroundDisabled};--state-color:${colorNeutralForegroundDisabled}}.label{cursor:pointer;font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};line-height:${lineHeightBase300}}.label__hidden{display:none}.control{box-sizing:border-box;align-items:center;border:1px solid var(--control-border-color,${colorNeutralStrokeAccessible});border-radius:${borderRadiusCircular};display:flex;height:16px;justify-content:center;margin:${spacingVerticalS} ${spacingHorizontalS};position:relative;width:16px;justify-self:center}.checked-indicator{border-radius:${borderRadiusCircular};height:10px;opacity:0;width:10px}:host([aria-checked='false']:hover) .control{color:${colorNeutralForeground2}}:host(:focus-visible){border-radius:${borderRadiusSmall};box-shadow:0 0 0 3px ${colorStrokeFocus2};outline:1px solid ${colorStrokeFocus1}}:host(:hover) .control{border-color:${colorNeutralStrokeAccessibleHover}}:host(:active) .control{border-color:${colorNeutralStrokeAccessiblePressed}}:host([aria-checked='true']) .checked-indicator{opacity:1}:host([aria-checked='true']) .control{border-color:var(--control-border-color,${colorNeutralStrokeAccessible})}:host([aria-checked='true']) .checked-indicator{background-color:var(--checked-indicator-background-color,${colorCompoundBrandForeground1})}:host([aria-checked='true']:hover) .control{border-color:${colorCompoundBrandStrokeHover}}:host([aria-checked='true']:hover) .checked-indicator{background-color:${colorCompoundBrandStrokeHover}}:host([aria-checked='true']:active) .control{border-color:${colorCompoundBrandStrokePressed}}:host([aria-checked='true']:active) .checked-indicator{background:${colorCompoundBrandForeground1Pressed}}:host([disabled]){color:${colorNeutralForegroundDisabled};pointer-events:none}:host([disabled]) .control{pointer-events:none;border-color:${colorNeutralForegroundDisabled}}:host([disabled]) .checked-indicator{background:${colorNeutralForegroundDisabled}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
@@ -8523,12 +8744,111 @@ function radioTemplate(options = {}) {
|
|
|
8523
8744
|
filter: whitespaceFilter
|
|
8524
8745
|
})}></slot></label></template>`;
|
|
8525
8746
|
}
|
|
8526
|
-
const template$
|
|
8747
|
+
const template$a = radioTemplate({
|
|
8527
8748
|
checkedIndicator: html`<div part="checked-indicator" class="checked-indicator"></div>`
|
|
8528
8749
|
});
|
|
8529
8750
|
|
|
8530
|
-
const definition$
|
|
8751
|
+
const definition$a = Radio.compose({
|
|
8531
8752
|
name: `${FluentDesignSystem.prefix}-radio`,
|
|
8753
|
+
template: template$a,
|
|
8754
|
+
styles: styles$a
|
|
8755
|
+
});
|
|
8756
|
+
|
|
8757
|
+
definition$a.define(FluentDesignSystem.registry);
|
|
8758
|
+
|
|
8759
|
+
var __defProp$7 = Object.defineProperty;
|
|
8760
|
+
var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
|
|
8761
|
+
var __decorateClass$7 = (decorators, target, key, kind) => {
|
|
8762
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target;
|
|
8763
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8764
|
+
if (kind && result) __defProp$7(target, key, result);
|
|
8765
|
+
return result;
|
|
8766
|
+
};
|
|
8767
|
+
class RatingDisplay extends FASTElement {
|
|
8768
|
+
constructor() {
|
|
8769
|
+
super();
|
|
8770
|
+
/**
|
|
8771
|
+
* The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
8772
|
+
*
|
|
8773
|
+
* @internal
|
|
8774
|
+
*/
|
|
8775
|
+
this.elementInternals = this.attachInternals();
|
|
8776
|
+
this.compact = false;
|
|
8777
|
+
this.intlNumberFormatter = new Intl.NumberFormat();
|
|
8778
|
+
this.elementInternals.role = "img";
|
|
8779
|
+
}
|
|
8780
|
+
/**
|
|
8781
|
+
* Handles changes to the color attribute.
|
|
8782
|
+
*
|
|
8783
|
+
* @param prev - The previous state
|
|
8784
|
+
* @param next - The next state
|
|
8785
|
+
*/
|
|
8786
|
+
colorChanged(prev, next) {
|
|
8787
|
+
if (prev) toggleState(this.elementInternals, prev, false);
|
|
8788
|
+
if (next) toggleState(this.elementInternals, next, true);
|
|
8789
|
+
}
|
|
8790
|
+
/**
|
|
8791
|
+
* Handles changes to the size attribute.
|
|
8792
|
+
*
|
|
8793
|
+
* @param prev - The previous state
|
|
8794
|
+
* @param next - The next state
|
|
8795
|
+
*/
|
|
8796
|
+
sizeChanged(prev, next) {
|
|
8797
|
+
if (prev) toggleState(this.elementInternals, prev, false);
|
|
8798
|
+
if (next) toggleState(this.elementInternals, next, true);
|
|
8799
|
+
}
|
|
8800
|
+
/**
|
|
8801
|
+
* Returns "count" as string, formatted according to the locale.
|
|
8802
|
+
*
|
|
8803
|
+
* @internal
|
|
8804
|
+
*/
|
|
8805
|
+
get formattedCount() {
|
|
8806
|
+
return this.count ? this.intlNumberFormatter.format(this.count) : "";
|
|
8807
|
+
}
|
|
8808
|
+
/**
|
|
8809
|
+
* Generates the icon SVG elements based on the "max" attribute.
|
|
8810
|
+
*
|
|
8811
|
+
* @internal
|
|
8812
|
+
*/
|
|
8813
|
+
generateIcons() {
|
|
8814
|
+
let htmlString = "";
|
|
8815
|
+
const selectedValue = Math.round((this.compact ? 1 : this.value ?? 0) * 2) / 2;
|
|
8816
|
+
for (let i = 0; i < (this.compact ? 1 : this.max ?? 5) * 2; i++) {
|
|
8817
|
+
const iconValue = (i + 1) / 2;
|
|
8818
|
+
htmlString += `<svg aria-hidden="true" ${iconValue === selectedValue ? "selected" : ""}><use href="#star"></use></svg>`;
|
|
8819
|
+
}
|
|
8820
|
+
return htmlString;
|
|
8821
|
+
}
|
|
8822
|
+
}
|
|
8823
|
+
__decorateClass$7([attr], RatingDisplay.prototype, "color", 2);
|
|
8824
|
+
__decorateClass$7([attr({
|
|
8825
|
+
mode: "boolean"
|
|
8826
|
+
})], RatingDisplay.prototype, "compact", 2);
|
|
8827
|
+
__decorateClass$7([attr({
|
|
8828
|
+
converter: nullableNumberConverter
|
|
8829
|
+
})], RatingDisplay.prototype, "count", 2);
|
|
8830
|
+
__decorateClass$7([attr({
|
|
8831
|
+
converter: nullableNumberConverter
|
|
8832
|
+
})], RatingDisplay.prototype, "max", 2);
|
|
8833
|
+
__decorateClass$7([attr], RatingDisplay.prototype, "size", 2);
|
|
8834
|
+
__decorateClass$7([attr({
|
|
8835
|
+
converter: nullableNumberConverter
|
|
8836
|
+
})], RatingDisplay.prototype, "value", 2);
|
|
8837
|
+
|
|
8838
|
+
const styles$9 = css`
|
|
8839
|
+
${display("inline-flex")}
|
|
8840
|
+
|
|
8841
|
+
:host{--icon-size:16px;align-items:center;color:${colorNeutralForeground1};font-family:${fontFamilyBase};font-size:${fontSizeBase200};line-height:${lineHeightBase200};contain:layout style;user-select:none}:host(${smallState}){--icon-size:12px}:host(${largeState}){--icon-size:20px;font-size:${fontSizeBase300};line-height:${lineHeightBase300}}svg{width:var(--icon-size);height:var(--icon-size);fill:${colorPaletteMarigoldBackground3};margin-inline-end:${spacingHorizontalXXS}}svg:nth-child(even){clip-path:inset(0 50% 0 0);margin-inline-end:calc(0px - var(--icon-size))}:host(${neutralState}) svg{fill:${colorNeutralForeground1}}:host(${brandState}) svg{fill:${colorBrandBackground}}:host(:is([value^='-'],[value='0'])) svg,:host(:not([value])) svg,svg[selected] ~ svg{fill:${colorPaletteMarigoldBackground2}}:host(${neutralState}:is([value^='-'],[value='0'])) svg,:host(${neutralState}:not([value])) svg,:host(${neutralState}) svg[selected] ~ svg{fill:${colorNeutralBackground1Pressed}}:host(${brandState}:is([value^='-'],[value='0'])) svg,:host(${brandState}:not([value])) svg,:host(${brandState}) svg[selected] ~ svg{fill:${colorBrandStroke2}}.value-label,::slotted([slot='value']){display:block;margin-inline-start:${spacingHorizontalXS};font-weight:${fontWeightSemibold}}:host(${smallState}) .value-label,:host(${smallState}) ::slotted([slot='value']){margin-inline-start:${spacingHorizontalXXS}}:host(${largeState}) .value-label,:host(${largeState}) ::slotted([slot='value']){margin-inline-start:${spacingHorizontalSNudge}}:host(:not([count])) .count-label{display:none}.count-label::before,::slotted([slot='count'])::before{content:'·';margin-inline:${spacingHorizontalXS}}:host(${smallState}) .count-label::before,:host(${smallState}) ::slotted([slot='count'])::before{margin-inline:${spacingHorizontalXXS}}:host(${largeState}) .count-label::before,:host(${largeState}) ::slotted([slot='count'])::before{margin-inline:${spacingHorizontalSNudge}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
8842
|
+
:host([color]) svg{fill:CanvasText}:host([color]:is([value^='-'],[value='0'])) svg,:host(:not([value])) svg,:host([color]) svg[selected] ~ svg{fill:Canvas;stroke:CanvasText}`));
|
|
8843
|
+
|
|
8844
|
+
const star = html`<svg xmlns="http://www.w3.org/2000/svg" style="display: none"><symbol id="star" viewBox="0 0 12 12"><path d="M5.28347 1.54556C5.57692 0.95096 6.42479 0.950961 6.71825 1.54556L7.82997 3.79817L10.3159 4.15939C10.9721 4.25474 11.2341 5.06112 10.7592 5.52394L8.96043 7.27736L9.38507 9.75321C9.49716 10.4067 8.81122 10.9051 8.22431 10.5966L6.00086 9.42761L3.7774 10.5966C3.19049 10.9051 2.50455 10.4067 2.61664 9.75321L3.04128 7.27736L1.24246 5.52394C0.767651 5.06111 1.02966 4.25474 1.68584 4.15939L4.17174 3.79817L5.28347 1.54556Z" /></symbol></svg>`;
|
|
8845
|
+
function ratingDisplayTemplate() {
|
|
8846
|
+
return html` ${star} ${x => html`${html.partial(x.generateIcons())}`}<slot name="value"><span class="value-label" aria-hidden="true">${x => x.value}</span></slot><slot name="count"><span class="count-label" aria-hidden="true">${x => x.formattedCount}</span></slot>`;
|
|
8847
|
+
}
|
|
8848
|
+
const template$9 = ratingDisplayTemplate();
|
|
8849
|
+
|
|
8850
|
+
const definition$9 = RatingDisplay.compose({
|
|
8851
|
+
name: `${FluentDesignSystem.prefix}-rating-display`,
|
|
8532
8852
|
template: template$9,
|
|
8533
8853
|
styles: styles$9
|
|
8534
8854
|
});
|
|
@@ -10140,7 +10460,7 @@ __decorateClass([attr({
|
|
|
10140
10460
|
})], ToggleButton.prototype, "mixed", 2);
|
|
10141
10461
|
|
|
10142
10462
|
const styles = css`
|
|
10143
|
-
${styles$
|
|
10463
|
+
${styles$v}
|
|
10144
10464
|
|
|
10145
10465
|
: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`
|
|
10146
10466
|
:host(${pressedState}),:host(${pressedState}${primaryState}),:host(${pressedState}${subtleState}),:host(${pressedState}${outlineState}),:host(${pressedState}${transparentState}){background:SelectedItem;color:SelectedItemText}`));
|