@ni/nimble-components 11.8.3 → 11.9.0

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.
@@ -10,6 +10,7 @@ import './button';
10
10
  import './card-button';
11
11
  import './checkbox';
12
12
  import './combobox';
13
+ import './dialog';
13
14
  import './drawer';
14
15
  import './icons/all-icons';
15
16
  import './list-option';
@@ -10,6 +10,7 @@ import './button';
10
10
  import './card-button';
11
11
  import './checkbox';
12
12
  import './combobox';
13
+ import './dialog';
13
14
  import './drawer';
14
15
  import './icons/all-icons';
15
16
  import './list-option';
@@ -1 +1 @@
1
- {"version":3,"file":"all-components.js","sourceRoot":"","sources":["../../src/all-components.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,cAAc,CAAC;AACtB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,UAAU,CAAC;AAClB,OAAO,eAAe,CAAC;AACvB,OAAO,YAAY,CAAC;AACpB,OAAO,YAAY,CAAC;AACpB,OAAO,UAAU,CAAC;AAClB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,eAAe,CAAC;AACvB,OAAO,QAAQ,CAAC;AAChB,OAAO,eAAe,CAAC;AACvB,OAAO,aAAa,CAAC;AACrB,OAAO,gBAAgB,CAAC;AACxB,OAAO,UAAU,CAAC;AAClB,OAAO,UAAU,CAAC;AAClB,OAAO,OAAO,CAAC;AACf,OAAO,aAAa,CAAC;AACrB,OAAO,QAAQ,CAAC;AAChB,OAAO,gBAAgB,CAAC;AACxB,OAAO,aAAa,CAAC;AACrB,OAAO,cAAc,CAAC;AACtB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,iBAAiB,CAAC;AACzB,OAAO,WAAW,CAAC;AACnB,OAAO,WAAW,CAAC;AACnB,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC"}
1
+ {"version":3,"file":"all-components.js","sourceRoot":"","sources":["../../src/all-components.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,cAAc,CAAC;AACtB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,UAAU,CAAC;AAClB,OAAO,eAAe,CAAC;AACvB,OAAO,YAAY,CAAC;AACpB,OAAO,YAAY,CAAC;AACpB,OAAO,UAAU,CAAC;AAClB,OAAO,UAAU,CAAC;AAClB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,eAAe,CAAC;AACvB,OAAO,QAAQ,CAAC;AAChB,OAAO,eAAe,CAAC;AACvB,OAAO,aAAa,CAAC;AACrB,OAAO,gBAAgB,CAAC;AACxB,OAAO,UAAU,CAAC;AAClB,OAAO,UAAU,CAAC;AAClB,OAAO,OAAO,CAAC;AACf,OAAO,aAAa,CAAC;AACrB,OAAO,QAAQ,CAAC;AAChB,OAAO,gBAAgB,CAAC;AACxB,OAAO,aAAa,CAAC;AACrB,OAAO,cAAc,CAAC;AACtB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,iBAAiB,CAAC;AACzB,OAAO,WAAW,CAAC;AACnB,OAAO,WAAW,CAAC;AACnB,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC"}
@@ -17,7 +17,7 @@ export declare class Combobox extends FoundationCombobox implements IHasErrorTex
17
17
  *
18
18
  * @internal
19
19
  */
20
- readonly dropdownButton: ToggleButton | undefined;
20
+ readonly dropdownButton?: ToggleButton;
21
21
  /**
22
22
  * A message explaining why the value is invalid.
23
23
  *
@@ -26,16 +26,36 @@ export declare class Combobox extends FoundationCombobox implements IHasErrorTex
26
26
  * HTML Attribute: error-text
27
27
  */
28
28
  errorText: string | undefined;
29
+ private valueUpdatedByInput;
30
+ private valueBeforeTextUpdate?;
29
31
  setPositioning(): void;
30
32
  slottedOptionsChanged(prev: HTMLElement[], next: HTMLElement[]): void;
31
33
  connectedCallback(): void;
32
- disconnectedCallback(): void;
33
34
  toggleButtonClickHandler(e: Event): void;
34
35
  toggleButtonChangeHandler(e: Event): void;
35
36
  toggleButtonKeyDownHandler(e: KeyboardEvent): boolean;
36
37
  filterOptions(): void;
38
+ /**
39
+ * This is a workaround for the issue described here: https://github.com/microsoft/fast/issues/6267
40
+ * For now, we will update the value ourselves while a user types in text. Note that there is other
41
+ * implementation related to this (like the 'keydownEventHandler') needed to create the complete set
42
+ * of desired behavior described in the issue noted above.
43
+ */
44
+ inputHandler(e: InputEvent): boolean | void;
45
+ keydownHandler(e: KeyboardEvent): boolean | void;
46
+ focusoutHandler(e: FocusEvent): boolean | void;
37
47
  protected openChanged(): void;
38
48
  private ariaLabelChanged;
39
49
  private updateInputAriaLabel;
40
- private readonly focusOutHandler;
50
+ /**
51
+ * This will only emit a `change` event after text entry where the text in the input prior to
52
+ * typing is different than the text present upon an attempt to commit (e.g. pressing <Enter>).
53
+ * So, for a concrete example:
54
+ * 1) User types 'Sue' (when Combobox input was blank).
55
+ * 2) User presses <Enter> -> 'change' event fires
56
+ * 3) User deletes 'Sue'
57
+ * 4) User re-types 'Sue'
58
+ * 5) User presses <Enter> -> NO 'change' event is fired
59
+ */
60
+ private emitChangeIfValueUpdated;
41
61
  }
@@ -12,9 +12,7 @@ import { styles } from './styles';
12
12
  export class Combobox extends FoundationCombobox {
13
13
  constructor() {
14
14
  super(...arguments);
15
- this.focusOutHandler = () => {
16
- this.open = false;
17
- };
15
+ this.valueUpdatedByInput = false;
18
16
  }
19
17
  // Workaround for https://github.com/microsoft/fast/issues/5123
20
18
  setPositioning() {
@@ -38,10 +36,6 @@ export class Combobox extends FoundationCombobox {
38
36
  // Call setPositioning() after this.forcedPosition is initialized.
39
37
  this.setPositioning();
40
38
  this.updateInputAriaLabel();
41
- this.addEventListener('focusout', this.focusOutHandler);
42
- }
43
- disconnectedCallback() {
44
- this.removeEventListener('focusout', this.focusOutHandler);
45
39
  }
46
40
  toggleButtonClickHandler(e) {
47
41
  e.stopImmediatePropagation();
@@ -68,6 +62,50 @@ export class Combobox extends FoundationCombobox {
68
62
  const enabledOptions = this.filteredOptions.filter(o => !o.disabled);
69
63
  this.filteredOptions = enabledOptions;
70
64
  }
65
+ /**
66
+ * This is a workaround for the issue described here: https://github.com/microsoft/fast/issues/6267
67
+ * For now, we will update the value ourselves while a user types in text. Note that there is other
68
+ * implementation related to this (like the 'keydownEventHandler') needed to create the complete set
69
+ * of desired behavior described in the issue noted above.
70
+ */
71
+ // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
72
+ inputHandler(e) {
73
+ const returnValue = super.inputHandler(e);
74
+ if (!this.valueUpdatedByInput) {
75
+ this.valueBeforeTextUpdate = this.value;
76
+ }
77
+ this.value = this.control.value;
78
+ this.valueUpdatedByInput = true;
79
+ return returnValue;
80
+ }
81
+ // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
82
+ keydownHandler(e) {
83
+ const returnValue = super.keydownHandler(e);
84
+ if (e.ctrlKey || e.altKey) {
85
+ return returnValue;
86
+ }
87
+ switch (e.key) {
88
+ case keyEnter:
89
+ this.emitChangeIfValueUpdated();
90
+ break;
91
+ case keyArrowDown:
92
+ case keyArrowUp:
93
+ if (this.open && this.valueUpdatedByInput) {
94
+ this.valueUpdatedByInput = false;
95
+ }
96
+ break;
97
+ default:
98
+ return returnValue;
99
+ }
100
+ return returnValue;
101
+ }
102
+ // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
103
+ focusoutHandler(e) {
104
+ const returnValue = super.focusoutHandler(e);
105
+ this.open = false;
106
+ this.emitChangeIfValueUpdated();
107
+ return returnValue;
108
+ }
71
109
  openChanged() {
72
110
  super.openChanged();
73
111
  if (this.dropdownButton) {
@@ -87,6 +125,24 @@ export class Combobox extends FoundationCombobox {
87
125
  inputElement?.removeAttribute('aria-label');
88
126
  }
89
127
  }
128
+ /**
129
+ * This will only emit a `change` event after text entry where the text in the input prior to
130
+ * typing is different than the text present upon an attempt to commit (e.g. pressing <Enter>).
131
+ * So, for a concrete example:
132
+ * 1) User types 'Sue' (when Combobox input was blank).
133
+ * 2) User presses <Enter> -> 'change' event fires
134
+ * 3) User deletes 'Sue'
135
+ * 4) User re-types 'Sue'
136
+ * 5) User presses <Enter> -> NO 'change' event is fired
137
+ */
138
+ emitChangeIfValueUpdated() {
139
+ if (this.valueUpdatedByInput) {
140
+ if (this.value !== this.valueBeforeTextUpdate) {
141
+ this.$emit('change');
142
+ }
143
+ this.valueUpdatedByInput = false;
144
+ }
145
+ }
90
146
  }
91
147
  __decorate([
92
148
  observable
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/combobox/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EACH,YAAY,EACZ,QAAQ,IAAI,kBAAkB,EAE9B,gBAAgB,IAAI,QAAQ,EAC/B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACH,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,QAAQ,EACX,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,2BAA2B,CAAC;AACnC,OAAO,8BAA8B,CAAC;AAEtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AASlC;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,kBAAkB;IAAhD;;QAwGqB,oBAAe,GAAG,GAAS,EAAE;YAC1C,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;QACtB,CAAC,CAAC;IACN,CAAC;IAxFG,+DAA+D;IAC/C,cAAc;QAC1B,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE;YACnC,qDAAqD;YACrD,mDAAmD;YACnD,OAAO;SACV;QACD,KAAK,CAAC,cAAc,EAAE,CAAC;IAC3B,CAAC;IAED,+DAA+D;IAC/C,qBAAqB,CACjC,IAAmB,EACnB,IAAmB;QAEnB,MAAM,KAAK,GAAG,IAAI,CAAC,KAA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C,0BAA0B,CAAC,CAAC,CAAC,KAAsB,CAAC;;;;iCAI3D,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;;;;;;;;;;UAUlC,iBAAiB;KACtB;CACJ,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC,CAAC"}
@@ -0,0 +1,64 @@
1
+ import { ARIAGlobalStatesAndProperties, FoundationElement } from '@microsoft/fast-foundation';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'nimble-dialog': Dialog;
5
+ }
6
+ }
7
+ /**
8
+ * Symbol that is returned as the dialog close reason (from the Promise returned by show()) when
9
+ * the dialog was closed by pressing the ESC key (vs. calling the close() function).
10
+ */
11
+ export declare const USER_DISMISSED: unique symbol;
12
+ export declare type UserDismissed = typeof USER_DISMISSED;
13
+ /**
14
+ * This is a workaround for an incomplete definition of the native dialog element:
15
+ * https://github.com/microsoft/TypeScript/issues/48267
16
+ * @internal
17
+ */
18
+ export interface ExtendedDialog extends HTMLDialogElement {
19
+ showModal(): void;
20
+ close(): void;
21
+ }
22
+ /**
23
+ * A nimble-styled dialog.
24
+ */
25
+ export declare class Dialog<CloseReason = void> extends FoundationElement {
26
+ /**
27
+ * @public
28
+ * @description
29
+ * Prevents dismissing the dialog via the Escape key
30
+ */
31
+ preventDismiss: boolean;
32
+ /**
33
+ * The ref to the internal dialog element.
34
+ *
35
+ * @internal
36
+ */
37
+ readonly dialogElement: ExtendedDialog;
38
+ /**
39
+ * True if the dialog is open/showing, false otherwise
40
+ */
41
+ get open(): boolean;
42
+ private resolveShow?;
43
+ private closeReason;
44
+ /**
45
+ * Opens the dialog
46
+ * @returns Promise that is resolved when the dialog is closed. The value of the resolved Promise is the reason value passed to the close() method, or USER_DISMISSED if the dialog was closed via the ESC key.
47
+ */
48
+ show(): Promise<CloseReason | UserDismissed>;
49
+ /**
50
+ * Closes the dialog
51
+ * @param reason An optional value indicating how/why the dialog was closed.
52
+ */
53
+ close(reason: CloseReason): void;
54
+ /**
55
+ * @internal
56
+ */
57
+ closeHandler(): boolean;
58
+ /**
59
+ * @internal
60
+ */
61
+ cancelHandler(event: Event): boolean;
62
+ }
63
+ export interface Dialog extends ARIAGlobalStatesAndProperties {
64
+ }
@@ -0,0 +1,90 @@
1
+ import { __decorate } from "tslib";
2
+ import { attr } from '@microsoft/fast-element';
3
+ import { applyMixins, ARIAGlobalStatesAndProperties, DesignSystem, FoundationElement } from '@microsoft/fast-foundation';
4
+ import { styles } from './styles';
5
+ import { template } from './template';
6
+ /**
7
+ * Symbol that is returned as the dialog close reason (from the Promise returned by show()) when
8
+ * the dialog was closed by pressing the ESC key (vs. calling the close() function).
9
+ */
10
+ export const USER_DISMISSED = Symbol('user dismissed');
11
+ /**
12
+ * A nimble-styled dialog.
13
+ */
14
+ // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
15
+ export class Dialog extends FoundationElement {
16
+ constructor() {
17
+ super(...arguments);
18
+ /**
19
+ * @public
20
+ * @description
21
+ * Prevents dismissing the dialog via the Escape key
22
+ */
23
+ this.preventDismiss = false;
24
+ }
25
+ /**
26
+ * True if the dialog is open/showing, false otherwise
27
+ */
28
+ get open() {
29
+ return this.resolveShow !== undefined;
30
+ }
31
+ /**
32
+ * Opens the dialog
33
+ * @returns Promise that is resolved when the dialog is closed. The value of the resolved Promise is the reason value passed to the close() method, or USER_DISMISSED if the dialog was closed via the ESC key.
34
+ */
35
+ async show() {
36
+ if (this.open) {
37
+ throw new Error('Dialog is already open');
38
+ }
39
+ this.dialogElement.showModal();
40
+ return new Promise((resolve, _reject) => {
41
+ this.resolveShow = resolve;
42
+ });
43
+ }
44
+ /**
45
+ * Closes the dialog
46
+ * @param reason An optional value indicating how/why the dialog was closed.
47
+ */
48
+ close(reason) {
49
+ if (!this.open) {
50
+ throw new Error('Dialog is not open');
51
+ }
52
+ this.closeReason = reason;
53
+ this.dialogElement.close();
54
+ }
55
+ /**
56
+ * @internal
57
+ */
58
+ closeHandler() {
59
+ this.resolveShow(this.closeReason);
60
+ this.resolveShow = undefined;
61
+ return true;
62
+ }
63
+ /**
64
+ * @internal
65
+ */
66
+ cancelHandler(event) {
67
+ if (this.preventDismiss) {
68
+ event.preventDefault();
69
+ }
70
+ else {
71
+ this.closeReason = USER_DISMISSED;
72
+ }
73
+ return true;
74
+ }
75
+ }
76
+ __decorate([
77
+ attr({ attribute: 'prevent-dismiss', mode: 'boolean' })
78
+ ], Dialog.prototype, "preventDismiss", void 0);
79
+ applyMixins(Dialog, ARIAGlobalStatesAndProperties);
80
+ const nimbleDialog = Dialog.compose({
81
+ baseName: 'dialog',
82
+ template,
83
+ styles,
84
+ baseClass: Dialog,
85
+ shadowOptions: {
86
+ delegatesFocus: true
87
+ }
88
+ });
89
+ DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDialog());
90
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dialog/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EACH,WAAW,EACX,6BAA6B,EAC7B,YAAY,EACZ,iBAAiB,EACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAQtC;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkB,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAatE;;GAEG;AACH,mEAAmE;AACnE,MAAM,OAAO,MAA2B,SAAQ,iBAAiB;IAAjE;;QACI;;;;WAIG;QAEI,mBAAc,GAAG,KAAK,CAAC;IAiElC,CAAC;IAxDG;;OAEG;IACH,IAAW,IAAI;QACX,OAAO,IAAI,CAAC,WAAW,KAAK,SAAS,CAAC;IAC1C,CAAC;IAKD;;;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I;KACvB;CACJ,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const styles: import("@microsoft/fast-element").ElementStyles;
@@ -0,0 +1,14 @@
1
+ import { css } from '@microsoft/fast-element';
2
+ import { display } from '@microsoft/fast-foundation';
3
+ import { applicationBackgroundColor, borderWidth, popupBoxShadowColor, popupBorderColor } from '../theme-provider/design-tokens';
4
+ export const styles = css `
5
+ ${display('grid')}
6
+
7
+ dialog {
8
+ background-color: ${applicationBackgroundColor};
9
+ border: ${borderWidth} solid ${popupBorderColor};
10
+ box-shadow: 0px 2px 3px ${popupBoxShadowColor};
11
+ max-width: 50%;
12
+ }
13
+ `;
14
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/dialog/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD,OAAO,EACH,0BAA0B,EAC1B,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EACnB,MAAM,iCAAiC,CAAC;AAEzC,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,MAAM,CAAC;;;4BAGO,0BAA0B;kBACpC,WAAW,UAAU,gBAAgB;kCACrB,mBAAmB;;;CAGpD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { Dialog } from '.';
2
+ export declare const template: import("@microsoft/fast-element").ViewTemplate<Dialog<void>, any>;
@@ -0,0 +1,15 @@
1
+ import { html, ref } from '@microsoft/fast-element';
2
+ export const template = html `
3
+ <template>
4
+ <dialog
5
+ ${ref('dialogElement')}
6
+ role="alertdialog"
7
+ aria-label="${x => x.ariaLabel}"
8
+ @cancel="${(x, c) => x.cancelHandler(c.event)}"
9
+ @close="${x => x.closeHandler()}"
10
+ >
11
+ <slot></slot>
12
+ </dialog>
13
+ </template>
14
+ `;
15
+ //# sourceMappingURL=template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../src/dialog/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAGpD,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAQ;;;cAGtB,GAAG,CAAC,eAAe,CAAC;;0BAER,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS;uBACnB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC;sBACnC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,EAAE;;;;;CAK1C,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { css } from '@microsoft/fast-element';
2
2
  import { display } from '@microsoft/fast-foundation';
3
- import { borderRgbPartialColor, borderHoverColor, borderWidth, bodyFontColor, bodyDisabledFontColor, controlHeight, fillSelectedRgbPartialColor, controlLabelFont, controlLabelFontColor, labelHeight, smallDelay, bodyFont, failColor, standardPadding, controlLabelDisabledFontColor } from '../theme-provider/design-tokens';
3
+ import { borderRgbPartialColor, borderHoverColor, borderWidth, bodyFontColor, bodyDisabledFontColor, controlHeight, controlLabelFont, controlLabelFontColor, labelHeight, smallDelay, bodyFont, failColor, standardPadding, controlLabelDisabledFontColor } from '../theme-provider/design-tokens';
4
4
  import { appearanceBehavior } from '../utilities/style/appearance';
5
5
  import { NumberFieldAppearance } from './types';
6
6
  import { styles as errorStyles } from '../patterns/error/styles';
@@ -119,11 +119,6 @@ export const styles = css `
119
119
  outline: none;
120
120
  }
121
121
 
122
- .control::selection {
123
- color: ${controlLabelFontColor};
124
- background: rgba(${fillSelectedRgbPartialColor}, 0.3);
125
- }
126
-
127
122
  .control::placeholder {
128
123
  color: ${controlLabelFontColor};
129
124
  }
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/number-field/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EACH,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,qBAAqB,EACrB,aAAa,EACb,2BAA2B,EAC3B,gBAAgB,EAChB,qBAAqB,EACrB,WAAW,EACX,UAAU,EACV,QAAQ,EACR,SAAS,EACT,eAAe,EACf,6BAA6B,EAChC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEjE,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,cAAc,CAAC;MACvB,WAAW;;;gBAGD,QAAQ;;;iBAGP,aAAa;uBACP,WAAW,MAAM,aAAa;mDACF,WAAW;;cAEhD,aAAa,UAAU,WAAW;;;;;iBAK/B,qBAAqB;;;;;;iBAMrB,qBAAqB;gBACtB,gBAAgB;;;;iBAIf,6BAA6B;;;;;;;;;;;iCAWb,qBAAqB;mBACnC,WAAW;;;;+BAIC,gBAAgB;;;;6BAIlB,qBAAqB;;;;+BAInB,SAAS;;;;UAI9B,CAAA,yCAA0C,EAAE;;;;;;;;;;4BAU1B,WAAW;;;yBAGd,gBAAgB;;4BAEb,UAAU;;;;;;;;;;+BAUP,SAAS;;;;;;;;;;;;;;;;;;;;;;;;6BAwBX,eAAe;;;;;;;;;;;iBAW3B,qBAAqB;2BACX,2BAA2B;;;;iBAIrC,qBAAqB;;;;iBAIrB,qBAAqB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BAAqB;gBACtB,gBAAgB;;;;iBAIf,6BAA6B;;;;;;;;;;;iCAWb,qBAAqB;mBACnC,WAAW;;;;+BAIC,gBAAgB;;;;6BAIlB,qBAAqB;;;;+BAInB,SAAS;;;;UAI9B,CAAA,yCAA0C,EAAE;;;;;;;;;;4BAU1B,WAAW;;;yBAGd,gBAAgB;;4BAEb,UAAU;;;;;;;;;;+BAUP,SAAS;;;;;;;;;;;;;;;;;;;;;;;;6BAwBX,eAAe;;;;;;;;;;;iBAW3B,qBAAqB;;;;iBAIrB,qBAAqB;;;;;;;MAOhC;AACE,uKAAuK,CAAC,EAC5K;;;8BAG0B,eAAe;;;;;;;;UAQnC,aAAa,CAAC,iBAAiB;;;;;;;;;8BASX,eAAe;;CAE5C,CAAC,aAAa,CACH,kBAAkB,CACd,qBAAqB,CAAC,SAAS,EAC/B,GAAG,CAAA;;uCAEoB,WAAW;;;SAGzC,CACI,EACD,kBAAkB,CACd,qBAAqB,CAAC,KAAK,EAC3B,GAAG,CAAA;;yCAEsB,qBAAqB;;;;;uCAKvB,WAAW;;;;;;;;;yCAST,qBAAqB;;SAErD,CACI,EACD,kBAAkB,CACd,qBAAqB,CAAC,OAAO,EAC7B,GAAG,CAAA;;gCAEa,WAAW;;;SAGlC,CACI,CACJ,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { css } from '@microsoft/fast-element';
2
2
  import { display } from '@microsoft/fast-foundation';
3
- import { borderRgbPartialColor, borderHoverColor, borderWidth, fillSelectedRgbPartialColor, smallDelay, bodyFontColor, bodyDisabledFontColor, controlLabelFont, controlLabelFontColor, bodyFont, controlLabelDisabledFontColor } from '../theme-provider/design-tokens';
3
+ import { borderRgbPartialColor, borderHoverColor, borderWidth, smallDelay, bodyFontColor, bodyDisabledFontColor, controlLabelFont, controlLabelFontColor, bodyFont, controlLabelDisabledFontColor } from '../theme-provider/design-tokens';
4
4
  import { appearanceBehavior } from '../utilities/style/appearance';
5
5
  import { TextAreaAppearance } from './types';
6
6
  export const styles = css `
@@ -70,11 +70,6 @@ export const styles = css `
70
70
  box-shadow: none;
71
71
  }
72
72
 
73
- .control::selection {
74
- color: ${controlLabelFontColor};
75
- background: rgba(${fillSelectedRgbPartialColor}, 0.3);
76
- }
77
-
78
73
  .control::placeholder {
79
74
  color: ${controlLabelFontColor};
80
75
  }
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/text-area/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EACH,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,EACX,2BAA2B,EAC3B,UAAU,EACV,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,QAAQ,EACR,6BAA6B,EAChC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,aAAa,CAAC;;;gBAGZ,QAAQ;;;iBAGP,aAAa;;;;;;iBAMb,qBAAqB;;;;;iBAKrB,qBAAqB;gBACtB,gBAAgB;;;;iBAIf,6BAA6B;;;;;;;;;;;;;;kBAc5B,WAAW;;iCAEI,UAAU,YAAY,UAAU;;;;;;;;;;;wBAWzC,gBAAgB;sCACF,gBAAgB;;;;wBAI9B,gBAAgB;;;;;;;;6BAQX,qBAAqB;;;;;iBAKjC,qBAAqB;2BACX,2BAA2B;;;;iBAIrC,qBAAqB;;;;iBAIrB,6BAA6B;;;;;;;;;;;;;;;;;;;;CAoB7C;IACG,kBAAkB;KACjB,aAAa,CACV,kBAAkB,CACd,kBAAkB,CAAC,OAAO,EAC1B,GAAG,CAAA;;yCAE0B,qBAAqB;;;aAGjD,CAC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 -1,7 +1,7 @@
1
1
  /* eslint-disable @typescript-eslint/indent */
2
2
  import { css } from '@microsoft/fast-element';
3
3
  import { display } from '@microsoft/fast-foundation';
4
- import { borderRgbPartialColor, borderHoverColor, borderWidth, bodyFontColor, bodyDisabledFontColor, controlHeight, failColor, fillSelectedRgbPartialColor, labelHeight, smallDelay, controlLabelFont, bodyFont, controlLabelFontColor, controlLabelDisabledFontColor, standardPadding } from '../theme-provider/design-tokens';
4
+ import { borderRgbPartialColor, borderHoverColor, borderWidth, bodyFontColor, bodyDisabledFontColor, controlHeight, failColor, labelHeight, smallDelay, controlLabelFont, bodyFont, controlLabelFontColor, controlLabelDisabledFontColor, standardPadding } from '../theme-provider/design-tokens';
5
5
  import { appearanceBehavior } from '../utilities/style/appearance';
6
6
  import { TextFieldAppearance } from './types';
7
7
  import { Theme } from '../theme-provider/types';
@@ -134,11 +134,6 @@ export const styles = css `
134
134
  text-overflow: clip;
135
135
  }
136
136
 
137
- .control::selection {
138
- color: ${controlLabelFontColor};
139
- background: rgba(${fillSelectedRgbPartialColor}, 0.3);
140
- }
141
-
142
137
  .control::placeholder {
143
138
  color: ${controlLabelFontColor};
144
139
  }
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/text-field/styles.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD,OAAO,EACH,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,qBAAqB,EACrB,aAAa,EACb,SAAS,EACT,2BAA2B,EAC3B,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,qBAAqB,EACrB,6BAA6B,EAC7B,eAAe,EAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,m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HANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ni/nimble-components",
3
- "version": "11.8.3",
3
+ "version": "11.9.0",
4
4
  "description": "Styled web components for the NI Nimble Design System",
5
5
  "scripts": {
6
6
  "build": "npm run generate-icons && npm run build-components && npm run bundle-components && npm run generate-scss && npm run build-storybook",