@ni/nimble-components 11.5.0 → 11.6.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.
- package/dist/all-components-bundle.js +51 -6
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +102 -73
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/patterns/dropdown/styles.js +1 -4
- package/dist/esm/patterns/dropdown/styles.js.map +1 -1
- package/dist/esm/patterns/dropdown/types.d.ts +6 -0
- package/dist/esm/patterns/dropdown/types.js +5 -0
- package/dist/esm/patterns/dropdown/types.js.map +1 -1
- package/dist/esm/select/index.d.ts +3 -1
- package/dist/esm/select/index.js +11 -1
- package/dist/esm/select/index.js.map +1 -1
- package/dist/esm/select/styles.js +35 -1
- package/dist/esm/select/styles.js.map +1 -1
- package/dist/esm/select/types.d.ts +5 -0
- package/dist/esm/select/types.js +6 -0
- package/dist/esm/select/types.js.map +1 -0
- package/package.json +1 -1
|
@@ -24,10 +24,7 @@ export const styles = css `
|
|
|
24
24
|
:host::before {
|
|
25
25
|
content: '';
|
|
26
26
|
position: absolute;
|
|
27
|
-
bottom: calc(
|
|
28
|
-
var(--ni-private-hover-indicator-width) +
|
|
29
|
-
var(--ni-private-indicator-lines-gap)
|
|
30
|
-
);
|
|
27
|
+
bottom: calc(${borderWidth} + var(--ni-private-indicator-lines-gap));
|
|
31
28
|
width: 0px;
|
|
32
29
|
height: 0px;
|
|
33
30
|
justify-self: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/patterns/dropdown/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EACH,0BAA0B,EAC1B,QAAQ,EACR,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,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OlB,mBAAmB;4BACzB,gBAAgB;4BAChB,0BAA0B;;;;;;;;;;;;;;;;;;;kBAmBpC,aAAa;;;;oBAIX,aAAa,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;iBAsBlC,QAAQ;kBACP,QAAQ;gBACV,aAAa;;;;gBAIb,qBAAqB;;;;;;;;;;;;;;;;;;;;;CAqBpC,CAAC"}
|
|
@@ -3,3 +3,9 @@ export declare const DropdownPosition: {
|
|
|
3
3
|
readonly below: "below";
|
|
4
4
|
};
|
|
5
5
|
export declare type DropdownPosition = typeof DropdownPosition[keyof typeof DropdownPosition];
|
|
6
|
+
export declare const DropdownAppearance: {
|
|
7
|
+
readonly underline: "underline";
|
|
8
|
+
readonly outline: "outline";
|
|
9
|
+
readonly block: "block";
|
|
10
|
+
};
|
|
11
|
+
export declare type DropdownAppearance = typeof DropdownAppearance[keyof typeof DropdownAppearance];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/patterns/dropdown/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,KAAK,EAAE,cAAc,CAAC,KAAK;IAC3B,KAAK,EAAE,cAAc,CAAC,KAAK;CACrB,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/patterns/dropdown/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,KAAK,EAAE,cAAc,CAAC,KAAK;IAC3B,KAAK,EAAE,cAAc,CAAC,KAAK;CACrB,CAAC;AAIX,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAC9B,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;CACR,CAAC"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { Select as FoundationSelect } from '@microsoft/fast-foundation';
|
|
2
|
+
import { DropdownAppearance } from '../patterns/dropdown/types';
|
|
2
3
|
declare global {
|
|
3
4
|
interface HTMLElementTagNameMap {
|
|
4
5
|
'nimble-select': Select;
|
|
5
6
|
}
|
|
6
7
|
}
|
|
7
8
|
/**
|
|
8
|
-
* A nimble-
|
|
9
|
+
* A nimble-styled HTML select
|
|
9
10
|
*/
|
|
10
11
|
export declare class Select extends FoundationSelect {
|
|
12
|
+
appearance: DropdownAppearance;
|
|
11
13
|
setPositioning(): void;
|
|
12
14
|
slottedOptionsChanged(prev: Element[], next: Element[]): void;
|
|
13
15
|
private maxHeightChanged;
|
package/dist/esm/select/index.js
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { attr } from '@microsoft/fast-element';
|
|
1
3
|
import { DesignSystem, Select as FoundationSelect, selectTemplate as template } from '@microsoft/fast-foundation';
|
|
2
4
|
import { arrowExpanderDown16X16 } from '@ni/nimble-tokens/dist/icons/js';
|
|
3
5
|
import { styles } from './styles';
|
|
6
|
+
import { DropdownAppearance } from '../patterns/dropdown/types';
|
|
4
7
|
/**
|
|
5
|
-
* A nimble-
|
|
8
|
+
* A nimble-styled HTML select
|
|
6
9
|
*/
|
|
7
10
|
export class Select extends FoundationSelect {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.appearance = DropdownAppearance.underline;
|
|
14
|
+
}
|
|
8
15
|
// Workaround for https://github.com/microsoft/fast/issues/5123
|
|
9
16
|
setPositioning() {
|
|
10
17
|
if (!this.$fastController.isConnected) {
|
|
@@ -32,6 +39,9 @@ export class Select extends FoundationSelect {
|
|
|
32
39
|
}
|
|
33
40
|
}
|
|
34
41
|
}
|
|
42
|
+
__decorate([
|
|
43
|
+
attr
|
|
44
|
+
], Select.prototype, "appearance", void 0);
|
|
35
45
|
const nimbleSelect = Select.compose({
|
|
36
46
|
baseName: 'select',
|
|
37
47
|
baseClass: FoundationSelect,
|
|
@@ -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,iCAAiC,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/select/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EACH,YAAY,EACZ,MAAM,IAAI,gBAAgB,EAE1B,cAAc,IAAI,QAAQ,EAC7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAQhE;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,gBAAgB;IAA5C;;QAEW,eAAU,GAAuB,kBAAkB,CAAC,SAAS,CAAC;IAqCzE,CAAC;IAnCG,+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;QACvB,IAAI,CAAC,iCAAiC,EAAE,CAAC;IAC7C,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;IAEO,gBAAgB;QACpB,IAAI,CAAC,iCAAiC,EAAE,CAAC;IAC7C,CAAC;IAEO,iCAAiC;QACrC,IAAI,IAAI,CAAC,OAAO,EAAE;YACd,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAC1B,gCAAgC,EAChC,GAAG,IAAI,CAAC,SAAS,IAAI,CACxB,CAAC;SACL;IACL,CAAC;CACJ;AArCG;IADC,IAAI;0CACgE;AAuCzE,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"}
|
|
@@ -1,6 +1,40 @@
|
|
|
1
1
|
import { css } from '@microsoft/fast-element';
|
|
2
2
|
import { styles as dropdownStyles } from '../patterns/dropdown/styles';
|
|
3
|
+
import { appearanceBehavior } from '../utilities/style/appearance';
|
|
4
|
+
import { DropdownAppearance } from '../patterns/dropdown/types';
|
|
5
|
+
import { borderWidth, controlHeight, borderRgbPartialColor, standardPadding } from '../theme-provider/design-tokens';
|
|
3
6
|
export const styles = css `
|
|
4
7
|
${dropdownStyles}
|
|
5
|
-
|
|
8
|
+
`.withBehaviors(appearanceBehavior(DropdownAppearance.underline, css `
|
|
9
|
+
.control {
|
|
10
|
+
padding-top: ${borderWidth};
|
|
11
|
+
padding-left: calc(${borderWidth} + ${standardPadding} / 2);
|
|
12
|
+
padding-right: ${borderWidth};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:host([disabled]) .control {
|
|
16
|
+
border-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
17
|
+
}
|
|
18
|
+
`), appearanceBehavior(DropdownAppearance.outline, css `
|
|
19
|
+
.control {
|
|
20
|
+
border: ${borderWidth} solid rgba(${borderRgbPartialColor}, 0.3);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:host(.invalid) .errortext {
|
|
24
|
+
top: calc(${controlHeight} - ${borderWidth});
|
|
25
|
+
}
|
|
26
|
+
`), appearanceBehavior(DropdownAppearance.block, css `
|
|
27
|
+
.control {
|
|
28
|
+
background-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
29
|
+
padding-left: calc(${borderWidth} + ${standardPadding} / 2);
|
|
30
|
+
padding-right: ${borderWidth};
|
|
31
|
+
padding-bottom: calc(${borderWidth});
|
|
32
|
+
border-bottom: ${borderWidth}
|
|
33
|
+
rgba(${borderRgbPartialColor}, 0.07);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host([disabled]) .control {
|
|
37
|
+
background-color: rgba(${borderRgbPartialColor}, 0.07);
|
|
38
|
+
}
|
|
39
|
+
`));
|
|
6
40
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/select/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/select/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EACH,WAAW,EACX,aAAa,EACb,qBAAqB,EACrB,eAAe,EAClB,MAAM,iCAAiC,CAAC;AAEzC,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,cAAc;CACnB,CAAC,aAAa,CACP,kBAAkB,CACd,kBAAkB,CAAC,SAAS,EAC5B,GAAG,CAAA;;+BAEgB,WAAW;qCACL,WAAW,MAAM,eAAe;iCACpC,WAAW;;;;qCAIP,qBAAqB;;SAEjD,CACA,EACD,kBAAkB,CACd,kBAAkB,CAAC,OAAO,EAC1B,GAAG,CAAA;;0BAEW,WAAW,eAAe,qBAAqB;;;;4BAI7C,aAAa,MAAM,WAAW;;SAEjD,CACA,EACD,kBAAkB,CACd,kBAAkB,CAAC,KAAK,EACxB,GAAG,CAAA;;yCAE0B,qBAAqB;qCACzB,WAAW,MAAM,eAAe;iCACpC,WAAW;uCACL,WAAW;iCACjB,WAAW;2BACjB,qBAAqB;;;;yCAIP,qBAAqB;;SAErD,CACA,CACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/select/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ni/nimble-components",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.6.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",
|