@fluentui/web-components 3.0.0-beta.55 → 3.0.0-beta.57
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 +21 -2
- package/dist/dts/anchor-button/index.d.ts +1 -1
- package/dist/dts/checkbox/index.d.ts +1 -1
- package/dist/dts/helpers.tests.d.ts +22 -0
- package/dist/dts/index-rollup.d.ts +1 -0
- package/dist/dts/index.d.ts +3 -2
- package/dist/dts/menu/menu.d.ts +1 -2
- package/dist/dts/menu-item/menu-item.d.ts +2 -3
- package/dist/dts/slider/slider.d.ts +1 -1
- package/dist/dts/styles/states/index.d.ts +36 -0
- package/dist/dts/textarea/define.d.ts +1 -0
- package/dist/dts/textarea/index.d.ts +5 -0
- package/dist/dts/textarea/textarea.bench.d.ts +3 -0
- package/dist/dts/textarea/textarea.d.ts +390 -0
- package/dist/dts/textarea/textarea.definition.d.ts +9 -0
- package/dist/dts/textarea/textarea.options.d.ts +47 -0
- package/dist/dts/textarea/textarea.styles.d.ts +7 -0
- package/dist/dts/textarea/textarea.template.d.ts +12 -0
- package/dist/esm/anchor-button/index.js +1 -1
- package/dist/esm/anchor-button/index.js.map +1 -1
- package/dist/esm/checkbox/index.js +1 -1
- package/dist/esm/checkbox/index.js.map +1 -1
- package/dist/esm/helpers.tests.js +44 -0
- package/dist/esm/helpers.tests.js.map +1 -1
- package/dist/esm/index-rollup.js +1 -0
- package/dist/esm/index-rollup.js.map +1 -1
- package/dist/esm/index.js +3 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/menu/menu.js +6 -1
- package/dist/esm/menu/menu.js.map +1 -1
- package/dist/esm/menu-item/menu-item.js +8 -1
- package/dist/esm/menu-item/menu-item.js.map +1 -1
- package/dist/esm/menu-item/menu-item.template.js +3 -1
- package/dist/esm/menu-item/menu-item.template.js.map +1 -1
- package/dist/esm/slider/slider.js +1 -1
- package/dist/esm/styles/states/index.js +40 -0
- package/dist/esm/styles/states/index.js.map +1 -1
- package/dist/esm/textarea/define.js +4 -0
- package/dist/esm/textarea/define.js.map +1 -0
- package/dist/esm/textarea/index.js +6 -0
- package/dist/esm/textarea/index.js.map +1 -0
- package/dist/esm/textarea/textarea.bench.js +10 -0
- package/dist/esm/textarea/textarea.bench.js.map +1 -0
- package/dist/esm/textarea/textarea.definition.js +20 -0
- package/dist/esm/textarea/textarea.definition.js.map +1 -0
- package/dist/esm/textarea/textarea.js +605 -0
- package/dist/esm/textarea/textarea.js.map +1 -0
- package/dist/esm/textarea/textarea.options.js +56 -0
- package/dist/esm/textarea/textarea.options.js.map +1 -0
- package/dist/esm/textarea/textarea.styles.js +268 -0
- package/dist/esm/textarea/textarea.styles.js.map +1 -0
- package/dist/esm/textarea/textarea.template.js +54 -0
- package/dist/esm/textarea/textarea.template.js.map +1 -0
- package/dist/esm/theme/set-theme.js +1 -0
- package/dist/esm/theme/set-theme.js.map +1 -1
- package/dist/esm/utils/element-internals.js +4 -2
- package/dist/esm/utils/element-internals.js.map +1 -1
- package/dist/web-components.d.ts +469 -10
- package/dist/web-components.js +1095 -542
- package/dist/web-components.min.js +284 -280
- package/package.json +6 -2
package/dist/web-components.js
CHANGED
|
@@ -3391,70 +3391,70 @@ function uniqueId(prefix = "") {
|
|
|
3391
3391
|
return `${prefix}${uniqueIdCounter++}`;
|
|
3392
3392
|
}
|
|
3393
3393
|
|
|
3394
|
-
var __defProp$
|
|
3395
|
-
var __getOwnPropDesc$
|
|
3396
|
-
var __decorateClass$
|
|
3397
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
3394
|
+
var __defProp$w = Object.defineProperty;
|
|
3395
|
+
var __getOwnPropDesc$w = Object.getOwnPropertyDescriptor;
|
|
3396
|
+
var __decorateClass$w = (decorators, target, key, kind) => {
|
|
3397
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$w(target, key) : target;
|
|
3398
3398
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
3399
|
-
if (kind && result) __defProp$
|
|
3399
|
+
if (kind && result) __defProp$w(target, key, result);
|
|
3400
3400
|
return result;
|
|
3401
3401
|
};
|
|
3402
3402
|
class ARIAGlobalStatesAndProperties {}
|
|
3403
|
-
__decorateClass$
|
|
3403
|
+
__decorateClass$w([attr({
|
|
3404
3404
|
attribute: "aria-atomic"
|
|
3405
3405
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaAtomic", 2);
|
|
3406
|
-
__decorateClass$
|
|
3406
|
+
__decorateClass$w([attr({
|
|
3407
3407
|
attribute: "aria-busy"
|
|
3408
3408
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaBusy", 2);
|
|
3409
|
-
__decorateClass$
|
|
3409
|
+
__decorateClass$w([attr({
|
|
3410
3410
|
attribute: "aria-controls"
|
|
3411
3411
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaControls", 2);
|
|
3412
|
-
__decorateClass$
|
|
3412
|
+
__decorateClass$w([attr({
|
|
3413
3413
|
attribute: "aria-current"
|
|
3414
3414
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaCurrent", 2);
|
|
3415
|
-
__decorateClass$
|
|
3415
|
+
__decorateClass$w([attr({
|
|
3416
3416
|
attribute: "aria-describedby"
|
|
3417
3417
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaDescribedby", 2);
|
|
3418
|
-
__decorateClass$
|
|
3418
|
+
__decorateClass$w([attr({
|
|
3419
3419
|
attribute: "aria-details"
|
|
3420
3420
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaDetails", 2);
|
|
3421
|
-
__decorateClass$
|
|
3421
|
+
__decorateClass$w([attr({
|
|
3422
3422
|
attribute: "aria-disabled"
|
|
3423
3423
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaDisabled", 2);
|
|
3424
|
-
__decorateClass$
|
|
3424
|
+
__decorateClass$w([attr({
|
|
3425
3425
|
attribute: "aria-errormessage"
|
|
3426
3426
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaErrormessage", 2);
|
|
3427
|
-
__decorateClass$
|
|
3427
|
+
__decorateClass$w([attr({
|
|
3428
3428
|
attribute: "aria-flowto"
|
|
3429
3429
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaFlowto", 2);
|
|
3430
|
-
__decorateClass$
|
|
3430
|
+
__decorateClass$w([attr({
|
|
3431
3431
|
attribute: "aria-haspopup"
|
|
3432
3432
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaHaspopup", 2);
|
|
3433
|
-
__decorateClass$
|
|
3433
|
+
__decorateClass$w([attr({
|
|
3434
3434
|
attribute: "aria-hidden"
|
|
3435
3435
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaHidden", 2);
|
|
3436
|
-
__decorateClass$
|
|
3436
|
+
__decorateClass$w([attr({
|
|
3437
3437
|
attribute: "aria-invalid"
|
|
3438
3438
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaInvalid", 2);
|
|
3439
|
-
__decorateClass$
|
|
3439
|
+
__decorateClass$w([attr({
|
|
3440
3440
|
attribute: "aria-keyshortcuts"
|
|
3441
3441
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaKeyshortcuts", 2);
|
|
3442
|
-
__decorateClass$
|
|
3442
|
+
__decorateClass$w([attr({
|
|
3443
3443
|
attribute: "aria-label"
|
|
3444
3444
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaLabel", 2);
|
|
3445
|
-
__decorateClass$
|
|
3445
|
+
__decorateClass$w([attr({
|
|
3446
3446
|
attribute: "aria-labelledby"
|
|
3447
3447
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaLabelledby", 2);
|
|
3448
|
-
__decorateClass$
|
|
3448
|
+
__decorateClass$w([attr({
|
|
3449
3449
|
attribute: "aria-live"
|
|
3450
3450
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaLive", 2);
|
|
3451
|
-
__decorateClass$
|
|
3451
|
+
__decorateClass$w([attr({
|
|
3452
3452
|
attribute: "aria-owns"
|
|
3453
3453
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaOwns", 2);
|
|
3454
|
-
__decorateClass$
|
|
3454
|
+
__decorateClass$w([attr({
|
|
3455
3455
|
attribute: "aria-relevant"
|
|
3456
3456
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaRelevant", 2);
|
|
3457
|
-
__decorateClass$
|
|
3457
|
+
__decorateClass$w([attr({
|
|
3458
3458
|
attribute: "aria-roledescription"
|
|
3459
3459
|
})], ARIAGlobalStatesAndProperties.prototype, "ariaRoledescription", 2);
|
|
3460
3460
|
|
|
@@ -3640,20 +3640,19 @@ function toggleState(elementInternals, state, force) {
|
|
|
3640
3640
|
elementInternals.shadowRoot.host.toggleAttribute(`state--${state}`, force);
|
|
3641
3641
|
return;
|
|
3642
3642
|
}
|
|
3643
|
-
|
|
3644
|
-
if (force) {
|
|
3643
|
+
if (force ?? !elementInternals.states.has(state)) {
|
|
3645
3644
|
elementInternals.states.add(state);
|
|
3646
3645
|
return;
|
|
3647
3646
|
}
|
|
3648
3647
|
elementInternals.states.delete(state);
|
|
3649
3648
|
}
|
|
3650
3649
|
|
|
3651
|
-
var __defProp$
|
|
3652
|
-
var __getOwnPropDesc$
|
|
3653
|
-
var __decorateClass$
|
|
3654
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
3650
|
+
var __defProp$v = Object.defineProperty;
|
|
3651
|
+
var __getOwnPropDesc$v = Object.getOwnPropertyDescriptor;
|
|
3652
|
+
var __decorateClass$v = (decorators, target, key, kind) => {
|
|
3653
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$v(target, key) : target;
|
|
3655
3654
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
3656
|
-
if (kind && result) __defProp$
|
|
3655
|
+
if (kind && result) __defProp$v(target, key, result);
|
|
3657
3656
|
return result;
|
|
3658
3657
|
};
|
|
3659
3658
|
class BaseAccordionItem extends FASTElement {
|
|
@@ -3687,18 +3686,18 @@ class BaseAccordionItem extends FASTElement {
|
|
|
3687
3686
|
toggleState(this.elementInternals, "disabled", next);
|
|
3688
3687
|
}
|
|
3689
3688
|
}
|
|
3690
|
-
__decorateClass$
|
|
3689
|
+
__decorateClass$v([attr({
|
|
3691
3690
|
attribute: "heading-level",
|
|
3692
3691
|
mode: "fromView",
|
|
3693
3692
|
converter: nullableNumberConverter
|
|
3694
3693
|
})], BaseAccordionItem.prototype, "headinglevel", 2);
|
|
3695
|
-
__decorateClass$
|
|
3694
|
+
__decorateClass$v([attr({
|
|
3696
3695
|
mode: "boolean"
|
|
3697
3696
|
})], BaseAccordionItem.prototype, "expanded", 2);
|
|
3698
|
-
__decorateClass$
|
|
3697
|
+
__decorateClass$v([attr({
|
|
3699
3698
|
mode: "boolean"
|
|
3700
3699
|
})], BaseAccordionItem.prototype, "disabled", 2);
|
|
3701
|
-
__decorateClass$
|
|
3700
|
+
__decorateClass$v([attr], BaseAccordionItem.prototype, "id", 2);
|
|
3702
3701
|
class AccordionItem extends BaseAccordionItem {
|
|
3703
3702
|
constructor() {
|
|
3704
3703
|
super(...arguments);
|
|
@@ -3739,11 +3738,11 @@ class AccordionItem extends BaseAccordionItem {
|
|
|
3739
3738
|
toggleState(this.elementInternals, "block", next);
|
|
3740
3739
|
}
|
|
3741
3740
|
}
|
|
3742
|
-
__decorateClass$
|
|
3743
|
-
__decorateClass$
|
|
3741
|
+
__decorateClass$v([attr], AccordionItem.prototype, "size", 2);
|
|
3742
|
+
__decorateClass$v([attr({
|
|
3744
3743
|
attribute: "marker-position"
|
|
3745
3744
|
})], AccordionItem.prototype, "markerPosition", 2);
|
|
3746
|
-
__decorateClass$
|
|
3745
|
+
__decorateClass$v([attr({
|
|
3747
3746
|
mode: "boolean"
|
|
3748
3747
|
})], AccordionItem.prototype, "block", 2);
|
|
3749
3748
|
applyMixins(AccordionItem, StartEnd);
|
|
@@ -3792,6 +3791,14 @@ css.partial`:is([state--singleline], :state(singleline))`;
|
|
|
3792
3791
|
const multiLineState = css.partial`:is([state--multiline], :state(multiline))`;
|
|
3793
3792
|
const expandedState = css.partial`:is([state--expanded], :state(expanded))`;
|
|
3794
3793
|
const blockState = css.partial`:is([state--block], :state(block))`;
|
|
3794
|
+
css.partial`:is([state--resize], :state(resize))`;
|
|
3795
|
+
const resizeHorizontalState = css.partial`:is([state--resize-horizontal], :state(resize-horizontal))`;
|
|
3796
|
+
const resizeVerticalState = css.partial`:is([state--resize-vertical], :state(resize-vertical))`;
|
|
3797
|
+
const resizeBothState = css.partial`:is([state--resize-both], :state(resize-both))`;
|
|
3798
|
+
const autoResizeState = css.partial`:is([state--auto-resize], :state(auto-resize))`;
|
|
3799
|
+
const displayShadowState = css.partial`:is([state--display-shadow], :state(display-shadow))`;
|
|
3800
|
+
const userInvalidState = css.partial`:is([state--user-invalid], :state(user-invalid))`;
|
|
3801
|
+
css.partial`:is([state--user-valid], :state(user-valid))`;
|
|
3795
3802
|
|
|
3796
3803
|
const colorNeutralForeground1 = "var(--colorNeutralForeground1)";
|
|
3797
3804
|
const colorNeutralForeground1Hover = "var(--colorNeutralForeground1Hover)";
|
|
@@ -4031,7 +4038,7 @@ const curveEasyEaseMax = "var(--curveEasyEaseMax)";
|
|
|
4031
4038
|
const curveEasyEase = "var(--curveEasyEase)";
|
|
4032
4039
|
const curveLinear = "var(--curveLinear)";
|
|
4033
4040
|
|
|
4034
|
-
const styles$
|
|
4041
|
+
const styles$A = css`
|
|
4035
4042
|
${display("block")}
|
|
4036
4043
|
|
|
4037
4044
|
:host{max-width:fit-content;contain:content}.heading{height:44px;display:grid;position:relative;padding-inline:${spacingHorizontalM} ${spacingHorizontalMNudge};border-radius:${borderRadiusMedium};font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};line-height:${lineHeightBase300};grid-template-columns:auto auto 1fr auto}.button{appearance:none;background:${colorTransparentBackground};border:none;box-sizing:border-box;color:${colorNeutralForeground1};cursor:pointer;font:inherit;grid-column:auto / span 2;grid-row:1;height:44px;outline:none;padding:0;text-align:start}.button::before{content:'';position:absolute;inset:0px;cursor:pointer;border-radius:${borderRadiusSmall}}:where(.default-marker-collapsed,.default-marker-expanded),::slotted(:is([slot='marker-collapsed'],[slot='marker-expanded'])){display:flex;align-items:center;justify-content:center;pointer-events:none;position:relative;height:100%;padding-inline-end:${spacingHorizontalS};grid-column:1 / span 1;grid-row:1}.content{margin:0 ${spacingHorizontalM}}::slotted([slot='start']){display:flex;justify-content:center;align-items:center;padding-right:${spacingHorizontalS};grid-column:2 / span 1;grid-row:1}button:focus-visible::after{content:'';position:absolute;inset:0px;cursor:pointer;border-radius:${borderRadiusSmall};outline:none;border:2px solid ${colorStrokeFocus1};box-shadow:inset 0 0 0 1px ${colorStrokeFocus2}}:host(${disabledState}) .button{color:${colorNeutralForegroundDisabled}}:host(${disabledState}) svg{filter:invert(89%) sepia(0%) saturate(569%) hue-rotate(155deg) brightness(88%) contrast(87%)}:host(${expandedState}) .content{display:block}:host(${expandedState}) .default-marker-collapsed,:host(${expandedState}) ::slotted([slot='marker-collapsed']),:host(:not(${expandedState})) :is(.default-marker-expanded,.content),:host(:not(${expandedState})) ::slotted([slot='marker-expanded']){display:none}:host(${expandedState}) ::slotted([slot='marker-expanded']),:host(:not(${expandedState})) ::slotted([slot='marker-collapsed']){display:flex}.heading{font-size:${fontSizeBase300};line-height:${lineHeightBase300}}:host(${smallState}) .heading{font-size:${fontSizeBase200};line-height:${lineHeightBase200}}:host(${largeState}) .heading{font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host(${extraLargeState}) .heading{font-size:${fontSizeBase500};line-height:${lineHeightBase500}}:host(${alignEndState}) :slotted([slot='start']){grid-column:1 / span 1}:host(${alignEndState}) :is(.default-marker-collapsed,.default-marker-expanded){grid-column:4 / span 1;padding-inline-start:${spacingHorizontalS};padding-inline-end:0}:host(${alignEndState}) .button{grid-column:2 / span 3}:host([block]){max-width:100%}:host(${alignEndState}) .heading{grid-template-columns:auto auto 28px;padding-inline:${spacingHorizontalM}}:host(${alignEndState}:has([slot='start'])) .heading{padding-inline:${spacingHorizontalMNudge} ${spacingHorizontalM}}:host(${blockState}${alignEndState}) .heading{grid-template-columns:auto 1fr}:host(${alignEndState}) :is(.default-marker-collapsed,.default-marker-expanded){grid-column:5 / span 1}`;
|
|
@@ -4067,30 +4074,30 @@ const chevronDown20Filled = html.partial(`<svg
|
|
|
4067
4074
|
function accordionItemTemplate(options = {}) {
|
|
4068
4075
|
return html`<div class="heading" part="heading" role="heading" aria-level="${x => x.headinglevel}"><button class="button" part="button" ${ref("expandbutton")} ?disabled="${x => x.disabled ? "true" : void 0}" aria-expanded="${x => x.expanded}" aria-controls="${x => x.id}-panel" id="${x => x.id}"><slot name="heading"></slot></button>${startSlotTemplate(options)}<slot name="marker-expanded">${staticallyCompose(options.expandedIcon)}</slot><slot name="marker-collapsed">${staticallyCompose(options.collapsedIcon)}</slot></div><div class="content" part="content" id="${x => x.id}-panel" role="region" aria-labelledby="${x => x.id}"><slot></slot></div>`;
|
|
4069
4076
|
}
|
|
4070
|
-
const template$
|
|
4077
|
+
const template$B = accordionItemTemplate({
|
|
4071
4078
|
collapsedIcon: chevronRight20Filled,
|
|
4072
4079
|
expandedIcon: chevronDown20Filled
|
|
4073
4080
|
});
|
|
4074
4081
|
|
|
4075
|
-
const definition$
|
|
4082
|
+
const definition$B = AccordionItem.compose({
|
|
4076
4083
|
name: `${FluentDesignSystem.prefix}-accordion-item`,
|
|
4077
|
-
template: template$
|
|
4078
|
-
styles: styles$
|
|
4084
|
+
template: template$B,
|
|
4085
|
+
styles: styles$A
|
|
4079
4086
|
});
|
|
4080
4087
|
|
|
4081
|
-
definition$
|
|
4088
|
+
definition$B.define(FluentDesignSystem.registry);
|
|
4082
4089
|
|
|
4083
4090
|
const AccordionExpandMode = {
|
|
4084
4091
|
single: "single",
|
|
4085
4092
|
multi: "multi"
|
|
4086
4093
|
};
|
|
4087
4094
|
|
|
4088
|
-
var __defProp$
|
|
4089
|
-
var __getOwnPropDesc$
|
|
4090
|
-
var __decorateClass$
|
|
4091
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
4095
|
+
var __defProp$u = Object.defineProperty;
|
|
4096
|
+
var __getOwnPropDesc$u = Object.getOwnPropertyDescriptor;
|
|
4097
|
+
var __decorateClass$u = (decorators, target, key, kind) => {
|
|
4098
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$u(target, key) : target;
|
|
4092
4099
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
4093
|
-
if (kind && result) __defProp$
|
|
4100
|
+
if (kind && result) __defProp$u(target, key, result);
|
|
4094
4101
|
return result;
|
|
4095
4102
|
};
|
|
4096
4103
|
class Accordion extends FASTElement {
|
|
@@ -4229,12 +4236,12 @@ class Accordion extends FASTElement {
|
|
|
4229
4236
|
});
|
|
4230
4237
|
}
|
|
4231
4238
|
}
|
|
4232
|
-
__decorateClass$
|
|
4239
|
+
__decorateClass$u([attr({
|
|
4233
4240
|
attribute: "expand-mode"
|
|
4234
4241
|
})], Accordion.prototype, "expandmode", 2);
|
|
4235
|
-
__decorateClass$
|
|
4242
|
+
__decorateClass$u([observable], Accordion.prototype, "slottedAccordionItems", 2);
|
|
4236
4243
|
|
|
4237
|
-
const styles$
|
|
4244
|
+
const styles$z = css`
|
|
4238
4245
|
${display("flex")}
|
|
4239
4246
|
|
|
4240
4247
|
:host{flex-direction:column;width:100%;contain:content}`;
|
|
@@ -4245,15 +4252,15 @@ function accordionTemplate() {
|
|
|
4245
4252
|
filter: elements()
|
|
4246
4253
|
})}></slot></template>`;
|
|
4247
4254
|
}
|
|
4248
|
-
const template$
|
|
4255
|
+
const template$A = accordionTemplate();
|
|
4249
4256
|
|
|
4250
|
-
const definition$
|
|
4257
|
+
const definition$A = Accordion.compose({
|
|
4251
4258
|
name: `${FluentDesignSystem.prefix}-accordion`,
|
|
4252
|
-
template: template$
|
|
4253
|
-
styles: styles$
|
|
4259
|
+
template: template$A,
|
|
4260
|
+
styles: styles$z
|
|
4254
4261
|
});
|
|
4255
4262
|
|
|
4256
|
-
definition$
|
|
4263
|
+
definition$A.define(FluentDesignSystem.registry);
|
|
4257
4264
|
|
|
4258
4265
|
const ButtonType = {
|
|
4259
4266
|
submit: "submit",
|
|
@@ -4272,12 +4279,12 @@ const AnchorAttributes = {
|
|
|
4272
4279
|
type: "type"
|
|
4273
4280
|
};
|
|
4274
4281
|
|
|
4275
|
-
var __defProp$
|
|
4276
|
-
var __getOwnPropDesc$
|
|
4277
|
-
var __decorateClass$
|
|
4278
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
4282
|
+
var __defProp$t = Object.defineProperty;
|
|
4283
|
+
var __getOwnPropDesc$t = Object.getOwnPropertyDescriptor;
|
|
4284
|
+
var __decorateClass$t = (decorators, target, key, kind) => {
|
|
4285
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$t(target, key) : target;
|
|
4279
4286
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
4280
|
-
if (kind && result) __defProp$
|
|
4287
|
+
if (kind && result) __defProp$t(target, key, result);
|
|
4281
4288
|
return result;
|
|
4282
4289
|
};
|
|
4283
4290
|
class BaseAnchor extends FASTElement {
|
|
@@ -4385,14 +4392,14 @@ class BaseAnchor extends FASTElement {
|
|
|
4385
4392
|
return proxy;
|
|
4386
4393
|
}
|
|
4387
4394
|
}
|
|
4388
|
-
__decorateClass$
|
|
4389
|
-
__decorateClass$
|
|
4390
|
-
__decorateClass$
|
|
4391
|
-
__decorateClass$
|
|
4392
|
-
__decorateClass$
|
|
4393
|
-
__decorateClass$
|
|
4394
|
-
__decorateClass$
|
|
4395
|
-
__decorateClass$
|
|
4395
|
+
__decorateClass$t([attr], BaseAnchor.prototype, "download", 2);
|
|
4396
|
+
__decorateClass$t([attr], BaseAnchor.prototype, "href", 2);
|
|
4397
|
+
__decorateClass$t([attr], BaseAnchor.prototype, "hreflang", 2);
|
|
4398
|
+
__decorateClass$t([attr], BaseAnchor.prototype, "ping", 2);
|
|
4399
|
+
__decorateClass$t([attr], BaseAnchor.prototype, "referrerpolicy", 2);
|
|
4400
|
+
__decorateClass$t([attr], BaseAnchor.prototype, "rel", 2);
|
|
4401
|
+
__decorateClass$t([attr], BaseAnchor.prototype, "target", 2);
|
|
4402
|
+
__decorateClass$t([attr], BaseAnchor.prototype, "type", 2);
|
|
4396
4403
|
class AnchorButton extends BaseAnchor {
|
|
4397
4404
|
constructor() {
|
|
4398
4405
|
super(...arguments);
|
|
@@ -4446,10 +4453,10 @@ class AnchorButton extends BaseAnchor {
|
|
|
4446
4453
|
toggleState(this.elementInternals, "icon", !!next);
|
|
4447
4454
|
}
|
|
4448
4455
|
}
|
|
4449
|
-
__decorateClass$
|
|
4450
|
-
__decorateClass$
|
|
4451
|
-
__decorateClass$
|
|
4452
|
-
__decorateClass$
|
|
4456
|
+
__decorateClass$t([attr], AnchorButton.prototype, "appearance", 2);
|
|
4457
|
+
__decorateClass$t([attr], AnchorButton.prototype, "shape", 2);
|
|
4458
|
+
__decorateClass$t([attr], AnchorButton.prototype, "size", 2);
|
|
4459
|
+
__decorateClass$t([attr({
|
|
4453
4460
|
attribute: "icon-only",
|
|
4454
4461
|
mode: "boolean"
|
|
4455
4462
|
})], AnchorButton.prototype, "iconOnly", 2);
|
|
@@ -4459,13 +4466,13 @@ const baseButtonStyles = css`
|
|
|
4459
4466
|
${display("inline-flex")}
|
|
4460
4467
|
|
|
4461
4468
|
: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}`;
|
|
4462
|
-
const styles$
|
|
4469
|
+
const styles$y = css`
|
|
4463
4470
|
${baseButtonStyles}
|
|
4464
4471
|
|
|
4465
4472
|
: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`
|
|
4466
4473
|
:host{background:ButtonFace;color:ButtonText}:host(:is(:hover,:focus-visible)){border-color:Highlight}`));
|
|
4467
4474
|
|
|
4468
|
-
const styles$
|
|
4475
|
+
const styles$x = css`
|
|
4469
4476
|
${baseButtonStyles}
|
|
4470
4477
|
|
|
4471
4478
|
::slotted(a){position:absolute;inset:0}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
@@ -4474,15 +4481,15 @@ const styles$w = css`
|
|
|
4474
4481
|
function anchorTemplate$1(options = {}) {
|
|
4475
4482
|
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>`;
|
|
4476
4483
|
}
|
|
4477
|
-
const template$
|
|
4484
|
+
const template$z = anchorTemplate$1();
|
|
4478
4485
|
|
|
4479
|
-
const definition$
|
|
4486
|
+
const definition$z = AnchorButton.compose({
|
|
4480
4487
|
name: `${FluentDesignSystem.prefix}-anchor-button`,
|
|
4481
|
-
template: template$
|
|
4482
|
-
styles: styles$
|
|
4488
|
+
template: template$z,
|
|
4489
|
+
styles: styles$x
|
|
4483
4490
|
});
|
|
4484
4491
|
|
|
4485
|
-
definition$
|
|
4492
|
+
definition$z.define(FluentDesignSystem.registry);
|
|
4486
4493
|
|
|
4487
4494
|
const UNWANTED_ENCLOSURES_REGEX = /[\(\[\{][^\)\]\}]*[\)\]\}]/g;
|
|
4488
4495
|
const UNWANTED_CHARS_REGEX = /[\0-\u001F\!-/:-@\[-`\{-\u00BF\u0250-\u036F\uD800-\uFFFF]/g;
|
|
@@ -4564,12 +4571,12 @@ const AvatarColor = {
|
|
|
4564
4571
|
...AvatarNamedColor
|
|
4565
4572
|
};
|
|
4566
4573
|
|
|
4567
|
-
var __defProp$
|
|
4568
|
-
var __getOwnPropDesc$
|
|
4569
|
-
var __decorateClass$
|
|
4570
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
4574
|
+
var __defProp$s = Object.defineProperty;
|
|
4575
|
+
var __getOwnPropDesc$s = Object.getOwnPropertyDescriptor;
|
|
4576
|
+
var __decorateClass$s = (decorators, target, key, kind) => {
|
|
4577
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$s(target, key) : target;
|
|
4571
4578
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
4572
|
-
if (kind && result) __defProp$
|
|
4579
|
+
if (kind && result) __defProp$s(target, key, result);
|
|
4573
4580
|
return result;
|
|
4574
4581
|
};
|
|
4575
4582
|
class BaseAvatar extends FASTElement {
|
|
@@ -4584,9 +4591,9 @@ class BaseAvatar extends FASTElement {
|
|
|
4584
4591
|
this.elementInternals.role = "img";
|
|
4585
4592
|
}
|
|
4586
4593
|
}
|
|
4587
|
-
__decorateClass$
|
|
4588
|
-
__decorateClass$
|
|
4589
|
-
__decorateClass$
|
|
4594
|
+
__decorateClass$s([attr], BaseAvatar.prototype, "name", 2);
|
|
4595
|
+
__decorateClass$s([attr], BaseAvatar.prototype, "initials", 2);
|
|
4596
|
+
__decorateClass$s([attr], BaseAvatar.prototype, "active", 2);
|
|
4590
4597
|
const _Avatar = class _Avatar extends BaseAvatar {
|
|
4591
4598
|
/**
|
|
4592
4599
|
* Handles changes to observable properties
|
|
@@ -4640,13 +4647,13 @@ const _Avatar = class _Avatar extends BaseAvatar {
|
|
|
4640
4647
|
* An array of the available Avatar named colors
|
|
4641
4648
|
*/
|
|
4642
4649
|
_Avatar.colors = Object.values(AvatarNamedColor);
|
|
4643
|
-
__decorateClass$
|
|
4644
|
-
__decorateClass$
|
|
4645
|
-
__decorateClass$
|
|
4650
|
+
__decorateClass$s([attr], _Avatar.prototype, "shape", 2);
|
|
4651
|
+
__decorateClass$s([attr], _Avatar.prototype, "appearance", 2);
|
|
4652
|
+
__decorateClass$s([attr({
|
|
4646
4653
|
converter: nullableNumberConverter
|
|
4647
4654
|
})], _Avatar.prototype, "size", 2);
|
|
4648
|
-
__decorateClass$
|
|
4649
|
-
__decorateClass$
|
|
4655
|
+
__decorateClass$s([attr], _Avatar.prototype, "color", 2);
|
|
4656
|
+
__decorateClass$s([attr({
|
|
4650
4657
|
attribute: "color-id"
|
|
4651
4658
|
})], _Avatar.prototype, "colorId", 2);
|
|
4652
4659
|
let Avatar = _Avatar;
|
|
@@ -4671,22 +4678,22 @@ const animations = {
|
|
|
4671
4678
|
normalEase: curveEasyEase,
|
|
4672
4679
|
nullEasing: curveLinear
|
|
4673
4680
|
};
|
|
4674
|
-
const styles$
|
|
4681
|
+
const styles$w = css`
|
|
4675
4682
|
${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}}`;
|
|
4676
4683
|
|
|
4677
4684
|
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>`;
|
|
4678
4685
|
function avatarTemplate() {
|
|
4679
4686
|
return html`<slot>${x => x.name || x.initials ? x.generateInitials() : defaultIconTemplate}</slot><slot name="badge"></slot>`;
|
|
4680
4687
|
}
|
|
4681
|
-
const template$
|
|
4688
|
+
const template$y = avatarTemplate();
|
|
4682
4689
|
|
|
4683
|
-
const definition$
|
|
4690
|
+
const definition$y = Avatar.compose({
|
|
4684
4691
|
name: `${FluentDesignSystem.prefix}-avatar`,
|
|
4685
|
-
template: template$
|
|
4686
|
-
styles: styles$
|
|
4692
|
+
template: template$y,
|
|
4693
|
+
styles: styles$w
|
|
4687
4694
|
});
|
|
4688
4695
|
|
|
4689
|
-
definition$
|
|
4696
|
+
definition$y.define(FluentDesignSystem.registry);
|
|
4690
4697
|
|
|
4691
4698
|
const BadgeAppearance = {
|
|
4692
4699
|
filled: "filled",
|
|
@@ -4705,12 +4712,12 @@ const BadgeColor = {
|
|
|
4705
4712
|
warning: "warning"
|
|
4706
4713
|
};
|
|
4707
4714
|
|
|
4708
|
-
var __defProp$
|
|
4709
|
-
var __getOwnPropDesc$
|
|
4710
|
-
var __decorateClass$
|
|
4711
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
4715
|
+
var __defProp$r = Object.defineProperty;
|
|
4716
|
+
var __getOwnPropDesc$r = Object.getOwnPropertyDescriptor;
|
|
4717
|
+
var __decorateClass$r = (decorators, target, key, kind) => {
|
|
4718
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$r(target, key) : target;
|
|
4712
4719
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
4713
|
-
if (kind && result) __defProp$
|
|
4720
|
+
if (kind && result) __defProp$r(target, key, result);
|
|
4714
4721
|
return result;
|
|
4715
4722
|
};
|
|
4716
4723
|
class Badge extends FASTElement {
|
|
@@ -4778,10 +4785,10 @@ class Badge extends FASTElement {
|
|
|
4778
4785
|
}
|
|
4779
4786
|
}
|
|
4780
4787
|
}
|
|
4781
|
-
__decorateClass$
|
|
4782
|
-
__decorateClass$
|
|
4783
|
-
__decorateClass$
|
|
4784
|
-
__decorateClass$
|
|
4788
|
+
__decorateClass$r([attr], Badge.prototype, "appearance", 2);
|
|
4789
|
+
__decorateClass$r([attr], Badge.prototype, "color", 2);
|
|
4790
|
+
__decorateClass$r([attr], Badge.prototype, "shape", 2);
|
|
4791
|
+
__decorateClass$r([attr], Badge.prototype, "size", 2);
|
|
4785
4792
|
applyMixins(Badge, StartEnd);
|
|
4786
4793
|
|
|
4787
4794
|
const badgeBaseStyles = css.partial`
|
|
@@ -5135,7 +5142,7 @@ css.partial`
|
|
|
5135
5142
|
font-weight: ${fontWeightSemibold};
|
|
5136
5143
|
`;
|
|
5137
5144
|
|
|
5138
|
-
const styles$
|
|
5145
|
+
const styles$v = css`
|
|
5139
5146
|
:host(${squareState}){border-radius:${borderRadiusNone}}:host(${roundedState}){border-radius:${borderRadiusMedium}}:host(${roundedState}${tinyState}),:host(${roundedState}${extraSmallState}),:host(${roundedState}${smallState}){border-radius:${borderRadiusSmall}}${badgeSizeStyles}
|
|
5140
5147
|
${badgeFilledStyles}
|
|
5141
5148
|
${badgeGhostStyles}
|
|
@@ -5148,22 +5155,22 @@ const styles$u = css`
|
|
|
5148
5155
|
function badgeTemplate(options = {}) {
|
|
5149
5156
|
return html` ${startSlotTemplate(options)}<slot>${staticallyCompose(options.defaultContent)}</slot>${endSlotTemplate(options)} `;
|
|
5150
5157
|
}
|
|
5151
|
-
const template$
|
|
5158
|
+
const template$x = badgeTemplate();
|
|
5152
5159
|
|
|
5153
|
-
const definition$
|
|
5160
|
+
const definition$x = Badge.compose({
|
|
5154
5161
|
name: `${FluentDesignSystem.prefix}-badge`,
|
|
5155
|
-
template: template$
|
|
5156
|
-
styles: styles$
|
|
5162
|
+
template: template$x,
|
|
5163
|
+
styles: styles$v
|
|
5157
5164
|
});
|
|
5158
5165
|
|
|
5159
|
-
definition$
|
|
5166
|
+
definition$x.define(FluentDesignSystem.registry);
|
|
5160
5167
|
|
|
5161
|
-
var __defProp$
|
|
5162
|
-
var __getOwnPropDesc$
|
|
5163
|
-
var __decorateClass$
|
|
5164
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
5168
|
+
var __defProp$q = Object.defineProperty;
|
|
5169
|
+
var __getOwnPropDesc$q = Object.getOwnPropertyDescriptor;
|
|
5170
|
+
var __decorateClass$q = (decorators, target, key, kind) => {
|
|
5171
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$q(target, key) : target;
|
|
5165
5172
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
5166
|
-
if (kind && result) __defProp$
|
|
5173
|
+
if (kind && result) __defProp$q(target, key, result);
|
|
5167
5174
|
return result;
|
|
5168
5175
|
};
|
|
5169
5176
|
class BaseButton extends FASTElement {
|
|
@@ -5367,44 +5374,44 @@ class BaseButton extends FASTElement {
|
|
|
5367
5374
|
* @public
|
|
5368
5375
|
*/
|
|
5369
5376
|
BaseButton.formAssociated = true;
|
|
5370
|
-
__decorateClass$
|
|
5377
|
+
__decorateClass$q([attr({
|
|
5371
5378
|
mode: "boolean"
|
|
5372
5379
|
})], BaseButton.prototype, "autofocus", 2);
|
|
5373
|
-
__decorateClass$
|
|
5374
|
-
__decorateClass$
|
|
5380
|
+
__decorateClass$q([observable], BaseButton.prototype, "defaultSlottedContent", 2);
|
|
5381
|
+
__decorateClass$q([attr({
|
|
5375
5382
|
mode: "boolean"
|
|
5376
5383
|
})], BaseButton.prototype, "disabled", 2);
|
|
5377
|
-
__decorateClass$
|
|
5384
|
+
__decorateClass$q([attr({
|
|
5378
5385
|
attribute: "disabled-focusable",
|
|
5379
5386
|
mode: "boolean"
|
|
5380
5387
|
})], BaseButton.prototype, "disabledFocusable", 2);
|
|
5381
|
-
__decorateClass$
|
|
5388
|
+
__decorateClass$q([attr({
|
|
5382
5389
|
attribute: "tabindex",
|
|
5383
5390
|
mode: "fromView",
|
|
5384
5391
|
converter: nullableNumberConverter
|
|
5385
5392
|
})], BaseButton.prototype, "tabIndex", 2);
|
|
5386
|
-
__decorateClass$
|
|
5393
|
+
__decorateClass$q([attr({
|
|
5387
5394
|
attribute: "formaction"
|
|
5388
5395
|
})], BaseButton.prototype, "formAction", 2);
|
|
5389
|
-
__decorateClass$
|
|
5396
|
+
__decorateClass$q([attr({
|
|
5390
5397
|
attribute: "form"
|
|
5391
5398
|
})], BaseButton.prototype, "formAttribute", 2);
|
|
5392
|
-
__decorateClass$
|
|
5399
|
+
__decorateClass$q([attr({
|
|
5393
5400
|
attribute: "formenctype"
|
|
5394
5401
|
})], BaseButton.prototype, "formEnctype", 2);
|
|
5395
|
-
__decorateClass$
|
|
5402
|
+
__decorateClass$q([attr({
|
|
5396
5403
|
attribute: "formmethod"
|
|
5397
5404
|
})], BaseButton.prototype, "formMethod", 2);
|
|
5398
|
-
__decorateClass$
|
|
5405
|
+
__decorateClass$q([attr({
|
|
5399
5406
|
attribute: "formnovalidate",
|
|
5400
5407
|
mode: "boolean"
|
|
5401
5408
|
})], BaseButton.prototype, "formNoValidate", 2);
|
|
5402
|
-
__decorateClass$
|
|
5409
|
+
__decorateClass$q([attr({
|
|
5403
5410
|
attribute: "formtarget"
|
|
5404
5411
|
})], BaseButton.prototype, "formTarget", 2);
|
|
5405
|
-
__decorateClass$
|
|
5406
|
-
__decorateClass$
|
|
5407
|
-
__decorateClass$
|
|
5412
|
+
__decorateClass$q([attr], BaseButton.prototype, "name", 2);
|
|
5413
|
+
__decorateClass$q([attr], BaseButton.prototype, "type", 2);
|
|
5414
|
+
__decorateClass$q([attr], BaseButton.prototype, "value", 2);
|
|
5408
5415
|
class Button extends BaseButton {
|
|
5409
5416
|
constructor() {
|
|
5410
5417
|
super(...arguments);
|
|
@@ -5458,10 +5465,10 @@ class Button extends BaseButton {
|
|
|
5458
5465
|
toggleState(this.elementInternals, "icon", next);
|
|
5459
5466
|
}
|
|
5460
5467
|
}
|
|
5461
|
-
__decorateClass$
|
|
5462
|
-
__decorateClass$
|
|
5463
|
-
__decorateClass$
|
|
5464
|
-
__decorateClass$
|
|
5468
|
+
__decorateClass$q([attr], Button.prototype, "appearance", 2);
|
|
5469
|
+
__decorateClass$q([attr], Button.prototype, "shape", 2);
|
|
5470
|
+
__decorateClass$q([attr], Button.prototype, "size", 2);
|
|
5471
|
+
__decorateClass$q([attr({
|
|
5465
5472
|
attribute: "icon-only",
|
|
5466
5473
|
mode: "boolean"
|
|
5467
5474
|
})], Button.prototype, "iconOnly", 2);
|
|
@@ -5470,22 +5477,22 @@ applyMixins(Button, StartEnd);
|
|
|
5470
5477
|
function buttonTemplate$1(options = {}) {
|
|
5471
5478
|
return html`<template tabindex="${x => x.disabled ? null : x.tabIndex ?? 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>`;
|
|
5472
5479
|
}
|
|
5473
|
-
const template$
|
|
5480
|
+
const template$w = buttonTemplate$1();
|
|
5474
5481
|
|
|
5475
|
-
const definition$
|
|
5482
|
+
const definition$w = Button.compose({
|
|
5476
5483
|
name: `${FluentDesignSystem.prefix}-button`,
|
|
5477
|
-
template: template$
|
|
5478
|
-
styles: styles$
|
|
5484
|
+
template: template$w,
|
|
5485
|
+
styles: styles$y
|
|
5479
5486
|
});
|
|
5480
5487
|
|
|
5481
|
-
definition$
|
|
5488
|
+
definition$w.define(FluentDesignSystem.registry);
|
|
5482
5489
|
|
|
5483
|
-
var __defProp$
|
|
5484
|
-
var __getOwnPropDesc$
|
|
5485
|
-
var __decorateClass$
|
|
5486
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
5490
|
+
var __defProp$p = Object.defineProperty;
|
|
5491
|
+
var __getOwnPropDesc$p = Object.getOwnPropertyDescriptor;
|
|
5492
|
+
var __decorateClass$p = (decorators, target, key, kind) => {
|
|
5493
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$p(target, key) : target;
|
|
5487
5494
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
5488
|
-
if (kind && result) __defProp$
|
|
5495
|
+
if (kind && result) __defProp$p(target, key, result);
|
|
5489
5496
|
return result;
|
|
5490
5497
|
};
|
|
5491
5498
|
class BaseCheckbox extends FASTElement {
|
|
@@ -5819,27 +5826,27 @@ class BaseCheckbox extends FASTElement {
|
|
|
5819
5826
|
* @public
|
|
5820
5827
|
*/
|
|
5821
5828
|
BaseCheckbox.formAssociated = true;
|
|
5822
|
-
__decorateClass$
|
|
5829
|
+
__decorateClass$p([attr({
|
|
5823
5830
|
mode: "boolean"
|
|
5824
5831
|
})], BaseCheckbox.prototype, "autofocus", 2);
|
|
5825
|
-
__decorateClass$
|
|
5826
|
-
__decorateClass$
|
|
5832
|
+
__decorateClass$p([observable], BaseCheckbox.prototype, "disabled", 2);
|
|
5833
|
+
__decorateClass$p([attr({
|
|
5827
5834
|
attribute: "disabled",
|
|
5828
5835
|
mode: "boolean"
|
|
5829
5836
|
})], BaseCheckbox.prototype, "disabledAttribute", 2);
|
|
5830
|
-
__decorateClass$
|
|
5837
|
+
__decorateClass$p([attr({
|
|
5831
5838
|
attribute: "form"
|
|
5832
5839
|
})], BaseCheckbox.prototype, "formAttribute", 2);
|
|
5833
|
-
__decorateClass$
|
|
5840
|
+
__decorateClass$p([attr({
|
|
5834
5841
|
attribute: "checked",
|
|
5835
5842
|
mode: "boolean"
|
|
5836
5843
|
})], BaseCheckbox.prototype, "initialChecked", 2);
|
|
5837
|
-
__decorateClass$
|
|
5844
|
+
__decorateClass$p([attr({
|
|
5838
5845
|
attribute: "value",
|
|
5839
5846
|
mode: "fromView"
|
|
5840
5847
|
})], BaseCheckbox.prototype, "initialValue", 2);
|
|
5841
|
-
__decorateClass$
|
|
5842
|
-
__decorateClass$
|
|
5848
|
+
__decorateClass$p([attr], BaseCheckbox.prototype, "name", 2);
|
|
5849
|
+
__decorateClass$p([attr({
|
|
5843
5850
|
mode: "boolean"
|
|
5844
5851
|
})], BaseCheckbox.prototype, "required", 2);
|
|
5845
5852
|
class Checkbox extends BaseCheckbox {
|
|
@@ -5912,12 +5919,12 @@ class Checkbox extends BaseCheckbox {
|
|
|
5912
5919
|
super.toggleChecked(force);
|
|
5913
5920
|
}
|
|
5914
5921
|
}
|
|
5915
|
-
__decorateClass$
|
|
5916
|
-
__decorateClass$
|
|
5917
|
-
__decorateClass$
|
|
5922
|
+
__decorateClass$p([observable], Checkbox.prototype, "indeterminate", 2);
|
|
5923
|
+
__decorateClass$p([attr], Checkbox.prototype, "shape", 2);
|
|
5924
|
+
__decorateClass$p([attr], Checkbox.prototype, "size", 2);
|
|
5918
5925
|
|
|
5919
5926
|
const indeterminateState = css.partial`:is([state--indeterminate], :state(indeterminate))`;
|
|
5920
|
-
const styles$
|
|
5927
|
+
const styles$u = css`
|
|
5921
5928
|
${display("inline-flex")}
|
|
5922
5929
|
|
|
5923
5930
|
:host{--size:16px;background-color:${colorNeutralBackground1};border-radius:${borderRadiusSmall};border:${strokeWidthThin} solid ${colorNeutralStrokeAccessible};box-sizing:border-box;cursor:pointer;position:relative;width:var(--size)}:host,.indeterminate-indicator,.checked-indicator{aspect-ratio:1}:host(:hover){border-color:${colorNeutralStrokeAccessibleHover}}:host(:active){border-color:${colorNeutralStrokeAccessiblePressed}}:host(${checkedState}:hover){background-color:${colorCompoundBrandBackgroundHover};border-color:${colorCompoundBrandStrokeHover}}:host(${checkedState}:active){background-color:${colorCompoundBrandBackgroundPressed};border-color:${colorCompoundBrandStrokePressed}}:host(:focus-visible){outline:none}:host(:not([slot='input']))::after{content:'';position:absolute;inset:-8px;box-sizing:border-box;outline:none;border:${strokeWidthThick} solid ${colorTransparentStroke};border-radius:${borderRadiusMedium}}:host(:not([slot='input']):focus-visible)::after{border-color:${colorStrokeFocus2}}.indeterminate-indicator,.checked-indicator{color:${colorNeutralForegroundInverted};inset:0;margin:auto;position:absolute}::slotted([slot='checked-indicator']),.checked-indicator{fill:currentColor;display:inline-flex;flex:1 0 auto;width:12px}:host(:not(${checkedState})) *:is(::slotted([slot='checked-indicator']),.checked-indicator){display:none}:host(${checkedState}),:host(${indeterminateState}){border-color:${colorCompoundBrandStroke}}:host(${checkedState}),:host(${indeterminateState}) .indeterminate-indicator{background-color:${colorCompoundBrandBackground}}:host(${indeterminateState}) .indeterminate-indicator{border-radius:${borderRadiusSmall};position:absolute;width:calc(var(--size) / 2);inset:0}:host(${largeState}){--size:20px}:host(${largeState}) ::slotted([slot='checked-indicator']),:host(${largeState}) .checked-indicator{width:16px}:host(${circularState}),:host(${circularState}) .indeterminate-indicator{border-radius:${borderRadiusCircular}}:host([disabled]),:host([disabled]${checkedState}){background-color:${colorNeutralBackgroundDisabled};border-color:${colorNeutralStrokeDisabled}}:host([disabled]){cursor:unset}:host([disabled]${indeterminateState}) .indeterminate-indicator{background-color:${colorNeutralStrokeDisabled}}:host([disabled]${checkedState}) .checked-indicator{color:${colorNeutralStrokeDisabled}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
@@ -5943,23 +5950,23 @@ const indeterminateIndicator = html.partial( /* html */
|
|
|
5943
5950
|
function checkboxTemplate(options = {}) {
|
|
5944
5951
|
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>`;
|
|
5945
5952
|
}
|
|
5946
|
-
const template$
|
|
5953
|
+
const template$v = checkboxTemplate({
|
|
5947
5954
|
checkedIndicator: checkedIndicator$1,
|
|
5948
5955
|
indeterminateIndicator
|
|
5949
5956
|
});
|
|
5950
5957
|
|
|
5951
|
-
const definition$
|
|
5958
|
+
const definition$v = Checkbox.compose({
|
|
5952
5959
|
name: `${FluentDesignSystem.prefix}-checkbox`,
|
|
5953
|
-
template: template$
|
|
5954
|
-
styles: styles$
|
|
5960
|
+
template: template$v,
|
|
5961
|
+
styles: styles$u
|
|
5955
5962
|
});
|
|
5956
5963
|
|
|
5957
|
-
definition$
|
|
5964
|
+
definition$v.define(FluentDesignSystem.registry);
|
|
5958
5965
|
|
|
5959
5966
|
class CompoundButton extends Button {}
|
|
5960
5967
|
|
|
5961
|
-
const styles$
|
|
5962
|
-
${styles$
|
|
5968
|
+
const styles$t = css`
|
|
5969
|
+
${styles$y}
|
|
5963
5970
|
|
|
5964
5971
|
: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]))
|
|
5965
5972
|
::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}}`;
|
|
@@ -5967,22 +5974,22 @@ const styles$s = css`
|
|
|
5967
5974
|
function buttonTemplate(options = {}) {
|
|
5968
5975
|
return html`<template ?disabled="${x => x.disabled}" tabindex="${x => x.disabled ? null : x.tabIndex ?? 0}">${startSlotTemplate(options)}<span class="content" part="content"><slot ${slotted("defaultSlottedContent")}></slot><slot name="description"></slot></span>${endSlotTemplate(options)}</template>`;
|
|
5969
5976
|
}
|
|
5970
|
-
const template$
|
|
5977
|
+
const template$u = buttonTemplate();
|
|
5971
5978
|
|
|
5972
|
-
const definition$
|
|
5979
|
+
const definition$u = CompoundButton.compose({
|
|
5973
5980
|
name: `${FluentDesignSystem.prefix}-compound-button`,
|
|
5974
|
-
template: template$
|
|
5975
|
-
styles: styles$
|
|
5981
|
+
template: template$u,
|
|
5982
|
+
styles: styles$t
|
|
5976
5983
|
});
|
|
5977
5984
|
|
|
5978
|
-
definition$
|
|
5985
|
+
definition$u.define(FluentDesignSystem.registry);
|
|
5979
5986
|
|
|
5980
|
-
var __defProp$
|
|
5981
|
-
var __getOwnPropDesc$
|
|
5982
|
-
var __decorateClass$
|
|
5983
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
5987
|
+
var __defProp$o = Object.defineProperty;
|
|
5988
|
+
var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
|
|
5989
|
+
var __decorateClass$o = (decorators, target, key, kind) => {
|
|
5990
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$o(target, key) : target;
|
|
5984
5991
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
5985
|
-
if (kind && result) __defProp$
|
|
5992
|
+
if (kind && result) __defProp$o(target, key, result);
|
|
5986
5993
|
return result;
|
|
5987
5994
|
};
|
|
5988
5995
|
class CounterBadge extends FASTElement {
|
|
@@ -6079,28 +6086,28 @@ class CounterBadge extends FASTElement {
|
|
|
6079
6086
|
return;
|
|
6080
6087
|
}
|
|
6081
6088
|
}
|
|
6082
|
-
__decorateClass$
|
|
6083
|
-
__decorateClass$
|
|
6084
|
-
__decorateClass$
|
|
6085
|
-
__decorateClass$
|
|
6086
|
-
__decorateClass$
|
|
6089
|
+
__decorateClass$o([attr], CounterBadge.prototype, "appearance", 2);
|
|
6090
|
+
__decorateClass$o([attr], CounterBadge.prototype, "color", 2);
|
|
6091
|
+
__decorateClass$o([attr], CounterBadge.prototype, "shape", 2);
|
|
6092
|
+
__decorateClass$o([attr], CounterBadge.prototype, "size", 2);
|
|
6093
|
+
__decorateClass$o([attr({
|
|
6087
6094
|
converter: nullableNumberConverter
|
|
6088
6095
|
})], CounterBadge.prototype, "count", 2);
|
|
6089
|
-
__decorateClass$
|
|
6096
|
+
__decorateClass$o([attr({
|
|
6090
6097
|
attribute: "overflow-count",
|
|
6091
6098
|
converter: nullableNumberConverter
|
|
6092
6099
|
})], CounterBadge.prototype, "overflowCount", 2);
|
|
6093
|
-
__decorateClass$
|
|
6100
|
+
__decorateClass$o([attr({
|
|
6094
6101
|
attribute: "show-zero",
|
|
6095
6102
|
mode: "boolean"
|
|
6096
6103
|
})], CounterBadge.prototype, "showZero", 2);
|
|
6097
|
-
__decorateClass$
|
|
6104
|
+
__decorateClass$o([attr({
|
|
6098
6105
|
mode: "boolean"
|
|
6099
6106
|
})], CounterBadge.prototype, "dot", 2);
|
|
6100
6107
|
applyMixins(CounterBadge, StartEnd);
|
|
6101
6108
|
|
|
6102
6109
|
const dotState = css.partial`:is([state--dot], :state(dot))`;
|
|
6103
|
-
const styles$
|
|
6110
|
+
const styles$s = css`
|
|
6104
6111
|
:host(${roundedState}){border-radius:${borderRadiusMedium}}:host(${roundedState}${tinyState}),:host(${roundedState}${extraSmallState}),:host(${roundedState}${smallState}){border-radius:${borderRadiusSmall}}${badgeSizeStyles}
|
|
6105
6112
|
${badgeFilledStyles}
|
|
6106
6113
|
${badgeGhostStyles}
|
|
@@ -6113,15 +6120,15 @@ function composeTemplate(options = {}) {
|
|
|
6113
6120
|
defaultContent: html`${x => x.setCount()}`
|
|
6114
6121
|
});
|
|
6115
6122
|
}
|
|
6116
|
-
const template$
|
|
6123
|
+
const template$t = composeTemplate();
|
|
6117
6124
|
|
|
6118
|
-
const definition$
|
|
6125
|
+
const definition$t = CounterBadge.compose({
|
|
6119
6126
|
name: `${FluentDesignSystem.prefix}-counter-badge`,
|
|
6120
|
-
template: template$
|
|
6121
|
-
styles: styles$
|
|
6127
|
+
template: template$t,
|
|
6128
|
+
styles: styles$s
|
|
6122
6129
|
});
|
|
6123
6130
|
|
|
6124
|
-
definition$
|
|
6131
|
+
definition$t.define(FluentDesignSystem.registry);
|
|
6125
6132
|
|
|
6126
6133
|
const DialogType = {
|
|
6127
6134
|
modal: "modal",
|
|
@@ -6129,12 +6136,12 @@ const DialogType = {
|
|
|
6129
6136
|
alert: "alert"
|
|
6130
6137
|
};
|
|
6131
6138
|
|
|
6132
|
-
var __defProp$
|
|
6133
|
-
var __getOwnPropDesc$
|
|
6134
|
-
var __decorateClass$
|
|
6135
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6139
|
+
var __defProp$n = Object.defineProperty;
|
|
6140
|
+
var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
|
|
6141
|
+
var __decorateClass$n = (decorators, target, key, kind) => {
|
|
6142
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$n(target, key) : target;
|
|
6136
6143
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6137
|
-
if (kind && result) __defProp$
|
|
6144
|
+
if (kind && result) __defProp$n(target, key, result);
|
|
6138
6145
|
return result;
|
|
6139
6146
|
};
|
|
6140
6147
|
class Dialog extends FASTElement {
|
|
@@ -6202,35 +6209,35 @@ class Dialog extends FASTElement {
|
|
|
6202
6209
|
return true;
|
|
6203
6210
|
}
|
|
6204
6211
|
}
|
|
6205
|
-
__decorateClass$
|
|
6206
|
-
__decorateClass$
|
|
6212
|
+
__decorateClass$n([observable], Dialog.prototype, "dialog", 2);
|
|
6213
|
+
__decorateClass$n([attr({
|
|
6207
6214
|
attribute: "aria-describedby"
|
|
6208
6215
|
})], Dialog.prototype, "ariaDescribedby", 2);
|
|
6209
|
-
__decorateClass$
|
|
6216
|
+
__decorateClass$n([attr({
|
|
6210
6217
|
attribute: "aria-labelledby"
|
|
6211
6218
|
})], Dialog.prototype, "ariaLabelledby", 2);
|
|
6212
|
-
__decorateClass$
|
|
6219
|
+
__decorateClass$n([attr], Dialog.prototype, "type", 2);
|
|
6213
6220
|
|
|
6214
|
-
const template$
|
|
6221
|
+
const template$s = 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>`;
|
|
6215
6222
|
|
|
6216
|
-
const styles$
|
|
6223
|
+
const styles$r = css`
|
|
6217
6224
|
@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`
|
|
6218
6225
|
@layer base{dialog{border:${strokeWidthThin} solid ${colorTransparentStroke}}}`));
|
|
6219
6226
|
|
|
6220
|
-
const definition$
|
|
6227
|
+
const definition$s = Dialog.compose({
|
|
6221
6228
|
name: `${FluentDesignSystem.prefix}-dialog`,
|
|
6222
|
-
template: template$
|
|
6223
|
-
styles: styles$
|
|
6229
|
+
template: template$s,
|
|
6230
|
+
styles: styles$r
|
|
6224
6231
|
});
|
|
6225
6232
|
|
|
6226
|
-
definition$
|
|
6233
|
+
definition$s.define(FluentDesignSystem.registry);
|
|
6227
6234
|
|
|
6228
|
-
var __defProp$
|
|
6229
|
-
var __getOwnPropDesc$
|
|
6230
|
-
var __decorateClass$
|
|
6231
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6235
|
+
var __defProp$m = Object.defineProperty;
|
|
6236
|
+
var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
|
|
6237
|
+
var __decorateClass$m = (decorators, target, key, kind) => {
|
|
6238
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$m(target, key) : target;
|
|
6232
6239
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6233
|
-
if (kind && result) __defProp$
|
|
6240
|
+
if (kind && result) __defProp$m(target, key, result);
|
|
6234
6241
|
return result;
|
|
6235
6242
|
};
|
|
6236
6243
|
class DialogBody extends FASTElement {
|
|
@@ -6239,7 +6246,7 @@ class DialogBody extends FASTElement {
|
|
|
6239
6246
|
this.noTitleAction = false;
|
|
6240
6247
|
}
|
|
6241
6248
|
}
|
|
6242
|
-
__decorateClass$
|
|
6249
|
+
__decorateClass$m([attr({
|
|
6243
6250
|
mode: "boolean",
|
|
6244
6251
|
attribute: "no-title-action"
|
|
6245
6252
|
})], DialogBody.prototype, "noTitleAction", 2);
|
|
@@ -6258,20 +6265,20 @@ const dismissed16Regular = html.partial(`
|
|
|
6258
6265
|
fill="currentColor"
|
|
6259
6266
|
></path>
|
|
6260
6267
|
</svg>`);
|
|
6261
|
-
const template$
|
|
6268
|
+
const template$r = 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>`;
|
|
6262
6269
|
|
|
6263
|
-
const styles$
|
|
6270
|
+
const styles$q = css`
|
|
6264
6271
|
${display("grid")}
|
|
6265
6272
|
|
|
6266
6273
|
: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}}}`;
|
|
6267
6274
|
|
|
6268
|
-
const definition$
|
|
6275
|
+
const definition$r = DialogBody.compose({
|
|
6269
6276
|
name: `${FluentDesignSystem.prefix}-dialog-body`,
|
|
6270
|
-
template: template$
|
|
6271
|
-
styles: styles$
|
|
6277
|
+
template: template$r,
|
|
6278
|
+
styles: styles$q
|
|
6272
6279
|
});
|
|
6273
6280
|
|
|
6274
|
-
definition$
|
|
6281
|
+
definition$r.define(FluentDesignSystem.registry);
|
|
6275
6282
|
|
|
6276
6283
|
const DividerRole = {
|
|
6277
6284
|
/**
|
|
@@ -6285,12 +6292,12 @@ const DividerRole = {
|
|
|
6285
6292
|
};
|
|
6286
6293
|
const DividerOrientation = Orientation;
|
|
6287
6294
|
|
|
6288
|
-
var __defProp$
|
|
6289
|
-
var __getOwnPropDesc$
|
|
6290
|
-
var __decorateClass$
|
|
6291
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6295
|
+
var __defProp$l = Object.defineProperty;
|
|
6296
|
+
var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
|
|
6297
|
+
var __decorateClass$l = (decorators, target, key, kind) => {
|
|
6298
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$l(target, key) : target;
|
|
6292
6299
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6293
|
-
if (kind && result) __defProp$
|
|
6300
|
+
if (kind && result) __defProp$l(target, key, result);
|
|
6294
6301
|
return result;
|
|
6295
6302
|
};
|
|
6296
6303
|
class BaseDivider extends FASTElement {
|
|
@@ -6342,8 +6349,8 @@ class BaseDivider extends FASTElement {
|
|
|
6342
6349
|
}
|
|
6343
6350
|
}
|
|
6344
6351
|
}
|
|
6345
|
-
__decorateClass$
|
|
6346
|
-
__decorateClass$
|
|
6352
|
+
__decorateClass$l([attr], BaseDivider.prototype, "role", 2);
|
|
6353
|
+
__decorateClass$l([attr], BaseDivider.prototype, "orientation", 2);
|
|
6347
6354
|
class Divider extends BaseDivider {
|
|
6348
6355
|
constructor() {
|
|
6349
6356
|
super(...arguments);
|
|
@@ -6384,32 +6391,32 @@ class Divider extends BaseDivider {
|
|
|
6384
6391
|
toggleState(this.elementInternals, "inset", next);
|
|
6385
6392
|
}
|
|
6386
6393
|
}
|
|
6387
|
-
__decorateClass$
|
|
6394
|
+
__decorateClass$l([attr({
|
|
6388
6395
|
attribute: "align-content"
|
|
6389
6396
|
})], Divider.prototype, "alignContent", 2);
|
|
6390
|
-
__decorateClass$
|
|
6391
|
-
__decorateClass$
|
|
6397
|
+
__decorateClass$l([attr], Divider.prototype, "appearance", 2);
|
|
6398
|
+
__decorateClass$l([attr({
|
|
6392
6399
|
mode: "boolean"
|
|
6393
6400
|
})], Divider.prototype, "inset", 2);
|
|
6394
6401
|
|
|
6395
6402
|
function dividerTemplate() {
|
|
6396
6403
|
return html`<slot></slot>`;
|
|
6397
6404
|
}
|
|
6398
|
-
const template$
|
|
6405
|
+
const template$q = dividerTemplate();
|
|
6399
6406
|
|
|
6400
|
-
const styles$
|
|
6407
|
+
const styles$p = css`
|
|
6401
6408
|
${display("flex")}
|
|
6402
6409
|
|
|
6403
6410
|
: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`
|
|
6404
6411
|
: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}`));
|
|
6405
6412
|
|
|
6406
|
-
const definition$
|
|
6413
|
+
const definition$q = Divider.compose({
|
|
6407
6414
|
name: `${FluentDesignSystem.prefix}-divider`,
|
|
6408
|
-
template: template$
|
|
6409
|
-
styles: styles$
|
|
6415
|
+
template: template$q,
|
|
6416
|
+
styles: styles$p
|
|
6410
6417
|
});
|
|
6411
6418
|
|
|
6412
|
-
definition$
|
|
6419
|
+
definition$q.define(FluentDesignSystem.registry);
|
|
6413
6420
|
|
|
6414
6421
|
const DrawerPosition = {
|
|
6415
6422
|
start: "start",
|
|
@@ -6427,12 +6434,12 @@ const DrawerType = {
|
|
|
6427
6434
|
inline: "inline"
|
|
6428
6435
|
};
|
|
6429
6436
|
|
|
6430
|
-
var __defProp$
|
|
6431
|
-
var __getOwnPropDesc$
|
|
6432
|
-
var __decorateClass$
|
|
6433
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6437
|
+
var __defProp$k = Object.defineProperty;
|
|
6438
|
+
var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
|
|
6439
|
+
var __decorateClass$k = (decorators, target, key, kind) => {
|
|
6440
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$k(target, key) : target;
|
|
6434
6441
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6435
|
-
if (kind && result) __defProp$
|
|
6442
|
+
if (kind && result) __defProp$k(target, key, result);
|
|
6436
6443
|
return result;
|
|
6437
6444
|
};
|
|
6438
6445
|
class Drawer extends FASTElement {
|
|
@@ -6502,20 +6509,20 @@ class Drawer extends FASTElement {
|
|
|
6502
6509
|
return true;
|
|
6503
6510
|
}
|
|
6504
6511
|
}
|
|
6505
|
-
__decorateClass$
|
|
6506
|
-
__decorateClass$
|
|
6512
|
+
__decorateClass$k([attr], Drawer.prototype, "type", 2);
|
|
6513
|
+
__decorateClass$k([attr({
|
|
6507
6514
|
attribute: "aria-labelledby"
|
|
6508
6515
|
})], Drawer.prototype, "ariaLabelledby", 2);
|
|
6509
|
-
__decorateClass$
|
|
6516
|
+
__decorateClass$k([attr({
|
|
6510
6517
|
attribute: "aria-describedby"
|
|
6511
6518
|
})], Drawer.prototype, "ariaDescribedby", 2);
|
|
6512
|
-
__decorateClass$
|
|
6513
|
-
__decorateClass$
|
|
6519
|
+
__decorateClass$k([attr], Drawer.prototype, "position", 2);
|
|
6520
|
+
__decorateClass$k([attr({
|
|
6514
6521
|
attribute: "size"
|
|
6515
6522
|
})], Drawer.prototype, "size", 2);
|
|
6516
|
-
__decorateClass$
|
|
6523
|
+
__decorateClass$k([observable], Drawer.prototype, "dialog", 2);
|
|
6517
6524
|
|
|
6518
|
-
const styles$
|
|
6525
|
+
const styles$o = css`
|
|
6519
6526
|
${display("block")}
|
|
6520
6527
|
|
|
6521
6528
|
: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}}}`;
|
|
@@ -6523,34 +6530,34 @@ const styles$n = css`
|
|
|
6523
6530
|
function drawerTemplate() {
|
|
6524
6531
|
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>`;
|
|
6525
6532
|
}
|
|
6526
|
-
const template$
|
|
6533
|
+
const template$p = drawerTemplate();
|
|
6527
6534
|
|
|
6528
|
-
const definition$
|
|
6535
|
+
const definition$p = Drawer.compose({
|
|
6529
6536
|
name: `${FluentDesignSystem.prefix}-drawer`,
|
|
6530
|
-
template: template$
|
|
6531
|
-
styles: styles$
|
|
6537
|
+
template: template$p,
|
|
6538
|
+
styles: styles$o
|
|
6532
6539
|
});
|
|
6533
6540
|
|
|
6534
|
-
definition$
|
|
6541
|
+
definition$p.define(FluentDesignSystem.registry);
|
|
6535
6542
|
|
|
6536
6543
|
class DrawerBody extends FASTElement {}
|
|
6537
6544
|
|
|
6538
|
-
const styles$
|
|
6545
|
+
const styles$n = css`
|
|
6539
6546
|
${display("grid")}
|
|
6540
6547
|
:host{box-sizing:border-box;grid-template-rows:min-content auto min-content;position:relative;height:100%;padding:${spacingHorizontalXL};max-height:100svh}.header{display:flex;justify-content:space-between;align-items:center;${typographySubtitle1Styles}}.footer{display:flex;justify-content:flex-start;gap:${spacingHorizontalM}}`;
|
|
6541
6548
|
|
|
6542
6549
|
function drawerBodyTemplate() {
|
|
6543
6550
|
return html`<div class="header" part="header"><slot name="title"></slot><slot name="close"></slot></div><div class="content" part="content"><slot></slot></div><div class="footer" part="footer"><slot name="footer"></slot></div>`;
|
|
6544
6551
|
}
|
|
6545
|
-
const template$
|
|
6552
|
+
const template$o = drawerBodyTemplate();
|
|
6546
6553
|
|
|
6547
|
-
const definition$
|
|
6554
|
+
const definition$o = DrawerBody.compose({
|
|
6548
6555
|
name: `${FluentDesignSystem.prefix}-drawer-body`,
|
|
6549
|
-
template: template$
|
|
6550
|
-
styles: styles$
|
|
6556
|
+
template: template$o,
|
|
6557
|
+
styles: styles$n
|
|
6551
6558
|
});
|
|
6552
6559
|
|
|
6553
|
-
definition$
|
|
6560
|
+
definition$o.define(FluentDesignSystem.registry);
|
|
6554
6561
|
|
|
6555
6562
|
const LabelPosition = {
|
|
6556
6563
|
above: "above",
|
|
@@ -6571,12 +6578,12 @@ const ValidationFlags = {
|
|
|
6571
6578
|
valid: "valid"
|
|
6572
6579
|
};
|
|
6573
6580
|
|
|
6574
|
-
var __defProp$
|
|
6575
|
-
var __getOwnPropDesc$
|
|
6576
|
-
var __decorateClass$
|
|
6577
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6581
|
+
var __defProp$j = Object.defineProperty;
|
|
6582
|
+
var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
|
|
6583
|
+
var __decorateClass$j = (decorators, target, key, kind) => {
|
|
6584
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$j(target, key) : target;
|
|
6578
6585
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6579
|
-
if (kind && result) __defProp$
|
|
6586
|
+
if (kind && result) __defProp$j(target, key, result);
|
|
6580
6587
|
return result;
|
|
6581
6588
|
};
|
|
6582
6589
|
class BaseField extends FASTElement {
|
|
@@ -6744,17 +6751,17 @@ class BaseField extends FASTElement {
|
|
|
6744
6751
|
}
|
|
6745
6752
|
}
|
|
6746
6753
|
}
|
|
6747
|
-
__decorateClass$
|
|
6748
|
-
__decorateClass$
|
|
6749
|
-
__decorateClass$
|
|
6750
|
-
__decorateClass$
|
|
6754
|
+
__decorateClass$j([observable], BaseField.prototype, "labelSlot", 2);
|
|
6755
|
+
__decorateClass$j([observable], BaseField.prototype, "messageSlot", 2);
|
|
6756
|
+
__decorateClass$j([observable], BaseField.prototype, "slottedInputs", 2);
|
|
6757
|
+
__decorateClass$j([observable], BaseField.prototype, "input", 2);
|
|
6751
6758
|
class Field extends BaseField {
|
|
6752
6759
|
constructor() {
|
|
6753
6760
|
super(...arguments);
|
|
6754
6761
|
this.labelPosition = LabelPosition.above;
|
|
6755
6762
|
}
|
|
6756
6763
|
}
|
|
6757
|
-
__decorateClass$
|
|
6764
|
+
__decorateClass$j([attr({
|
|
6758
6765
|
attribute: "label-position"
|
|
6759
6766
|
})], Field.prototype, "labelPosition", 2);
|
|
6760
6767
|
|
|
@@ -6771,12 +6778,12 @@ const typeMismatchState = css.partial`:is([state--${ValidationFlags.typeMismatch
|
|
|
6771
6778
|
const validState = css.partial`:is([state-${ValidationFlags.valid}], :state(${ValidationFlags.valid}))`;
|
|
6772
6779
|
const valueMissingState = css.partial`:is([state--${ValidationFlags.valueMissing}], :state(${ValidationFlags.valueMissing}))`;
|
|
6773
6780
|
const hasMessageState = css.partial`:is([state--has-message], :state(has-message))`;
|
|
6774
|
-
const styles$
|
|
6781
|
+
const styles$m = css`
|
|
6775
6782
|
${display("inline-grid")}
|
|
6776
6783
|
|
|
6777
6784
|
:host{color:${colorNeutralForeground1};align-items:center;gap:0 ${spacingHorizontalM};justify-items:start;position:relative}: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';justify-items:center}:host([label-position='below']) ::slotted([slot='label']){margin-block-start:${spacingVerticalM}}:host([label-position='below']:not(${hasMessageState})){grid-template-areas:'input' 'label'}::slotted([slot='label'])::after{content:'';display:block;position:absolute;inset:0}::slotted([slot='input']){grid-area:input;position:relative;z-index:1}::slotted([slot='message']){margin-block-start:${spacingVerticalXXS};grid-area:message}:host(${focusVisibleState}:focus-within){border-radius:${borderRadiusMedium};outline:${strokeWidthThick} solid ${colorStrokeFocus2}}::slotted(label),::slotted([slot='label']){cursor:inherit;display:inline-flex;font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};grid-area:label;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}){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}`;
|
|
6778
6785
|
|
|
6779
|
-
const template$
|
|
6786
|
+
const template$n = 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({
|
|
6780
6787
|
property: "slottedInputs",
|
|
6781
6788
|
attributes: true,
|
|
6782
6789
|
attributeFilter: ["disabled", "required", "readonly"],
|
|
@@ -6788,23 +6795,23 @@ const template$m = html`<template @click="${(x, c) => x.clickHandler(c.event)}"
|
|
|
6788
6795
|
filter: elements("[flag]")
|
|
6789
6796
|
})}></slot></template>`;
|
|
6790
6797
|
|
|
6791
|
-
const definition$
|
|
6798
|
+
const definition$n = Field.compose({
|
|
6792
6799
|
name: `${FluentDesignSystem.prefix}-field`,
|
|
6793
|
-
template: template$
|
|
6794
|
-
styles: styles$
|
|
6800
|
+
template: template$n,
|
|
6801
|
+
styles: styles$m,
|
|
6795
6802
|
shadowOptions: {
|
|
6796
6803
|
delegatesFocus: true
|
|
6797
6804
|
}
|
|
6798
6805
|
});
|
|
6799
6806
|
|
|
6800
|
-
definition$
|
|
6807
|
+
definition$n.define(FluentDesignSystem.registry);
|
|
6801
6808
|
|
|
6802
|
-
var __defProp$
|
|
6803
|
-
var __getOwnPropDesc$
|
|
6804
|
-
var __decorateClass$
|
|
6805
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6809
|
+
var __defProp$i = Object.defineProperty;
|
|
6810
|
+
var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
|
|
6811
|
+
var __decorateClass$i = (decorators, target, key, kind) => {
|
|
6812
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$i(target, key) : target;
|
|
6806
6813
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6807
|
-
if (kind && result) __defProp$
|
|
6814
|
+
if (kind && result) __defProp$i(target, key, result);
|
|
6808
6815
|
return result;
|
|
6809
6816
|
};
|
|
6810
6817
|
class Image extends FASTElement {
|
|
@@ -6869,37 +6876,37 @@ class Image extends FASTElement {
|
|
|
6869
6876
|
}
|
|
6870
6877
|
}
|
|
6871
6878
|
}
|
|
6872
|
-
__decorateClass$
|
|
6879
|
+
__decorateClass$i([attr({
|
|
6873
6880
|
mode: "boolean"
|
|
6874
6881
|
})], Image.prototype, "block", 2);
|
|
6875
|
-
__decorateClass$
|
|
6882
|
+
__decorateClass$i([attr({
|
|
6876
6883
|
mode: "boolean"
|
|
6877
6884
|
})], Image.prototype, "bordered", 2);
|
|
6878
|
-
__decorateClass$
|
|
6885
|
+
__decorateClass$i([attr({
|
|
6879
6886
|
mode: "boolean"
|
|
6880
6887
|
})], Image.prototype, "shadow", 2);
|
|
6881
|
-
__decorateClass$
|
|
6882
|
-
__decorateClass$
|
|
6888
|
+
__decorateClass$i([attr], Image.prototype, "fit", 2);
|
|
6889
|
+
__decorateClass$i([attr], Image.prototype, "shape", 2);
|
|
6883
6890
|
|
|
6884
|
-
const template$
|
|
6891
|
+
const template$m = html`<slot></slot>`;
|
|
6885
6892
|
|
|
6886
|
-
const styles$
|
|
6893
|
+
const styles$l = css`
|
|
6887
6894
|
: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}}`;
|
|
6888
6895
|
|
|
6889
|
-
const definition$
|
|
6896
|
+
const definition$m = Image.compose({
|
|
6890
6897
|
name: `${FluentDesignSystem.prefix}-image`,
|
|
6891
|
-
template: template$
|
|
6892
|
-
styles: styles$
|
|
6898
|
+
template: template$m,
|
|
6899
|
+
styles: styles$l
|
|
6893
6900
|
});
|
|
6894
6901
|
|
|
6895
|
-
definition$
|
|
6902
|
+
definition$m.define(FluentDesignSystem.registry);
|
|
6896
6903
|
|
|
6897
|
-
var __defProp$
|
|
6898
|
-
var __getOwnPropDesc$
|
|
6899
|
-
var __decorateClass$
|
|
6900
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6904
|
+
var __defProp$h = Object.defineProperty;
|
|
6905
|
+
var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
|
|
6906
|
+
var __decorateClass$h = (decorators, target, key, kind) => {
|
|
6907
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$h(target, key) : target;
|
|
6901
6908
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6902
|
-
if (kind && result) __defProp$
|
|
6909
|
+
if (kind && result) __defProp$h(target, key, result);
|
|
6903
6910
|
return result;
|
|
6904
6911
|
};
|
|
6905
6912
|
class Label extends FASTElement {
|
|
@@ -6949,16 +6956,16 @@ class Label extends FASTElement {
|
|
|
6949
6956
|
toggleState(this.elementInternals, "disabled", next);
|
|
6950
6957
|
}
|
|
6951
6958
|
}
|
|
6952
|
-
__decorateClass$
|
|
6953
|
-
__decorateClass$
|
|
6954
|
-
__decorateClass$
|
|
6959
|
+
__decorateClass$h([attr], Label.prototype, "size", 2);
|
|
6960
|
+
__decorateClass$h([attr], Label.prototype, "weight", 2);
|
|
6961
|
+
__decorateClass$h([attr({
|
|
6955
6962
|
mode: "boolean"
|
|
6956
6963
|
})], Label.prototype, "disabled", 2);
|
|
6957
|
-
__decorateClass$
|
|
6964
|
+
__decorateClass$h([attr({
|
|
6958
6965
|
mode: "boolean"
|
|
6959
6966
|
})], Label.prototype, "required", 2);
|
|
6960
6967
|
|
|
6961
|
-
const styles$
|
|
6968
|
+
const styles$k = css`
|
|
6962
6969
|
${display("inline-flex")}
|
|
6963
6970
|
|
|
6964
6971
|
: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}}`;
|
|
@@ -6966,22 +6973,22 @@ const styles$j = css`
|
|
|
6966
6973
|
function labelTemplate() {
|
|
6967
6974
|
return html`<slot></slot><span part="asterisk" class="asterisk" ?hidden="${x => !x.required}">*</span>`;
|
|
6968
6975
|
}
|
|
6969
|
-
const template$
|
|
6976
|
+
const template$l = labelTemplate();
|
|
6970
6977
|
|
|
6971
|
-
const definition$
|
|
6978
|
+
const definition$l = Label.compose({
|
|
6972
6979
|
name: `${FluentDesignSystem.prefix}-label`,
|
|
6973
|
-
template: template$
|
|
6974
|
-
styles: styles$
|
|
6980
|
+
template: template$l,
|
|
6981
|
+
styles: styles$k
|
|
6975
6982
|
});
|
|
6976
6983
|
|
|
6977
|
-
definition$
|
|
6984
|
+
definition$l.define(FluentDesignSystem.registry);
|
|
6978
6985
|
|
|
6979
|
-
var __defProp$
|
|
6980
|
-
var __getOwnPropDesc$
|
|
6981
|
-
var __decorateClass$
|
|
6982
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6986
|
+
var __defProp$g = Object.defineProperty;
|
|
6987
|
+
var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
|
|
6988
|
+
var __decorateClass$g = (decorators, target, key, kind) => {
|
|
6989
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$g(target, key) : target;
|
|
6983
6990
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6984
|
-
if (kind && result) __defProp$
|
|
6991
|
+
if (kind && result) __defProp$g(target, key, result);
|
|
6985
6992
|
return result;
|
|
6986
6993
|
};
|
|
6987
6994
|
class Link extends BaseAnchor {
|
|
@@ -7011,12 +7018,12 @@ class Link extends BaseAnchor {
|
|
|
7011
7018
|
toggleState(this.elementInternals, "inline", next);
|
|
7012
7019
|
}
|
|
7013
7020
|
}
|
|
7014
|
-
__decorateClass$
|
|
7015
|
-
__decorateClass$
|
|
7021
|
+
__decorateClass$g([attr], Link.prototype, "appearance", 2);
|
|
7022
|
+
__decorateClass$g([attr({
|
|
7016
7023
|
mode: "boolean"
|
|
7017
7024
|
})], Link.prototype, "inline", 2);
|
|
7018
7025
|
|
|
7019
|
-
const styles$
|
|
7026
|
+
const styles$j = css`
|
|
7020
7027
|
${display("inline")}
|
|
7021
7028
|
|
|
7022
7029
|
: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`
|
|
@@ -7025,19 +7032,19 @@ const styles$i = css`
|
|
|
7025
7032
|
function anchorTemplate() {
|
|
7026
7033
|
return html`<template tabindex="0" @click="${(x, c) => x.clickHandler(c.event)}" @keydown="${(x, c) => x.keydownHandler(c.event)}"><slot></slot></template>`;
|
|
7027
7034
|
}
|
|
7028
|
-
const template$
|
|
7035
|
+
const template$k = anchorTemplate();
|
|
7029
7036
|
|
|
7030
|
-
const definition$
|
|
7037
|
+
const definition$k = Link.compose({
|
|
7031
7038
|
name: `${FluentDesignSystem.prefix}-link`,
|
|
7032
|
-
template: template$
|
|
7033
|
-
styles: styles$
|
|
7039
|
+
template: template$k,
|
|
7040
|
+
styles: styles$j
|
|
7034
7041
|
});
|
|
7035
7042
|
|
|
7036
|
-
definition$
|
|
7043
|
+
definition$k.define(FluentDesignSystem.registry);
|
|
7037
7044
|
|
|
7038
7045
|
class MenuButton extends Button {}
|
|
7039
7046
|
|
|
7040
|
-
const template$
|
|
7047
|
+
const template$j = buttonTemplate$1({
|
|
7041
7048
|
end: html.partial( /* html */
|
|
7042
7049
|
`
|
|
7043
7050
|
<svg slot="end" fill="currentColor" aria-hidden="true" width="1em" height="1em" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -7046,13 +7053,13 @@ const template$i = buttonTemplate$1({
|
|
|
7046
7053
|
`)
|
|
7047
7054
|
});
|
|
7048
7055
|
|
|
7049
|
-
const definition$
|
|
7056
|
+
const definition$j = MenuButton.compose({
|
|
7050
7057
|
name: `${FluentDesignSystem.prefix}-menu-button`,
|
|
7051
|
-
template: template$
|
|
7052
|
-
styles: styles$
|
|
7058
|
+
template: template$j,
|
|
7059
|
+
styles: styles$y
|
|
7053
7060
|
});
|
|
7054
7061
|
|
|
7055
|
-
definition$
|
|
7062
|
+
definition$j.define(FluentDesignSystem.registry);
|
|
7056
7063
|
|
|
7057
7064
|
const MenuItemRole = {
|
|
7058
7065
|
/**
|
|
@@ -7074,12 +7081,12 @@ const MenuItemRole = {
|
|
|
7074
7081
|
[MenuItemRole.menuitemradio]: "menuitemradio"
|
|
7075
7082
|
});
|
|
7076
7083
|
|
|
7077
|
-
var __defProp$
|
|
7078
|
-
var __getOwnPropDesc$
|
|
7079
|
-
var __decorateClass$
|
|
7080
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
7084
|
+
var __defProp$f = Object.defineProperty;
|
|
7085
|
+
var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
|
|
7086
|
+
var __decorateClass$f = (decorators, target, key, kind) => {
|
|
7087
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$f(target, key) : target;
|
|
7081
7088
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7082
|
-
if (kind && result) __defProp$
|
|
7089
|
+
if (kind && result) __defProp$f(target, key, result);
|
|
7083
7090
|
return result;
|
|
7084
7091
|
};
|
|
7085
7092
|
const menuFilter = () => value => value.nodeType === 1 && value.elementInternals.role === "menu";
|
|
@@ -7267,22 +7274,22 @@ class MenuItem extends FASTElement {
|
|
|
7267
7274
|
this.elementInternals.ariaChecked = this.role !== MenuItemRole.menuitem ? `${!!this.checked}` : null;
|
|
7268
7275
|
}
|
|
7269
7276
|
}
|
|
7270
|
-
__decorateClass$
|
|
7277
|
+
__decorateClass$f([attr({
|
|
7271
7278
|
mode: "boolean"
|
|
7272
7279
|
})], MenuItem.prototype, "disabled", 2);
|
|
7273
|
-
__decorateClass$
|
|
7274
|
-
__decorateClass$
|
|
7280
|
+
__decorateClass$f([attr], MenuItem.prototype, "role", 2);
|
|
7281
|
+
__decorateClass$f([attr({
|
|
7275
7282
|
mode: "boolean"
|
|
7276
7283
|
})], MenuItem.prototype, "checked", 2);
|
|
7277
|
-
__decorateClass$
|
|
7284
|
+
__decorateClass$f([attr({
|
|
7278
7285
|
mode: "boolean"
|
|
7279
7286
|
})], MenuItem.prototype, "hidden", 2);
|
|
7280
|
-
__decorateClass$
|
|
7281
|
-
__decorateClass$
|
|
7287
|
+
__decorateClass$f([observable], MenuItem.prototype, "slottedSubmenu", 2);
|
|
7288
|
+
__decorateClass$f([observable], MenuItem.prototype, "submenu", 2);
|
|
7282
7289
|
applyMixins(MenuItem, StartEnd);
|
|
7283
7290
|
|
|
7284
7291
|
const submenuState = css.partial`:is([state--submenu], :state(submenu))`;
|
|
7285
|
-
const styles$
|
|
7292
|
+
const styles$i = css`
|
|
7286
7293
|
${display("grid")}
|
|
7287
7294
|
|
|
7288
7295
|
:host{--indent:0;align-items:center;background:${colorNeutralBackground1};border-radius:${borderRadiusMedium};color:${colorNeutralForeground2};contain:layout;cursor:pointer;flex-shrink:0;font:${fontWeightRegular} ${fontSizeBase300} / ${lineHeightBase300} ${fontFamilyBase};grid-gap:4px;grid-template-columns:20px 20px auto 20px;height:32px;overflow:visible;padding:0 10px}:host(:hover){background:${colorNeutralBackground1Hover};color:${colorNeutralForeground2Hover}}:host(:active){background-color:${colorNeutralBackground1Selected};color:${colorNeutralForeground2Pressed}}:host(:active) ::slotted([slot='start']){color:${colorCompoundBrandForeground1Pressed}}:host(${disabledState}){background-color:${colorNeutralBackgroundDisabled};color:${colorNeutralForegroundDisabled}}:host(${disabledState}) ::slotted([slot='start']),:host(${disabledState}) ::slotted([slot='end']){color:${colorNeutralForegroundDisabled}}:host(:focus-visible){border-radius:${borderRadiusMedium};outline:2px solid ${colorStrokeFocus2}}.content{white-space:nowrap;flex-grow:1;grid-column:auto / span 2;padding:0 2px}:host(:not(${checkedState})) .indicator,:host(:not(${checkedState})) ::slotted([slot='indicator']),:host(:not(${submenuState})) .submenu-glyph,:host(:not(${submenuState})) ::slotted([slot='submenu-glyph']){display:none}::slotted([slot='end']){color:${colorNeutralForeground3};font:${fontWeightRegular} ${fontSizeBase200} / ${lineHeightBase200} ${fontFamilyBase};white-space:nowrap}:host([data-indent='1']){--indent:1}:host([data-indent='2']){--indent:2;grid-template-columns:20px 20px auto auto}:host(${submenuState}){grid-template-columns:20px auto auto 20px}:host([data-indent='2']${submenuState}){grid-template-columns:20px 20px auto auto 20px}.indicator,::slotted([slot='indicator']){grid-column:1 / span 1;width:20px}::slotted([slot='start']){display:inline-flex;grid-column:calc(var(--indent)) / span 1}.content{grid-column:calc(var(--indent) + 1) / span 1}::slotted([slot='end']){grid-column:calc(var(--indent) + 2) / span 1;justify-self:end}.submenu-glyph,::slotted([slot='submenu-glyph']){grid-column:-2 / span 1;justify-self:end}@layer popover{:host{anchor-name:--menu-trigger;position:relative}::slotted([popover]){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}@supports not (anchor-name:--menu-trigger){::slotted([popover]){align-self:start}}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
@@ -7291,30 +7298,32 @@ const styles$h = css`
|
|
|
7291
7298
|
const Checkmark16Filled = html.partial(`<svg class="indicator" fill="currentColor" aria-hidden="true" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.05 3.49c.28.3.27.77-.04 1.06l-7.93 7.47A.85.85 0 014.9 12L2.22 9.28a.75.75 0 111.06-1.06l2.24 2.27 7.47-7.04a.75.75 0 011.06.04z" fill="currentColor"></path></svg>`);
|
|
7292
7299
|
const chevronRight16Filled = html.partial(`<svg class="submenu-glyph" fill="currentColor" aria-hidden="true" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M5.74 3.2a.75.75 0 00-.04 1.06L9.23 8 5.7 11.74a.75.75 0 101.1 1.02l4-4.25a.75.75 0 000-1.02l-4-4.25a.75.75 0 00-1.06-.04z" fill="currentColor"></path></svg>`);
|
|
7293
7300
|
function menuItemTemplate(options = {}) {
|
|
7294
|
-
return html`<template @keydown="${(x, c) => x.handleMenuItemKeyDown(c.event)}" @click="${(x, c) => x.handleMenuItemClick(c.event)}" @mouseover="${(x, c) => x.handleMouseOver(c.event)}" @mouseout="${(x, c) => x.handleMouseOut(c.event)}" @toggle="${(x, c) =>
|
|
7301
|
+
return html`<template @keydown="${(x, c) => x.handleMenuItemKeyDown(c.event)}" @click="${(x, c) => x.handleMenuItemClick(c.event)}" @mouseover="${(x, c) => x.handleMouseOver(c.event)}" @mouseout="${(x, c) => x.handleMouseOut(c.event)}" @toggle="${(x, c) =>
|
|
7302
|
+
// @ts-expect-error - Baseline 2024
|
|
7303
|
+
x.toggleHandler(c.event)}"><slot name="indicator">${staticallyCompose(options.indicator)}</slot>${startSlotTemplate(options)}<div part="content" class="content"><slot></slot></div>${endSlotTemplate(options)}<slot name="submenu-glyph">${staticallyCompose(options.submenuGlyph)}</slot><slot name="submenu" ${slotted({
|
|
7295
7304
|
property: "slottedSubmenu",
|
|
7296
7305
|
filter: menuFilter()
|
|
7297
7306
|
})}></slot></template>`;
|
|
7298
7307
|
}
|
|
7299
|
-
const template$
|
|
7308
|
+
const template$i = menuItemTemplate({
|
|
7300
7309
|
indicator: Checkmark16Filled,
|
|
7301
7310
|
submenuGlyph: chevronRight16Filled
|
|
7302
7311
|
});
|
|
7303
7312
|
|
|
7304
|
-
const definition$
|
|
7313
|
+
const definition$i = MenuItem.compose({
|
|
7305
7314
|
name: `${FluentDesignSystem.prefix}-menu-item`,
|
|
7306
|
-
template: template$
|
|
7307
|
-
styles: styles$
|
|
7315
|
+
template: template$i,
|
|
7316
|
+
styles: styles$i
|
|
7308
7317
|
});
|
|
7309
7318
|
|
|
7310
|
-
definition$
|
|
7319
|
+
definition$i.define(FluentDesignSystem.registry);
|
|
7311
7320
|
|
|
7312
|
-
var __defProp$
|
|
7313
|
-
var __getOwnPropDesc$
|
|
7314
|
-
var __decorateClass$
|
|
7315
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
7321
|
+
var __defProp$e = Object.defineProperty;
|
|
7322
|
+
var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
|
|
7323
|
+
var __decorateClass$e = (decorators, target, key, kind) => {
|
|
7324
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$e(target, key) : target;
|
|
7316
7325
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7317
|
-
if (kind && result) __defProp$
|
|
7326
|
+
if (kind && result) __defProp$e(target, key, result);
|
|
7318
7327
|
return result;
|
|
7319
7328
|
};
|
|
7320
7329
|
const _MenuList = class _MenuList extends FASTElement {
|
|
@@ -7530,10 +7539,10 @@ const _MenuList = class _MenuList extends FASTElement {
|
|
|
7530
7539
|
}
|
|
7531
7540
|
};
|
|
7532
7541
|
_MenuList.focusableElementRoles = MenuItemRole;
|
|
7533
|
-
__decorateClass$
|
|
7542
|
+
__decorateClass$e([observable], _MenuList.prototype, "items", 2);
|
|
7534
7543
|
let MenuList = _MenuList;
|
|
7535
7544
|
|
|
7536
|
-
const styles$
|
|
7545
|
+
const styles$h = css`
|
|
7537
7546
|
${display("flex")}
|
|
7538
7547
|
|
|
7539
7548
|
: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}`;
|
|
@@ -7541,22 +7550,22 @@ const styles$g = css`
|
|
|
7541
7550
|
function menuTemplate$1() {
|
|
7542
7551
|
return html`<template slot="${x => x.slot ? x.slot : x.isNestedMenu() ? "submenu" : void 0}" @keydown="${(x, c) => x.handleMenuKeyDown(c.event)}" @focusout="${(x, c) => x.handleFocusOut(c.event)}"><slot ${slotted("items")}></slot></template>`;
|
|
7543
7552
|
}
|
|
7544
|
-
const template$
|
|
7553
|
+
const template$h = menuTemplate$1();
|
|
7545
7554
|
|
|
7546
|
-
const definition$
|
|
7555
|
+
const definition$h = MenuList.compose({
|
|
7547
7556
|
name: `${FluentDesignSystem.prefix}-menu-list`,
|
|
7548
|
-
template: template$
|
|
7549
|
-
styles: styles$
|
|
7557
|
+
template: template$h,
|
|
7558
|
+
styles: styles$h
|
|
7550
7559
|
});
|
|
7551
7560
|
|
|
7552
|
-
definition$
|
|
7561
|
+
definition$h.define(FluentDesignSystem.registry);
|
|
7553
7562
|
|
|
7554
|
-
var __defProp$
|
|
7555
|
-
var __getOwnPropDesc$
|
|
7556
|
-
var __decorateClass$
|
|
7557
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
7563
|
+
var __defProp$d = Object.defineProperty;
|
|
7564
|
+
var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
|
|
7565
|
+
var __decorateClass$d = (decorators, target, key, kind) => {
|
|
7566
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$d(target, key) : target;
|
|
7558
7567
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7559
|
-
if (kind && result) __defProp$
|
|
7568
|
+
if (kind && result) __defProp$d(target, key, result);
|
|
7560
7569
|
return result;
|
|
7561
7570
|
};
|
|
7562
7571
|
class Menu extends FASTElement {
|
|
@@ -7613,7 +7622,7 @@ class Menu extends FASTElement {
|
|
|
7613
7622
|
* @returns void
|
|
7614
7623
|
*/
|
|
7615
7624
|
this.toggleHandler = e => {
|
|
7616
|
-
if (e
|
|
7625
|
+
if (e.type === "toggle" && e.newState) {
|
|
7617
7626
|
const newState = e.newState === "open" ? true : false;
|
|
7618
7627
|
this._trigger?.setAttribute("aria-expanded", `${newState}`);
|
|
7619
7628
|
this._open = newState;
|
|
@@ -7840,26 +7849,26 @@ class Menu extends FASTElement {
|
|
|
7840
7849
|
}
|
|
7841
7850
|
}
|
|
7842
7851
|
}
|
|
7843
|
-
__decorateClass$
|
|
7852
|
+
__decorateClass$d([attr({
|
|
7844
7853
|
attribute: "open-on-hover",
|
|
7845
7854
|
mode: "boolean"
|
|
7846
7855
|
})], Menu.prototype, "openOnHover", 2);
|
|
7847
|
-
__decorateClass$
|
|
7856
|
+
__decorateClass$d([attr({
|
|
7848
7857
|
attribute: "open-on-context",
|
|
7849
7858
|
mode: "boolean"
|
|
7850
7859
|
})], Menu.prototype, "openOnContext", 2);
|
|
7851
|
-
__decorateClass$
|
|
7860
|
+
__decorateClass$d([attr({
|
|
7852
7861
|
attribute: "close-on-scroll",
|
|
7853
7862
|
mode: "boolean"
|
|
7854
7863
|
})], Menu.prototype, "closeOnScroll", 2);
|
|
7855
|
-
__decorateClass$
|
|
7864
|
+
__decorateClass$d([attr({
|
|
7856
7865
|
attribute: "persist-on-item-click",
|
|
7857
7866
|
mode: "boolean"
|
|
7858
7867
|
})], Menu.prototype, "persistOnItemClick", 2);
|
|
7859
|
-
__decorateClass$
|
|
7860
|
-
__decorateClass$
|
|
7868
|
+
__decorateClass$d([observable], Menu.prototype, "slottedMenuList", 2);
|
|
7869
|
+
__decorateClass$d([observable], Menu.prototype, "slottedTriggers", 2);
|
|
7861
7870
|
|
|
7862
|
-
const styles$
|
|
7871
|
+
const styles$g = css`
|
|
7863
7872
|
${display("inline-block")}
|
|
7864
7873
|
|
|
7865
7874
|
::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}`;
|
|
@@ -7873,22 +7882,22 @@ function menuTemplate() {
|
|
|
7873
7882
|
filter: elements()
|
|
7874
7883
|
})}></slot></template>`;
|
|
7875
7884
|
}
|
|
7876
|
-
const template$
|
|
7885
|
+
const template$g = menuTemplate();
|
|
7877
7886
|
|
|
7878
|
-
const definition$
|
|
7887
|
+
const definition$g = Menu.compose({
|
|
7879
7888
|
name: `${FluentDesignSystem.prefix}-menu`,
|
|
7880
|
-
template: template$
|
|
7881
|
-
styles: styles$
|
|
7889
|
+
template: template$g,
|
|
7890
|
+
styles: styles$g
|
|
7882
7891
|
});
|
|
7883
7892
|
|
|
7884
|
-
definition$
|
|
7893
|
+
definition$g.define(FluentDesignSystem.registry);
|
|
7885
7894
|
|
|
7886
|
-
var __defProp$
|
|
7887
|
-
var __getOwnPropDesc$
|
|
7888
|
-
var __decorateClass$
|
|
7889
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
7895
|
+
var __defProp$c = Object.defineProperty;
|
|
7896
|
+
var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
|
|
7897
|
+
var __decorateClass$c = (decorators, target, key, kind) => {
|
|
7898
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$c(target, key) : target;
|
|
7890
7899
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7891
|
-
if (kind && result) __defProp$
|
|
7900
|
+
if (kind && result) __defProp$c(target, key, result);
|
|
7892
7901
|
return result;
|
|
7893
7902
|
};
|
|
7894
7903
|
class MessageBar extends FASTElement {
|
|
@@ -7949,36 +7958,36 @@ class MessageBar extends FASTElement {
|
|
|
7949
7958
|
}
|
|
7950
7959
|
}
|
|
7951
7960
|
}
|
|
7952
|
-
__decorateClass$
|
|
7953
|
-
__decorateClass$
|
|
7954
|
-
__decorateClass$
|
|
7961
|
+
__decorateClass$c([attr], MessageBar.prototype, "shape", 2);
|
|
7962
|
+
__decorateClass$c([attr], MessageBar.prototype, "layout", 2);
|
|
7963
|
+
__decorateClass$c([attr], MessageBar.prototype, "intent", 2);
|
|
7955
7964
|
|
|
7956
|
-
const styles$
|
|
7965
|
+
const styles$f = css`
|
|
7957
7966
|
: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'
|
|
7958
7967
|
'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}`;
|
|
7959
7968
|
|
|
7960
7969
|
function messageBarTemplate() {
|
|
7961
7970
|
return html`<slot name="icon"></slot><div class="content"><slot></slot></div><div class="actions"><slot name="actions"></slot></div><slot name="dismiss"></slot>`;
|
|
7962
7971
|
}
|
|
7963
|
-
const template$
|
|
7972
|
+
const template$f = messageBarTemplate();
|
|
7964
7973
|
|
|
7965
|
-
const definition$
|
|
7974
|
+
const definition$f = MessageBar.compose({
|
|
7966
7975
|
name: `${FluentDesignSystem.prefix}-message-bar`,
|
|
7967
|
-
template: template$
|
|
7968
|
-
styles: styles$
|
|
7976
|
+
template: template$f,
|
|
7977
|
+
styles: styles$f,
|
|
7969
7978
|
shadowOptions: {
|
|
7970
7979
|
mode: FluentDesignSystem.shadowRootMode
|
|
7971
7980
|
}
|
|
7972
7981
|
});
|
|
7973
7982
|
|
|
7974
|
-
definition$
|
|
7983
|
+
definition$f.define(FluentDesignSystem.registry);
|
|
7975
7984
|
|
|
7976
|
-
var __defProp$
|
|
7977
|
-
var __getOwnPropDesc$
|
|
7978
|
-
var __decorateClass$
|
|
7979
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
7985
|
+
var __defProp$b = Object.defineProperty;
|
|
7986
|
+
var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
|
|
7987
|
+
var __decorateClass$b = (decorators, target, key, kind) => {
|
|
7988
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$b(target, key) : target;
|
|
7980
7989
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7981
|
-
if (kind && result) __defProp$
|
|
7990
|
+
if (kind && result) __defProp$b(target, key, result);
|
|
7982
7991
|
return result;
|
|
7983
7992
|
};
|
|
7984
7993
|
class BaseProgressBar extends FASTElement {
|
|
@@ -8041,19 +8050,19 @@ class BaseProgressBar extends FASTElement {
|
|
|
8041
8050
|
return range === 0 ? 0 : Math.fround((value - min) / range * 100);
|
|
8042
8051
|
}
|
|
8043
8052
|
}
|
|
8044
|
-
__decorateClass$
|
|
8053
|
+
__decorateClass$b([attr({
|
|
8045
8054
|
attribute: "validation-state"
|
|
8046
8055
|
})], BaseProgressBar.prototype, "validationState", 2);
|
|
8047
|
-
__decorateClass$
|
|
8056
|
+
__decorateClass$b([attr({
|
|
8048
8057
|
converter: nullableNumberConverter
|
|
8049
8058
|
})], BaseProgressBar.prototype, "value", 2);
|
|
8050
|
-
__decorateClass$
|
|
8059
|
+
__decorateClass$b([attr({
|
|
8051
8060
|
converter: nullableNumberConverter
|
|
8052
8061
|
})], BaseProgressBar.prototype, "min", 2);
|
|
8053
|
-
__decorateClass$
|
|
8062
|
+
__decorateClass$b([attr({
|
|
8054
8063
|
converter: nullableNumberConverter
|
|
8055
8064
|
})], BaseProgressBar.prototype, "max", 2);
|
|
8056
|
-
__decorateClass$
|
|
8065
|
+
__decorateClass$b([volatile], BaseProgressBar.prototype, "percentComplete", 1);
|
|
8057
8066
|
class ProgressBar extends BaseProgressBar {
|
|
8058
8067
|
/**
|
|
8059
8068
|
* Handles changes to thickness attribute custom states
|
|
@@ -8082,10 +8091,10 @@ class ProgressBar extends BaseProgressBar {
|
|
|
8082
8091
|
}
|
|
8083
8092
|
}
|
|
8084
8093
|
}
|
|
8085
|
-
__decorateClass$
|
|
8086
|
-
__decorateClass$
|
|
8094
|
+
__decorateClass$b([attr], ProgressBar.prototype, "thickness", 2);
|
|
8095
|
+
__decorateClass$b([attr], ProgressBar.prototype, "shape", 2);
|
|
8087
8096
|
|
|
8088
|
-
const styles$
|
|
8097
|
+
const styles$e = css`
|
|
8089
8098
|
${display("block")}
|
|
8090
8099
|
|
|
8091
8100
|
: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(
|
|
@@ -8096,15 +8105,15 @@ const styles$d = css`
|
|
|
8096
8105
|
function progressTemplate() {
|
|
8097
8106
|
return html`<div class="indicator" part="indicator" style="${x => typeof x.value === "number" ? `width: ${x.percentComplete}%` : void 0}"></div>`;
|
|
8098
8107
|
}
|
|
8099
|
-
const template$
|
|
8108
|
+
const template$e = progressTemplate();
|
|
8100
8109
|
|
|
8101
|
-
const definition$
|
|
8110
|
+
const definition$e = ProgressBar.compose({
|
|
8102
8111
|
name: `${FluentDesignSystem.prefix}-progress-bar`,
|
|
8103
|
-
template: template$
|
|
8104
|
-
styles: styles$
|
|
8112
|
+
template: template$e,
|
|
8113
|
+
styles: styles$e
|
|
8105
8114
|
});
|
|
8106
8115
|
|
|
8107
|
-
definition$
|
|
8116
|
+
definition$e.define(FluentDesignSystem.registry);
|
|
8108
8117
|
|
|
8109
8118
|
class Radio extends BaseCheckbox {
|
|
8110
8119
|
connectedCallback() {
|
|
@@ -8190,12 +8199,12 @@ function getRootActiveElement(element) {
|
|
|
8190
8199
|
|
|
8191
8200
|
const RadioGroupOrientation = Orientation;
|
|
8192
8201
|
|
|
8193
|
-
var __defProp$
|
|
8194
|
-
var __getOwnPropDesc$
|
|
8195
|
-
var __decorateClass$
|
|
8196
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
8202
|
+
var __defProp$a = Object.defineProperty;
|
|
8203
|
+
var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
|
|
8204
|
+
var __decorateClass$a = (decorators, target, key, kind) => {
|
|
8205
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$a(target, key) : target;
|
|
8197
8206
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8198
|
-
if (kind && result) __defProp$
|
|
8207
|
+
if (kind && result) __defProp$a(target, key, result);
|
|
8199
8208
|
return result;
|
|
8200
8209
|
};
|
|
8201
8210
|
class RadioGroup extends FASTElement {
|
|
@@ -8618,23 +8627,23 @@ class RadioGroup extends FASTElement {
|
|
|
8618
8627
|
* @public
|
|
8619
8628
|
*/
|
|
8620
8629
|
RadioGroup.formAssociated = true;
|
|
8621
|
-
__decorateClass$
|
|
8622
|
-
__decorateClass$
|
|
8630
|
+
__decorateClass$a([observable], RadioGroup.prototype, "checkedIndex", 2);
|
|
8631
|
+
__decorateClass$a([attr({
|
|
8623
8632
|
attribute: "disabled",
|
|
8624
8633
|
mode: "boolean"
|
|
8625
8634
|
})], RadioGroup.prototype, "disabled", 2);
|
|
8626
|
-
__decorateClass$
|
|
8635
|
+
__decorateClass$a([attr({
|
|
8627
8636
|
attribute: "value",
|
|
8628
8637
|
mode: "fromView"
|
|
8629
8638
|
})], RadioGroup.prototype, "initialValue", 2);
|
|
8630
|
-
__decorateClass$
|
|
8631
|
-
__decorateClass$
|
|
8632
|
-
__decorateClass$
|
|
8633
|
-
__decorateClass$
|
|
8639
|
+
__decorateClass$a([attr], RadioGroup.prototype, "name", 2);
|
|
8640
|
+
__decorateClass$a([attr], RadioGroup.prototype, "orientation", 2);
|
|
8641
|
+
__decorateClass$a([observable], RadioGroup.prototype, "radios", 2);
|
|
8642
|
+
__decorateClass$a([attr({
|
|
8634
8643
|
mode: "boolean"
|
|
8635
8644
|
})], RadioGroup.prototype, "required", 2);
|
|
8636
8645
|
|
|
8637
|
-
const styles$
|
|
8646
|
+
const styles$d = css`
|
|
8638
8647
|
${display("flex")}
|
|
8639
8648
|
|
|
8640
8649
|
:host{-webkit-tap-highlight-color:transparent;cursor:pointer;gap:${spacingVerticalL}}:host(${disabledState}),:host([orientation='vertical']){flex-direction:column;justify-content:flex-start}:host([orientation='horizontal']){flex-direction:row}::slotted(*){color:${colorNeutralForeground3}}::slotted(:hover){color:${colorNeutralForeground2}}::slotted(:active){color:${colorNeutralForeground1}}::slotted(${disabledState}){color:${colorNeutralForegroundDisabled}}::slotted(${checkedState}){color:${colorNeutralForeground1}}`;
|
|
@@ -8642,17 +8651,17 @@ const styles$c = css`
|
|
|
8642
8651
|
function radioGroupTemplate() {
|
|
8643
8652
|
return html`<template @disabled="${(x, c) => x.disabledRadioHandler(c.event)}" @change="${(x, c) => x.changeHandler(c.event)}" @click="${(x, c) => x.clickHandler(c.event)}" @focusin="${(x, c) => x.focusinHandler(c.event)}" @focusout="${(x, c) => x.focusoutHandler(c.event)}" @keydown="${(x, c) => x.keydownHandler(c.event)}"><slot @slotchange="${(x, c) => x.slotchangeHandler(c.event)}"></slot></template>`;
|
|
8644
8653
|
}
|
|
8645
|
-
const template$
|
|
8654
|
+
const template$d = radioGroupTemplate();
|
|
8646
8655
|
|
|
8647
|
-
const definition$
|
|
8656
|
+
const definition$d = RadioGroup.compose({
|
|
8648
8657
|
name: `${FluentDesignSystem.prefix}-radio-group`,
|
|
8649
|
-
template: template$
|
|
8650
|
-
styles: styles$
|
|
8658
|
+
template: template$d,
|
|
8659
|
+
styles: styles$d
|
|
8651
8660
|
});
|
|
8652
8661
|
|
|
8653
|
-
definition$
|
|
8662
|
+
definition$d.define(FluentDesignSystem.registry);
|
|
8654
8663
|
|
|
8655
|
-
const styles$
|
|
8664
|
+
const styles$c = css`
|
|
8656
8665
|
${display("inline-flex")}
|
|
8657
8666
|
|
|
8658
8667
|
:host{--size:16px;aspect-ratio:1;background-color:${colorNeutralBackground1};border:${strokeWidthThin} solid ${colorNeutralStrokeAccessible};border-radius:${borderRadiusCircular};box-sizing:border-box;position:relative;width:var(--size)}:host([size='large']){--size:20px}.checked-indicator{aspect-ratio:1;border-radius:${borderRadiusCircular};color:${colorNeutralForegroundInverted};inset:0;margin:auto;position:absolute;width:calc(var(--size) * 0.625)}:host(:not([slot='input']))::after{content:'' / '';position:absolute;display:block;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}}:host(:hover){border-color:${colorNeutralStrokeAccessibleHover}}:host(${checkedState}){border-color:${colorCompoundBrandStroke}}:host(${checkedState}) .checked-indicator{background-color:${colorCompoundBrandBackground}}:host(${checkedState}:hover) .checked-indicator{background-color:${colorCompoundBrandBackgroundHover}}:host(:active){border-color:${colorNeutralStrokeAccessiblePressed}}:host(${checkedState}:active) .checked-indicator{background-color:${colorCompoundBrandBackgroundPressed}}:host(:focus-visible){outline:none}:host(${disabledState}){background-color:${colorNeutralBackgroundDisabled};border-color:${colorNeutralStrokeDisabled}}:host(${checkedState}${disabledState}) .checked-indicator{background-color:${colorNeutralStrokeDisabled}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
@@ -8665,24 +8674,24 @@ const checkedIndicator = html.partial( /* html */
|
|
|
8665
8674
|
function radioTemplate(options = {}) {
|
|
8666
8675
|
return html`<template @click="${(x, c) => x.clickHandler(c.event)}" @keydown="${(x, c) => x.keydownHandler(c.event)}" @keyup="${(x, c) => x.keyupHandler(c.event)}"><slot name="checked-indicator">${staticallyCompose(options.checkedIndicator)}</slot></template>`;
|
|
8667
8676
|
}
|
|
8668
|
-
const template$
|
|
8677
|
+
const template$c = radioTemplate({
|
|
8669
8678
|
checkedIndicator
|
|
8670
8679
|
});
|
|
8671
8680
|
|
|
8672
|
-
const definition$
|
|
8681
|
+
const definition$c = Radio.compose({
|
|
8673
8682
|
name: `${FluentDesignSystem.prefix}-radio`,
|
|
8674
|
-
template: template$
|
|
8675
|
-
styles: styles$
|
|
8683
|
+
template: template$c,
|
|
8684
|
+
styles: styles$c
|
|
8676
8685
|
});
|
|
8677
8686
|
|
|
8678
|
-
definition$
|
|
8687
|
+
definition$c.define(FluentDesignSystem.registry);
|
|
8679
8688
|
|
|
8680
|
-
var __defProp$
|
|
8681
|
-
var __getOwnPropDesc$
|
|
8682
|
-
var __decorateClass$
|
|
8683
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
8689
|
+
var __defProp$9 = Object.defineProperty;
|
|
8690
|
+
var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
|
|
8691
|
+
var __decorateClass$9 = (decorators, target, key, kind) => {
|
|
8692
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$9(target, key) : target;
|
|
8684
8693
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8685
|
-
if (kind && result) __defProp$
|
|
8694
|
+
if (kind && result) __defProp$9(target, key, result);
|
|
8686
8695
|
return result;
|
|
8687
8696
|
};
|
|
8688
8697
|
class BaseRatingDisplay extends FASTElement {
|
|
@@ -8736,13 +8745,13 @@ class BaseRatingDisplay extends FASTElement {
|
|
|
8736
8745
|
return htmlString;
|
|
8737
8746
|
}
|
|
8738
8747
|
}
|
|
8739
|
-
__decorateClass$
|
|
8748
|
+
__decorateClass$9([attr({
|
|
8740
8749
|
converter: nullableNumberConverter
|
|
8741
8750
|
})], BaseRatingDisplay.prototype, "count", 2);
|
|
8742
|
-
__decorateClass$
|
|
8751
|
+
__decorateClass$9([attr({
|
|
8743
8752
|
converter: nullableNumberConverter
|
|
8744
8753
|
})], BaseRatingDisplay.prototype, "max", 2);
|
|
8745
|
-
__decorateClass$
|
|
8754
|
+
__decorateClass$9([attr({
|
|
8746
8755
|
converter: nullableNumberConverter
|
|
8747
8756
|
})], BaseRatingDisplay.prototype, "value", 2);
|
|
8748
8757
|
class RatingDisplay extends BaseRatingDisplay {
|
|
@@ -8787,13 +8796,13 @@ class RatingDisplay extends BaseRatingDisplay {
|
|
|
8787
8796
|
return (this.compact ? 1 : this.max ?? 5) * 2;
|
|
8788
8797
|
}
|
|
8789
8798
|
}
|
|
8790
|
-
__decorateClass$
|
|
8791
|
-
__decorateClass$
|
|
8792
|
-
__decorateClass$
|
|
8799
|
+
__decorateClass$9([attr], RatingDisplay.prototype, "color", 2);
|
|
8800
|
+
__decorateClass$9([attr], RatingDisplay.prototype, "size", 2);
|
|
8801
|
+
__decorateClass$9([attr({
|
|
8793
8802
|
mode: "boolean"
|
|
8794
8803
|
})], RatingDisplay.prototype, "compact", 2);
|
|
8795
8804
|
|
|
8796
|
-
const styles$
|
|
8805
|
+
const styles$b = css`
|
|
8797
8806
|
${display("inline-flex")}
|
|
8798
8807
|
|
|
8799
8808
|
: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`
|
|
@@ -8803,15 +8812,15 @@ const star = html`<svg xmlns="http://www.w3.org/2000/svg" style="display: none">
|
|
|
8803
8812
|
function ratingDisplayTemplate() {
|
|
8804
8813
|
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>`;
|
|
8805
8814
|
}
|
|
8806
|
-
const template$
|
|
8815
|
+
const template$b = ratingDisplayTemplate();
|
|
8807
8816
|
|
|
8808
|
-
const definition$
|
|
8817
|
+
const definition$b = RatingDisplay.compose({
|
|
8809
8818
|
name: `${FluentDesignSystem.prefix}-rating-display`,
|
|
8810
|
-
template: template$
|
|
8811
|
-
styles: styles$
|
|
8819
|
+
template: template$b,
|
|
8820
|
+
styles: styles$b
|
|
8812
8821
|
});
|
|
8813
8822
|
|
|
8814
|
-
definition$
|
|
8823
|
+
definition$b.define(FluentDesignSystem.registry);
|
|
8815
8824
|
|
|
8816
8825
|
const SliderOrientation = Orientation;
|
|
8817
8826
|
const SliderMode = {
|
|
@@ -8826,12 +8835,12 @@ function convertPixelToPercent(pixelPos, minPosition, maxPosition, direction) {
|
|
|
8826
8835
|
return pct;
|
|
8827
8836
|
}
|
|
8828
8837
|
|
|
8829
|
-
var __defProp$
|
|
8830
|
-
var __getOwnPropDesc$
|
|
8831
|
-
var __decorateClass$
|
|
8832
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
8838
|
+
var __defProp$8 = Object.defineProperty;
|
|
8839
|
+
var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
|
|
8840
|
+
var __decorateClass$8 = (decorators, target, key, kind) => {
|
|
8841
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$8(target, key) : target;
|
|
8833
8842
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8834
|
-
if (kind && result) __defProp$
|
|
8843
|
+
if (kind && result) __defProp$8(target, key, result);
|
|
8835
8844
|
return result;
|
|
8836
8845
|
};
|
|
8837
8846
|
class Slider extends FASTElement {
|
|
@@ -9370,36 +9379,36 @@ class Slider extends FASTElement {
|
|
|
9370
9379
|
* @public
|
|
9371
9380
|
*/
|
|
9372
9381
|
Slider.formAssociated = true;
|
|
9373
|
-
__decorateClass$
|
|
9374
|
-
__decorateClass$
|
|
9382
|
+
__decorateClass$8([attr], Slider.prototype, "size", 2);
|
|
9383
|
+
__decorateClass$8([attr({
|
|
9375
9384
|
attribute: "value",
|
|
9376
9385
|
mode: "fromView"
|
|
9377
9386
|
})], Slider.prototype, "initialValue", 2);
|
|
9378
|
-
__decorateClass$
|
|
9379
|
-
__decorateClass$
|
|
9380
|
-
__decorateClass$
|
|
9381
|
-
__decorateClass$
|
|
9382
|
-
__decorateClass$
|
|
9383
|
-
__decorateClass$
|
|
9384
|
-
__decorateClass$
|
|
9385
|
-
__decorateClass$
|
|
9386
|
-
__decorateClass$
|
|
9387
|
-
__decorateClass$
|
|
9387
|
+
__decorateClass$8([observable], Slider.prototype, "direction", 2);
|
|
9388
|
+
__decorateClass$8([observable], Slider.prototype, "isDragging", 2);
|
|
9389
|
+
__decorateClass$8([observable], Slider.prototype, "position", 2);
|
|
9390
|
+
__decorateClass$8([observable], Slider.prototype, "trackWidth", 2);
|
|
9391
|
+
__decorateClass$8([observable], Slider.prototype, "trackMinWidth", 2);
|
|
9392
|
+
__decorateClass$8([observable], Slider.prototype, "trackHeight", 2);
|
|
9393
|
+
__decorateClass$8([observable], Slider.prototype, "trackLeft", 2);
|
|
9394
|
+
__decorateClass$8([observable], Slider.prototype, "trackMinHeight", 2);
|
|
9395
|
+
__decorateClass$8([observable], Slider.prototype, "valueTextFormatter", 2);
|
|
9396
|
+
__decorateClass$8([attr({
|
|
9388
9397
|
mode: "boolean"
|
|
9389
9398
|
})], Slider.prototype, "disabled", 2);
|
|
9390
|
-
__decorateClass$
|
|
9399
|
+
__decorateClass$8([attr({
|
|
9391
9400
|
converter: numberLikeStringConverter
|
|
9392
9401
|
})], Slider.prototype, "min", 2);
|
|
9393
|
-
__decorateClass$
|
|
9402
|
+
__decorateClass$8([attr({
|
|
9394
9403
|
converter: numberLikeStringConverter
|
|
9395
9404
|
})], Slider.prototype, "max", 2);
|
|
9396
|
-
__decorateClass$
|
|
9405
|
+
__decorateClass$8([attr({
|
|
9397
9406
|
converter: numberLikeStringConverter
|
|
9398
9407
|
})], Slider.prototype, "step", 2);
|
|
9399
|
-
__decorateClass$
|
|
9400
|
-
__decorateClass$
|
|
9408
|
+
__decorateClass$8([attr], Slider.prototype, "orientation", 2);
|
|
9409
|
+
__decorateClass$8([attr], Slider.prototype, "mode", 2);
|
|
9401
9410
|
|
|
9402
|
-
const styles$
|
|
9411
|
+
const styles$a = css`
|
|
9403
9412
|
${display("inline-grid")}
|
|
9404
9413
|
|
|
9405
9414
|
:host{--thumb-size:20px;--track-margin-inline:calc(var(--thumb-size) / 2);--track-size:4px;--track-overhang:calc(var(--track-size) / -2);--slider-direction:90deg;--border-radius:${borderRadiusMedium};--step-marker-inset:var(--track-overhang) -1px;position:relative;align-items:center;justify-content:center;box-sizing:border-box;outline:none;user-select:none;touch-action:none;min-width:120px;min-height:32px;grid-template-rows:1fr var(--thumb-size) 1fr;grid-template-columns:var(--track-margin-inline) 1fr var(--track-margin-inline)}:host(:not(:disabled)){cursor:pointer}:host(:dir(rtl)){--slider-direction:-90deg}:host(${smallState}){--thumb-size:16px;--track-overhang:-1px;--track-size:2px;--border-radius:${borderRadiusSmall}}:host(${verticalState}){--slider-direction:0deg;--step-marker-inset:-1px var(--track-overhang);min-height:120px;grid-template-rows:var(--track-margin-inline) 1fr var(--track-margin-inline);grid-template-columns:1fr var(--thumb-size) 1fr;width:unset;min-width:32px;justify-items:center}:host(:not([slot='input']):focus-visible){box-shadow:0 0 0 2pt ${colorStrokeFocus2};outline:1px solid ${colorStrokeFocus1}}.track{position:relative;background-color:${colorNeutralStrokeAccessible};border-radius:var(--border-radius);grid-row:2 / 2;grid-column:2 / 2;width:100%;height:var(--track-size);forced-color-adjust:none}:host(${verticalState}) .track{top:var(--track-overhang);bottom:var(--track-overhang);width:var(--track-size);height:100%}.track::before{content:'';position:absolute;height:100%;border-radius:inherit;inset-inline-start:0;width:var(--slider-progress)}:host(${verticalState}) .track::before{width:100%;bottom:0;height:var(--slider-progress)}:host([step]) .track::after{content:'';position:absolute;border-radius:inherit;inset:var(--step-marker-inset);background-image:repeating-linear-gradient(
|
|
@@ -9410,24 +9419,24 @@ const styles$9 = css`
|
|
|
9410
9419
|
function sliderTemplate(options = {}) {
|
|
9411
9420
|
return html`<template tabindex="${x => x.disabled ? null : 0}" @pointerdown="${(x, c) => x.handlePointerDown(c.event)}"><div ${ref("track")} part="track-container" class="track" style="${x => x.position}"></div><div ${ref("thumb")} part="thumb-container" class="thumb-container" style="${x => x.position}" @pointerdown="${(x, c) => x.handleThumbPointerDown(c.event)}"><slot name="thumb">${staticallyCompose(options.thumb)}</slot></div></template>`;
|
|
9412
9421
|
}
|
|
9413
|
-
const template$
|
|
9422
|
+
const template$a = sliderTemplate({
|
|
9414
9423
|
thumb: `<div class="thumb"></div>`
|
|
9415
9424
|
});
|
|
9416
9425
|
|
|
9417
|
-
const definition$
|
|
9426
|
+
const definition$a = Slider.compose({
|
|
9418
9427
|
name: `${FluentDesignSystem.prefix}-slider`,
|
|
9419
|
-
template: template$
|
|
9420
|
-
styles: styles$
|
|
9428
|
+
template: template$a,
|
|
9429
|
+
styles: styles$a
|
|
9421
9430
|
});
|
|
9422
9431
|
|
|
9423
|
-
definition$
|
|
9432
|
+
definition$a.define(FluentDesignSystem.registry);
|
|
9424
9433
|
|
|
9425
|
-
var __defProp$
|
|
9426
|
-
var __getOwnPropDesc$
|
|
9427
|
-
var __decorateClass$
|
|
9428
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
9434
|
+
var __defProp$7 = Object.defineProperty;
|
|
9435
|
+
var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
|
|
9436
|
+
var __decorateClass$7 = (decorators, target, key, kind) => {
|
|
9437
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target;
|
|
9429
9438
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9430
|
-
if (kind && result) __defProp$
|
|
9439
|
+
if (kind && result) __defProp$7(target, key, result);
|
|
9431
9440
|
return result;
|
|
9432
9441
|
};
|
|
9433
9442
|
class BaseSpinner extends FASTElement {
|
|
@@ -9470,24 +9479,24 @@ class Spinner extends BaseSpinner {
|
|
|
9470
9479
|
}
|
|
9471
9480
|
}
|
|
9472
9481
|
}
|
|
9473
|
-
__decorateClass$
|
|
9474
|
-
__decorateClass$
|
|
9482
|
+
__decorateClass$7([attr], Spinner.prototype, "size", 2);
|
|
9483
|
+
__decorateClass$7([attr], Spinner.prototype, "appearance", 2);
|
|
9475
9484
|
|
|
9476
|
-
const styles$
|
|
9485
|
+
const styles$9 = css`
|
|
9477
9486
|
${display("inline-flex")}
|
|
9478
9487
|
|
|
9479
9488
|
:host{--duration:1.5s;--indicatorSize:${strokeWidthThicker};--size:32px;height:var(--size);width:var(--size);contain:strict;content-visibility:auto}:host(${tinyState}){--indicatorSize:${strokeWidthThick};--size:20px}:host(${extraSmallState}){--indicatorSize:${strokeWidthThick};--size:24px}:host(${smallState}){--indicatorSize:${strokeWidthThick};--size:28px}:host(${largeState}){--indicatorSize:${strokeWidthThicker};--size:36px}:host(${extraLargeState}){--indicatorSize:${strokeWidthThicker};--size:40px}:host(${hugeState}){--indicatorSize:${strokeWidthThickest};--size:44px}.progress,.background,.spinner,.start,.end,.indicator{position:absolute;inset:0}.progress,.spinner,.indicator{animation:none var(--duration) infinite ${curveEasyEase}}.progress{animation-timing-function:linear;animation-name:spin-linear}.background{border:var(--indicatorSize) solid ${colorBrandStroke2};border-radius:50%}:host(${invertedState}) .background{border-color:rgba(255,255,255,0.2)}.spinner{animation-name:spin-swing}.start{overflow:hidden;inset-inline-end:50%}.end{overflow:hidden;inset-inline-start:50%}.indicator{color:${colorBrandStroke1};box-sizing:border-box;border-radius:50%;border:var(--indicatorSize) solid transparent;border-block-start-color:currentcolor;border-inline-end-color:currentcolor}:host(${invertedState}) .indicator{color:${colorNeutralStrokeOnBrand2}}.start .indicator{rotate:135deg;inset:0 -100% 0 0;animation-name:spin-start}.end .indicator{rotate:135deg;inset:0 0 0 -100%;animation-name:spin-end}@keyframes spin-linear{100%{transform:rotate(360deg)}}@keyframes spin-swing{0%{transform:rotate(-135deg)}50%{transform:rotate(0deg)}100%{transform:rotate(225deg)}}@keyframes spin-start{0%,100%{transform:rotate(0deg)}50%{transform:rotate(-80deg)}}@keyframes spin-end{0%,100%{transform:rotate(0deg)}50%{transform:rotate(70deg)}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
9480
9489
|
.background{display:none}.indicator{border-color:Canvas;border-block-start-color:Highlight;border-inline-end-color:Highlight}`));
|
|
9481
9490
|
|
|
9482
|
-
const template$
|
|
9491
|
+
const template$9 = html`<slot name="indicator"><div class="background"></div><div class="progress"><div class="spinner"><div class="start"><div class="indicator"></div></div><div class="end"><div class="indicator"></div></div></div></div></slot>`;
|
|
9483
9492
|
|
|
9484
|
-
const definition$
|
|
9493
|
+
const definition$9 = Spinner.compose({
|
|
9485
9494
|
name: `${FluentDesignSystem.prefix}-spinner`,
|
|
9486
|
-
template: template$
|
|
9487
|
-
styles: styles$
|
|
9495
|
+
template: template$9,
|
|
9496
|
+
styles: styles$9
|
|
9488
9497
|
});
|
|
9489
9498
|
|
|
9490
|
-
definition$
|
|
9499
|
+
definition$9.define(FluentDesignSystem.registry);
|
|
9491
9500
|
|
|
9492
9501
|
class Switch extends BaseCheckbox {
|
|
9493
9502
|
constructor() {
|
|
@@ -9499,50 +9508,50 @@ class Switch extends BaseCheckbox {
|
|
|
9499
9508
|
function switchTemplate(options = {}) {
|
|
9500
9509
|
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="switch">${staticallyCompose(options.switch)}</slot></template>`;
|
|
9501
9510
|
}
|
|
9502
|
-
const template$
|
|
9511
|
+
const template$8 = switchTemplate({
|
|
9503
9512
|
switch: `<span class="checked-indicator" part="checked-indicator"></span>`
|
|
9504
9513
|
});
|
|
9505
9514
|
|
|
9506
|
-
const styles$
|
|
9515
|
+
const styles$8 = css`
|
|
9507
9516
|
${display("inline-flex")}
|
|
9508
9517
|
|
|
9509
9518
|
:host{box-sizing:border-box;align-items:center;flex-direction:row;outline:none;user-select:none;contain:content;padding:0 ${spacingHorizontalXXS};width:40px;height:20px;background-color:${colorTransparentBackground};border:1px solid ${colorNeutralStrokeAccessible};border-radius:${borderRadiusCircular};cursor:pointer}:host(:hover){background:none;border-color:${colorNeutralStrokeAccessibleHover}}:host(:active){border-color:${colorNeutralStrokeAccessiblePressed}}:host(:disabled),:host([readonly]){border:1px solid ${colorNeutralStrokeDisabled};background-color:none;pointer:default}:host(${checkedState}){background:${colorCompoundBrandBackground};border-color:${colorCompoundBrandBackground}}:host(${checkedState}:hover){background:${colorCompoundBrandBackgroundHover};border-color:${colorCompoundBrandBackgroundHover}}:host(${checkedState}:active){background:${colorCompoundBrandBackgroundPressed};border-color:${colorCompoundBrandBackgroundPressed}}:host(${checkedState}:disabled){background:${colorNeutralBackgroundDisabled};border-color:${colorNeutralStrokeDisabled}}.checked-indicator{height:14px;width:14px;border-radius:50%;margin-inline-start:0;background-color:${colorNeutralForeground3};transition-duration:${durationNormal};transition-timing-function:${curveEasyEase};transition-property:margin-inline-start}:host(${checkedState}) .checked-indicator{background-color:${colorNeutralForegroundInverted};margin-inline-start:calc(100% - 14px)}:host(${checkedState}:hover) .checked-indicator{background:${colorNeutralForegroundInvertedHover}}:host(${checkedState}:active) .checked-indicator{background:${colorNeutralForegroundInvertedPressed}}:host(:hover) .checked-indicator{background-color:${colorNeutralForeground3Hover}}:host(:active) .checked-indicator{background-color:${colorNeutralForeground3Pressed}}:host(:disabled) .checked-indicator,:host([readonly]) .checked-indicator{background:${colorNeutralForegroundDisabled}}:host(${checkedState}:disabled) .checked-indicator{background:${colorNeutralForegroundDisabled}}:host(:focus-visible){outline:none}:host(:not([slot='input']):focus-visible){border-color:${colorTransparentStroke};outline:${strokeWidthThick} solid ${colorTransparentStroke};box-shadow:${shadow4},0 0 0 2px ${colorStrokeFocus2}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
9510
9519
|
:host{border-color:InactiveBorder}:host(${checkedState}),:host(${checkedState}:active),:host(${checkedState}:hover){background:Highlight;border-color:Highlight}.checked-indicator,:host(:hover) .checked-indicator,:host(:active) .checked-indicator{background-color:ActiveCaption}:host(${checkedState}) .checked-indicator,:host(${checkedState}:hover) .checked-indicator,:host(${checkedState}:active) .checked-indicator{background-color:ButtonFace}`));
|
|
9511
9520
|
|
|
9512
|
-
const definition$
|
|
9521
|
+
const definition$8 = Switch.compose({
|
|
9513
9522
|
name: `${FluentDesignSystem.prefix}-switch`,
|
|
9514
|
-
template: template$
|
|
9515
|
-
styles: styles$
|
|
9523
|
+
template: template$8,
|
|
9524
|
+
styles: styles$8
|
|
9516
9525
|
});
|
|
9517
9526
|
|
|
9518
|
-
definition$
|
|
9527
|
+
definition$8.define(FluentDesignSystem.registry);
|
|
9519
9528
|
|
|
9520
9529
|
class TabPanel extends FASTElement {}
|
|
9521
9530
|
|
|
9522
9531
|
function tabPanelTemplate() {
|
|
9523
9532
|
return html`<template slot="tabpanel" role="tabpanel"><slot></slot></template>`;
|
|
9524
9533
|
}
|
|
9525
|
-
const template$
|
|
9534
|
+
const template$7 = tabPanelTemplate();
|
|
9526
9535
|
|
|
9527
|
-
const styles$
|
|
9536
|
+
const styles$7 = css`
|
|
9528
9537
|
${display("block")}
|
|
9529
9538
|
|
|
9530
9539
|
:host{box-sizing:border-box;padding:${spacingHorizontalM} ${spacingHorizontalMNudge}}`;
|
|
9531
9540
|
|
|
9532
|
-
const definition$
|
|
9541
|
+
const definition$7 = TabPanel.compose({
|
|
9533
9542
|
name: `${FluentDesignSystem.prefix}-tab-panel`,
|
|
9534
|
-
template: template$
|
|
9535
|
-
styles: styles$
|
|
9543
|
+
template: template$7,
|
|
9544
|
+
styles: styles$7
|
|
9536
9545
|
});
|
|
9537
9546
|
|
|
9538
|
-
definition$
|
|
9547
|
+
definition$7.define(FluentDesignSystem.registry);
|
|
9539
9548
|
|
|
9540
|
-
var __defProp$
|
|
9541
|
-
var __getOwnPropDesc$
|
|
9542
|
-
var __decorateClass$
|
|
9543
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
9549
|
+
var __defProp$6 = Object.defineProperty;
|
|
9550
|
+
var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
|
|
9551
|
+
var __decorateClass$6 = (decorators, target, key, kind) => {
|
|
9552
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$6(target, key) : target;
|
|
9544
9553
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9545
|
-
if (kind && result) __defProp$
|
|
9554
|
+
if (kind && result) __defProp$6(target, key, result);
|
|
9546
9555
|
return result;
|
|
9547
9556
|
};
|
|
9548
9557
|
class Tab extends FASTElement {
|
|
@@ -9556,7 +9565,7 @@ class Tab extends FASTElement {
|
|
|
9556
9565
|
this.$fastController.addStyles(this.styles);
|
|
9557
9566
|
}
|
|
9558
9567
|
}
|
|
9559
|
-
__decorateClass$
|
|
9568
|
+
__decorateClass$6([attr({
|
|
9560
9569
|
mode: "boolean"
|
|
9561
9570
|
})], Tab.prototype, "disabled", 2);
|
|
9562
9571
|
applyMixins(Tab, StartEnd);
|
|
@@ -9564,21 +9573,21 @@ applyMixins(Tab, StartEnd);
|
|
|
9564
9573
|
function tabTemplate(options = {}) {
|
|
9565
9574
|
return html`<template slot="tab" role="tab" aria-disabled="${x => x.disabled}">${startSlotTemplate(options)}<span class="tab-content"><slot></slot></span>${endSlotTemplate(options)}</template>`;
|
|
9566
9575
|
}
|
|
9567
|
-
const template$
|
|
9576
|
+
const template$6 = tabTemplate({});
|
|
9568
9577
|
|
|
9569
|
-
const styles$
|
|
9578
|
+
const styles$6 = css`
|
|
9570
9579
|
${display("inline-flex")}
|
|
9571
9580
|
|
|
9572
9581
|
:host{position:relative;flex-direction:column;cursor:pointer;box-sizing:border-box;justify-content:center;line-height:${lineHeightBase300};font-family:${fontFamilyBase};font-size:${fontSizeBase300};color:${colorNeutralForeground2};fill:currentcolor;grid-row:1;padding:${spacingHorizontalM} ${spacingHorizontalMNudge};border-radius:${borderRadiusMedium}}:host .tab-content{display:inline-flex;flex-direction:column;padding:0 2px}:host([aria-selected='true']){color:${colorNeutralForeground1};font-weight:${fontWeightSemibold}}:host .tab-content::after{content:var(--textContent);visibility:hidden;height:0;line-height:${lineHeightBase300};font-weight:${fontWeightSemibold}}:host([aria-selected='true'])::after{background-color:${colorCompoundBrandStroke};border-radius:${borderRadiusCircular};content:'';inset:0;position:absolute;z-index:2}:host([aria-selected='false']:hover)::after{background-color:${colorNeutralStroke1Hover};border-radius:${borderRadiusCircular};content:'';inset:0;position:absolute;z-index:1}:host([aria-selected='true'][disabled])::after{background-color:${colorNeutralForegroundDisabled}}::slotted([slot='start']),::slotted([slot='end']){display:flex}::slotted([slot='start']){margin-inline-end:11px}::slotted([slot='end']){margin-inline-start:11px}:host([disabled]){cursor:not-allowed;fill:${colorNeutralForegroundDisabled};color:${colorNeutralForegroundDisabled}}:host([disabled]:hover)::after{background-color:unset}:host(:focus){outline:none}:host(:focus-visible){border-radius:${borderRadiusSmall};box-shadow:0 0 0 3px ${colorStrokeFocus2};outline:1px solid ${colorStrokeFocus1}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
9573
9582
|
:host([aria-selected='true'])::after{background-color:Highlight}`));
|
|
9574
9583
|
|
|
9575
|
-
const definition$
|
|
9584
|
+
const definition$6 = Tab.compose({
|
|
9576
9585
|
name: `${FluentDesignSystem.prefix}-tab`,
|
|
9577
|
-
template: template$
|
|
9578
|
-
styles: styles$
|
|
9586
|
+
template: template$6,
|
|
9587
|
+
styles: styles$6
|
|
9579
9588
|
});
|
|
9580
9589
|
|
|
9581
|
-
definition$
|
|
9590
|
+
definition$6.define(FluentDesignSystem.registry);
|
|
9582
9591
|
|
|
9583
9592
|
const TabsAppearance = {
|
|
9584
9593
|
subtle: "subtle",
|
|
@@ -9586,12 +9595,12 @@ const TabsAppearance = {
|
|
|
9586
9595
|
};
|
|
9587
9596
|
const TabsOrientation = Orientation;
|
|
9588
9597
|
|
|
9589
|
-
var __defProp$
|
|
9590
|
-
var __getOwnPropDesc$
|
|
9591
|
-
var __decorateClass$
|
|
9592
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
9598
|
+
var __defProp$5 = Object.defineProperty;
|
|
9599
|
+
var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
|
|
9600
|
+
var __decorateClass$5 = (decorators, target, key, kind) => {
|
|
9601
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$5(target, key) : target;
|
|
9593
9602
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9594
|
-
if (kind && result) __defProp$
|
|
9603
|
+
if (kind && result) __defProp$5(target, key, result);
|
|
9595
9604
|
return result;
|
|
9596
9605
|
};
|
|
9597
9606
|
class BaseTabs extends FASTElement {
|
|
@@ -9835,10 +9844,10 @@ class BaseTabs extends FASTElement {
|
|
|
9835
9844
|
this.activeTabIndex = this.getActiveIndex();
|
|
9836
9845
|
}
|
|
9837
9846
|
}
|
|
9838
|
-
__decorateClass$
|
|
9839
|
-
__decorateClass$
|
|
9840
|
-
__decorateClass$
|
|
9841
|
-
__decorateClass$
|
|
9847
|
+
__decorateClass$5([attr], BaseTabs.prototype, "orientation", 2);
|
|
9848
|
+
__decorateClass$5([attr], BaseTabs.prototype, "activeid", 2);
|
|
9849
|
+
__decorateClass$5([observable], BaseTabs.prototype, "tabs", 2);
|
|
9850
|
+
__decorateClass$5([observable], BaseTabs.prototype, "tabpanels", 2);
|
|
9842
9851
|
class Tabs extends BaseTabs {
|
|
9843
9852
|
constructor() {
|
|
9844
9853
|
super(...arguments);
|
|
@@ -9970,30 +9979,30 @@ class Tabs extends BaseTabs {
|
|
|
9970
9979
|
this.setTabData();
|
|
9971
9980
|
}
|
|
9972
9981
|
}
|
|
9973
|
-
__decorateClass$
|
|
9974
|
-
__decorateClass$
|
|
9982
|
+
__decorateClass$5([attr], Tabs.prototype, "appearance", 2);
|
|
9983
|
+
__decorateClass$5([attr({
|
|
9975
9984
|
mode: "boolean"
|
|
9976
9985
|
})], Tabs.prototype, "disabled", 2);
|
|
9977
|
-
__decorateClass$
|
|
9986
|
+
__decorateClass$5([attr], Tabs.prototype, "size", 2);
|
|
9978
9987
|
applyMixins(Tabs, StartEnd);
|
|
9979
9988
|
|
|
9980
9989
|
function tabsTemplate(options = {}) {
|
|
9981
9990
|
return html` ${startSlotTemplate(options)}<div class="tablist" part="tablist" role="tablist"><slot name="tab" ${slotted("tabs")}></slot></div>${endSlotTemplate(options)}<div class="tabpanel" part="tabpanel"><slot name="tabpanel" ${slotted("tabpanels")}></slot></div>`;
|
|
9982
9991
|
}
|
|
9983
|
-
const template$
|
|
9992
|
+
const template$5 = tabsTemplate({});
|
|
9984
9993
|
|
|
9985
|
-
const styles$
|
|
9994
|
+
const styles$5 = css`
|
|
9986
9995
|
${display("grid")}
|
|
9987
9996
|
|
|
9988
9997
|
:host{box-sizing:border-box;font-family:${fontFamilyBase};font-size:${fontSizeBase300};line-height:${lineHeightBase300};color:${colorNeutralForeground2};grid-template-columns:auto 1fr auto;grid-template-rows:auto 1fr}:host([disabled]){cursor:not-allowed;color:${colorNeutralForegroundDisabled}}:host([disabled]) ::slotted(fluent-tab){pointer-events:none;cursor:not-allowed;color:${colorNeutralForegroundDisabled}}:host([disabled]) ::slotted(fluent-tab:after){background-color:${colorNeutralForegroundDisabled}}:host([disabled]) ::slotted(fluent-tab[aria-selected='true'])::after{background-color:${colorNeutralForegroundDisabled}}:host([disabled]) ::slotted(fluent-tab:hover):before{content:unset}:host ::slotted(fluent-tab){border-radius:${borderRadiusMedium}}:host ::slotted(fluent-tab[aria-selected='true'])::before{background-color:${colorNeutralForegroundDisabled}}.tablist{display:grid;grid-template-rows:auto auto;grid-template-columns:auto;position:relative;width:max-content;align-self:end;box-sizing:border-box}::slotted([slot='start']),::slotted([slot='end']){display:flex;align-self:center}::slotted([slot='start']){margin-inline-end:11px}::slotted([slot='end']){margin-inline-start:11px}.tabpanel{grid-row:2;grid-column-start:1;grid-column-end:4;position:relative}:host([orientation='vertical']){grid-template-rows:auto 1fr auto;grid-template-columns:auto 1fr}:host([orientation='vertical']) .tablist{grid-row-start:2;grid-row-end:2;display:grid;grid-template-rows:auto;grid-template-columns:auto 1fr;position:relative;width:max-content;justify-self:end;align-self:flex-start;width:100%}:host([orientation='vertical']) .tabpanel{grid-column:2;grid-row-start:1;grid-row-end:4}:host([orientation='vertical']) ::slotted([slot='end']){grid-row:3}:host([appearance='subtle']) ::slotted(fluent-tab:hover){background-color:${colorSubtleBackgroundHover};color:${colorNeutralForeground1Hover};fill:${colorCompoundBrandForeground1Hover}}:host([appearance='subtle']) ::slotted(fluent-tab:active){background-color:${colorSubtleBackgroundPressed};fill:${colorSubtleBackgroundPressed};color:${colorNeutralForeground1}}:host([size='small']) ::slotted(fluent-tab){font-size:${fontSizeBase300};line-height:${lineHeightBase300};padding:${spacingVerticalSNudge} ${spacingHorizontalSNudge}}:host([size='large']) ::slotted(fluent-tab){font-size:${fontSizeBase400};line-height:${lineHeightBase400};padding:${spacingVerticalL} ${spacingHorizontalMNudge}}:host ::slotted(fluent-tab[data-animate='true'])::after{transition-property:transform;transition-duration:${durationSlow};transition-timing-function:${curveDecelerateMax}}:host ::slotted(fluent-tab)::after{height:${strokeWidthThicker};margin-top:auto;transform-origin:left;transform:translateX(var(--tabIndicatorOffset)) scaleX(var(--tabIndicatorScale))}:host([orientation='vertical']) ::slotted(fluent-tab)::after{width:${strokeWidthThicker};height:unset;margin-top:unset;transform-origin:top;transform:translateY(var(--tabIndicatorOffset)) scaleY(var(--tabIndicatorScale))}:host ::slotted(fluent-tab)::before{height:${strokeWidthThicker};border-radius:${borderRadiusCircular};content:'';inset:0;position:absolute;margin-top:auto}:host([orientation='vertical']) ::slotted(fluent-tab)::before{height:unset;width:${strokeWidthThicker};margin-inline-end:auto;transform-origin:top}:host ::slotted(fluent-tab[aria-selected='false']:hover)::after{height:${strokeWidthThicker};margin-top:auto;transform-origin:left}:host([orientation='vertical']) ::slotted(fluent-tab[aria-selected='false']:hover)::after{height:unset;margin-inline-end:auto;transform-origin:top;width:${strokeWidthThicker}}:host([orientation='vertical']) ::slotted(fluent-tab){align-items:flex-start;grid-column:2;padding-top:${spacingVerticalSNudge};padding-bottom:${spacingVerticalSNudge}}:host([orientation='vertical'][size='small']) ::slotted(fluent-tab){padding-top:${spacingVerticalXXS};padding-bottom:${spacingVerticalXXS}}:host([orientation='vertical'][size='large']) ::slotted(fluent-tab){padding-top:${spacingVerticalS};padding-bottom:${spacingVerticalS}}:host([size='small']) ::slotted(fluent-tab)::after,:host([size='small']) ::slotted(fluent-tab)::before,:host([size='small']) ::slotted(fluent-tab:hover)::after{right:${spacingHorizontalSNudge};left:${spacingHorizontalSNudge}}:host ::slotted(fluent-tab)::after,:host ::slotted(fluent-tab)::before,:host ::slotted(fluent-tab:hover)::after{right:${spacingHorizontalMNudge};left:${spacingHorizontalMNudge}}:host([size='large']) ::slotted(fluent-tab)::after,:host([size='large']) ::slotted(fluent-tab)::before,:host([size='large']) ::slotted(fluent-tab:hover)::after{right:${spacingHorizontalMNudge};left:${spacingHorizontalMNudge}}:host([orientation='vertical'][size='small']) ::slotted(fluent-tab)::after,:host([orientation='vertical'][size='small']) ::slotted(fluent-tab)::before,:host([orientation='vertical'][size='small']) ::slotted(fluent-tab:hover)::after{right:0;left:0;top:${spacingVerticalSNudge};bottom:${spacingVerticalSNudge}}:host([orientation='vertical']) ::slotted(fluent-tab)::after,:host([orientation='vertical']) ::slotted(fluent-tab)::before,:host([orientation='vertical']) ::slotted(fluent-tab:hover)::after{right:0;left:0;top:${spacingVerticalS};bottom:${spacingVerticalS}}:host([orientation='vertical'][size='large']) ::slotted(fluent-tab)::after,:host([orientation='vertical'][size='large']) ::slotted(fluent-tab)::before,:host([orientation='vertical'][size='large']) ::slotted(fluent-tab:hover)::after{right:0;left:0;top:${spacingVerticalMNudge};bottom:${spacingVerticalMNudge}}`;
|
|
9989
9998
|
|
|
9990
|
-
const definition$
|
|
9999
|
+
const definition$5 = Tabs.compose({
|
|
9991
10000
|
name: `${FluentDesignSystem.prefix}-tabs`,
|
|
9992
|
-
template: template$
|
|
9993
|
-
styles: styles$
|
|
10001
|
+
template: template$5,
|
|
10002
|
+
styles: styles$5
|
|
9994
10003
|
});
|
|
9995
10004
|
|
|
9996
|
-
definition$
|
|
10005
|
+
definition$5.define(FluentDesignSystem.registry);
|
|
9997
10006
|
|
|
9998
10007
|
const isARIADisabledElement = el => {
|
|
9999
10008
|
return el.getAttribute("aria-disabled") === "true";
|
|
@@ -10011,12 +10020,12 @@ const TablistAppearance = {
|
|
|
10011
10020
|
};
|
|
10012
10021
|
const TablistOrientation = Orientation;
|
|
10013
10022
|
|
|
10014
|
-
var __defProp$
|
|
10015
|
-
var __getOwnPropDesc$
|
|
10016
|
-
var __decorateClass$
|
|
10017
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
10023
|
+
var __defProp$4 = Object.defineProperty;
|
|
10024
|
+
var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
|
|
10025
|
+
var __decorateClass$4 = (decorators, target, key, kind) => {
|
|
10026
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$4(target, key) : target;
|
|
10018
10027
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10019
|
-
if (kind && result) __defProp$
|
|
10028
|
+
if (kind && result) __defProp$4(target, key, result);
|
|
10020
10029
|
return result;
|
|
10021
10030
|
};
|
|
10022
10031
|
class BaseTablist extends FASTElement {
|
|
@@ -10210,12 +10219,12 @@ class BaseTablist extends FASTElement {
|
|
|
10210
10219
|
this.activeTabIndex = this.getActiveIndex();
|
|
10211
10220
|
}
|
|
10212
10221
|
}
|
|
10213
|
-
__decorateClass$
|
|
10222
|
+
__decorateClass$4([attr({
|
|
10214
10223
|
mode: "boolean"
|
|
10215
10224
|
})], BaseTablist.prototype, "disabled", 2);
|
|
10216
|
-
__decorateClass$
|
|
10217
|
-
__decorateClass$
|
|
10218
|
-
__decorateClass$
|
|
10225
|
+
__decorateClass$4([attr], BaseTablist.prototype, "orientation", 2);
|
|
10226
|
+
__decorateClass$4([attr], BaseTablist.prototype, "activeid", 2);
|
|
10227
|
+
__decorateClass$4([observable], BaseTablist.prototype, "tabs", 2);
|
|
10219
10228
|
class Tablist extends BaseTablist {
|
|
10220
10229
|
constructor() {
|
|
10221
10230
|
super(...arguments);
|
|
@@ -10377,20 +10386,564 @@ class Tablist extends BaseTablist {
|
|
|
10377
10386
|
}
|
|
10378
10387
|
}
|
|
10379
10388
|
}
|
|
10380
|
-
__decorateClass$
|
|
10381
|
-
__decorateClass$
|
|
10389
|
+
__decorateClass$4([attr], Tablist.prototype, "appearance", 2);
|
|
10390
|
+
__decorateClass$4([attr], Tablist.prototype, "size", 2);
|
|
10382
10391
|
|
|
10383
|
-
const template$
|
|
10392
|
+
const template$4 = html`<template role="tablist"><slot name="tab" ${slotted("tabs")}></slot></template>`;
|
|
10384
10393
|
|
|
10385
|
-
const styles$
|
|
10394
|
+
const styles$4 = css`
|
|
10386
10395
|
${display("flex")}
|
|
10387
10396
|
|
|
10388
10397
|
:host{--tabPaddingInline:inherit;--tabPaddingBlock:inherit;--tabIndicatorInsetInline:0;--tabIndicatorInsetBlock:0;box-sizing:border-box;color:${colorNeutralForeground2};flex-direction:row}:host(${verticalState}){flex-direction:column}:host ::slotted([role='tab']){align-items:flex-start}:host ::slotted([slot='tab'][data-animate='true'])::after{transition-property:transform;transition-duration:${durationSlow};transition-timing-function:${curveDecelerateMax}}:host ::slotted([slot='tab'])::after{height:${strokeWidthThicker};margin-block-start:auto;transform-origin:left;transform:translateX(var(--tabIndicatorOffset)) scaleX(var(--tabIndicatorScale))}:host(${verticalState}) ::slotted([slot='tab'])::after{width:${strokeWidthThicker};height:unset;margin-block-start:unset;transform-origin:top;transform:translateY(var(--tabIndicatorOffset)) scaleY(var(--tabIndicatorScale))}:host ::slotted([slot='tab'])::before{height:${strokeWidthThicker};border-radius:${borderRadiusCircular};content:'';inset-inline:var(--tabIndicatorInsetInline);inset-block:var(--tabIndicatorInsetBlock);position:absolute;margin-top:auto}:host ::slotted([slot='tab'])::before{inset-inline:var(--tabIndicatorInsetInline);inset-block:var(--tabIndicatorInsetBlock)}:host ::slotted([slot='tab'][aria-selected='true'])::before{background-color:${colorNeutralForegroundDisabled}}:host ::slotted([slot='tab'][aria-selected='false']:hover)::after{height:${strokeWidthThicker};margin-block-start:auto;transform-origin:left}:host(${verticalState}) ::slotted([slot='tab'])::before,:host(${verticalState}) ::slotted([slot='tab'][aria-selected='false']:hover)::after{height:unset;width:${strokeWidthThicker};margin-inline-end:auto;transform-origin:top}:host(:where(${smallState},${largeState})) ::slotted([slot='tab']){padding-inline:var(--tabPaddingInline);padding-block:var(--tabPaddingBlock)}:host(${smallState}) ::slotted([slot='tab']){--tabPaddingBlock:${spacingVerticalSNudge};--tabPaddingInline:${spacingHorizontalSNudge};font-size:${fontSizeBase300};line-height:${lineHeightBase300}}:host(${largeState}) ::slotted([slot='tab']){--tabPaddingBlock:${spacingVerticalL};--tabPaddingInline:${spacingHorizontalMNudge};font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host ::slotted([slot='tab'])::after,:host ::slotted([slot='tab'])::before,:host ::slotted([slot='tab']:hover)::after{inset-inline:var(--tabIndicatorInsetInline)}:host ::slotted([slot='tab']){--tabIndicatorInsetInline:${spacingHorizontalMNudge}}:host(${smallState}) ::slotted([slot='tab']){--tabIndicatorInsetInline:${spacingHorizontalSNudge}}:host(${largeState}) ::slotted([slot='tab']){--tabIndicatorInsetInline:${spacingHorizontalMNudge}}:host(${verticalState}) ::slotted([slot='tab']){padding-block:var(--tabPaddingBlock)}:host(${verticalState}) ::slotted([slot='tab']){--tabPaddingBlock:${spacingVerticalS}}:host(${verticalState}${smallState}) ::slotted([slot='tab']){--tabPaddingBlock:${spacingVerticalXXS}}:host(${verticalState}${largeState}) ::slotted([slot='tab']){--tabPaddingBlock:${spacingVerticalS}}:host(${verticalState}) ::slotted([slot='tab'])::after,:host(${verticalState}) ::slotted([slot='tab'])::before,:host(${verticalState}) ::slotted([slot='tab']:hover)::after{inset-inline:0;inset-block:var(--tabIndicatorInsetBlock)}:host(${verticalState}){--tabIndicatorInsetBlock:${spacingVerticalS}}:host(${verticalState}${smallState}){--tabIndicatorInsetBlock:${spacingVerticalSNudge}}:host(${verticalState}${largeState}){--tabIndicatorInsetBlock:${spacingVerticalMNudge}}:host(${disabledState}){cursor:not-allowed;color:${colorNeutralForegroundDisabled}}:host(${disabledState}) ::slotted([slot='tab']){pointer-events:none;cursor:not-allowed;color:${colorNeutralForegroundDisabled}}:host(${disabledState}) ::slotted([slot='tab']:after){background-color:${colorNeutralForegroundDisabled}}:host(${disabledState}) ::slotted([slot='tab'][aria-selected='true'])::after{background-color:${colorNeutralForegroundDisabled}}:host(${disabledState}) ::slotted([slot='tab']:hover):before{content:unset}:host(${subtleState}) ::slotted([slot='tab']:hover){background-color:${colorSubtleBackgroundHover};color:${colorNeutralForeground1Hover};fill:${colorCompoundBrandForeground1Hover}}:host(${subtleState}) ::slotted([slot='tab']:active){background-color:${colorSubtleBackgroundPressed};fill:${colorSubtleBackgroundPressed};color:${colorNeutralForeground1}}`;
|
|
10389
10398
|
|
|
10390
|
-
const definition$
|
|
10399
|
+
const definition$4 = Tablist.compose({
|
|
10391
10400
|
name: `${FluentDesignSystem.prefix}-tablist`,
|
|
10401
|
+
template: template$4,
|
|
10402
|
+
styles: styles$4
|
|
10403
|
+
});
|
|
10404
|
+
|
|
10405
|
+
definition$4.define(FluentDesignSystem.registry);
|
|
10406
|
+
|
|
10407
|
+
const TextAreaAppearance = {
|
|
10408
|
+
outline: "outline",
|
|
10409
|
+
filledLighter: "filled-lighter",
|
|
10410
|
+
filledDarker: "filled-darker"
|
|
10411
|
+
};
|
|
10412
|
+
const TextAreaAppearancesForDisplayShadow = [TextAreaAppearance.filledLighter, TextAreaAppearance.filledDarker];
|
|
10413
|
+
const TextAreaResize = {
|
|
10414
|
+
none: "none",
|
|
10415
|
+
both: "both",
|
|
10416
|
+
horizontal: "horizontal",
|
|
10417
|
+
vertical: "vertical"
|
|
10418
|
+
};
|
|
10419
|
+
const TextAreaResizableResize = [TextAreaResize.both, TextAreaResize.horizontal, TextAreaResize.vertical];
|
|
10420
|
+
|
|
10421
|
+
var __defProp$3 = Object.defineProperty;
|
|
10422
|
+
var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
|
|
10423
|
+
var __decorateClass$3 = (decorators, target, key, kind) => {
|
|
10424
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key) : target;
|
|
10425
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10426
|
+
if (kind && result) __defProp$3(target, key, result);
|
|
10427
|
+
return result;
|
|
10428
|
+
};
|
|
10429
|
+
class BaseTextArea extends FASTElement {
|
|
10430
|
+
constructor() {
|
|
10431
|
+
super();
|
|
10432
|
+
/**
|
|
10433
|
+
* The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
10434
|
+
*
|
|
10435
|
+
* @internal
|
|
10436
|
+
*/
|
|
10437
|
+
this.elementInternals = this.attachInternals();
|
|
10438
|
+
this.userInteracted = false;
|
|
10439
|
+
this.preConnectControlEl = document.createElement("textarea");
|
|
10440
|
+
this.autoResize = false;
|
|
10441
|
+
this.disabled = false;
|
|
10442
|
+
this.displayShadow = false;
|
|
10443
|
+
this.readOnly = false;
|
|
10444
|
+
this.required = false;
|
|
10445
|
+
this.resize = TextAreaResize.none;
|
|
10446
|
+
this.spellcheck = false;
|
|
10447
|
+
}
|
|
10448
|
+
defaultSlottedNodesChanged() {
|
|
10449
|
+
const next = this.getContent();
|
|
10450
|
+
this.defaultValue = next;
|
|
10451
|
+
this.value = next;
|
|
10452
|
+
}
|
|
10453
|
+
labelSlottedNodesChanged() {
|
|
10454
|
+
if (this.labelEl) {
|
|
10455
|
+
this.labelEl.hidden = !this.labelSlottedNodes.length;
|
|
10456
|
+
}
|
|
10457
|
+
this.labelSlottedNodes.forEach(node => {
|
|
10458
|
+
node.disabled = this.disabled;
|
|
10459
|
+
node.required = this.required;
|
|
10460
|
+
});
|
|
10461
|
+
}
|
|
10462
|
+
autoResizeChanged() {
|
|
10463
|
+
this.maybeCreateAutoSizerEl();
|
|
10464
|
+
toggleState(this.elementInternals, "auto-resize", this.autoResize);
|
|
10465
|
+
}
|
|
10466
|
+
disabledChanged() {
|
|
10467
|
+
this.setDisabledSideEffect(this.disabled);
|
|
10468
|
+
}
|
|
10469
|
+
/**
|
|
10470
|
+
* The form element that’s associated to the element, or `null` if no form is associated.
|
|
10471
|
+
*
|
|
10472
|
+
* @public
|
|
10473
|
+
*/
|
|
10474
|
+
get form() {
|
|
10475
|
+
return this.elementInternals.form;
|
|
10476
|
+
}
|
|
10477
|
+
/**
|
|
10478
|
+
* A `NodeList` of `<label>` element associated with the element.
|
|
10479
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement/labels | `labels`} property
|
|
10480
|
+
*
|
|
10481
|
+
* @public
|
|
10482
|
+
*/
|
|
10483
|
+
get labels() {
|
|
10484
|
+
return this.elementInternals.labels;
|
|
10485
|
+
}
|
|
10486
|
+
readOnlyChanged() {
|
|
10487
|
+
this.elementInternals.ariaReadOnly = `${!!this.readOnly}`;
|
|
10488
|
+
}
|
|
10489
|
+
requiredChanged() {
|
|
10490
|
+
this.elementInternals.ariaRequired = `${!!this.required}`;
|
|
10491
|
+
if (this.labelSlottedNodes?.length) {
|
|
10492
|
+
this.labelSlottedNodes.forEach(node => node.required = this.required);
|
|
10493
|
+
}
|
|
10494
|
+
}
|
|
10495
|
+
resizeChanged(prev, next) {
|
|
10496
|
+
if (prev) {
|
|
10497
|
+
toggleState(this.elementInternals, `resize-${prev}`, false);
|
|
10498
|
+
}
|
|
10499
|
+
if (next) {
|
|
10500
|
+
toggleState(this.elementInternals, `resize-${next}`, true);
|
|
10501
|
+
}
|
|
10502
|
+
toggleState(this.elementInternals, `resize`, TextAreaResizableResize.includes(this.resize));
|
|
10503
|
+
}
|
|
10504
|
+
/**
|
|
10505
|
+
* The length of the current value.
|
|
10506
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement#textLength | 'textLength'} property
|
|
10507
|
+
*
|
|
10508
|
+
* @public
|
|
10509
|
+
*/
|
|
10510
|
+
get textLength() {
|
|
10511
|
+
return this.controlEl.textLength;
|
|
10512
|
+
}
|
|
10513
|
+
/**
|
|
10514
|
+
* The type of the element, which is always "textarea".
|
|
10515
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement/type | `type`} property
|
|
10516
|
+
*
|
|
10517
|
+
* @public
|
|
10518
|
+
*/
|
|
10519
|
+
get type() {
|
|
10520
|
+
return "textarea";
|
|
10521
|
+
}
|
|
10522
|
+
/**
|
|
10523
|
+
* The element's validity state.
|
|
10524
|
+
*
|
|
10525
|
+
* @public
|
|
10526
|
+
* @remarks
|
|
10527
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/validity | `ElementInternals.validity`} property.
|
|
10528
|
+
*/
|
|
10529
|
+
get validity() {
|
|
10530
|
+
return this.elementInternals.validity;
|
|
10531
|
+
}
|
|
10532
|
+
/**
|
|
10533
|
+
* The validation message.
|
|
10534
|
+
*
|
|
10535
|
+
* @public
|
|
10536
|
+
* @remarks
|
|
10537
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/validationMessage | `ElementInternals.validationMessage`} property.
|
|
10538
|
+
*/
|
|
10539
|
+
get validationMessage() {
|
|
10540
|
+
return this.elementInternals.validationMessage || this.controlEl.validationMessage;
|
|
10541
|
+
}
|
|
10542
|
+
/**
|
|
10543
|
+
* Determines if the control can be submitted for constraint validation.
|
|
10544
|
+
*
|
|
10545
|
+
* @public
|
|
10546
|
+
* @remarks
|
|
10547
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/willValidate | `ElementInternals.willValidate`} property.
|
|
10548
|
+
*/
|
|
10549
|
+
get willValidate() {
|
|
10550
|
+
return this.elementInternals.willValidate;
|
|
10551
|
+
}
|
|
10552
|
+
/**
|
|
10553
|
+
* The text content of the element before user interaction.
|
|
10554
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement#defaultvalue | `defaultValue`} property
|
|
10555
|
+
*
|
|
10556
|
+
* @public
|
|
10557
|
+
* @remarks
|
|
10558
|
+
* In order to set the initial/default value, an author should either add the default value in the HTML as the children
|
|
10559
|
+
* of the component, or setting this property in JavaScript. Setting `innerHTML`, `innerText`, or `textContent` on this
|
|
10560
|
+
* component will not change the default value or the content displayed inside the component.
|
|
10561
|
+
*/
|
|
10562
|
+
get defaultValue() {
|
|
10563
|
+
return this.controlEl?.defaultValue ?? this.preConnectControlEl.defaultValue;
|
|
10564
|
+
}
|
|
10565
|
+
set defaultValue(next) {
|
|
10566
|
+
const controlEl = this.controlEl ?? this.preConnectControlEl;
|
|
10567
|
+
controlEl.defaultValue = next;
|
|
10568
|
+
if (this.controlEl && !this.userInteracted) {
|
|
10569
|
+
this.controlEl.value = next;
|
|
10570
|
+
}
|
|
10571
|
+
}
|
|
10572
|
+
/**
|
|
10573
|
+
* The value of the element.
|
|
10574
|
+
*
|
|
10575
|
+
* @public
|
|
10576
|
+
* @remarks
|
|
10577
|
+
* Reflects the `value` property.
|
|
10578
|
+
*/
|
|
10579
|
+
get value() {
|
|
10580
|
+
return this.controlEl?.value ?? this.preConnectControlEl.value;
|
|
10581
|
+
}
|
|
10582
|
+
set value(next) {
|
|
10583
|
+
const controlEl = this.controlEl ?? this.preConnectControlEl;
|
|
10584
|
+
controlEl.value = next;
|
|
10585
|
+
this.setFormValue(next);
|
|
10586
|
+
this.setValidity();
|
|
10587
|
+
}
|
|
10588
|
+
/**
|
|
10589
|
+
* @internal
|
|
10590
|
+
*/
|
|
10591
|
+
connectedCallback() {
|
|
10592
|
+
super.connectedCallback();
|
|
10593
|
+
this.setDefaultValue();
|
|
10594
|
+
this.maybeCreateAutoSizerEl();
|
|
10595
|
+
this.bindEvents();
|
|
10596
|
+
this.observeControlElAttrs();
|
|
10597
|
+
}
|
|
10598
|
+
/**
|
|
10599
|
+
* @internal
|
|
10600
|
+
*/
|
|
10601
|
+
disconnectedCallback() {
|
|
10602
|
+
super.disconnectedCallback();
|
|
10603
|
+
this.autoSizerObserver?.disconnect();
|
|
10604
|
+
this.controlElAttrObserver?.disconnect();
|
|
10605
|
+
}
|
|
10606
|
+
/**
|
|
10607
|
+
* Resets the value to its initial value when the form is reset.
|
|
10608
|
+
*
|
|
10609
|
+
* @internal
|
|
10610
|
+
*/
|
|
10611
|
+
formResetCallback() {
|
|
10612
|
+
this.value = this.defaultValue;
|
|
10613
|
+
}
|
|
10614
|
+
/**
|
|
10615
|
+
* @internal
|
|
10616
|
+
*/
|
|
10617
|
+
formDisabledCallback(disabled) {
|
|
10618
|
+
this.setDisabledSideEffect(disabled);
|
|
10619
|
+
this.setValidity();
|
|
10620
|
+
}
|
|
10621
|
+
/**
|
|
10622
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/setFormValue | `ElementInternals.setFormValue()`} method.
|
|
10623
|
+
*
|
|
10624
|
+
* @internal
|
|
10625
|
+
*/
|
|
10626
|
+
setFormValue(value, state) {
|
|
10627
|
+
this.elementInternals.setFormValue(value, value ?? state);
|
|
10628
|
+
}
|
|
10629
|
+
/**
|
|
10630
|
+
* Checks the validity of the element and returns the result.
|
|
10631
|
+
*
|
|
10632
|
+
* @public
|
|
10633
|
+
* @remarks
|
|
10634
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/checkValidity | `HTMLInputElement.checkValidity()`} method.
|
|
10635
|
+
*/
|
|
10636
|
+
checkValidity() {
|
|
10637
|
+
return this.elementInternals.checkValidity();
|
|
10638
|
+
}
|
|
10639
|
+
/**
|
|
10640
|
+
* Reports the validity of the element.
|
|
10641
|
+
*
|
|
10642
|
+
* @public
|
|
10643
|
+
* @remarks
|
|
10644
|
+
* Reflects the {@link https://developer.mozilla.org/docs/Web/API/ElementInternals/reportValidity | `HTMLInputElement.reportValidity()`} method.
|
|
10645
|
+
*/
|
|
10646
|
+
reportValidity() {
|
|
10647
|
+
return this.elementInternals.reportValidity();
|
|
10648
|
+
}
|
|
10649
|
+
/**
|
|
10650
|
+
* Sets the custom validity message.
|
|
10651
|
+
* @param message - The message to set
|
|
10652
|
+
*
|
|
10653
|
+
* @public
|
|
10654
|
+
*/
|
|
10655
|
+
setCustomValidity(message) {
|
|
10656
|
+
this.elementInternals.setValidity({
|
|
10657
|
+
customError: !!message
|
|
10658
|
+
}, !!message ? message.toString() : void 0);
|
|
10659
|
+
this.reportValidity();
|
|
10660
|
+
}
|
|
10661
|
+
/**
|
|
10662
|
+
* Sets the validity of the control.
|
|
10663
|
+
*
|
|
10664
|
+
* @param flags - Validity flags. If not provided, the control's `validity` will be used.
|
|
10665
|
+
* @param message - Optional message to supply. If not provided, the control's `validationMessage` will be used. If the control does not have a `validationMessage`, the message will be empty.
|
|
10666
|
+
* @param anchor - Optional anchor to use for the validation message. If not provided, the control will be used.
|
|
10667
|
+
*
|
|
10668
|
+
* @internal
|
|
10669
|
+
*/
|
|
10670
|
+
setValidity(flags, message, anchor) {
|
|
10671
|
+
if (!this.$fastController.isConnected) {
|
|
10672
|
+
return;
|
|
10673
|
+
}
|
|
10674
|
+
if (this.disabled || this.readOnly) {
|
|
10675
|
+
this.elementInternals.setValidity({});
|
|
10676
|
+
} else {
|
|
10677
|
+
this.elementInternals.setValidity(flags ?? this.controlEl.validity, message ?? this.controlEl.validationMessage, anchor ?? this.controlEl);
|
|
10678
|
+
}
|
|
10679
|
+
if (this.userInteracted) {
|
|
10680
|
+
this.toggleUserValidityState();
|
|
10681
|
+
}
|
|
10682
|
+
}
|
|
10683
|
+
/**
|
|
10684
|
+
* Selects the content in the element.
|
|
10685
|
+
*
|
|
10686
|
+
* @public
|
|
10687
|
+
*/
|
|
10688
|
+
select() {
|
|
10689
|
+
this.controlEl.select();
|
|
10690
|
+
}
|
|
10691
|
+
setDefaultValue() {
|
|
10692
|
+
this.defaultValue = this.innerHTML.trim() || this.preConnectControlEl.defaultValue || "";
|
|
10693
|
+
this.value = this.preConnectControlEl.value || this.defaultValue;
|
|
10694
|
+
this.setFormValue(this.value);
|
|
10695
|
+
this.setValidity();
|
|
10696
|
+
this.preConnectControlEl = null;
|
|
10697
|
+
}
|
|
10698
|
+
bindEvents() {
|
|
10699
|
+
this.controlEl.addEventListener("input", () => this.userInteracted = true, {
|
|
10700
|
+
once: true
|
|
10701
|
+
});
|
|
10702
|
+
}
|
|
10703
|
+
/**
|
|
10704
|
+
* Gets the content inside the light DOM, if any HTML element is present, use its `outerHTML` value.
|
|
10705
|
+
*/
|
|
10706
|
+
getContent() {
|
|
10707
|
+
return this.defaultSlottedNodes.map(node => {
|
|
10708
|
+
switch (node.nodeType) {
|
|
10709
|
+
case Node.ELEMENT_NODE:
|
|
10710
|
+
return node.outerHTML;
|
|
10711
|
+
case Node.TEXT_NODE:
|
|
10712
|
+
return node.textContent.trim();
|
|
10713
|
+
default:
|
|
10714
|
+
return "";
|
|
10715
|
+
}
|
|
10716
|
+
}).join("") || "";
|
|
10717
|
+
}
|
|
10718
|
+
observeControlElAttrs() {
|
|
10719
|
+
this.controlElAttrObserver = new MutationObserver(() => {
|
|
10720
|
+
this.setValidity();
|
|
10721
|
+
});
|
|
10722
|
+
this.controlElAttrObserver.observe(this.controlEl, {
|
|
10723
|
+
attributes: true,
|
|
10724
|
+
attributeFilter: ["disabled", "required", "readonly", "maxlength", "minlength"]
|
|
10725
|
+
});
|
|
10726
|
+
}
|
|
10727
|
+
setDisabledSideEffect(disabled) {
|
|
10728
|
+
this.elementInternals.ariaDisabled = `${disabled}`;
|
|
10729
|
+
if (this.controlEl) {
|
|
10730
|
+
this.controlEl.disabled = disabled;
|
|
10731
|
+
}
|
|
10732
|
+
if (this.labelSlottedNodes?.length) {
|
|
10733
|
+
this.labelSlottedNodes.forEach(node => node.disabled = this.disabled);
|
|
10734
|
+
}
|
|
10735
|
+
}
|
|
10736
|
+
toggleUserValidityState() {
|
|
10737
|
+
toggleState(this.elementInternals, "user-invalid", !this.validity.valid);
|
|
10738
|
+
toggleState(this.elementInternals, "user-valid", this.validity.valid);
|
|
10739
|
+
}
|
|
10740
|
+
// Technique inspired by https://css-tricks.com/the-cleanest-trick-for-autogrowing-textareas/
|
|
10741
|
+
// TODO: This should be removed after `field-sizing: content` is widely supported
|
|
10742
|
+
// https://caniuse.com/mdn-css_properties_field-sizing_content
|
|
10743
|
+
maybeCreateAutoSizerEl() {
|
|
10744
|
+
if (CSS.supports("field-sizing: content")) {
|
|
10745
|
+
return;
|
|
10746
|
+
}
|
|
10747
|
+
if (!this.autoResize) {
|
|
10748
|
+
this.autoSizerEl?.remove();
|
|
10749
|
+
this.autoSizerObserver?.disconnect();
|
|
10750
|
+
return;
|
|
10751
|
+
}
|
|
10752
|
+
if (!this.autoSizerEl) {
|
|
10753
|
+
this.autoSizerEl = document.createElement("div");
|
|
10754
|
+
this.autoSizerEl.classList.add("auto-sizer");
|
|
10755
|
+
this.autoSizerEl.ariaHidden = "true";
|
|
10756
|
+
}
|
|
10757
|
+
this.shadowRoot.prepend(this.autoSizerEl);
|
|
10758
|
+
if (!this.autoSizerObserver) {
|
|
10759
|
+
this.autoSizerObserver = new ResizeObserver((_, observer) => {
|
|
10760
|
+
const blockSizePropName = window.getComputedStyle(this).writingMode.startsWith("horizontal") ? "height" : "width";
|
|
10761
|
+
if (this.style.getPropertyValue(blockSizePropName) !== "") {
|
|
10762
|
+
this.autoSizerEl?.remove();
|
|
10763
|
+
observer.disconnect();
|
|
10764
|
+
}
|
|
10765
|
+
});
|
|
10766
|
+
}
|
|
10767
|
+
this.autoSizerObserver.observe(this);
|
|
10768
|
+
}
|
|
10769
|
+
/**
|
|
10770
|
+
* @internal
|
|
10771
|
+
*/
|
|
10772
|
+
handleControlInput() {
|
|
10773
|
+
if (this.autoResize && this.autoSizerEl) {
|
|
10774
|
+
this.autoSizerEl.textContent = this.value + " ";
|
|
10775
|
+
}
|
|
10776
|
+
this.setFormValue(this.value);
|
|
10777
|
+
this.setValidity();
|
|
10778
|
+
}
|
|
10779
|
+
/**
|
|
10780
|
+
* @internal
|
|
10781
|
+
*/
|
|
10782
|
+
handleControlChange() {
|
|
10783
|
+
this.toggleUserValidityState();
|
|
10784
|
+
this.$emit("change");
|
|
10785
|
+
}
|
|
10786
|
+
/**
|
|
10787
|
+
* @internal
|
|
10788
|
+
*/
|
|
10789
|
+
handleControlSelect() {
|
|
10790
|
+
this.$emit("select");
|
|
10791
|
+
}
|
|
10792
|
+
}
|
|
10793
|
+
/**
|
|
10794
|
+
* The form-associated flag.
|
|
10795
|
+
* @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example | Form-associated custom elements}
|
|
10796
|
+
*
|
|
10797
|
+
* @public
|
|
10798
|
+
*/
|
|
10799
|
+
BaseTextArea.formAssociated = true;
|
|
10800
|
+
__decorateClass$3([observable], BaseTextArea.prototype, "defaultSlottedNodes", 2);
|
|
10801
|
+
__decorateClass$3([observable], BaseTextArea.prototype, "labelSlottedNodes", 2);
|
|
10802
|
+
__decorateClass$3([attr], BaseTextArea.prototype, "autocomplete", 2);
|
|
10803
|
+
__decorateClass$3([attr({
|
|
10804
|
+
attribute: "auto-resize",
|
|
10805
|
+
mode: "boolean"
|
|
10806
|
+
})], BaseTextArea.prototype, "autoResize", 2);
|
|
10807
|
+
__decorateClass$3([attr({
|
|
10808
|
+
attribute: "dirname"
|
|
10809
|
+
})], BaseTextArea.prototype, "dirName", 2);
|
|
10810
|
+
__decorateClass$3([attr({
|
|
10811
|
+
mode: "boolean"
|
|
10812
|
+
})], BaseTextArea.prototype, "disabled", 2);
|
|
10813
|
+
__decorateClass$3([attr({
|
|
10814
|
+
attribute: "display-shadow",
|
|
10815
|
+
mode: "boolean"
|
|
10816
|
+
})], BaseTextArea.prototype, "displayShadow", 2);
|
|
10817
|
+
__decorateClass$3([attr({
|
|
10818
|
+
attribute: "form"
|
|
10819
|
+
})], BaseTextArea.prototype, "initialForm", 2);
|
|
10820
|
+
__decorateClass$3([attr({
|
|
10821
|
+
attribute: "maxlength",
|
|
10822
|
+
converter: nullableNumberConverter
|
|
10823
|
+
})], BaseTextArea.prototype, "maxLength", 2);
|
|
10824
|
+
__decorateClass$3([attr({
|
|
10825
|
+
attribute: "minlength",
|
|
10826
|
+
converter: nullableNumberConverter
|
|
10827
|
+
})], BaseTextArea.prototype, "minLength", 2);
|
|
10828
|
+
__decorateClass$3([attr], BaseTextArea.prototype, "name", 2);
|
|
10829
|
+
__decorateClass$3([attr], BaseTextArea.prototype, "placeholder", 2);
|
|
10830
|
+
__decorateClass$3([attr({
|
|
10831
|
+
attribute: "readonly",
|
|
10832
|
+
mode: "boolean"
|
|
10833
|
+
})], BaseTextArea.prototype, "readOnly", 2);
|
|
10834
|
+
__decorateClass$3([attr({
|
|
10835
|
+
mode: "boolean"
|
|
10836
|
+
})], BaseTextArea.prototype, "required", 2);
|
|
10837
|
+
__decorateClass$3([attr({
|
|
10838
|
+
mode: "fromView"
|
|
10839
|
+
})], BaseTextArea.prototype, "resize", 2);
|
|
10840
|
+
__decorateClass$3([attr({
|
|
10841
|
+
mode: "boolean"
|
|
10842
|
+
})], BaseTextArea.prototype, "spellcheck", 2);
|
|
10843
|
+
class TextArea extends BaseTextArea {
|
|
10844
|
+
constructor() {
|
|
10845
|
+
super(...arguments);
|
|
10846
|
+
this.appearance = TextAreaAppearance.outline;
|
|
10847
|
+
this.block = false;
|
|
10848
|
+
}
|
|
10849
|
+
labelSlottedNodesChanged() {
|
|
10850
|
+
super.labelSlottedNodesChanged();
|
|
10851
|
+
this.labelSlottedNodes.forEach(node => {
|
|
10852
|
+
node.size = this.size;
|
|
10853
|
+
});
|
|
10854
|
+
}
|
|
10855
|
+
appearanceChanged(prev, next) {
|
|
10856
|
+
if (prev) {
|
|
10857
|
+
toggleState(this.elementInternals, `${prev}`, false);
|
|
10858
|
+
}
|
|
10859
|
+
if (!next || !Array.from(Object.values(TextAreaAppearance)).includes(next)) {
|
|
10860
|
+
toggleState(this.elementInternals, TextAreaAppearance.outline, true);
|
|
10861
|
+
} else {
|
|
10862
|
+
toggleState(this.elementInternals, `${next}`, true);
|
|
10863
|
+
}
|
|
10864
|
+
}
|
|
10865
|
+
blockChanged() {
|
|
10866
|
+
toggleState(this.elementInternals, "block", this.block);
|
|
10867
|
+
}
|
|
10868
|
+
sizeChanged(prev, next) {
|
|
10869
|
+
if (prev) {
|
|
10870
|
+
toggleState(this.elementInternals, `${prev}`, false);
|
|
10871
|
+
}
|
|
10872
|
+
if (next) {
|
|
10873
|
+
toggleState(this.elementInternals, `${next}`, true);
|
|
10874
|
+
}
|
|
10875
|
+
}
|
|
10876
|
+
/**
|
|
10877
|
+
* @internal
|
|
10878
|
+
*/
|
|
10879
|
+
handleChange(_, propertyName) {
|
|
10880
|
+
switch (propertyName) {
|
|
10881
|
+
case "size":
|
|
10882
|
+
this.labelSlottedNodes.forEach(node => {
|
|
10883
|
+
node.size = this.size;
|
|
10884
|
+
});
|
|
10885
|
+
break;
|
|
10886
|
+
case "appearance":
|
|
10887
|
+
case "displayShadow":
|
|
10888
|
+
this.maybeDisplayShadow();
|
|
10889
|
+
break;
|
|
10890
|
+
}
|
|
10891
|
+
}
|
|
10892
|
+
/**
|
|
10893
|
+
* @internal
|
|
10894
|
+
*/
|
|
10895
|
+
connectedCallback() {
|
|
10896
|
+
super.connectedCallback();
|
|
10897
|
+
this.maybeDisplayShadow();
|
|
10898
|
+
Observable.getNotifier(this).subscribe(this, "appearance");
|
|
10899
|
+
Observable.getNotifier(this).subscribe(this, "displayShadow");
|
|
10900
|
+
Observable.getNotifier(this).subscribe(this, "size");
|
|
10901
|
+
}
|
|
10902
|
+
/**
|
|
10903
|
+
* @internal
|
|
10904
|
+
*/
|
|
10905
|
+
disconnectedCallback() {
|
|
10906
|
+
super.disconnectedCallback();
|
|
10907
|
+
Observable.getNotifier(this).unsubscribe(this, "appearance");
|
|
10908
|
+
Observable.getNotifier(this).unsubscribe(this, "displayShadow");
|
|
10909
|
+
Observable.getNotifier(this).unsubscribe(this, "size");
|
|
10910
|
+
}
|
|
10911
|
+
maybeDisplayShadow() {
|
|
10912
|
+
toggleState(this.elementInternals, "display-shadow", this.displayShadow && TextAreaAppearancesForDisplayShadow.includes(this.appearance));
|
|
10913
|
+
}
|
|
10914
|
+
}
|
|
10915
|
+
__decorateClass$3([attr({
|
|
10916
|
+
mode: "fromView"
|
|
10917
|
+
})], TextArea.prototype, "appearance", 2);
|
|
10918
|
+
__decorateClass$3([attr({
|
|
10919
|
+
mode: "boolean"
|
|
10920
|
+
})], TextArea.prototype, "block", 2);
|
|
10921
|
+
__decorateClass$3([attr], TextArea.prototype, "size", 2);
|
|
10922
|
+
|
|
10923
|
+
const styles$3 = css`
|
|
10924
|
+
${display("inline-block")}
|
|
10925
|
+
|
|
10926
|
+
:host{--font-size:${fontSizeBase300};--line-height:${lineHeightBase300};--padding-inline:${spacingHorizontalMNudge};--padding-block:${spacingVerticalSNudge};--min-block-size:52px;--block-size:var(--min-block-size);--inline-size:18rem;--border-width:${strokeWidthThin};--control-padding-inline:${spacingHorizontalXXS};--color:${colorNeutralForeground1};--background-color:${colorNeutralBackground1};--border-color:${colorNeutralStroke1};--border-block-end-color:${colorNeutralStrokeAccessible};--placeholder-color:${colorNeutralForeground4};--focus-indicator-color:${colorCompoundBrandStroke};--box-shadow:none;--contain-size:size;--resize:none;color:var(--color);font-family:${fontFamilyBase};font-size:var(--font-size);font-weight:${fontWeightRegular};line-height:var(--line-height);position:relative}:host(:hover){--border-color:${colorNeutralStroke1Hover};--border-block-end-color:${colorNeutralStrokeAccessibleHover}}:host(:active){--border-color:${colorNeutralStroke1Pressed};--border-block-end-color:${colorNeutralStrokeAccessiblePressed}}:host(:focus-within){outline:none}:host(${blockState}:not([hidden])){display:block}:host(${smallState}){--font-size:${fontSizeBase200};--line-height:${lineHeightBase200};--min-block-size:40px;--padding-block:${spacingVerticalXS};--padding-inline:${spacingHorizontalSNudge};--control-padding-inline:${spacingHorizontalXXS}}:host(${largeState}){--font-size:${fontSizeBase400};--line-height:${lineHeightBase400};--min-block-size:64px;--padding-block:${spacingVerticalS};--padding-inline:${spacingHorizontalM};--control-padding-inline:${spacingHorizontalSNudge}}:host(${resizeBothState}:not(:disabled)){--resize:both}:host(${resizeHorizontalState}:not(:disabled)){--resize:horizontal}:host(${resizeVerticalState}:not(:disabled)){--resize:vertical}:host(${autoResizeState}){--block-size:auto;--contain-size:inline-size}:host(${filledDarkerState}){--background-color:${colorNeutralBackground3};--border-color:var(--background-color);--border-block-end-color:var(--border-color)}:host(${filledLighterState}){--border-color:var(--background-color);--border-block-end-color:var(--border-color)}:host(${filledDarkerState}${displayShadowState}),:host(${filledLighterState}${displayShadowState}){--box-shadow:${shadow2}}:host(${userInvalidState}){--border-color:${colorPaletteRedBorder2};--border-block-end-color:${colorPaletteRedBorder2}}:host(:disabled){--color:${colorNeutralForegroundDisabled};--background-color:${colorTransparentBackground};--border-color:${colorNeutralStrokeDisabled};--border-block-end-color:var(--border-color);--box-shadow:none;--placeholder-color:${colorNeutralForegroundDisabled};cursor:no-drop;user-select:none}.root{background-color:var(--background-color);border:var(--border-width) solid var(--border-color);border-block-end-color:var(--border-block-end-color);border-radius:${borderRadiusMedium};box-sizing:border-box;box-shadow:var(--box-shadow);contain:paint layout style var(--contain-size);display:grid;grid-template:1fr / 1fr;inline-size:var(--inline-size);min-block-size:var(--min-block-size);block-size:var(--block-size);overflow:hidden;padding:var(--padding-block) var(--padding-inline);position:relative;resize:var(--resize)}:host(${blockState}) .root{inline-size:auto}.root::after{border-bottom:2px solid var(--focus-indicator-color);border-radius:0 0 ${borderRadiusMedium} ${borderRadiusMedium};box-sizing:border-box;clip-path:inset(calc(100% - 2px) 1px 0px);content:'';height:max(2px,${borderRadiusMedium});inset:auto -1px 0;position:absolute;transform:scaleX(0);transition-delay:${curveAccelerateMid};transition-duration:${durationUltraFast};transition-property:transform}:host(:focus-within) .root::after{transform:scaleX(1);transition-property:transform;transition-duration:${durationNormal};transition-delay:${curveDecelerateMid}}:host([readonly]) .root::after,:host(:disabled) .root::after{content:none}label{color:var(--color);display:flex;inline-size:fit-content;padding-block-end:${spacingVerticalXS};padding-inline-end:${spacingHorizontalXS}}:host(:empty) label,label[hidden]{display:none}.auto-sizer,.control{box-sizing:border-box;font:inherit;grid-column:1 / -1;grid-row:1 / -1;letter-space:inherit;padding:0 var(--control-padding-inline)}.auto-sizer{display:none;padding-block-end:2px;pointer-events:none;visibility:hidden;white-space:pre-wrap}:host(${autoResizeState}) .auto-sizer{display:block}.control{appearance:none;background-color:transparent;border:0;color:inherit;field-sizing:content;max-block-size:100%;outline:0;resize:none;text-align:inherit}.control:disabled{cursor:inherit}.control::placeholder{color:var(--placeholder-color)}::selection{color:${colorNeutralForegroundInverted};background-color:${colorNeutralBackgroundInverted}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
|
|
10927
|
+
:host{--border-color:FieldText;--border-block-end-color:FieldText;--focus-indicator-color:Highlight;--placeholder-color:FieldText}:host(:hover),:host(:active),:host(:focus-within){--border-color:Highlight;--border-block-end-color:Highlight}:host(:disabled){--color:GrayText;--border-color:GrayText;--border-block-end-color:GrayText;--placeholder-color:GrayText}`));
|
|
10928
|
+
|
|
10929
|
+
function textAreaTemplate() {
|
|
10930
|
+
return html`<template><label ${ref("labelEl")} for="control" part="label"><slot name="label" ${slotted({
|
|
10931
|
+
property: "labelSlottedNodes",
|
|
10932
|
+
filter: whitespaceFilter
|
|
10933
|
+
})}></slot></label><div class="root" part="root"><textarea ${ref("controlEl")} id="control" class="control" part="control" ?required="${x => x.required}" ?disabled="${x => x.disabled}" ?readonly="${x => x.readOnly}" ?spellcheck="${x => x.spellcheck}" autocomplete="${x => x.autocomplete}" maxlength="${x => x.maxLength}" minlength="${x => x.minLength}" placeholder="${x => x.placeholder}" @change="${x => x.handleControlChange()}" @select="${x => x.handleControlSelect()}" @input="${x => x.handleControlInput()}"></textarea></div><div hidden><slot ${slotted({
|
|
10934
|
+
property: "defaultSlottedNodes",
|
|
10935
|
+
filter: whitespaceFilter
|
|
10936
|
+
})}></slot></div></template>`;
|
|
10937
|
+
}
|
|
10938
|
+
const template$3 = textAreaTemplate();
|
|
10939
|
+
|
|
10940
|
+
const definition$3 = TextArea.compose({
|
|
10941
|
+
name: `${FluentDesignSystem.prefix}-textarea`,
|
|
10392
10942
|
template: template$3,
|
|
10393
|
-
styles: styles$3
|
|
10943
|
+
styles: styles$3,
|
|
10944
|
+
shadowOptions: {
|
|
10945
|
+
delegatesFocus: true
|
|
10946
|
+
}
|
|
10394
10947
|
});
|
|
10395
10948
|
|
|
10396
10949
|
definition$3.define(FluentDesignSystem.registry);
|
|
@@ -11038,7 +11591,7 @@ __decorateClass([attr({
|
|
|
11038
11591
|
})], ToggleButton.prototype, "mixed", 2);
|
|
11039
11592
|
|
|
11040
11593
|
const styles = css`
|
|
11041
|
-
${styles$
|
|
11594
|
+
${styles$y}
|
|
11042
11595
|
|
|
11043
11596
|
: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`
|
|
11044
11597
|
:host(${pressedState}),:host(${pressedState}${primaryState}),:host(${pressedState}${subtleState}),:host(${pressedState}${outlineState}),:host(${pressedState}${transparentState}){background:SelectedItem;color:SelectedItemText}`));
|