@fluentui/web-components 3.0.0-beta.115 → 3.0.0-beta.116

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.
@@ -1,5 +1,4 @@
1
1
  import { html, ref, slotted } from '@microsoft/fast-element';
2
- import { whitespaceFilter } from '../utils/index.js';
3
2
  /**
4
3
  * Generates a template for the TextArea component.
5
4
  *
@@ -9,13 +8,7 @@ export function textAreaTemplate() {
9
8
  return html `
10
9
  <template>
11
10
  <label ${ref('labelEl')} for="control" part="label">
12
- <slot
13
- name="label"
14
- ${slotted({
15
- property: 'labelSlottedNodes',
16
- filter: whitespaceFilter,
17
- })}
18
- ></slot>
11
+ <slot name="label" ${slotted('labelSlottedNodes')}></slot>
19
12
  </label>
20
13
  <div class="root" part="root">
21
14
  <textarea
@@ -37,12 +30,7 @@ export function textAreaTemplate() {
37
30
  ></textarea>
38
31
  </div>
39
32
  <div hidden>
40
- <slot
41
- ${slotted({
42
- property: 'defaultSlottedNodes',
43
- filter: whitespaceFilter,
44
- })}
45
- ></slot>
33
+ <slot ${slotted('defaultSlottedNodes')}></slot>
46
34
  </div>
47
35
  </template>
48
36
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.template.js","sourceRoot":"","sources":["../../../src/textarea/textarea.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAGrD;;;;GAIG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,IAAI,CAAG;;eAED,GAAG,CAAC,SAAS,CAAC;;;YAGjB,OAAO,CAAC;QACR,QAAQ,EAAE,mBAAmB;QAC7B,MAAM,EAAE,gBAAgB;KACzB,CAAC;;;;;YAKA,GAAG,CAAC,WAAW,CAAC;;;;uBAIL,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ;uBACf,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ;uBACf,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ;yBACb,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU;0BAChB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY;uBACtB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS;uBAChB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS;yBACd,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW;qBACtB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,mBAAmB,EAAE;qBAC5B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,mBAAmB,EAAE;oBAC7B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,kBAAkB,EAAE;;;;;YAKnC,OAAO,CAAC;QACR,QAAQ,EAAE,qBAAqB;QAC/B,MAAM,EAAE,gBAAgB;KACzB,CAAC;;;;GAIT,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAkC,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"textarea.template.js","sourceRoot":"","sources":["../../../src/textarea/textarea.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAGvF;;;;GAIG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,IAAI,CAAG;;eAED,GAAG,CAAC,SAAS,CAAC;6BACA,OAAO,CAAC,mBAAmB,CAAC;;;;YAI7C,GAAG,CAAC,WAAW,CAAC;;;;uBAIL,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ;uBACf,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ;uBACf,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ;yBACb,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU;0BAChB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY;uBACtB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS;uBAChB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS;yBACd,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW;qBACtB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,mBAAmB,EAAE;qBAC5B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,mBAAmB,EAAE;oBAC7B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,kBAAkB,EAAE;;;;gBAI/B,OAAO,CAAC,qBAAqB,CAAC;;;GAG3C,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAkC,gBAAgB,EAAE,CAAC"}
@@ -2084,6 +2084,7 @@ export declare class BaseDropdown extends FASTElement {
2084
2084
  * @public
2085
2085
  */
2086
2086
  export declare class BaseField extends FASTElement {
2087
+ private slottedInputObserver;
2087
2088
  /**
2088
2089
  * The slotted label elements.
2089
2090
  *
@@ -2614,6 +2615,7 @@ export declare class BaseTextArea extends FASTElement {
2614
2615
  */
2615
2616
  defaultSlottedNodes: Node[];
2616
2617
  protected defaultSlottedNodesChanged(): void;
2618
+ private filteredLabelSlottedNodes;
2617
2619
  /**
2618
2620
  * The list of nodes that are assigned to the `label` slot.
2619
2621
  * @internal
@@ -6214,6 +6216,9 @@ export declare class Dialog extends FASTElement {
6214
6216
  * The type of the dialog modal
6215
6217
  */
6216
6218
  type: DialogType;
6219
+ protected typeChanged(prev: DialogType | undefined, next: DialogType | undefined): void;
6220
+ /** @internal */
6221
+ connectedCallback(): void;
6217
6222
  /**
6218
6223
  * @public
6219
6224
  * Method to emit an event before the dialog's open state changes
@@ -6466,6 +6471,7 @@ export declare const DividerTemplate: ElementViewTemplate<Divider>;
6466
6471
  * @method show - Method to show the drawer.
6467
6472
  * @method hide - Method to hide the drawer.
6468
6473
  * @method clickHandler - Handles click events on the drawer.
6474
+ * @method cancelHandler - Handles cancel events on the drawer.
6469
6475
  * @method emitToggle - Emits an event after the dialog's open state changes.
6470
6476
  * @method emitBeforeToggle - Emits an event before the dialog's open state changes.
6471
6477
  *
@@ -6474,12 +6480,14 @@ export declare const DividerTemplate: ElementViewTemplate<Divider>;
6474
6480
  * @tag fluent-drawer
6475
6481
  */
6476
6482
  export declare class Drawer extends FASTElement {
6483
+ protected roleAttrObserver: MutationObserver;
6477
6484
  /**
6478
6485
  * @public
6479
6486
  * Determines whether the drawer should be displayed as modal or non-modal
6480
6487
  * When rendered as a modal, an overlay is applied over the rest of the view.
6481
6488
  */
6482
6489
  type: DrawerType;
6490
+ protected typeChanged(): void;
6483
6491
  /**
6484
6492
  * @public
6485
6493
  * The ID of the element that labels the drawer.
@@ -6507,6 +6515,10 @@ export declare class Drawer extends FASTElement {
6507
6515
  * The dialog element.
6508
6516
  */
6509
6517
  dialog: HTMLDialogElement;
6518
+ /** @internal */
6519
+ connectedCallback(): void;
6520
+ /** @internal */
6521
+ disconnectedCallback(): void;
6510
6522
  /**
6511
6523
  * @public
6512
6524
  * Method to emit an event after the dialog's open state changes
@@ -6536,6 +6548,13 @@ export declare class Drawer extends FASTElement {
6536
6548
  * Handles click events on the drawer.
6537
6549
  */
6538
6550
  clickHandler(event: Event): boolean;
6551
+ /**
6552
+ * @public
6553
+ * Handles cancel events on the drawer.
6554
+ */
6555
+ cancelHandler(): void;
6556
+ protected observeRoleAttr(): void;
6557
+ protected updateDialogRole(): void;
6539
6558
  }
6540
6559
 
6541
6560
  /**
@@ -6719,6 +6719,26 @@ class Dialog extends FASTElement {
6719
6719
  });
6720
6720
  };
6721
6721
  }
6722
+ typeChanged(prev, next) {
6723
+ if (!this.dialog) {
6724
+ return;
6725
+ }
6726
+ if (next === DialogType.alert) {
6727
+ this.dialog.setAttribute("role", "alertdialog");
6728
+ } else {
6729
+ this.dialog.removeAttribute("role");
6730
+ }
6731
+ if (next !== DialogType.nonModal) {
6732
+ this.dialog.setAttribute("aria-modal", "true");
6733
+ } else {
6734
+ this.dialog.removeAttribute("aria-modal");
6735
+ }
6736
+ }
6737
+ /** @internal */
6738
+ connectedCallback() {
6739
+ super.connectedCallback();
6740
+ this.typeChanged(void 0, this.type);
6741
+ }
6722
6742
  /**
6723
6743
  * @public
6724
6744
  * Method to show the dialog
@@ -6765,7 +6785,7 @@ __decorateClass$D([attr({
6765
6785
  })], Dialog.prototype, "ariaLabelledby", 2);
6766
6786
  __decorateClass$D([attr], Dialog.prototype, "type", 2);
6767
6787
 
6768
- const template$y = 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 => x.hide()}" ${ref("dialog")}><slot></slot></dialog>`;
6788
+ const template$y = html`<dialog class="dialog" part="dialog" aria-describedby="${x => x.ariaDescribedby}" aria-labelledby="${x => x.ariaLabelledby}" aria-label="${x => x.ariaLabel}" @click="${(x, c) => x.clickHandler(c.event)}" @cancel="${x => x.hide()}" ${ref("dialog")}><slot></slot></dialog>`;
6769
6789
 
6770
6790
  const styles$x = css`
6771
6791
  @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:100vh;padding:0;width:100%;max-width:600px}:host([type='non-modal']) dialog{inset:0;position:fixed;z-index:2;overflow:auto}@supports (max-height:1dvh){dialog{max-height:100dvh}}}@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`
@@ -6968,6 +6988,28 @@ class Drawer extends FASTElement {
6968
6988
  });
6969
6989
  };
6970
6990
  }
6991
+ typeChanged() {
6992
+ if (!this.dialog) {
6993
+ return;
6994
+ }
6995
+ this.updateDialogRole();
6996
+ if (this.type === DrawerType.modal) {
6997
+ this.dialog.setAttribute("aria-modal", "true");
6998
+ } else {
6999
+ this.dialog.removeAttribute("aria-modal");
7000
+ }
7001
+ }
7002
+ /** @internal */
7003
+ connectedCallback() {
7004
+ super.connectedCallback();
7005
+ this.typeChanged();
7006
+ this.observeRoleAttr();
7007
+ }
7008
+ /** @internal */
7009
+ disconnectedCallback() {
7010
+ super.disconnectedCallback();
7011
+ this.roleAttrObserver.disconnect();
7012
+ }
6971
7013
  /**
6972
7014
  * @public
6973
7015
  * Method to show the drawer
@@ -7005,6 +7047,32 @@ class Drawer extends FASTElement {
7005
7047
  }
7006
7048
  return true;
7007
7049
  }
7050
+ /**
7051
+ * @public
7052
+ * Handles cancel events on the drawer.
7053
+ */
7054
+ cancelHandler() {
7055
+ this.hide();
7056
+ }
7057
+ observeRoleAttr() {
7058
+ if (this.roleAttrObserver) {
7059
+ return;
7060
+ }
7061
+ this.roleAttrObserver = new MutationObserver(() => {
7062
+ this.updateDialogRole();
7063
+ });
7064
+ this.roleAttrObserver.observe(this, {
7065
+ attributes: true,
7066
+ attributeFilter: ["role"]
7067
+ });
7068
+ }
7069
+ updateDialogRole() {
7070
+ console.log(this.role);
7071
+ if (!this.dialog) {
7072
+ return;
7073
+ }
7074
+ this.dialog.role = this.type === DrawerType.modal ? "dialog" : this.role;
7075
+ }
7008
7076
  }
7009
7077
  __decorateClass$A([attr], Drawer.prototype, "type", 2);
7010
7078
  __decorateClass$A([attr({
@@ -7025,7 +7093,7 @@ const styles$u = css`
7025
7093
  :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}}}`;
7026
7094
 
7027
7095
  function drawerTemplate() {
7028
- 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>`;
7096
+ return html`<dialog class="dialog" part="dialog" aria-describedby="${x => x.ariaDescribedby}" aria-labelledby="${x => x.ariaLabelledby}" aria-label="${x => x.ariaLabel}" size="${x => x.size}" position="${x => x.position}" @click="${(x, c) => x.clickHandler(c.event)}" @cancel="${x => x.cancelHandler()}" ${ref("dialog")}><slot></slot></dialog>`;
7029
7097
  }
7030
7098
  const template$v = drawerTemplate();
7031
7099
 
@@ -7977,9 +8045,9 @@ class BaseField extends FASTElement {
7977
8045
  * @internal
7978
8046
  */
7979
8047
  slottedInputsChanged(prev, next) {
7980
- if (next?.length) {
7981
- this.input = next?.[0];
7982
- this.setStates();
8048
+ const filtered = next?.filter(node => node.nodeType === Node.ELEMENT_NODE) ?? [];
8049
+ if (filtered?.length) {
8050
+ this.input = filtered?.[0];
7983
8051
  }
7984
8052
  }
7985
8053
  /**
@@ -7992,6 +8060,11 @@ class BaseField extends FASTElement {
7992
8060
  if (next) {
7993
8061
  this.setStates();
7994
8062
  this.setLabelProperties();
8063
+ this.slottedInputObserver.observe(this.input, {
8064
+ attributes: true,
8065
+ attributeFilter: ["disabled", "required", "readonly"],
8066
+ subtree: true
8067
+ });
7995
8068
  }
7996
8069
  }
7997
8070
  /**
@@ -8022,8 +8095,12 @@ class BaseField extends FASTElement {
8022
8095
  this.addEventListener("invalid", this.invalidHandler, {
8023
8096
  capture: true
8024
8097
  });
8098
+ this.slottedInputObserver = new MutationObserver(() => {
8099
+ this.setStates();
8100
+ });
8025
8101
  }
8026
8102
  disconnectedCallback() {
8103
+ this.slottedInputObserver.disconnect();
8027
8104
  this.removeEventListener("invalid", this.invalidHandler, {
8028
8105
  capture: true
8029
8106
  });
@@ -8095,7 +8172,7 @@ class BaseField extends FASTElement {
8095
8172
  }
8096
8173
  }
8097
8174
  setValidationStates() {
8098
- if (!this.input.validity) {
8175
+ if (!this.input?.validity) {
8099
8176
  return;
8100
8177
  }
8101
8178
  for (const [flag, value] of Object.entries(ValidationFlags)) {
@@ -8131,14 +8208,7 @@ const styles$r = css`
8131
8208
 
8132
8209
  :host{color:${colorNeutralForeground1};align-items:center;gap:0 ${spacingHorizontalM};justify-items:start}: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(${requiredState}) ::slotted([slot='label'])::after{content:'*' / '';color:${colorPaletteRedForeground1};margin-inline-start:${spacingHorizontalXS}}::slotted([slot='input']){grid-area:input}::slotted([slot='message']){color:${colorNeutralForeground3};font-family:${fontFamilyBase};font-size:${fontSizeBase200};font-weight:${fontWeightRegular};grid-area:message;line-height:${lineHeightBase200};margin-block-start:${spacingVerticalXXS}}: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};justify-self:stretch;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}`;
8133
8210
 
8134
- const template$s = 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({
8135
- property: "slottedInputs",
8136
- attributes: true,
8137
- attributeFilter: ["disabled", "required", "readonly"],
8138
- subtree: true,
8139
- selector: '[slot="input"]',
8140
- filter: elements()
8141
- })}><slot name="label" part="label" ${slotted("labelSlot")}></slot><slot name="input" part="input"></slot><slot name="message" part="message" ${slotted({
8211
+ const template$s = 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)}"><slot name="label" part="label" ${slotted("labelSlot")}></slot><slot name="input" part="input" ${slotted("slottedInputs")}></slot><slot name="message" part="message" ${slotted({
8142
8212
  property: "messageSlot",
8143
8213
  filter: elements("[flag]")
8144
8214
  })}></slot></template>`;
@@ -11062,7 +11132,7 @@ const styles$d = css`
11062
11132
  .track:hover,.track:active,.track{background:WindowText}.thumb:hover,.thumb:active,.thumb{background:ButtonText}:host(:hover) .track::before,:host(:active) .track::before,.track::before{background:Highlight}`));
11063
11133
 
11064
11134
  function sliderTemplate(options = {}) {
11065
- return html`<template tabindex="${x => x.disabled ? null : 0}" @pointerdown="${(x, c) => x.handlePointerDown(c.event)}" @keydown="${(x, c) => x.handleKeydown(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>`;
11135
+ return html`<template @pointerdown="${(x, c) => x.handlePointerDown(c.event)}" @keydown="${(x, c) => x.handleKeydown(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>`;
11066
11136
  }
11067
11137
  const template$d = sliderTemplate({
11068
11138
  thumb: `<div class="thumb"></div>`
@@ -12104,6 +12174,8 @@ class BaseTextArea extends FASTElement {
12104
12174
  * @internal
12105
12175
  */
12106
12176
  this.elementInternals = this.attachInternals();
12177
+ this.filteredLabelSlottedNodes = [];
12178
+ this.labelSlottedNodes = [];
12107
12179
  this.userInteracted = false;
12108
12180
  this.preConnectControlEl = document.createElement("textarea");
12109
12181
  this.autoResize = false;
@@ -12120,10 +12192,11 @@ class BaseTextArea extends FASTElement {
12120
12192
  this.value = next;
12121
12193
  }
12122
12194
  labelSlottedNodesChanged() {
12195
+ this.filteredLabelSlottedNodes = this.labelSlottedNodes.filter(whitespaceFilter);
12123
12196
  if (this.labelEl) {
12124
- this.labelEl.hidden = !this.labelSlottedNodes.length;
12197
+ this.labelEl.hidden = !this.filteredLabelSlottedNodes.length;
12125
12198
  }
12126
- this.labelSlottedNodes.forEach(node => {
12199
+ this.filteredLabelSlottedNodes.forEach(node => {
12127
12200
  node.disabled = this.disabled;
12128
12201
  node.required = this.required;
12129
12202
  });
@@ -12157,8 +12230,8 @@ class BaseTextArea extends FASTElement {
12157
12230
  }
12158
12231
  requiredChanged() {
12159
12232
  this.elementInternals.ariaRequired = `${!!this.required}`;
12160
- if (this.labelSlottedNodes?.length) {
12161
- this.labelSlottedNodes.forEach(node => node.required = this.required);
12233
+ if (this.filteredLabelSlottedNodes?.length) {
12234
+ this.filteredLabelSlottedNodes.forEach(node => node.required = this.required);
12162
12235
  }
12163
12236
  }
12164
12237
  resizeChanged(prev, next) {
@@ -12393,8 +12466,8 @@ class BaseTextArea extends FASTElement {
12393
12466
  if (this.controlEl) {
12394
12467
  this.controlEl.disabled = disabled;
12395
12468
  }
12396
- if (this.labelSlottedNodes?.length) {
12397
- this.labelSlottedNodes.forEach(node => node.disabled = this.disabled);
12469
+ if (this.filteredLabelSlottedNodes?.length) {
12470
+ this.filteredLabelSlottedNodes.forEach(node => node.disabled = this.disabled);
12398
12471
  }
12399
12472
  }
12400
12473
  toggleUserValidityState() {
@@ -12567,13 +12640,7 @@ const styles$6 = css`
12567
12640
  :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}`));
12568
12641
 
12569
12642
  function textAreaTemplate() {
12570
- return html`<template><label ${ref("labelEl")} for="control" part="label"><slot name="label" ${slotted({
12571
- property: "labelSlottedNodes",
12572
- filter: whitespaceFilter
12573
- })}></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({
12574
- property: "defaultSlottedNodes",
12575
- filter: whitespaceFilter
12576
- })}></slot></div></template>`;
12643
+ return html`<template><label ${ref("labelEl")} for="control" part="label"><slot name="label" ${slotted("labelSlottedNodes")}></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("defaultSlottedNodes")}></slot></div></template>`;
12577
12644
  }
12578
12645
  const template$6 = textAreaTemplate();
12579
12646