@ni/spright-components 4.3.4 → 4.3.6

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.
@@ -21099,7 +21099,7 @@ so this becomes the fallback color for the slot */ ''}
21099
21099
  `;
21100
21100
  }
21101
21101
 
21102
- const labelTemplate$3 = createRequiredVisibleLabelTemplate(html `
21102
+ const labelTemplate$5 = createRequiredVisibleLabelTemplate(html `
21103
21103
  <label part="label" class="label">
21104
21104
  <slot></slot>
21105
21105
  </label>
@@ -21117,7 +21117,7 @@ so this becomes the fallback color for the slot */ ''}
21117
21117
  @focusout="${(x, c) => x.focusoutHandler(c.event)}"
21118
21118
  @keydown="${(x, c) => x.keydownHandler(c.event)}"
21119
21119
  >
21120
- ${labelTemplate$3}
21120
+ ${labelTemplate$5}
21121
21121
  <div class="control" part="control" ${ref('controlWrapper')}>
21122
21122
  ${startSlotTemplate(context, definition)}
21123
21123
  <slot name="control">
@@ -26495,6 +26495,7 @@ so this becomes the fallback color for the slot */ ''}
26495
26495
  const styles$z = css `
26496
26496
  ${display$1('inline-block')}
26497
26497
  ${styles$O}
26498
+ ${styles$K}
26498
26499
 
26499
26500
  :host {
26500
26501
  font: ${bodyFont};
@@ -26682,21 +26683,20 @@ so this becomes the fallback color for the slot */ ''}
26682
26683
  }
26683
26684
  `));
26684
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>`);
26685
26693
  /**
26686
26694
  * The template for the {@link @microsoft/fast-foundation#(NumberField:class)} component.
26687
26695
  * @public
26688
26696
  */
26689
26697
  const template$u = (context, definition) => html `
26690
26698
  <template class="${x => (x.readOnly ? 'readonly' : '')}">
26691
- <label
26692
- part="label"
26693
- for="control"
26694
- class="${x => (x.defaultSlottedNodes?.length
26695
- ? 'label'
26696
- : 'label label__hidden')}"
26697
- >
26698
- <slot ${slotted('defaultSlottedNodes')}></slot>
26699
- </label>
26699
+ ${labelTemplate$4}
26700
26700
  <div class="root" part="root">
26701
26701
  ${startSlotTemplate(context, definition)}
26702
26702
  <input
@@ -26740,6 +26740,7 @@ so this becomes the fallback color for the slot */ ''}
26740
26740
  aria-owns="${x => x.ariaOwns}"
26741
26741
  aria-relevant="${x => x.ariaRelevant}"
26742
26742
  aria-roledescription="${x => x.ariaRoledescription}"
26743
+ aria-required="${x => x.requiredVisible}"
26743
26744
  ${ref('control')}
26744
26745
  />
26745
26746
  ${when(x => !x.hideStep && !x.readOnly && !x.disabled, html `
@@ -26772,7 +26773,7 @@ so this becomes the fallback color for the slot */ ''}
26772
26773
  /**
26773
26774
  * A nimble-styled HTML number input
26774
26775
  */
26775
- class NumberField extends mixinErrorPattern(NumberField$1) {
26776
+ class NumberField extends mixinErrorPattern(mixinRequiredVisiblePattern(NumberField$1)) {
26776
26777
  constructor() {
26777
26778
  super(...arguments);
26778
26779
  this.appearance = NumberFieldAppearance.underline;
@@ -26987,7 +26988,7 @@ so this becomes the fallback color for the slot */ ''}
26987
26988
  }
26988
26989
  `;
26989
26990
 
26990
- const labelTemplate$2 = createRequiredVisibleLabelTemplate(html `<slot name="label"></slot>`);
26991
+ const labelTemplate$3 = createRequiredVisibleLabelTemplate(html `<slot name="label"></slot>`);
26991
26992
  /* eslint-disable @typescript-eslint/indent */
26992
26993
  const template$t = html `
26993
26994
  <template
@@ -27000,7 +27001,7 @@ so this becomes the fallback color for the slot */ ''}
27000
27001
  @focusout="${(x, c) => x.focusOutHandler(c.event)}"
27001
27002
  >
27002
27003
  <div class="label-container">
27003
- ${labelTemplate$2}
27004
+ ${labelTemplate$3}
27004
27005
  <${iconExclamationMarkTag}
27005
27006
  severity="error"
27006
27007
  class="error-icon"
@@ -61012,7 +61013,7 @@ img.ProseMirror-separator {
61012
61013
  const isListOptionGroup = (n) => {
61013
61014
  return n instanceof ListOptionGroup;
61014
61015
  };
61015
- const labelTemplate$1 = createRequiredVisibleLabelTemplate(html `
61016
+ const labelTemplate$2 = createRequiredVisibleLabelTemplate(html `
61016
61017
  <label part="label" class="label" aria-hidden="true">
61017
61018
  <slot ${ref('labelSlot')}></slot>
61018
61019
  </label>
@@ -61045,7 +61046,7 @@ img.ProseMirror-separator {
61045
61046
  @keydown="${(x, c) => x.keydownHandler(c.event)}"
61046
61047
  @mousedown="${(x, c) => x.mousedownHandler(c.event)}"
61047
61048
  >
61048
- ${labelTemplate$1}
61049
+ ${labelTemplate$2}
61049
61050
  ${when(x => x.collapsible, html `
61050
61051
  <div
61051
61052
  class="control"
@@ -74636,7 +74637,7 @@ focus outline in that case.
74636
74637
  }
74637
74638
  `));
74638
74639
 
74639
- const labelTemplate = createRequiredVisibleLabelTemplate(html `
74640
+ const labelTemplate$1 = createRequiredVisibleLabelTemplate(html `
74640
74641
  <label
74641
74642
  part="label"
74642
74643
  for="control"
@@ -74646,7 +74647,7 @@ focus outline in that case.
74646
74647
  </label>
74647
74648
  `);
74648
74649
  const template$6 = () => html `
74649
- ${labelTemplate}
74650
+ ${labelTemplate$1}
74650
74651
  <div class="container">
74651
74652
  <textarea
74652
74653
  part="control"
@@ -74810,6 +74811,7 @@ focus outline in that case.
74810
74811
  const styles$6 = css `
74811
74812
  ${display$1('inline-block')}
74812
74813
  ${styles$O}
74814
+ ${styles$K}
74813
74815
 
74814
74816
  :host {
74815
74817
  font: ${bodyFont};
@@ -75046,6 +75048,18 @@ focus outline in that case.
75046
75048
  }
75047
75049
  `));
75048
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>`);
75049
75063
  /**
75050
75064
  * The template for the {@link @microsoft/fast-foundation#(TextField:class)} component.
75051
75065
  * @public
@@ -75056,20 +75070,7 @@ focus outline in that case.
75056
75070
  ${x => (x.readOnly ? 'readonly' : '')}
75057
75071
  "
75058
75072
  >
75059
- <label
75060
- part="label"
75061
- for="control"
75062
- class="${x => (x.defaultSlottedNodes?.length
75063
- ? 'label'
75064
- : 'label label__hidden')}"
75065
- >
75066
- <slot
75067
- ${slotted({
75068
- property: 'defaultSlottedNodes',
75069
- filter: whitespaceFilter
75070
- })}
75071
- ></slot>
75072
- </label>
75073
+ ${labelTemplate}
75073
75074
  <div class="root" part="root">
75074
75075
  ${startSlotTemplate(context, definition)}
75075
75076
  <input
@@ -75110,6 +75111,7 @@ focus outline in that case.
75110
75111
  aria-owns="${x => x.ariaOwns}"
75111
75112
  aria-relevant="${x => x.ariaRelevant}"
75112
75113
  aria-roledescription="${x => x.ariaRoledescription}"
75114
+ aria-required="${x => x.requiredVisible}"
75113
75115
  ${ref('control')}
75114
75116
  />
75115
75117
  ${endSlotTemplate(context, definition)}
@@ -75120,7 +75122,7 @@ focus outline in that case.
75120
75122
  /**
75121
75123
  * A nimble-styed HTML text input
75122
75124
  */
75123
- class TextField extends mixinErrorPattern(TextField$1) {
75125
+ class TextField extends mixinErrorPattern(mixinRequiredVisiblePattern(TextField$1)) {
75124
75126
  constructor() {
75125
75127
  super(...arguments);
75126
75128
  /**