@ni/spright-components 4.3.3 → 4.3.5

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.
@@ -16323,7 +16323,7 @@
16323
16323
 
16324
16324
  const template$P = html `<slot></slot>`;
16325
16325
 
16326
- const styles$11 = css `
16326
+ const styles$12 = css `
16327
16327
  ${display$1('contents')}
16328
16328
  `;
16329
16329
 
@@ -16438,7 +16438,7 @@
16438
16438
  ], ThemeProvider.prototype, "theme", void 0);
16439
16439
  const nimbleDesignSystemProvider = ThemeProvider.compose({
16440
16440
  baseName: 'theme-provider',
16441
- styles: styles$11,
16441
+ styles: styles$12,
16442
16442
  template: template$P
16443
16443
  });
16444
16444
  DesignSystem.getOrCreate()
@@ -16663,7 +16663,7 @@
16663
16663
  }
16664
16664
  }
16665
16665
 
16666
- const styles$10 = css `
16666
+ const styles$11 = css `
16667
16667
  @layer base, hover, focusVisible, active, disabled;
16668
16668
 
16669
16669
  @layer base {
@@ -16846,7 +16846,7 @@
16846
16846
  baseName: 'anchor',
16847
16847
  baseClass: Anchor$1,
16848
16848
  template: template$O,
16849
- styles: styles$10,
16849
+ styles: styles$11,
16850
16850
  shadowOptions: {
16851
16851
  delegatesFocus: true
16852
16852
  }
@@ -16958,7 +16958,7 @@
16958
16958
  padding: 0;
16959
16959
  `;
16960
16960
 
16961
- const styles$$ = css `
16961
+ const styles$10 = css `
16962
16962
  @layer base, checked, hover, focusVisible, active, disabled, top;
16963
16963
 
16964
16964
  @layer base {
@@ -17242,8 +17242,8 @@
17242
17242
  }
17243
17243
  `));
17244
17244
 
17245
- const styles$_ = css `
17246
- ${styles$$}
17245
+ const styles$$ = css `
17246
+ ${styles$10}
17247
17247
  ${buttonAppearanceVariantStyles}
17248
17248
 
17249
17249
  .control {
@@ -17346,7 +17346,7 @@
17346
17346
  const nimbleAnchorButton = AnchorButton.compose({
17347
17347
  baseName: 'anchor-button',
17348
17348
  template: template$N,
17349
- styles: styles$_,
17349
+ styles: styles$$,
17350
17350
  shadowOptions: {
17351
17351
  delegatesFocus: true
17352
17352
  }
@@ -17354,7 +17354,7 @@
17354
17354
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorButton());
17355
17355
  const anchorButtonTag = 'nimble-anchor-button';
17356
17356
 
17357
- const styles$Z = css `
17357
+ const styles$_ = css `
17358
17358
  ${display$1('grid')}
17359
17359
 
17360
17360
  :host {
@@ -17539,7 +17539,7 @@
17539
17539
  const nimbleAnchorMenuItem = AnchorMenuItem.compose({
17540
17540
  baseName: 'anchor-menu-item',
17541
17541
  template: template$M,
17542
- styles: styles$Z,
17542
+ styles: styles$_,
17543
17543
  shadowOptions: {
17544
17544
  delegatesFocus: true
17545
17545
  }
@@ -17549,7 +17549,7 @@
17549
17549
  .register(nimbleAnchorMenuItem());
17550
17550
  const anchorMenuItemTag = 'nimble-anchor-menu-item';
17551
17551
 
17552
- const styles$Y = css `
17552
+ const styles$Z = css `
17553
17553
  ${display$1('inline-flex')}
17554
17554
 
17555
17555
  :host {
@@ -17719,14 +17719,14 @@
17719
17719
  const nimbleAnchorTab = AnchorTab.compose({
17720
17720
  baseName: 'anchor-tab',
17721
17721
  template: template$L,
17722
- styles: styles$Y,
17722
+ styles: styles$Z,
17723
17723
  shadowOptions: {
17724
17724
  delegatesFocus: true
17725
17725
  }
17726
17726
  });
17727
17727
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTab());
17728
17728
 
17729
- const styles$X = css `
17729
+ const styles$Y = css `
17730
17730
  ${display$1('flex')}
17731
17731
 
17732
17732
  :host {
@@ -17766,8 +17766,8 @@
17766
17766
  }
17767
17767
  `;
17768
17768
 
17769
- const styles$W = css `
17770
- ${styles$$}
17769
+ const styles$X = css `
17770
+ ${styles$10}
17771
17771
  ${buttonAppearanceVariantStyles}
17772
17772
  `;
17773
17773
 
@@ -17863,7 +17863,7 @@
17863
17863
  baseName: 'button',
17864
17864
  baseClass: Button$1,
17865
17865
  template: template$K,
17866
- styles: styles$W,
17866
+ styles: styles$X,
17867
17867
  shadowOptions: {
17868
17868
  delegatesFocus: true
17869
17869
  }
@@ -18717,7 +18717,7 @@
18717
18717
  -webkit-user-select: none;
18718
18718
  `;
18719
18719
 
18720
- const styles$V = css `
18720
+ const styles$W = css `
18721
18721
  ${display$1('inline-flex')}
18722
18722
 
18723
18723
  :host {
@@ -18728,8 +18728,7 @@
18728
18728
  }
18729
18729
 
18730
18730
  .icon {
18731
- width: 100%;
18732
- height: 100%;
18731
+ display: contents;
18733
18732
  }
18734
18733
 
18735
18734
  :host([severity='error']) {
@@ -18749,6 +18748,7 @@
18749
18748
  }
18750
18749
 
18751
18750
  .icon svg {
18751
+ display: inline-flex;
18752
18752
  fill: ${iconColor};
18753
18753
  width: 100%;
18754
18754
  height: 100%;
@@ -18771,7 +18771,7 @@
18771
18771
  const composedIcon = iconClass.compose({
18772
18772
  baseName,
18773
18773
  template: template$J,
18774
- styles: styles$V
18774
+ styles: styles$W
18775
18775
  });
18776
18776
  DesignSystem.getOrCreate().withPrefix('nimble').register(composedIcon());
18777
18777
  };
@@ -19162,14 +19162,14 @@
19162
19162
  const nimbleAnchorTabs = AnchorTabs.compose({
19163
19163
  baseName: 'anchor-tabs',
19164
19164
  template: template$I,
19165
- styles: styles$X,
19165
+ styles: styles$Y,
19166
19166
  shadowOptions: {
19167
19167
  delegatesFocus: false
19168
19168
  }
19169
19169
  });
19170
19170
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTabs());
19171
19171
 
19172
- const styles$U = css `
19172
+ const styles$V = css `
19173
19173
  ${display$1('block')}
19174
19174
 
19175
19175
  :host {
@@ -19412,7 +19412,7 @@
19412
19412
  const nimbleAnchorTreeItem = AnchorTreeItem.compose({
19413
19413
  baseName: 'anchor-tree-item',
19414
19414
  template: template$H,
19415
- styles: styles$U,
19415
+ styles: styles$V,
19416
19416
  shadowOptions: {
19417
19417
  delegatesFocus: true
19418
19418
  }
@@ -19428,7 +19428,7 @@
19428
19428
  zIndex1000: '1000'
19429
19429
  };
19430
19430
 
19431
- const styles$T = css `
19431
+ const styles$U = css `
19432
19432
  ${display$1('block')}
19433
19433
 
19434
19434
  :host {
@@ -19459,7 +19459,7 @@
19459
19459
  baseName: 'anchored-region',
19460
19460
  baseClass: AnchoredRegion$1,
19461
19461
  template: anchoredRegionTemplate,
19462
- styles: styles$T
19462
+ styles: styles$U
19463
19463
  });
19464
19464
  DesignSystem.getOrCreate()
19465
19465
  .withPrefix('nimble')
@@ -19540,7 +19540,7 @@
19540
19540
  const themeBehavior = (theme, styles) => new ThemeStyleSheetBehavior(theme, styles);
19541
19541
  /* eslint-enable max-classes-per-file */
19542
19542
 
19543
- const styles$S = css `
19543
+ const styles$T = css `
19544
19544
  ${display$1('flex')}
19545
19545
 
19546
19546
  :host {
@@ -19838,11 +19838,11 @@
19838
19838
  const nimbleBanner = Banner.compose({
19839
19839
  baseName: 'banner',
19840
19840
  template: template$G,
19841
- styles: styles$S
19841
+ styles: styles$T
19842
19842
  });
19843
19843
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBanner());
19844
19844
 
19845
- const styles$R = css `
19845
+ const styles$S = css `
19846
19846
  ${display$1('inline-block')}
19847
19847
 
19848
19848
  .list {
@@ -19872,11 +19872,11 @@
19872
19872
  baseName: 'breadcrumb',
19873
19873
  baseClass: Breadcrumb$1,
19874
19874
  template: breadcrumbTemplate,
19875
- styles: styles$R
19875
+ styles: styles$S
19876
19876
  });
19877
19877
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBreadcrumb());
19878
19878
 
19879
- const styles$Q = css `
19879
+ const styles$R = css `
19880
19880
  @layer base, hover, focusVisible, active, disabled;
19881
19881
 
19882
19882
  @layer base {
@@ -19973,14 +19973,14 @@ so this becomes the fallback color for the slot */ ''}
19973
19973
  baseName: 'breadcrumb-item',
19974
19974
  baseClass: BreadcrumbItem$1,
19975
19975
  template: breadcrumbItemTemplate,
19976
- styles: styles$Q,
19976
+ styles: styles$R,
19977
19977
  separator: forwardSlash16X16.data
19978
19978
  });
19979
19979
  DesignSystem.getOrCreate()
19980
19980
  .withPrefix('nimble')
19981
19981
  .register(nimbleBreadcrumbItem());
19982
19982
 
19983
- const styles$P = css `
19983
+ const styles$Q = css `
19984
19984
  ${display$1('flex')}
19985
19985
 
19986
19986
  :host {
@@ -20020,11 +20020,11 @@ so this becomes the fallback color for the slot */ ''}
20020
20020
  baseName: 'card',
20021
20021
  baseClass: Card$1,
20022
20022
  template: template$F,
20023
- styles: styles$P
20023
+ styles: styles$Q
20024
20024
  });
20025
20025
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCard());
20026
20026
 
20027
- const styles$O = css `
20027
+ const styles$P = css `
20028
20028
  ${display$1('inline-flex')}
20029
20029
 
20030
20030
  :host {
@@ -20182,14 +20182,14 @@ so this becomes the fallback color for the slot */ ''}
20182
20182
  const nimbleCardButton = CardButton.compose({
20183
20183
  baseName: 'card-button',
20184
20184
  template: buttonTemplate,
20185
- styles: styles$O,
20185
+ styles: styles$P,
20186
20186
  shadowOptions: {
20187
20187
  delegatesFocus: true
20188
20188
  }
20189
20189
  });
20190
20190
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCardButton());
20191
20191
 
20192
- const styles$N = css `
20192
+ const styles$O = css `
20193
20193
  .error-icon {
20194
20194
  display: none;
20195
20195
  }
@@ -20223,9 +20223,9 @@ so this becomes the fallback color for the slot */ ''}
20223
20223
  }
20224
20224
  `;
20225
20225
 
20226
- const styles$M = css `
20226
+ const styles$N = css `
20227
20227
  ${display$1('inline-grid')}
20228
- ${styles$N}
20228
+ ${styles$O}
20229
20229
 
20230
20230
  :host {
20231
20231
  font: ${bodyFont};
@@ -20505,15 +20505,15 @@ so this becomes the fallback color for the slot */ ''}
20505
20505
  baseName: 'checkbox',
20506
20506
  baseClass: Checkbox$1,
20507
20507
  template: template$E,
20508
- styles: styles$M,
20508
+ styles: styles$N,
20509
20509
  checkedIndicator: check16X16.data,
20510
20510
  indeterminateIndicator: minus16X16.data
20511
20511
  });
20512
20512
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCheckbox());
20513
20513
  const checkboxTag = 'nimble-checkbox';
20514
20514
 
20515
- const styles$L = css `
20516
- ${styles$$}
20515
+ const styles$M = css `
20516
+ ${styles$10}
20517
20517
  ${buttonAppearanceVariantStyles}
20518
20518
 
20519
20519
  @layer checked {
@@ -20659,7 +20659,7 @@ so this becomes the fallback color for the slot */ ''}
20659
20659
  const nimbleToggleButton = ToggleButton.compose({
20660
20660
  baseName: 'toggle-button',
20661
20661
  template: template$D,
20662
- styles: styles$L,
20662
+ styles: styles$M,
20663
20663
  shadowOptions: {
20664
20664
  delegatesFocus: true
20665
20665
  }
@@ -20691,7 +20691,7 @@ so this becomes the fallback color for the slot */ ''}
20691
20691
  };
20692
20692
 
20693
20693
  // prettier-ignore
20694
- const styles$K = css `
20694
+ const styles$L = css `
20695
20695
  ${display$1('inline-flex')}
20696
20696
 
20697
20697
  :host {
@@ -20960,6 +20960,21 @@ so this becomes the fallback color for the slot */ ''}
20960
20960
  }
20961
20961
  `));
20962
20962
 
20963
+ const styles$K = css `
20964
+ .annotated-label {
20965
+ display: flex;
20966
+ flex-direction: row;
20967
+ }
20968
+
20969
+ .required-icon {
20970
+ flex: none;
20971
+ width: 5px;
20972
+ height: 5px;
20973
+ margin-top: 3px;
20974
+ margin-left: ${smallPadding};
20975
+ }
20976
+ `;
20977
+
20963
20978
  /**
20964
20979
  * Types of dropdown appearance.
20965
20980
  * @public
@@ -20975,8 +20990,9 @@ so this becomes the fallback color for the slot */ ''}
20975
20990
  };
20976
20991
 
20977
20992
  const styles$J = css `
20993
+ ${styles$L}
20994
+ ${styles$O}
20978
20995
  ${styles$K}
20979
- ${styles$N}
20980
20996
 
20981
20997
  :host {
20982
20998
  --ni-private-hover-bottom-border-width: 2px;
@@ -21052,6 +21068,42 @@ so this becomes the fallback color for the slot */ ''}
21052
21068
  }
21053
21069
  `));
21054
21070
 
21071
+ // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
21072
+ // See generation source in nimble-components/build/generate-icons
21073
+ /**
21074
+ * The icon component for the 'asterisk' icon
21075
+ */
21076
+ class IconAsterisk extends Icon {
21077
+ constructor() {
21078
+ super(asterisk5X5);
21079
+ }
21080
+ }
21081
+ registerIcon('icon-asterisk', IconAsterisk);
21082
+ const iconAsteriskTag = 'nimble-icon-asterisk';
21083
+
21084
+ /**
21085
+ * Given the template for a control label, creates a new template that includes
21086
+ * an icon next to the label to indicate whether or not the control is required.
21087
+ *
21088
+ * This function is intended to be used with components leveraging `mixinRequiredVisiblePattern`.
21089
+ */
21090
+ /* eslint-disable @typescript-eslint/indent */
21091
+ function createRequiredVisibleLabelTemplate(labelTemplate) {
21092
+ return html `
21093
+ <div class="annotated-label">
21094
+ ${labelTemplate}
21095
+ ${when(x => x.requiredVisible, html `
21096
+ <${iconAsteriskTag} class="required-icon" severity="error"></${iconAsteriskTag}>
21097
+ `)}
21098
+ </div>
21099
+ `;
21100
+ }
21101
+
21102
+ const labelTemplate$5 = createRequiredVisibleLabelTemplate(html `
21103
+ <label part="label" class="label">
21104
+ <slot></slot>
21105
+ </label>
21106
+ `);
21055
21107
  /* eslint-disable @typescript-eslint/indent */
21056
21108
  // prettier-ignore
21057
21109
  const template$C = (context, definition) => html `
@@ -21065,9 +21117,7 @@ so this becomes the fallback color for the slot */ ''}
21065
21117
  @focusout="${(x, c) => x.focusoutHandler(c.event)}"
21066
21118
  @keydown="${(x, c) => x.keydownHandler(c.event)}"
21067
21119
  >
21068
- <label part="label" class="label">
21069
- <slot></slot>
21070
- </label>
21120
+ ${labelTemplate$5}
21071
21121
  <div class="control" part="control" ${ref('controlWrapper')}>
21072
21122
  ${startSlotTemplate(context, definition)}
21073
21123
  <slot name="control">
@@ -21077,6 +21127,7 @@ so this becomes the fallback color for the slot */ ''}
21077
21127
  aria-controls="${x => x.ariaControls}"
21078
21128
  aria-disabled="${x => x.ariaDisabled}"
21079
21129
  aria-expanded="${x => x.ariaExpanded}"
21130
+ aria-required="${x => x.requiredVisible}"
21080
21131
  aria-haspopup="listbox"
21081
21132
  class="selected-value"
21082
21133
  part="selected-value"
@@ -21158,10 +21209,30 @@ so this becomes the fallback color for the slot */ ''}
21158
21209
  }
21159
21210
  }
21160
21211
 
21212
+ // As the returned class is internal to the function, we can't write a signature that uses is directly, so rely on inference
21213
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type
21214
+ function mixinRequiredVisiblePattern(base) {
21215
+ /**
21216
+ * The Mixin that provides the requiredVisible property and required-visible attribute
21217
+ * to a component.
21218
+ */
21219
+ class RequiredVisibleElement extends base {
21220
+ constructor() {
21221
+ super(...arguments);
21222
+ /*
21223
+ * Show the required appearance of the control
21224
+ */
21225
+ this.requiredVisible = false;
21226
+ }
21227
+ }
21228
+ attr({ attribute: 'required-visible', mode: 'boolean' })(RequiredVisibleElement.prototype, 'requiredVisible');
21229
+ return RequiredVisibleElement;
21230
+ }
21231
+
21161
21232
  /**
21162
21233
  * A nimble-styed HTML combobox
21163
21234
  */
21164
- class Combobox extends mixinErrorPattern(FormAssociatedCombobox) {
21235
+ class Combobox extends mixinErrorPattern(mixinRequiredVisiblePattern(FormAssociatedCombobox)) {
21165
21236
  constructor() {
21166
21237
  super(...arguments);
21167
21238
  this.appearance = DropdownAppearance.underline;
@@ -22664,18 +22735,6 @@ so this becomes the fallback color for the slot */ ''}
22664
22735
  }
22665
22736
  registerIcon('icon-arrows-repeat', IconArrowsRepeat);
22666
22737
 
22667
- // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
22668
- // See generation source in nimble-components/build/generate-icons
22669
- /**
22670
- * The icon component for the 'asterisk' icon
22671
- */
22672
- class IconAsterisk extends Icon {
22673
- constructor() {
22674
- super(asterisk5X5);
22675
- }
22676
- }
22677
- registerIcon('icon-asterisk', IconAsterisk);
22678
-
22679
22738
  // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
22680
22739
  // See generation source in nimble-components/build/generate-icons
22681
22740
  /**
@@ -26435,7 +26494,8 @@ so this becomes the fallback color for the slot */ ''}
26435
26494
 
26436
26495
  const styles$z = css `
26437
26496
  ${display$1('inline-block')}
26438
- ${styles$N}
26497
+ ${styles$O}
26498
+ ${styles$K}
26439
26499
 
26440
26500
  :host {
26441
26501
  font: ${bodyFont};
@@ -26623,21 +26683,20 @@ so this becomes the fallback color for the slot */ ''}
26623
26683
  }
26624
26684
  `));
26625
26685
 
26686
+ const labelTemplate$4 = createRequiredVisibleLabelTemplate(html `<label
26687
+ part="label"
26688
+ for="control"
26689
+ class="${x => (x.defaultSlottedNodes?.length ? 'label' : 'label label__hidden')}"
26690
+ >
26691
+ <slot ${slotted('defaultSlottedNodes')}></slot>
26692
+ </label>`);
26626
26693
  /**
26627
26694
  * The template for the {@link @microsoft/fast-foundation#(NumberField:class)} component.
26628
26695
  * @public
26629
26696
  */
26630
26697
  const template$u = (context, definition) => html `
26631
26698
  <template class="${x => (x.readOnly ? 'readonly' : '')}">
26632
- <label
26633
- part="label"
26634
- for="control"
26635
- class="${x => (x.defaultSlottedNodes?.length
26636
- ? 'label'
26637
- : 'label label__hidden')}"
26638
- >
26639
- <slot ${slotted('defaultSlottedNodes')}></slot>
26640
- </label>
26699
+ ${labelTemplate$4}
26641
26700
  <div class="root" part="root">
26642
26701
  ${startSlotTemplate(context, definition)}
26643
26702
  <input
@@ -26681,6 +26740,7 @@ so this becomes the fallback color for the slot */ ''}
26681
26740
  aria-owns="${x => x.ariaOwns}"
26682
26741
  aria-relevant="${x => x.ariaRelevant}"
26683
26742
  aria-roledescription="${x => x.ariaRoledescription}"
26743
+ aria-required="${x => x.requiredVisible}"
26684
26744
  ${ref('control')}
26685
26745
  />
26686
26746
  ${when(x => !x.hideStep && !x.readOnly && !x.disabled, html `
@@ -26713,7 +26773,7 @@ so this becomes the fallback color for the slot */ ''}
26713
26773
  /**
26714
26774
  * A nimble-styled HTML number input
26715
26775
  */
26716
- class NumberField extends mixinErrorPattern(NumberField$1) {
26776
+ class NumberField extends mixinErrorPattern(mixinRequiredVisiblePattern(NumberField$1)) {
26717
26777
  constructor() {
26718
26778
  super(...arguments);
26719
26779
  this.appearance = NumberFieldAppearance.underline;
@@ -26889,7 +26949,8 @@ so this becomes the fallback color for the slot */ ''}
26889
26949
 
26890
26950
  const styles$x = css `
26891
26951
  ${display$1('inline-block')}
26892
- ${styles$N}
26952
+ ${styles$O}
26953
+ ${styles$K}
26893
26954
 
26894
26955
  .positioning-region {
26895
26956
  display: flex;
@@ -26907,7 +26968,7 @@ so this becomes the fallback color for the slot */ ''}
26907
26968
 
26908
26969
  .label-container {
26909
26970
  display: flex;
26910
- height: ${controlLabelFontLineHeight};
26971
+ min-height: ${controlLabelFontLineHeight};
26911
26972
  gap: ${smallPadding};
26912
26973
  margin-bottom: ${smallPadding};
26913
26974
  }
@@ -26927,18 +26988,20 @@ so this becomes the fallback color for the slot */ ''}
26927
26988
  }
26928
26989
  `;
26929
26990
 
26991
+ const labelTemplate$3 = createRequiredVisibleLabelTemplate(html `<slot name="label"></slot>`);
26930
26992
  /* eslint-disable @typescript-eslint/indent */
26931
26993
  const template$t = html `
26932
26994
  <template
26933
26995
  role="radiogroup"
26934
26996
  aria-disabled="${x => x.disabled}"
26935
26997
  aria-readonly="${x => x.readOnly}"
26998
+ aria-required="${x => x.requiredVisible}"
26936
26999
  @click="${(x, c) => x.clickHandler(c.event)}"
26937
27000
  @keydown="${(x, c) => x.keydownHandler(c.event)}"
26938
27001
  @focusout="${(x, c) => x.focusOutHandler(c.event)}"
26939
27002
  >
26940
27003
  <div class="label-container">
26941
- <slot name="label"></slot>
27004
+ ${labelTemplate$3}
26942
27005
  <${iconExclamationMarkTag}
26943
27006
  severity="error"
26944
27007
  class="error-icon"
@@ -26962,7 +27025,7 @@ so this becomes the fallback color for the slot */ ''}
26962
27025
  /**
26963
27026
  * A nimble-styled grouping element for radio buttons
26964
27027
  */
26965
- class RadioGroup extends mixinErrorPattern(RadioGroup$1) {
27028
+ class RadioGroup extends mixinErrorPattern(mixinRequiredVisiblePattern(RadioGroup$1)) {
26966
27029
  }
26967
27030
  const nimbleRadioGroup = RadioGroup.compose({
26968
27031
  baseName: 'radio-group',
@@ -45315,7 +45378,7 @@ img.ProseMirror-separator {
45315
45378
  }).withDefault(richTextLabelDefaults.richTextToggleNumberedListLabel);
45316
45379
 
45317
45380
  const styles$v = css `
45318
- ${styles$K}
45381
+ ${styles$L}
45319
45382
 
45320
45383
  :host {
45321
45384
  height: auto;
@@ -45736,7 +45799,7 @@ img.ProseMirror-separator {
45736
45799
 
45737
45800
  const styles$u = css `
45738
45801
  ${display$1('inline-flex')}
45739
- ${styles$N}
45802
+ ${styles$O}
45740
45803
 
45741
45804
  :host {
45742
45805
  font: ${bodyFont};
@@ -60563,8 +60626,9 @@ img.ProseMirror-separator {
60563
60626
  .register(nimbleRichTextViewer());
60564
60627
 
60565
60628
  const styles$s = css `
60629
+ ${styles$L}
60630
+ ${styles$O}
60566
60631
  ${styles$K}
60567
- ${styles$N}
60568
60632
 
60569
60633
  ${
60570
60634
  /* We are using flex `order` to define the visual ordering of the selected value,
@@ -60949,6 +61013,11 @@ img.ProseMirror-separator {
60949
61013
  const isListOptionGroup = (n) => {
60950
61014
  return n instanceof ListOptionGroup;
60951
61015
  };
61016
+ const labelTemplate$2 = createRequiredVisibleLabelTemplate(html `
61017
+ <label part="label" class="label" aria-hidden="true">
61018
+ <slot ${ref('labelSlot')}></slot>
61019
+ </label>
61020
+ `);
60952
61021
  /* eslint-disable @typescript-eslint/indent */
60953
61022
  // prettier-ignore
60954
61023
  const template$o = (context, definition) => html `
@@ -60966,6 +61035,7 @@ img.ProseMirror-separator {
60966
61035
  aria-haspopup="${x => (x.collapsible ? 'listbox' : null)}"
60967
61036
  aria-label="${x => x.labelContent}"
60968
61037
  aria-multiselectable="${x => x.ariaMultiSelectable}"
61038
+ aria-required="${x => x.requiredVisible}"
60969
61039
  ?open="${x => x.open}"
60970
61040
  role="combobox"
60971
61041
  tabindex="${x => (!x.disabled ? '0' : null)}"
@@ -60976,9 +61046,7 @@ img.ProseMirror-separator {
60976
61046
  @keydown="${(x, c) => x.keydownHandler(c.event)}"
60977
61047
  @mousedown="${(x, c) => x.mousedownHandler(c.event)}"
60978
61048
  >
60979
- <label part="label" class="label" aria-hidden="true">
60980
- <slot ${ref('labelSlot')}></slot>
60981
- </label>
61049
+ ${labelTemplate$2}
60982
61050
  ${when(x => x.collapsible, html `
60983
61051
  <div
60984
61052
  class="control"
@@ -61115,7 +61183,7 @@ img.ProseMirror-separator {
61115
61183
  /**
61116
61184
  * A nimble-styled HTML select.
61117
61185
  */
61118
- class Select extends mixinErrorPattern(FormAssociatedSelect) {
61186
+ class Select extends mixinErrorPattern(mixinRequiredVisiblePattern(FormAssociatedSelect)) {
61119
61187
  constructor() {
61120
61188
  super(...arguments);
61121
61189
  this.appearance = DropdownAppearance.underline;
@@ -74275,7 +74343,7 @@ focus outline in that case.
74275
74343
  .register(nimbleTableColumnText());
74276
74344
 
74277
74345
  const styles$9 = css `
74278
- ${styles$X}
74346
+ ${styles$Y}
74279
74347
 
74280
74348
  .tabpanel {
74281
74349
  overflow: auto;
@@ -74406,7 +74474,8 @@ focus outline in that case.
74406
74474
 
74407
74475
  const styles$7 = css `
74408
74476
  ${display$1('inline-flex')}
74409
- ${styles$N}
74477
+ ${styles$O}
74478
+ ${styles$K}
74410
74479
 
74411
74480
  :host {
74412
74481
  font: ${bodyFont};
@@ -74568,7 +74637,7 @@ focus outline in that case.
74568
74637
  }
74569
74638
  `));
74570
74639
 
74571
- const template$6 = () => html `
74640
+ const labelTemplate$1 = createRequiredVisibleLabelTemplate(html `
74572
74641
  <label
74573
74642
  part="label"
74574
74643
  for="control"
@@ -74576,6 +74645,9 @@ focus outline in that case.
74576
74645
  >
74577
74646
  <slot ${slotted('defaultSlottedNodes')}></slot>
74578
74647
  </label>
74648
+ `);
74649
+ const template$6 = () => html `
74650
+ ${labelTemplate$1}
74579
74651
  <div class="container">
74580
74652
  <textarea
74581
74653
  part="control"
@@ -74614,6 +74686,7 @@ focus outline in that case.
74614
74686
  aria-owns="${x => x.ariaOwns}"
74615
74687
  aria-relevant="${x => x.ariaRelevant}"
74616
74688
  aria-roledescription="${x => x.ariaRoledescription}"
74689
+ aria-required="${x => x.requiredVisible}"
74617
74690
  @input="${x => x.onTextAreaInput()}"
74618
74691
  @change="${x => x.handleChange()}"
74619
74692
  ${ref('control')}
@@ -74630,7 +74703,7 @@ focus outline in that case.
74630
74703
  /**
74631
74704
  * A nimble-styed HTML text area
74632
74705
  */
74633
- class TextArea extends mixinErrorPattern(TextArea$1) {
74706
+ class TextArea extends mixinErrorPattern(mixinRequiredVisiblePattern(TextArea$1)) {
74634
74707
  constructor() {
74635
74708
  super(...arguments);
74636
74709
  /**
@@ -74737,7 +74810,8 @@ focus outline in that case.
74737
74810
 
74738
74811
  const styles$6 = css `
74739
74812
  ${display$1('inline-block')}
74740
- ${styles$N}
74813
+ ${styles$O}
74814
+ ${styles$K}
74741
74815
 
74742
74816
  :host {
74743
74817
  font: ${bodyFont};
@@ -74974,6 +75048,18 @@ focus outline in that case.
74974
75048
  }
74975
75049
  `));
74976
75050
 
75051
+ const labelTemplate = createRequiredVisibleLabelTemplate(html `<label
75052
+ part="label"
75053
+ for="control"
75054
+ class="${x => (x.defaultSlottedNodes?.length ? 'label' : 'label label__hidden')}"
75055
+ >
75056
+ <slot
75057
+ ${slotted({
75058
+ property: 'defaultSlottedNodes',
75059
+ filter: whitespaceFilter
75060
+ })}
75061
+ ></slot>
75062
+ </label>`);
74977
75063
  /**
74978
75064
  * The template for the {@link @microsoft/fast-foundation#(TextField:class)} component.
74979
75065
  * @public
@@ -74984,20 +75070,7 @@ focus outline in that case.
74984
75070
  ${x => (x.readOnly ? 'readonly' : '')}
74985
75071
  "
74986
75072
  >
74987
- <label
74988
- part="label"
74989
- for="control"
74990
- class="${x => (x.defaultSlottedNodes?.length
74991
- ? 'label'
74992
- : 'label label__hidden')}"
74993
- >
74994
- <slot
74995
- ${slotted({
74996
- property: 'defaultSlottedNodes',
74997
- filter: whitespaceFilter
74998
- })}
74999
- ></slot>
75000
- </label>
75073
+ ${labelTemplate}
75001
75074
  <div class="root" part="root">
75002
75075
  ${startSlotTemplate(context, definition)}
75003
75076
  <input
@@ -75038,6 +75111,7 @@ focus outline in that case.
75038
75111
  aria-owns="${x => x.ariaOwns}"
75039
75112
  aria-relevant="${x => x.ariaRelevant}"
75040
75113
  aria-roledescription="${x => x.ariaRoledescription}"
75114
+ aria-required="${x => x.requiredVisible}"
75041
75115
  ${ref('control')}
75042
75116
  />
75043
75117
  ${endSlotTemplate(context, definition)}
@@ -75048,7 +75122,7 @@ focus outline in that case.
75048
75122
  /**
75049
75123
  * A nimble-styed HTML text input
75050
75124
  */
75051
- class TextField extends mixinErrorPattern(TextField$1) {
75125
+ class TextField extends mixinErrorPattern(mixinRequiredVisiblePattern(TextField$1)) {
75052
75126
  constructor() {
75053
75127
  super(...arguments);
75054
75128
  /**