@ni/nimble-components 11.15.1 → 12.0.1

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.
Files changed (71) hide show
  1. package/dist/all-components-bundle.js +460 -416
  2. package/dist/all-components-bundle.js.map +1 -1
  3. package/dist/all-components-bundle.min.js +929 -911
  4. package/dist/all-components-bundle.min.js.map +1 -1
  5. package/dist/esm/breadcrumb/index.d.ts +2 -0
  6. package/dist/esm/breadcrumb/index.js +5 -0
  7. package/dist/esm/breadcrumb/index.js.map +1 -1
  8. package/dist/esm/breadcrumb/styles.js +4 -4
  9. package/dist/esm/breadcrumb/types.d.ts +9 -0
  10. package/dist/esm/breadcrumb/types.js +9 -0
  11. package/dist/esm/breadcrumb/types.js.map +1 -0
  12. package/dist/esm/button/index.d.ts +9 -3
  13. package/dist/esm/button/index.js +3 -0
  14. package/dist/esm/button/index.js.map +1 -1
  15. package/dist/esm/button/styles.js +17 -14
  16. package/dist/esm/button/styles.js.map +1 -1
  17. package/dist/esm/button/types.d.ts +9 -0
  18. package/dist/esm/button/types.js +8 -0
  19. package/dist/esm/button/types.js.map +1 -1
  20. package/dist/esm/combobox/index.d.ts +6 -6
  21. package/dist/esm/combobox/index.js +15 -9
  22. package/dist/esm/combobox/index.js.map +1 -1
  23. package/dist/esm/combobox/styles.js +5 -5
  24. package/dist/esm/drawer/styles.js +0 -4
  25. package/dist/esm/drawer/styles.js.map +1 -1
  26. package/dist/esm/icon-base/index.d.ts +9 -2
  27. package/dist/esm/icon-base/index.js +6 -1
  28. package/dist/esm/icon-base/index.js.map +1 -1
  29. package/dist/esm/icon-base/styles.js +4 -4
  30. package/dist/esm/icon-base/types.d.ts +6 -6
  31. package/dist/esm/icon-base/types.js +5 -5
  32. package/dist/esm/icon-base/types.js.map +1 -1
  33. package/dist/esm/list-option/styles.js +2 -2
  34. package/dist/esm/menu-button/index.d.ts +5 -5
  35. package/dist/esm/menu-button/index.js.map +1 -1
  36. package/dist/esm/menu-button/template.d.ts +1 -3
  37. package/dist/esm/menu-button/template.js +6 -5
  38. package/dist/esm/menu-button/template.js.map +1 -1
  39. package/dist/esm/number-field/index.d.ts +4 -5
  40. package/dist/esm/number-field/index.js +23 -12
  41. package/dist/esm/number-field/index.js.map +1 -1
  42. package/dist/esm/number-field/styles.js +5 -4
  43. package/dist/esm/number-field/styles.js.map +1 -1
  44. package/dist/esm/patterns/button/types.d.ts +1 -1
  45. package/dist/esm/patterns/dropdown/styles.js +1 -1
  46. package/dist/esm/patterns/dropdown/types.d.ts +8 -0
  47. package/dist/esm/patterns/dropdown/types.js +2 -3
  48. package/dist/esm/patterns/dropdown/types.js.map +1 -1
  49. package/dist/esm/patterns/error/styles.js +4 -4
  50. package/dist/esm/patterns/error/template.d.ts +2 -2
  51. package/dist/esm/patterns/error/template.js.map +1 -1
  52. package/dist/esm/patterns/error/types.d.ts +5 -4
  53. package/dist/esm/text-field/index.d.ts +5 -5
  54. package/dist/esm/text-field/index.js +13 -8
  55. package/dist/esm/text-field/index.js.map +1 -1
  56. package/dist/esm/text-field/styles.js +6 -6
  57. package/dist/esm/toggle-button/index.d.ts +2 -2
  58. package/dist/esm/tooltip/index.d.ts +8 -0
  59. package/dist/esm/tooltip/index.js +12 -0
  60. package/dist/esm/tooltip/index.js.map +1 -1
  61. package/dist/esm/tooltip/styles.js +8 -8
  62. package/dist/esm/tooltip/template.d.ts +1 -3
  63. package/dist/esm/tooltip/template.js +13 -8
  64. package/dist/esm/tooltip/template.js.map +1 -1
  65. package/dist/esm/tooltip/types.d.ts +4 -4
  66. package/dist/esm/tooltip/types.js +3 -3
  67. package/dist/esm/tooltip/types.js.map +1 -1
  68. package/dist/esm/tree-item/styles.d.ts +1 -3
  69. package/dist/esm/tree-item/styles.js +181 -176
  70. package/dist/esm/tree-item/styles.js.map +1 -1
  71. package/package.json +2 -2
@@ -14844,6 +14844,28 @@
14844
14844
  .withPrefix('nimble')
14845
14845
  .register(nimbleAnchoredRegion());
14846
14846
 
14847
+ /*! *****************************************************************************
14848
+ Copyright (c) Microsoft Corporation.
14849
+
14850
+ Permission to use, copy, modify, and/or distribute this software for any
14851
+ purpose with or without fee is hereby granted.
14852
+
14853
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14854
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
14855
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
14856
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14857
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14858
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14859
+ PERFORMANCE OF THIS SOFTWARE.
14860
+ ***************************************************************************** */
14861
+
14862
+ function __decorate(decorators, target, key, desc) {
14863
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
14864
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
14865
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
14866
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
14867
+ }
14868
+
14847
14869
  /**
14848
14870
  * Do not edit directly
14849
14871
  * Generated on Thu, 26 May 2022 18:20:05 GMT
@@ -15175,28 +15197,6 @@
15175
15197
  const prefix = 'ni-nimble';
15176
15198
  const styleNameFromTokenName = (tokenName) => `${prefix}-${tokenName}`;
15177
15199
 
15178
- /*! *****************************************************************************
15179
- Copyright (c) Microsoft Corporation.
15180
-
15181
- Permission to use, copy, modify, and/or distribute this software for any
15182
- purpose with or without fee is hereby granted.
15183
-
15184
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
15185
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15186
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
15187
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15188
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
15189
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15190
- PERFORMANCE OF THIS SOFTWARE.
15191
- ***************************************************************************** */
15192
-
15193
- function __decorate(decorators, target, key, desc) {
15194
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
15195
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
15196
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
15197
- return c > 3 && r && Object.defineProperty(target, key, r), r;
15198
- }
15199
-
15200
15200
  const template$7 = html `<slot></slot>`;
15201
15201
 
15202
15202
  const styles$w = css `
@@ -15494,7 +15494,7 @@
15494
15494
  flex-wrap: wrap;
15495
15495
  }
15496
15496
 
15497
- :host(.prominent-links) {
15497
+ :host([appearance='prominent']) {
15498
15498
  --ni-private-breadcrumb-link-active-font-color: ${bodyFontColor};
15499
15499
  }
15500
15500
 
@@ -15510,7 +15510,7 @@
15510
15510
  --ni-private-breadcrumb-link-active-font-color: ${DigitalGreenDark};
15511
15511
  }
15512
15512
 
15513
- :host(.prominent-links) {
15513
+ :host([appearance='prominent']) {
15514
15514
  --ni-private-breadcrumb-link-font-color: ${DigitalGreenDark};
15515
15515
  }
15516
15516
  `), themeBehavior(Theme.dark, css `
@@ -15518,7 +15518,7 @@
15518
15518
  --ni-private-breadcrumb-link-active-font-color: ${PowerGreen};
15519
15519
  }
15520
15520
 
15521
- :host(.prominent-links) {
15521
+ :host([appearance='prominent']) {
15522
15522
  --ni-private-breadcrumb-link-font-color: ${PowerGreen};
15523
15523
  }
15524
15524
  `), themeBehavior(Theme.color, css `
@@ -15526,7 +15526,7 @@
15526
15526
  --ni-private-breadcrumb-link-active-font-color: ${hexToRgbaCssColor(White, 0.6)};
15527
15527
  }
15528
15528
 
15529
- :host(.prominent-links) {
15529
+ :host([appearance='prominent']) {
15530
15530
  --ni-private-breadcrumb-link-font-color: ${PowerGreen};
15531
15531
  }
15532
15532
  `));
@@ -15536,6 +15536,9 @@
15536
15536
  */
15537
15537
  class Breadcrumb extends Breadcrumb$1 {
15538
15538
  }
15539
+ __decorate([
15540
+ attr
15541
+ ], Breadcrumb.prototype, "appearance", void 0);
15539
15542
  const nimbleBreadcrumb = Breadcrumb.compose({
15540
15543
  baseName: 'breadcrumb',
15541
15544
  baseClass: Breadcrumb$1,
@@ -16516,44 +16519,44 @@
16516
16519
  `));
16517
16520
 
16518
16521
  const styles$s = styles$t.withBehaviors(appearanceBehavior(ButtonAppearance.outline, css `
16519
- :host(.primary) .control {
16522
+ :host([appearance-variant='primary']) .control {
16520
16523
  box-shadow: 0px 0px 0px ${borderWidth}
16521
16524
  rgba(${actionRgbPartialColor}, 0.3) inset;
16522
16525
  }
16523
16526
 
16524
- :host(.primary) .control:hover {
16527
+ :host([appearance-variant='primary']) .control:hover {
16525
16528
  box-shadow: 0px 0px 0px ${borderWidth} ${borderHoverColor} inset;
16526
16529
  }
16527
16530
 
16528
- :host(.primary) .control${focusVisible} {
16531
+ :host([appearance-variant='primary']) .control${focusVisible} {
16529
16532
  box-shadow: 0px 0px 0px ${borderWidth} ${borderHoverColor} inset;
16530
16533
  }
16531
16534
 
16532
- :host(.primary) .control:active {
16535
+ :host([appearance-variant='primary']) .control:active {
16533
16536
  box-shadow: none;
16534
16537
  }
16535
16538
 
16536
- :host(.primary) .control[disabled] {
16539
+ :host([appearance-variant='primary']) .control[disabled] {
16537
16540
  box-shadow: none;
16538
16541
  }
16539
16542
  `), appearanceBehavior(ButtonAppearance.block, css `
16540
- :host(.primary) .control {
16543
+ :host([appearance-variant='primary']) .control {
16541
16544
  background-clip: padding-box;
16542
16545
  border-color: rgba(${actionRgbPartialColor}, 0.3);
16543
16546
  border-width: calc(2 * ${borderWidth});
16544
16547
  padding: 0 calc(${standardPadding} - ${borderWidth});
16545
16548
  }
16546
16549
 
16547
- :host(.primary[content-hidden]) .control {
16550
+ :host([appearance-variant='primary'][content-hidden]) .control {
16548
16551
  padding: 0px;
16549
16552
  }
16550
16553
 
16551
- :host(.primary) .control:hover {
16554
+ :host([appearance-variant='primary']) .control:hover {
16552
16555
  border-color: ${borderHoverColor};
16553
16556
  box-shadow: none;
16554
16557
  }
16555
16558
 
16556
- :host(.primary) .control${focusVisible} {
16559
+ :host([appearance-variant='primary']) .control${focusVisible} {
16557
16560
  background-clip: border-box;
16558
16561
  border-color: ${borderHoverColor};
16559
16562
  border-width: ${borderWidth};
@@ -16561,11 +16564,12 @@
16561
16564
  padding: 0 ${standardPadding};
16562
16565
  }
16563
16566
 
16564
- :host(.primary[content-hidden]) .control${focusVisible} {
16567
+ :host([appearance-variant='primary'][content-hidden])
16568
+ .control${focusVisible} {
16565
16569
  padding: 0px;
16566
16570
  }
16567
16571
 
16568
- :host(.primary) .control:active {
16572
+ :host([appearance-variant='primary']) .control:active {
16569
16573
  background-clip: border-box;
16570
16574
  border-color: ${fillSelectedColor};
16571
16575
  border-width: ${borderWidth};
@@ -16573,11 +16577,12 @@
16573
16577
  padding: 0 ${standardPadding};
16574
16578
  }
16575
16579
 
16576
- :host(.primary[content-hidden]) .control:active {
16580
+ :host([appearance-variant='primary'][content-hidden])
16581
+ .control:active {
16577
16582
  padding: 0px;
16578
16583
  }
16579
16584
 
16580
- :host(.primary) .control[disabled] {
16585
+ :host([appearance-variant='primary']) .control[disabled] {
16581
16586
  background-clip: border-box;
16582
16587
  border-color: transparent;
16583
16588
  border-width: ${borderWidth};
@@ -16585,7 +16590,8 @@
16585
16590
  padding: 0 ${standardPadding};
16586
16591
  }
16587
16592
 
16588
- :host(.primary[content-hidden]) .control[disabled] {
16593
+ :host([appearance-variant='primary'][content-hidden])
16594
+ .control[disabled] {
16589
16595
  padding: 0px;
16590
16596
  }
16591
16597
  `));
@@ -16613,6 +16619,9 @@
16613
16619
  __decorate([
16614
16620
  attr
16615
16621
  ], Button.prototype, "appearance", void 0);
16622
+ __decorate([
16623
+ attr({ attribute: 'appearance-variant' })
16624
+ ], Button.prototype, "appearanceVariant", void 0);
16616
16625
  __decorate([
16617
16626
  attr({ attribute: 'content-hidden', mode: 'boolean' })
16618
16627
  ], Button.prototype, "contentHidden", void 0);
@@ -16926,19 +16935,129 @@
16926
16935
  });
16927
16936
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCheckbox());
16928
16937
 
16938
+ const styles$p = css `
16939
+ ${styles$t}
16940
+
16941
+ .control[aria-pressed='true'] {
16942
+ background-color: ${fillSelectedColor};
16943
+ border-color: ${fillSelectedColor};
16944
+ }
16945
+
16946
+ .control[aria-pressed='true']:hover {
16947
+ background-color: ${fillSelectedColor};
16948
+ }
16949
+
16950
+ .control[aria-pressed='true']${focusVisible} {
16951
+ background-color: ${fillSelectedColor};
16952
+ }
16953
+
16954
+ .control[aria-pressed='true'][disabled] {
16955
+ background-color: ${fillSelectedColor};
16956
+ border-color: ${fillSelectedColor};
16957
+ }
16958
+
16959
+ .control[aria-pressed='true'][disabled]:hover {
16960
+ background-color: ${fillSelectedColor};
16961
+ border-color: ${fillSelectedColor};
16962
+ }
16963
+ `;
16964
+
16965
+ const template$6 = (context, definition) => html `
16966
+ <div
16967
+ role="button"
16968
+ part="control"
16969
+ tabindex="${x => (x.disabled ? null : 0)}"
16970
+ @keypress="${(x, c) => x.keypressHandler(c.event)}"
16971
+ @click="${(x, c) => x.clickHandler(c.event)}"
16972
+ class="control ${x => (x.checked ? 'checked' : '')}"
16973
+ ?disabled="${x => x.disabled}"
16974
+ ${'' /* Configure aria-disabled, aria-readonly, and aria-pressed based on the
16975
+ toggle button's state to keep the ARIA attributes consistent with the component's
16976
+ state without a client having to configure ARIA attributes directly */}
16977
+ aria-disabled="${x => x.disabled}"
16978
+ aria-readonly="${x => x.readOnly}"
16979
+ aria-pressed="${x => x.checked}"
16980
+ ${'' /* Configure all other ARIA attributes based on the aria attributes
16981
+ configured on the toggle button */}
16982
+ aria-atomic="${x => x.ariaAtomic}"
16983
+ aria-busy="${x => x.ariaBusy}"
16984
+ aria-controls="${x => x.ariaControls}"
16985
+ aria-current="${x => x.ariaCurrent}"
16986
+ aria-describedby="${x => x.ariaDescribedby}"
16987
+ aria-details="${x => x.ariaDetails}"
16988
+ aria-errormessage="${x => x.ariaErrormessage}"
16989
+ aria-expanded="${x => x.ariaExpanded}"
16990
+ aria-flowto="${x => x.ariaFlowto}"
16991
+ aria-haspopup="${x => x.ariaHaspopup}"
16992
+ aria-hidden="${x => x.ariaHidden}"
16993
+ aria-invalid="${x => x.ariaInvalid}"
16994
+ aria-keyshortcuts="${x => x.ariaKeyshortcuts}"
16995
+ aria-label="${x => x.ariaLabel}"
16996
+ aria-labelledby="${x => x.ariaLabelledby}"
16997
+ aria-live="${x => x.ariaLive}"
16998
+ aria-owns="${x => x.ariaOwns}"
16999
+ aria-relevant="${x => x.ariaRelevant}"
17000
+ aria-roledescription="${x => x.ariaRoledescription}"
17001
+ ${ref('control')}
17002
+ >
17003
+ ${startSlotTemplate(context, definition)}
17004
+ <span class="content" part="content">
17005
+ <slot></slot>
17006
+ </span>
17007
+ ${endSlotTemplate(context, definition)}
17008
+ </div>
17009
+ `;
17010
+
17011
+ /**
17012
+ * A nimble-styled toggle button control.
17013
+ */
17014
+ class ToggleButton extends Switch$1 {
17015
+ constructor() {
17016
+ super(...arguments);
17017
+ /**
17018
+ * @public
17019
+ * @remarks
17020
+ * HTML Attribute: appearance
17021
+ */
17022
+ this.appearance = ButtonAppearance.outline;
17023
+ /**
17024
+ * @public
17025
+ * @remarks
17026
+ * HTML Attribute: content-hidden
17027
+ */
17028
+ this.contentHidden = false;
17029
+ }
17030
+ }
17031
+ __decorate([
17032
+ attr
17033
+ ], ToggleButton.prototype, "appearance", void 0);
17034
+ __decorate([
17035
+ attr({ attribute: 'content-hidden', mode: 'boolean' })
17036
+ ], ToggleButton.prototype, "contentHidden", void 0);
17037
+ applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
17038
+ const nimbleToggleButton = ToggleButton.compose({
17039
+ baseName: 'toggle-button',
17040
+ template: template$6,
17041
+ styles: styles$p,
17042
+ shadowOptions: {
17043
+ delegatesFocus: true
17044
+ }
17045
+ });
17046
+ DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleToggleButton());
17047
+
16929
17048
  const errorTextTemplate = html `
16930
17049
  <div class="error-text" title="${x => x.errorText}" aria-live="polite">
16931
17050
  ${x => x.errorText}
16932
17051
  </div>
16933
17052
  `;
16934
17053
 
16935
- const template$6 = html `
17054
+ const template$5 = html `
16936
17055
  <template>
16937
17056
  <div class="icon" :innerHTML=${x => x.icon.data}></div>
16938
17057
  </template
16939
17058
  `;
16940
17059
 
16941
- const styles$p = css `
17060
+ const styles$o = css `
16942
17061
  ${display('inline-flex')}
16943
17062
 
16944
17063
  :host {
@@ -16953,19 +17072,19 @@
16953
17072
  height: 100%;
16954
17073
  }
16955
17074
 
16956
- :host(.fail) {
17075
+ :host([severity='error']) {
16957
17076
  ${iconColor.cssCustomProperty}: ${failColor};
16958
17077
  }
16959
17078
 
16960
- :host(.warning) {
17079
+ :host([severity='warning']) {
16961
17080
  ${iconColor.cssCustomProperty}: ${warningColor};
16962
17081
  }
16963
17082
 
16964
- :host(.pass) {
17083
+ :host([severity='success']) {
16965
17084
  ${iconColor.cssCustomProperty}: ${passColor};
16966
17085
  }
16967
17086
 
16968
- :host(.information) {
17087
+ :host([severity='information']) {
16969
17088
  ${iconColor.cssCustomProperty}: ${informationColor};
16970
17089
  }
16971
17090
 
@@ -16980,16 +17099,19 @@
16980
17099
  * The base class for icon components
16981
17100
  */
16982
17101
  class Icon extends FoundationElement {
16983
- constructor(icon) {
17102
+ constructor(/** @internal */ icon) {
16984
17103
  super();
16985
17104
  this.icon = icon;
16986
17105
  }
16987
17106
  }
17107
+ __decorate([
17108
+ attr
17109
+ ], Icon.prototype, "severity", void 0);
16988
17110
  const registerIcon = (baseName, iconClass) => {
16989
17111
  const composedIcon = iconClass.compose({
16990
17112
  baseName,
16991
- template: template$6,
16992
- styles: styles$p,
17113
+ template: template$5,
17114
+ styles: styles$o,
16993
17115
  baseClass: iconClass
16994
17116
  });
16995
17117
  DesignSystem.getOrCreate().withPrefix('nimble').register(composedIcon());
@@ -16997,37 +17119,33 @@
16997
17119
 
16998
17120
  // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
16999
17121
  /**
17000
- * The icon component for the 'exclamationMark' icon
17122
+ * The icon component for the 'arrowExpanderDown' icon
17001
17123
  */
17002
- class IconExclamationMark extends Icon {
17124
+ class IconArrowExpanderDown extends Icon {
17003
17125
  constructor() {
17004
- super(exclamationMark16X16);
17126
+ super(arrowExpanderDown16X16);
17005
17127
  }
17006
17128
  }
17007
- registerIcon('icon-exclamation-mark', IconExclamationMark);
17129
+ registerIcon('icon-arrow-expander-down', IconArrowExpanderDown);
17008
17130
 
17009
17131
  // AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
17010
17132
  /**
17011
- * The icon component for the 'arrowExpanderDown' icon
17133
+ * The icon component for the 'exclamationMark' icon
17012
17134
  */
17013
- class IconArrowExpanderDown extends Icon {
17135
+ class IconExclamationMark extends Icon {
17014
17136
  constructor() {
17015
- super(arrowExpanderDown16X16);
17137
+ super(exclamationMark16X16);
17016
17138
  }
17017
17139
  }
17018
- registerIcon('icon-arrow-expander-down', IconArrowExpanderDown);
17140
+ registerIcon('icon-exclamation-mark', IconExclamationMark);
17019
17141
 
17020
- ({
17021
- above: SelectPosition.above,
17022
- below: SelectPosition.below
17023
- });
17024
17142
  const DropdownAppearance = {
17025
17143
  underline: 'underline',
17026
17144
  outline: 'outline',
17027
17145
  block: 'block'
17028
17146
  };
17029
17147
 
17030
- const styles$o = css `
17148
+ const styles$n = css `
17031
17149
  ${display('inline-flex')}
17032
17150
 
17033
17151
  :host {
@@ -17107,7 +17225,7 @@
17107
17225
  padding: ${borderWidth};
17108
17226
  }
17109
17227
 
17110
- :host(.open:not(:hover)) .control {
17228
+ :host([open]:not(:hover)) .control {
17111
17229
  border-bottom-color: ${borderHoverColor};
17112
17230
  }
17113
17231
 
@@ -17241,12 +17359,12 @@
17241
17359
  }
17242
17360
  `));
17243
17361
 
17244
- const styles$n = css `
17362
+ const styles$m = css `
17245
17363
  .error-icon {
17246
17364
  display: none;
17247
17365
  }
17248
17366
 
17249
- :host(.invalid) .error-icon {
17367
+ :host([error-visible]) .error-icon {
17250
17368
  display: inline-flex;
17251
17369
  width: ${iconSize};
17252
17370
  height: ${iconSize};
@@ -17257,7 +17375,7 @@
17257
17375
  display: none;
17258
17376
  }
17259
17377
 
17260
- :host(.invalid) .error-text {
17378
+ :host([error-visible]) .error-text {
17261
17379
  display: block;
17262
17380
  font: ${errorTextFont};
17263
17381
  color: ${failColor};
@@ -17270,18 +17388,18 @@
17270
17388
  white-space: nowrap;
17271
17389
  }
17272
17390
 
17273
- :host(.invalid[readonly]:not([disabled])) .error-text {
17391
+ :host([error-visible][readonly]:not([disabled])) .error-text {
17274
17392
  top: calc(${controlHeight} - ${borderWidth});
17275
17393
  }
17276
17394
 
17277
- :host(.invalid) .error-text:empty {
17395
+ :host([error-visible]) .error-text:empty {
17278
17396
  display: none;
17279
17397
  }
17280
17398
  `;
17281
17399
 
17282
- const styles$m = css `
17283
- ${styles$o}
17400
+ const styles$l = css `
17284
17401
  ${styles$n}
17402
+ ${styles$m}
17285
17403
 
17286
17404
  :host {
17287
17405
  --ni-private-hover-bottom-border-width: 2px;
@@ -17297,7 +17415,7 @@
17297
17415
  color: ${bodyDisabledFontColor};
17298
17416
  }
17299
17417
 
17300
- :host(.invalid)::after {
17418
+ :host([error-visible])::after {
17301
17419
  border-bottom-color: ${failColor};
17302
17420
  }
17303
17421
 
@@ -17309,7 +17427,7 @@
17309
17427
  border-bottom-color: ${borderHoverColor};
17310
17428
  }
17311
17429
 
17312
- :host(.invalid) .control {
17430
+ :host([error-visible]) .control {
17313
17431
  border-bottom: var(--ni-private-bottom-border-width) solid ${failColor};
17314
17432
  }
17315
17433
 
@@ -17317,8 +17435,8 @@
17317
17435
  border-color: rgba(${borderRgbPartialColor}, 0.1);
17318
17436
  }
17319
17437
 
17320
- :host(.invalid[disabled]) .control,
17321
- :host(.open.invalid) .control {
17438
+ :host([error-visible][disabled]) .control,
17439
+ :host([error-visible][open]) .control {
17322
17440
  border-bottom-color: ${failColor};
17323
17441
  }
17324
17442
 
@@ -17372,7 +17490,7 @@
17372
17490
  display: none;
17373
17491
  }
17374
17492
  `.withBehaviors(appearanceBehavior(DropdownAppearance.block, css `
17375
- :host(.invalid) .control {
17493
+ :host([error-visible]) .control {
17376
17494
  border-bottom-width: ${borderWidth};
17377
17495
  padding-bottom: 0;
17378
17496
  }
@@ -17385,6 +17503,7 @@
17385
17503
  constructor() {
17386
17504
  super(...arguments);
17387
17505
  this.appearance = DropdownAppearance.underline;
17506
+ this.errorVisible = false;
17388
17507
  this.valueUpdatedByInput = false;
17389
17508
  }
17390
17509
  // Workaround for https://github.com/microsoft/fast/issues/5123
@@ -17526,21 +17645,25 @@
17526
17645
  __decorate([
17527
17646
  attr({ attribute: 'error-text' })
17528
17647
  ], Combobox.prototype, "errorText", void 0);
17648
+ __decorate([
17649
+ attr({ attribute: 'error-visible', mode: 'boolean' })
17650
+ ], Combobox.prototype, "errorVisible", void 0);
17529
17651
  const nimbleCombobox = Combobox.compose({
17530
17652
  baseName: 'combobox',
17531
17653
  baseClass: Combobox$1,
17532
17654
  template: comboboxTemplate,
17533
- styles: styles$m,
17655
+ styles: styles$l,
17534
17656
  shadowOptions: {
17535
17657
  delegatesFocus: true
17536
17658
  },
17537
17659
  end: html `
17538
17660
  <div class="end-slot-container">
17539
- <nimble-icon-exclamation-mark
17540
- class="error-icon fail"
17541
- ></nimble-icon-exclamation-mark>
17661
+ <${DesignSystem.tagFor(IconExclamationMark)}
17662
+ severity="error"
17663
+ class="error-icon"
17664
+ ></${DesignSystem.tagFor(IconExclamationMark)}>
17542
17665
  <div class="separator"></div>
17543
- <nimble-toggle-button
17666
+ <${DesignSystem.tagFor(ToggleButton)}
17544
17667
  ${ref('dropdownButton')}
17545
17668
  appearance="ghost"
17546
17669
  ?checked="${x => x.open}"
@@ -17555,19 +17678,19 @@
17555
17678
  aria-expanded="${x => x.open}"
17556
17679
  tabindex="-1"
17557
17680
  >
17558
- <nimble-icon-arrow-expander-down
17681
+ <${DesignSystem.tagFor(IconArrowExpanderDown)}
17559
17682
  slot="start"
17560
17683
  class="dropdown-icon"
17561
17684
  >
17562
- </nimble-icon-arrow-expander-down>
17563
- </nimble-toggle-button>
17685
+ </${DesignSystem.tagFor(IconArrowExpanderDown)}>
17686
+ </${DesignSystem.tagFor(ToggleButton)}>
17564
17687
  </div>
17565
17688
  ${errorTextTemplate}
17566
17689
  `
17567
17690
  });
17568
17691
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCombobox());
17569
17692
 
17570
- const styles$l = css `
17693
+ const styles$k = css `
17571
17694
  ${display('grid')}
17572
17695
 
17573
17696
  dialog {
@@ -17595,7 +17718,7 @@
17595
17718
  }
17596
17719
  `));
17597
17720
 
17598
- const template$5 = html `
17721
+ const template$4 = html `
17599
17722
  <template>
17600
17723
  <dialog
17601
17724
  ${ref('dialogElement')}
@@ -17681,8 +17804,8 @@
17681
17804
  applyMixins(Dialog, ARIAGlobalStatesAndProperties);
17682
17805
  const nimbleDialog = Dialog.compose({
17683
17806
  baseName: 'dialog',
17684
- template: template$5,
17685
- styles: styles$l,
17807
+ template: template$4,
17808
+ styles: styles$k,
17686
17809
  baseClass: Dialog
17687
17810
  });
17688
17811
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDialog());
@@ -18776,7 +18899,7 @@
18776
18899
  slideOutOptions
18777
18900
  };
18778
18901
 
18779
- const styles$k = css `
18902
+ const styles$j = css `
18780
18903
  ${display('block')}
18781
18904
 
18782
18905
  :host {
@@ -18846,10 +18969,6 @@
18846
18969
  height: 100%;
18847
18970
  }
18848
18971
 
18849
- :host(.hidden) .control {
18850
- visibility: hidden;
18851
- }
18852
-
18853
18972
  :host([location='left']) .control {
18854
18973
  left: 0px;
18855
18974
  border-right: ${borderWidth} solid ${popupBoxShadowColor};
@@ -19088,7 +19207,7 @@
19088
19207
  const nimbleDrawer = Drawer.compose({
19089
19208
  baseName: 'drawer',
19090
19209
  template: dialogTemplate,
19091
- styles: styles$k
19210
+ styles: styles$j
19092
19211
  });
19093
19212
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDrawer());
19094
19213
 
@@ -20687,7 +20806,7 @@
20687
20806
  }
20688
20807
  registerIcon('icon-xmark-check', IconXmarkCheck);
20689
20808
 
20690
- const styles$j = css `
20809
+ const styles$i = css `
20691
20810
  ${display('flex')}
20692
20811
 
20693
20812
  :host {
@@ -20701,13 +20820,13 @@
20701
20820
  padding: 8px 4px;
20702
20821
  }
20703
20822
 
20704
- :host(.selected) {
20823
+ :host([aria-selected='true']) {
20705
20824
  box-shadow: none;
20706
20825
  outline: none;
20707
20826
  background-color: ${fillSelectedColor};
20708
20827
  }
20709
20828
 
20710
- :host(:hover.selected) {
20829
+ :host([aria-selected='true']:hover) {
20711
20830
  background-color: ${fillHoverSelectedColor};
20712
20831
  }
20713
20832
 
@@ -20767,11 +20886,11 @@
20767
20886
  baseName: 'list-option',
20768
20887
  baseClass: ListboxOption,
20769
20888
  template: listboxOptionTemplate,
20770
- styles: styles$j
20889
+ styles: styles$i
20771
20890
  });
20772
20891
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleListOption());
20773
20892
 
20774
- const styles$i = css `
20893
+ const styles$h = css `
20775
20894
  ${display('grid')}
20776
20895
 
20777
20896
  :host {
@@ -20826,11 +20945,11 @@
20826
20945
  baseName: 'menu',
20827
20946
  baseClass: Menu$1,
20828
20947
  template: menuTemplate,
20829
- styles: styles$i
20948
+ styles: styles$h
20830
20949
  });
20831
20950
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenu());
20832
20951
 
20833
- const styles$h = css `
20952
+ const styles$g = css `
20834
20953
  ${display('inline-block')}
20835
20954
 
20836
20955
  :host {
@@ -20848,123 +20967,13 @@
20848
20967
  }
20849
20968
  `;
20850
20969
 
20851
- const styles$g = css `
20852
- ${styles$t}
20853
-
20854
- .control[aria-pressed='true'] {
20855
- background-color: ${fillSelectedColor};
20856
- border-color: ${fillSelectedColor};
20857
- }
20858
-
20859
- .control[aria-pressed='true']:hover {
20860
- background-color: ${fillSelectedColor};
20861
- }
20862
-
20863
- .control[aria-pressed='true']${focusVisible} {
20864
- background-color: ${fillSelectedColor};
20865
- }
20866
-
20867
- .control[aria-pressed='true'][disabled] {
20868
- background-color: ${fillSelectedColor};
20869
- border-color: ${fillSelectedColor};
20870
- }
20871
-
20872
- .control[aria-pressed='true'][disabled]:hover {
20873
- background-color: ${fillSelectedColor};
20874
- border-color: ${fillSelectedColor};
20875
- }
20876
- `;
20877
-
20878
- const template$4 = (context, definition) => html `
20879
- <div
20880
- role="button"
20881
- part="control"
20882
- tabindex="${x => (x.disabled ? null : 0)}"
20883
- @keypress="${(x, c) => x.keypressHandler(c.event)}"
20884
- @click="${(x, c) => x.clickHandler(c.event)}"
20885
- class="control ${x => (x.checked ? 'checked' : '')}"
20886
- ?disabled="${x => x.disabled}"
20887
- ${'' /* Configure aria-disabled, aria-readonly, and aria-pressed based on the
20888
- toggle button's state to keep the ARIA attributes consistent with the component's
20889
- state without a client having to configure ARIA attributes directly */}
20890
- aria-disabled="${x => x.disabled}"
20891
- aria-readonly="${x => x.readOnly}"
20892
- aria-pressed="${x => x.checked}"
20893
- ${'' /* Configure all other ARIA attributes based on the aria attributes
20894
- configured on the toggle button */}
20895
- aria-atomic="${x => x.ariaAtomic}"
20896
- aria-busy="${x => x.ariaBusy}"
20897
- aria-controls="${x => x.ariaControls}"
20898
- aria-current="${x => x.ariaCurrent}"
20899
- aria-describedby="${x => x.ariaDescribedby}"
20900
- aria-details="${x => x.ariaDetails}"
20901
- aria-errormessage="${x => x.ariaErrormessage}"
20902
- aria-expanded="${x => x.ariaExpanded}"
20903
- aria-flowto="${x => x.ariaFlowto}"
20904
- aria-haspopup="${x => x.ariaHaspopup}"
20905
- aria-hidden="${x => x.ariaHidden}"
20906
- aria-invalid="${x => x.ariaInvalid}"
20907
- aria-keyshortcuts="${x => x.ariaKeyshortcuts}"
20908
- aria-label="${x => x.ariaLabel}"
20909
- aria-labelledby="${x => x.ariaLabelledby}"
20910
- aria-live="${x => x.ariaLive}"
20911
- aria-owns="${x => x.ariaOwns}"
20912
- aria-relevant="${x => x.ariaRelevant}"
20913
- aria-roledescription="${x => x.ariaRoledescription}"
20914
- ${ref('control')}
20915
- >
20916
- ${startSlotTemplate(context, definition)}
20917
- <span class="content" part="content">
20918
- <slot></slot>
20919
- </span>
20920
- ${endSlotTemplate(context, definition)}
20921
- </div>
20922
- `;
20923
-
20924
- /**
20925
- * A nimble-styled toggle button control.
20926
- */
20927
- class ToggleButton extends Switch$1 {
20928
- constructor() {
20929
- super(...arguments);
20930
- /**
20931
- * @public
20932
- * @remarks
20933
- * HTML Attribute: appearance
20934
- */
20935
- this.appearance = ButtonAppearance.outline;
20936
- /**
20937
- * @public
20938
- * @remarks
20939
- * HTML Attribute: content-hidden
20940
- */
20941
- this.contentHidden = false;
20942
- }
20943
- }
20944
- __decorate([
20945
- attr
20946
- ], ToggleButton.prototype, "appearance", void 0);
20947
- __decorate([
20948
- attr({ attribute: 'content-hidden', mode: 'boolean' })
20949
- ], ToggleButton.prototype, "contentHidden", void 0);
20950
- applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
20951
- const nimbleToggleButton = ToggleButton.compose({
20952
- baseName: 'toggle-button',
20953
- template: template$4,
20954
- styles: styles$g,
20955
- shadowOptions: {
20956
- delegatesFocus: true
20957
- }
20958
- });
20959
- DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleToggleButton());
20960
-
20961
20970
  // prettier-ignore
20962
- const template$3 = context => html `
20971
+ const template$3 = html `
20963
20972
  <template
20964
20973
  ?open="${x => x.open}"
20965
20974
  @focusout="${(x, c) => x.focusoutHandler(c.event)}"
20966
20975
  >
20967
- <${context.tagFor(ToggleButton)}
20976
+ <${DesignSystem.tagFor(ToggleButton)}
20968
20977
  part="button"
20969
20978
  appearance="${x => x.appearance}"
20970
20979
  ?content-hidden="${x => x.contentHidden}"
@@ -20981,9 +20990,9 @@
20981
20990
  <slot slot="start" name="start"></slot>
20982
20991
  <slot></slot>
20983
20992
  <slot slot="end" name="end"></slot>
20984
- </${context.tagFor(ToggleButton)}>
20993
+ </${DesignSystem.tagFor(ToggleButton)}>
20985
20994
  ${when(x => x.open, html `
20986
- <${context.tagFor(AnchoredRegion)}
20995
+ <${DesignSystem.tagFor(AnchoredRegion)}
20987
20996
  fixed-placement="true"
20988
20997
  auto-update-mode="auto"
20989
20998
  horizontal-inset="true"
@@ -20997,7 +21006,7 @@
20997
21006
  <span part="menu">
20998
21007
  <slot name="menu" ${slotted({ property: 'slottedMenus', filter: elements('[role=menu]') })}></slot>
20999
21008
  </span>
21000
- </${context.tagFor(AnchoredRegion)}>
21009
+ </${DesignSystem.tagFor(AnchoredRegion)}>
21001
21010
  `)}
21002
21011
  </template>
21003
21012
  `;
@@ -21168,7 +21177,7 @@
21168
21177
  const nimbleMenuButton = MenuButton.compose({
21169
21178
  baseName: 'menu-button',
21170
21179
  template: template$3,
21171
- styles: styles$h,
21180
+ styles: styles$g,
21172
21181
  shadowOptions: {
21173
21182
  delegatesFocus: true
21174
21183
  }
@@ -21289,7 +21298,7 @@
21289
21298
 
21290
21299
  const styles$e = css `
21291
21300
  ${display('inline-block')}
21292
- ${styles$n}
21301
+ ${styles$m}
21293
21302
 
21294
21303
  :host {
21295
21304
  font: ${bodyFont};
@@ -21338,7 +21347,7 @@
21338
21347
  border-color: rgba(${borderRgbPartialColor}, 0.1);
21339
21348
  }
21340
21349
 
21341
- :host(.invalid) .root {
21350
+ :host([error-visible]) .root {
21342
21351
  border-bottom-color: ${failColor};
21343
21352
  }
21344
21353
 
@@ -21367,7 +21376,7 @@
21367
21376
  }
21368
21377
  }
21369
21378
 
21370
- :host(.invalid) .root::after {
21379
+ :host([error-visible]) .root::after {
21371
21380
  border-bottom-color: ${failColor};
21372
21381
  }
21373
21382
 
@@ -21415,7 +21424,8 @@
21415
21424
  }
21416
21425
 
21417
21426
  ${
21418
- /* We are using flex `order` to define the visual ordering of the inc/dec buttons and the invalid icon because they are not "interactive" i.e. part of the tab order */ ''}
21427
+ /* We are using flex `order` to define the visual ordering of the inc/dec buttons
21428
+ and the invalid icon because they are not "interactive" i.e. part of the tab order */ ''}
21419
21429
  .step-up {
21420
21430
  order: 3;
21421
21431
  padding-right: calc(${standardPadding} / 4);
@@ -21448,7 +21458,7 @@
21448
21458
  }
21449
21459
 
21450
21460
  .root:focus-within,
21451
- :host(.invalid) .root {
21461
+ :host([error-visible]) .root {
21452
21462
  border-bottom-width: ${borderWidth};
21453
21463
  padding-bottom: 0;
21454
21464
  }
@@ -21474,6 +21484,7 @@
21474
21484
  constructor() {
21475
21485
  super(...arguments);
21476
21486
  this.appearance = NumberFieldAppearance.underline;
21487
+ this.errorVisible = false;
21477
21488
  }
21478
21489
  connectedCallback() {
21479
21490
  super.connectedCallback();
@@ -21487,6 +21498,9 @@
21487
21498
  __decorate([
21488
21499
  attr({ attribute: 'error-text' })
21489
21500
  ], NumberField.prototype, "errorText", void 0);
21501
+ __decorate([
21502
+ attr({ attribute: 'error-visible', mode: 'boolean' })
21503
+ ], NumberField.prototype, "errorVisible", void 0);
21490
21504
  /**
21491
21505
  * A function that returns a number-field registration for configuring the component with a DesignSystem.
21492
21506
  *
@@ -21504,31 +21518,37 @@
21504
21518
  delegatesFocus: true
21505
21519
  },
21506
21520
  stepDownGlyph: html `
21507
- <nimble-button
21521
+ <${DesignSystem.tagFor(Button)}
21508
21522
  class="step-up-down-button"
21509
21523
  appearance="ghost"
21510
21524
  content-hidden
21511
21525
  tabindex="-1"
21512
21526
  >
21513
21527
  "Decrement"
21514
- <nimble-icon-minus-wide slot="start"></nimble-icon-minus-wide>
21515
- </nimble-button>
21528
+ <${DesignSystem.tagFor(IconMinusWide)}
21529
+ slot="start"
21530
+ >
21531
+ </${DesignSystem.tagFor(IconMinusWide)}>
21532
+ </${DesignSystem.tagFor(Button)}>
21516
21533
  `,
21517
21534
  stepUpGlyph: html `
21518
- <nimble-button
21535
+ <${DesignSystem.tagFor(Button)}
21519
21536
  class="step-up-down-button"
21520
21537
  appearance="ghost"
21521
21538
  content-hidden
21522
21539
  tabindex="-1"
21523
21540
  >
21524
21541
  "Increment"
21525
- <nimble-icon-add slot="start"></nimble-icon-add>
21526
- </nimble-button>
21542
+ <${DesignSystem.tagFor(IconAdd)}
21543
+ slot="start">
21544
+ </${DesignSystem.tagFor(IconAdd)}>
21545
+ </${DesignSystem.tagFor(Button)}>
21527
21546
  `,
21528
21547
  end: html `
21529
- <nimble-icon-exclamation-mark
21530
- class="error-icon fail"
21531
- ></nimble-icon-exclamation-mark>
21548
+ <${DesignSystem.tagFor(IconExclamationMark)}
21549
+ severity="error"
21550
+ class="error-icon"
21551
+ ></${DesignSystem.tagFor(IconExclamationMark)}>
21532
21552
  ${errorTextTemplate}
21533
21553
  `
21534
21554
  });
@@ -21682,7 +21702,7 @@
21682
21702
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadioGroup());
21683
21703
 
21684
21704
  const styles$b = css `
21685
- ${styles$o}
21705
+ ${styles$n}
21686
21706
  `;
21687
21707
 
21688
21708
  /**
@@ -22316,7 +22336,7 @@
22316
22336
 
22317
22337
  const styles$4 = css `
22318
22338
  ${display('inline-block')}
22319
- ${styles$n}
22339
+ ${styles$m}
22320
22340
 
22321
22341
  :host {
22322
22342
  font: ${bodyFont};
@@ -22367,7 +22387,7 @@
22367
22387
  border-color: rgba(${borderRgbPartialColor}, 0.1);
22368
22388
  }
22369
22389
 
22370
- :host(.invalid) .root {
22390
+ :host([error-visible]) .root {
22371
22391
  border-bottom-color: ${failColor};
22372
22392
  }
22373
22393
 
@@ -22375,7 +22395,7 @@
22375
22395
  border-bottom-color: ${borderHoverColor};
22376
22396
  }
22377
22397
 
22378
- :host([appearance='frameless'].clear-inline-padding) .root {
22398
+ :host([appearance='frameless'][full-bleed]) .root {
22379
22399
  padding-left: 0px;
22380
22400
  padding-right: 0px;
22381
22401
  }
@@ -22388,7 +22408,7 @@
22388
22408
  user-select: none;
22389
22409
  }
22390
22410
 
22391
- :host([appearance='frameless'].clear-inline-padding) .root::before {
22411
+ :host([appearance='frameless'][full-bleed]) .root::before {
22392
22412
  display: none;
22393
22413
  }
22394
22414
 
@@ -22400,7 +22420,7 @@
22400
22420
  user-select: none;
22401
22421
  }
22402
22422
 
22403
- :host([appearance='frameless'].clear-inline-padding) .root::after {
22423
+ :host([appearance='frameless'][full-bleed]) .root::after {
22404
22424
  display: none;
22405
22425
  }
22406
22426
 
@@ -22470,7 +22490,7 @@
22470
22490
  }
22471
22491
  }
22472
22492
 
22473
- :host(.invalid) [part='end']::after {
22493
+ :host([error-visible]) [part='end']::after {
22474
22494
  border-bottom-color: ${failColor};
22475
22495
  }
22476
22496
 
@@ -22506,7 +22526,7 @@
22506
22526
  }
22507
22527
 
22508
22528
  .root:focus-within,
22509
- :host(.invalid) .root {
22529
+ :host([error-visible]) .root {
22510
22530
  border-bottom-width: ${borderWidth};
22511
22531
  padding-bottom: 0;
22512
22532
  }
@@ -22561,10 +22581,8 @@
22561
22581
  * HTML Attribute: appearance
22562
22582
  */
22563
22583
  this.appearance = TextFieldAppearance.underline;
22564
- }
22565
- connectedCallback() {
22566
- super.connectedCallback();
22567
- this.control.setAttribute('aria-errormessage', 'errortext');
22584
+ this.errorVisible = false;
22585
+ this.fullBleed = false;
22568
22586
  }
22569
22587
  }
22570
22588
  __decorate([
@@ -22573,6 +22591,12 @@
22573
22591
  __decorate([
22574
22592
  attr({ attribute: 'error-text' })
22575
22593
  ], TextField.prototype, "errorText", void 0);
22594
+ __decorate([
22595
+ attr({ attribute: 'error-visible', mode: 'boolean' })
22596
+ ], TextField.prototype, "errorVisible", void 0);
22597
+ __decorate([
22598
+ attr({ attribute: 'full-bleed', mode: 'boolean' })
22599
+ ], TextField.prototype, "fullBleed", void 0);
22576
22600
  const nimbleTextField = TextField.compose({
22577
22601
  baseName: 'text-field',
22578
22602
  baseClass: TextField$1,
@@ -22582,9 +22606,10 @@
22582
22606
  delegatesFocus: true
22583
22607
  },
22584
22608
  end: html `
22585
- <nimble-icon-exclamation-mark
22586
- class="error-icon fail"
22587
- ></nimble-icon-exclamation-mark>
22609
+ <${DesignSystem.tagFor(IconExclamationMark)}
22610
+ severity="error"
22611
+ class="error-icon"
22612
+ ></${DesignSystem.tagFor(IconExclamationMark)}>
22588
22613
  <span part="actions">
22589
22614
  <slot name="actions"></slot>
22590
22615
  </span>
@@ -22667,22 +22692,22 @@
22667
22692
  padding-right: 8px;
22668
22693
  }
22669
22694
 
22670
- :host(.fail.icon-visible) .fail {
22695
+ :host([severity='error'][icon-visible]) [severity='error'] {
22671
22696
  display: flex;
22672
22697
  flex: 0 0 auto;
22673
22698
  }
22674
22699
 
22675
- :host(.information.icon-visible) .information {
22700
+ :host([severity='information'][icon-visible]) [severity='information'] {
22676
22701
  display: flex;
22677
22702
  flex: 0 0 auto;
22678
22703
  }
22679
22704
  `.withBehaviors(themeBehavior(Theme.light, css `
22680
- :host(.fail) {
22705
+ :host([severity='error']) {
22681
22706
  --ni-private-tooltip-border-color: ${BannerFail100DarkUi};
22682
22707
  --ni-private-tooltip-background-color: ${White};
22683
22708
  }
22684
22709
 
22685
- :host(.information) {
22710
+ :host([severity='information']) {
22686
22711
  --ni-private-tooltip-border-color: ${Information100LightUi};
22687
22712
  --ni-private-tooltip-background-color: ${White};
22688
22713
  }
@@ -22692,11 +22717,11 @@
22692
22717
  --ni-private-tooltip-background-color: ${Black85};
22693
22718
  }
22694
22719
 
22695
- :host(.information) {
22720
+ :host([severity='information']) {
22696
22721
  --ni-private-tooltip-border-color: ${Information100DarkUi};
22697
22722
  }
22698
22723
 
22699
- :host(.fail) {
22724
+ :host([severity='error']) {
22700
22725
  --ni-private-tooltip-border-color: ${BannerFail100DarkUi};
22701
22726
  }
22702
22727
  `), themeBehavior(Theme.color, css `
@@ -22709,11 +22734,11 @@
22709
22734
  --ni-private-tooltip-background-color: ${hexToRgbaCssColor(White, 0.15)};
22710
22735
  }
22711
22736
 
22712
- :host(.fail) {
22737
+ :host([severity='error']) {
22713
22738
  --ni-private-tooltip-border-color: ${White};
22714
22739
  }
22715
22740
 
22716
- :host(.information) {
22741
+ :host([severity='information']) {
22717
22742
  --ni-private-tooltip-border-color: ${White};
22718
22743
  }
22719
22744
 
@@ -22723,10 +22748,9 @@
22723
22748
  `));
22724
22749
 
22725
22750
  // prettier-ignore
22726
- const template = context => {
22727
- return html `
22751
+ const template = html `
22728
22752
  ${when(x => x.tooltipVisible, html `
22729
- <${context.tagFor(AnchoredRegion)}
22753
+ <${DesignSystem.tagFor(AnchoredRegion)}
22730
22754
  class="anchored-region"
22731
22755
  fixed-placement="true"
22732
22756
  auto-update-mode="${x => x.autoUpdateMode}"
@@ -22744,20 +22768,35 @@
22744
22768
  ${ref('region')}
22745
22769
  >
22746
22770
  <div class="tooltip" part="tooltip" role="tooltip">
22747
- <${context.tagFor(IconExclamationMark)} class="fail status-icon"></${context.tagFor(IconExclamationMark)}>
22748
- <${context.tagFor(IconInfo)} class="information status-icon"></${context.tagFor(IconInfo)}>
22771
+ <${DesignSystem.tagFor(IconExclamationMark)}
22772
+ severity="error"
22773
+ class="status-icon"
22774
+ ></${DesignSystem.tagFor(IconExclamationMark)}>
22775
+ <${DesignSystem.tagFor(IconInfo)}
22776
+ severity="information"
22777
+ class="status-icon"
22778
+ ></${DesignSystem.tagFor(IconInfo)}>
22749
22779
  <slot></slot>
22750
22780
  </div>
22751
- </${context.tagFor(AnchoredRegion)}>
22781
+ </${DesignSystem.tagFor(AnchoredRegion)}>
22752
22782
  `)}
22753
- `;
22754
- };
22783
+ `;
22755
22784
 
22756
22785
  /**
22757
22786
  * A nimble-styled tooltip control.
22758
22787
  */
22759
22788
  class Tooltip extends Tooltip$1 {
22789
+ constructor() {
22790
+ super(...arguments);
22791
+ this.iconVisible = false;
22792
+ }
22760
22793
  }
22794
+ __decorate([
22795
+ attr
22796
+ ], Tooltip.prototype, "severity", void 0);
22797
+ __decorate([
22798
+ attr({ attribute: 'icon-visible', mode: 'boolean' })
22799
+ ], Tooltip.prototype, "iconVisible", void 0);
22761
22800
  const nimbleTooltip = Tooltip.compose({
22762
22801
  baseName: 'tooltip',
22763
22802
  baseClass: Tooltip$1,
@@ -22848,198 +22887,203 @@
22848
22887
  }
22849
22888
  }
22850
22889
 
22851
- const styles$1 = (context, _definition) => css `
22852
- ${display('block')}
22890
+ const styles$1 = css `
22891
+ ${display('block')}
22853
22892
 
22854
- :host {
22855
- ${
22893
+ :host {
22894
+ ${
22856
22895
  /* don't set font-size here or else it overrides what we set on .items */ ''}
22857
- font-family: ${bodyFontFamily};
22858
- font-weight: ${bodyFontWeight};
22859
- contain: content;
22860
- position: relative;
22861
- outline: none;
22862
- color: ${bodyFontColor};
22863
- cursor: pointer;
22864
- --ni-private-tree-item-nested-width: 0;
22865
- }
22896
+ font-family: ${bodyFontFamily};
22897
+ font-weight: ${bodyFontWeight};
22898
+ contain: content;
22899
+ position: relative;
22900
+ outline: none;
22901
+ color: ${bodyFontColor};
22902
+ cursor: pointer;
22903
+ --ni-private-tree-item-nested-width: 0;
22904
+ }
22866
22905
 
22867
- ${ /* this controls the side border */''}
22868
- :host([${groupSelectedAttribute}])::after {
22869
- background: ${borderHoverColor};
22870
- border-radius: 0px;
22871
- content: '';
22872
- display: block;
22873
- position: absolute;
22874
- top: 0px;
22875
- width: calc(${borderWidth} * 2);
22876
- height: calc(${iconSize} * 2);
22877
- }
22906
+ ${ /* this controls the side border */''}
22907
+ :host([${groupSelectedAttribute}])::after {
22908
+ background: ${borderHoverColor};
22909
+ border-radius: 0px;
22910
+ content: '';
22911
+ display: block;
22912
+ position: absolute;
22913
+ top: 0px;
22914
+ width: calc(${borderWidth} * 2);
22915
+ height: calc(${iconSize} * 2);
22916
+ }
22878
22917
 
22879
- .positioning-region {
22880
- display: flex;
22881
- position: relative;
22882
- box-sizing: border-box;
22883
- height: calc(${iconSize} * 2);
22884
- }
22918
+ .positioning-region {
22919
+ display: flex;
22920
+ position: relative;
22921
+ box-sizing: border-box;
22922
+ height: calc(${iconSize} * 2);
22923
+ }
22885
22924
 
22886
- .positioning-region:hover {
22887
- background: ${fillHoverColor};
22888
- }
22925
+ .positioning-region:hover {
22926
+ background: ${fillHoverColor};
22927
+ }
22889
22928
 
22890
- :host([${groupSelectedAttribute}]) .positioning-region:hover {
22891
- background: ${fillHoverSelectedColor};
22892
- }
22929
+ :host([${groupSelectedAttribute}]) .positioning-region:hover {
22930
+ background: ${fillHoverSelectedColor};
22931
+ }
22893
22932
 
22894
- :host(${focusVisible}) .positioning-region {
22895
- box-shadow: 0px 0px 0px ${borderWidth} ${borderHoverColor} inset;
22896
- outline: ${borderWidth} solid ${borderHoverColor};
22897
- outline-offset: -2px;
22898
- }
22933
+ :host(${focusVisible}) .positioning-region {
22934
+ box-shadow: 0px 0px 0px ${borderWidth} ${borderHoverColor} inset;
22935
+ outline: ${borderWidth} solid ${borderHoverColor};
22936
+ outline-offset: -2px;
22937
+ }
22899
22938
 
22900
- :host([selected]) .positioning-region {
22901
- background: ${fillSelectedColor};
22902
- }
22939
+ :host([selected]) .positioning-region {
22940
+ background: ${fillSelectedColor};
22941
+ }
22903
22942
 
22904
- :host([selected]) .positioning-region:hover {
22905
- background: ${fillHoverSelectedColor};
22906
- }
22943
+ :host([selected]) .positioning-region:hover {
22944
+ background: ${fillHoverSelectedColor};
22945
+ }
22907
22946
 
22908
- .positioning-region::before {
22909
- content: '';
22910
- display: block;
22911
- width: var(--ni-private-tree-item-nested-width);
22912
- flex-shrink: 0;
22913
- }
22947
+ .positioning-region::before {
22948
+ content: '';
22949
+ display: block;
22950
+ width: var(--ni-private-tree-item-nested-width);
22951
+ flex-shrink: 0;
22952
+ }
22914
22953
 
22915
- .content-region {
22916
- display: inline-flex;
22917
- align-items: center;
22918
- white-space: nowrap;
22919
- width: 100%;
22920
- padding-left: 10px;
22921
- font: inherit;
22922
- font-size: ${bodyFontSize};
22923
- user-select: none;
22924
- position: relative;
22925
- margin-inline-start: ${iconSize};
22926
- }
22954
+ .content-region {
22955
+ display: inline-flex;
22956
+ align-items: center;
22957
+ white-space: nowrap;
22958
+ width: 100%;
22959
+ padding-left: 10px;
22960
+ font: inherit;
22961
+ font-size: ${bodyFontSize};
22962
+ user-select: none;
22963
+ position: relative;
22964
+ margin-inline-start: ${iconSize};
22965
+ }
22927
22966
 
22928
- :host(${focusVisible}) .content-region {
22929
- outline: none;
22930
- }
22967
+ :host(${focusVisible}) .content-region {
22968
+ outline: none;
22969
+ }
22931
22970
 
22932
- :host([disabled]) .content-region {
22933
- opacity: 0.5;
22934
- cursor: not-allowed;
22935
- }
22971
+ :host([disabled]) .content-region {
22972
+ opacity: 0.5;
22973
+ cursor: not-allowed;
22974
+ }
22936
22975
 
22937
- .expand-collapse-button {
22938
- background: none;
22939
- border: none;
22940
- outline: none;
22941
- width: ${iconSize};
22942
- height: ${iconSize};
22943
- padding: 0px;
22944
- justify-content: center;
22945
- align-items: center;
22946
- cursor: pointer;
22947
- margin-left: 10px;
22948
- position: absolute;
22949
- }
22976
+ .expand-collapse-button {
22977
+ background: none;
22978
+ border: none;
22979
+ outline: none;
22980
+ width: ${iconSize};
22981
+ height: ${iconSize};
22982
+ padding: 0px;
22983
+ justify-content: center;
22984
+ align-items: center;
22985
+ cursor: pointer;
22986
+ margin-left: 10px;
22987
+ position: absolute;
22988
+ }
22950
22989
 
22951
- .expand-collapse-button svg {
22952
- width: ${iconSize};
22953
- height: ${iconSize};
22954
- transition: transform 0.2s ease-in;
22955
- pointer-events: none;
22956
- fill: currentcolor;
22957
- }
22990
+ .expand-collapse-button svg {
22991
+ width: ${iconSize};
22992
+ height: ${iconSize};
22993
+ transition: transform 0.2s ease-in;
22994
+ pointer-events: none;
22995
+ fill: currentcolor;
22996
+ }
22958
22997
 
22959
- ${
22998
+ ${
22960
22999
  /* this rule keeps children without an icon text aligned with parents */ ''}
22961
- span[part="start"] {
22962
- width: ${iconSize};
22963
- }
23000
+ span[part="start"] {
23001
+ width: ${iconSize};
23002
+ }
22964
23003
 
22965
- ${
23004
+ ${
22966
23005
  /* the start class is applied when the corresponding slots is filled */ ''}
22967
- .start {
22968
- display: flex;
22969
- fill: currentcolor;
22970
- margin-inline-start: ${iconSize};
22971
- margin-inline-end: ${iconSize};
22972
- }
23006
+ .start {
23007
+ display: flex;
23008
+ fill: currentcolor;
23009
+ margin-inline-start: ${iconSize};
23010
+ margin-inline-end: ${iconSize};
23011
+ }
22973
23012
 
22974
- slot[name='start']::slotted(*) {
22975
- width: ${iconSize};
22976
- height: ${iconSize};
22977
- }
23013
+ slot[name='start']::slotted(*) {
23014
+ width: ${iconSize};
23015
+ height: ${iconSize};
23016
+ }
22978
23017
 
22979
- ::slotted(${context.tagFor(TreeItem$1)}) {
22980
- --ni-private-tree-item-nested-width: 1em;
22981
- --ni-private-expand-collapse-button-nested-width: calc(
22982
- ${iconSize} * -1
22983
- );
22984
- }
23018
+ ${
23019
+ /*
23020
+ Cannot call DesignSystem.tagFor(TreeItem) as this string is evaluated
23021
+ before the registration of the element itself; the style is self-referencing.
23022
+ Instead styling against the role which is more general and likely a better approach.
23023
+ */ ''}
23024
+ ::slotted([role='treeitem']) {
23025
+ --ni-private-tree-item-nested-width: 1em;
23026
+ --ni-private-expand-collapse-button-nested-width: calc(
23027
+ ${iconSize} * -1
23028
+ );
23029
+ }
22985
23030
 
22986
- ${
22987
- /* the end class is applied when the corresponding slots is filled */ ''}
22988
- .end {
22989
- display: flex;
22990
- fill: currentcolor;
22991
- margin-inline-start: ${iconSize};
22992
- }
23031
+ ${ /* the end class is applied when the corresponding slots is filled */''}
23032
+ .end {
23033
+ display: flex;
23034
+ fill: currentcolor;
23035
+ margin-inline-start: ${iconSize};
23036
+ }
22993
23037
 
22994
- .items {
22995
- display: none;
22996
- ${
23038
+ .items {
23039
+ display: none;
23040
+ ${
22997
23041
  /*
22998
23042
  * this controls the nested indentation (by affecting .positioning-region::before)
22999
23043
  * it must minimally contain arithmetic with an em and a px value
23000
23044
  * make it larger or shorter by changing the px value
23001
23045
  */ ''}
23002
- font-size: calc(1em + (${iconSize} * 2));
23003
- }
23046
+ font-size: calc(1em + (${iconSize} * 2));
23047
+ }
23004
23048
 
23005
- :host([expanded]) .items {
23006
- display: block;
23007
- }
23008
- `.withBehaviors(new DirectionalStyleSheetBehavior(
23049
+ :host([expanded]) .items {
23050
+ display: block;
23051
+ }
23052
+ `.withBehaviors(new DirectionalStyleSheetBehavior(
23009
23053
  // ltr styles
23010
23054
  css `
23011
- .expand-collapse-button {
23012
- left: var(
23013
- --ni-private-expand-collapse-button-nested-width,
23014
- calc(${iconSize} * -1)
23015
- );
23016
- }
23055
+ .expand-collapse-button {
23056
+ left: var(
23057
+ --ni-private-expand-collapse-button-nested-width,
23058
+ calc(${iconSize} * -1)
23059
+ );
23060
+ }
23017
23061
 
23018
- .expand-collapse-button svg {
23019
- transform: rotate(90deg);
23020
- }
23062
+ .expand-collapse-button svg {
23063
+ transform: rotate(90deg);
23064
+ }
23021
23065
 
23022
- :host([expanded]) .expand-collapse-button svg {
23023
- transform: rotate(180deg);
23024
- }
23025
- `,
23066
+ :host([expanded]) .expand-collapse-button svg {
23067
+ transform: rotate(180deg);
23068
+ }
23069
+ `,
23026
23070
  // rtl styles
23027
23071
  css `
23028
- .expand-collapse-button {
23029
- right: var(
23030
- --ni-private-expand-collapse-button-nested-width,
23031
- calc(${iconSize} * -1)
23032
- );
23033
- }
23072
+ .expand-collapse-button {
23073
+ right: var(
23074
+ --ni-private-expand-collapse-button-nested-width,
23075
+ calc(${iconSize} * -1)
23076
+ );
23077
+ }
23034
23078
 
23035
- .expand-collapse-button svg {
23036
- transform: rotate(180deg);
23037
- }
23079
+ .expand-collapse-button svg {
23080
+ transform: rotate(180deg);
23081
+ }
23038
23082
 
23039
- :host([expanded]) .expand-collapse-button svg {
23040
- transform: rotate(135deg);
23041
- }
23042
- `));
23083
+ :host([expanded]) .expand-collapse-button svg {
23084
+ transform: rotate(135deg);
23085
+ }
23086
+ `));
23043
23087
 
23044
23088
  /**
23045
23089
  * A function that returns a nimble-tree-item registration for configuring the component with a DesignSystem.