@ni/nimble-components 7.4.0 → 7.4.3
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.
- package/dist/all-components-bundle.js +22 -20
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +4 -3
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/icon-base/icon-metadata.d.ts +1 -1
- package/dist/esm/icon-base/icon-metadata.js +423 -141
- package/dist/esm/icon-base/icon-metadata.js.map +1 -1
- package/dist/esm/nimble-components/src/icon-base/icon-metadata.d.ts +1 -1
- package/dist/esm/nimble-components/src/select/index.d.ts +1 -2
- package/dist/esm/select/index.d.ts +1 -2
- package/dist/esm/select/index.js +8 -18
- package/dist/esm/select/index.js.map +1 -1
- package/dist/esm/text-area/styles.js +14 -2
- package/dist/esm/text-area/styles.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/select/index.js
CHANGED
|
@@ -5,24 +5,6 @@ import { styles } from './styles';
|
|
|
5
5
|
* A nimble-styed HTML select
|
|
6
6
|
*/
|
|
7
7
|
export class Select extends FoundationSelect {
|
|
8
|
-
get value() {
|
|
9
|
-
return super.value;
|
|
10
|
-
}
|
|
11
|
-
set value(value) {
|
|
12
|
-
super.value = value;
|
|
13
|
-
// Workaround for https://github.com/microsoft/fast/issues/5139
|
|
14
|
-
// When the value property is set very early in the element's lifecycle (e.g. Angular value binding),
|
|
15
|
-
// the options property will not be set yet. As a workaround, we mark the listbox-option element with
|
|
16
|
-
// the selected attribute, which will set the initial value correctly.
|
|
17
|
-
if (value !== null && this.options.length === 0) {
|
|
18
|
-
const options = this.querySelectorAll('option,[role="option"]');
|
|
19
|
-
options.forEach(option => {
|
|
20
|
-
if (option.getAttribute('value') === value) {
|
|
21
|
-
option.setAttribute('selected', '');
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
8
|
// Workaround for https://github.com/microsoft/fast/issues/5123
|
|
27
9
|
setPositioning() {
|
|
28
10
|
if (!this.$fastController.isConnected) {
|
|
@@ -37,6 +19,14 @@ export class Select extends FoundationSelect {
|
|
|
37
19
|
// Call setPositioning() after this.forcedPosition is initialized.
|
|
38
20
|
this.setPositioning();
|
|
39
21
|
}
|
|
22
|
+
// Workaround for https://github.com/microsoft/fast/issues/5773
|
|
23
|
+
slottedOptionsChanged(prev, next) {
|
|
24
|
+
const value = this.value;
|
|
25
|
+
super.slottedOptionsChanged(prev, next);
|
|
26
|
+
if (value) {
|
|
27
|
+
this.value = value;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
40
30
|
}
|
|
41
31
|
const nimbleSelect = Select.compose({
|
|
42
32
|
baseName: 'select',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/select/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EACZ,MAAM,IAAI,gBAAgB,EAE1B,cAAc,IAAI,QAAQ,EAC7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAC9F,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAQlC;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,gBAAgB;IACxC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/select/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EACZ,MAAM,IAAI,gBAAgB,EAE1B,cAAc,IAAI,QAAQ,EAC7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAC9F,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAQlC;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,gBAAgB;IACxC,+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;IAEe,iBAAiB;QAC7B,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,kEAAkE;QAClE,IAAI,CAAC,cAAc,EAAE,CAAC;IAC1B,CAAC;IAED,+DAA+D;IAC/C,qBAAqB,CACjC,IAAe,EACf,IAAe;QAEf,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,KAAK,CAAC,qBAAqB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACxC,IAAI,KAAK,EAAE;YACP,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;SACtB;IACL,CAAC;CACJ;AAED,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAgB;IAC/C,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,gBAAgB;IAC3B,QAAQ;IACR,MAAM;IACN,SAAS,EAAE,sBAAsB,CAAC,IAAI;CACzC,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC"}
|
|
@@ -4,13 +4,15 @@ import { borderRgbPartialColor, borderHoverColor, borderWidth, fillSelectedRgbPa
|
|
|
4
4
|
import { appearanceBehavior } from '../utilities/style/appearance';
|
|
5
5
|
import { TextAreaAppearance } from './types';
|
|
6
6
|
export const styles = css `
|
|
7
|
-
${display('inline-
|
|
7
|
+
${display('inline-flex')}
|
|
8
8
|
|
|
9
9
|
:host {
|
|
10
10
|
font: ${bodyFont};
|
|
11
11
|
outline: none;
|
|
12
12
|
user-select: none;
|
|
13
13
|
color: ${bodyFontColor};
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
vertical-align: top;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
:host([disabled]) {
|
|
@@ -18,7 +20,7 @@ export const styles = css `
|
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
.label {
|
|
21
|
-
display:
|
|
23
|
+
display: block;
|
|
22
24
|
color: ${controlLabelFontColor};
|
|
23
25
|
font: ${controlLabelFont};
|
|
24
26
|
}
|
|
@@ -30,6 +32,8 @@ export const styles = css `
|
|
|
30
32
|
.control {
|
|
31
33
|
-webkit-appearance: none;
|
|
32
34
|
font: inherit;
|
|
35
|
+
width: 100%;
|
|
36
|
+
flex-grow: 1;
|
|
33
37
|
outline: none;
|
|
34
38
|
box-sizing: border-box;
|
|
35
39
|
position: relative;
|
|
@@ -79,6 +83,14 @@ export const styles = css `
|
|
|
79
83
|
color: ${controlLabelDisabledFontColor};
|
|
80
84
|
}
|
|
81
85
|
|
|
86
|
+
:host([cols]) .control {
|
|
87
|
+
width: auto;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
:host([rows]) .control {
|
|
91
|
+
flex: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
82
94
|
:host([resize='both']) .control {
|
|
83
95
|
resize: both;
|
|
84
96
|
}
|
|
@@ -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,
|
|
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,CACJ,EACD,kBAAkB,CACd,kBAAkB,CAAC,KAAK,EACxB,GAAG,CAAA;;6CAE8B,qBAAqB;;;;;;;;;6CASrB,qBAAqB;;aAErD,CACJ,CACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ni/nimble-components",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.3",
|
|
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",
|