@ni/nimble-components 19.6.3 → 19.7.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 +37 -2
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +614 -599
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/spinner/index.d.ts +7 -0
- package/dist/esm/spinner/index.js +15 -0
- package/dist/esm/spinner/index.js.map +1 -1
- package/dist/esm/spinner/styles.js +16 -2
- package/dist/esm/spinner/styles.js.map +1 -1
- package/dist/esm/spinner/types.d.ts +9 -0
- package/dist/esm/spinner/types.js +9 -0
- package/dist/esm/spinner/types.js.map +1 -0
- package/dist/esm/src/spinner/index.d.ts +7 -0
- package/dist/esm/src/spinner/types.d.ts +9 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
|
+
import { SpinnerAppearance } from './types';
|
|
2
3
|
declare global {
|
|
3
4
|
interface HTMLElementTagNameMap {
|
|
4
5
|
'nimble-spinner': Spinner;
|
|
@@ -9,5 +10,11 @@ declare global {
|
|
|
9
10
|
* A spinner is an animating indicator that can be placed in a particular region of a page to represent loading progress, or an ongoing operation, of an indeterminate / unknown duration.
|
|
10
11
|
*/
|
|
11
12
|
export declare class Spinner extends FoundationElement {
|
|
13
|
+
/**
|
|
14
|
+
* @public
|
|
15
|
+
* @description
|
|
16
|
+
* The appearance the spinner area should have.
|
|
17
|
+
*/
|
|
18
|
+
appearance: SpinnerAppearance;
|
|
12
19
|
}
|
|
13
20
|
export declare const spinnerTag: string;
|
|
@@ -1,12 +1,27 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { attr } from '@microsoft/fast-element';
|
|
1
3
|
import { DesignSystem, FoundationElement } from '@microsoft/fast-foundation';
|
|
2
4
|
import { styles } from './styles';
|
|
3
5
|
import { template } from './template';
|
|
6
|
+
import { SpinnerAppearance } from './types';
|
|
4
7
|
/**
|
|
5
8
|
* A Nimble-styled spinner component.
|
|
6
9
|
* A spinner is an animating indicator that can be placed in a particular region of a page to represent loading progress, or an ongoing operation, of an indeterminate / unknown duration.
|
|
7
10
|
*/
|
|
8
11
|
export class Spinner extends FoundationElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
/**
|
|
15
|
+
* @public
|
|
16
|
+
* @description
|
|
17
|
+
* The appearance the spinner area should have.
|
|
18
|
+
*/
|
|
19
|
+
this.appearance = SpinnerAppearance.default;
|
|
20
|
+
}
|
|
9
21
|
}
|
|
22
|
+
__decorate([
|
|
23
|
+
attr
|
|
24
|
+
], Spinner.prototype, "appearance", void 0);
|
|
10
25
|
const nimbleSpinner = Spinner.compose({
|
|
11
26
|
baseName: 'spinner',
|
|
12
27
|
template,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/spinner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/spinner/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAQ5C;;;GAGG;AACH,MAAM,OAAO,OAAQ,SAAQ,iBAAiB;IAA9C;;QACI;;;;WAIG;QAEI,eAAU,GAAsB,iBAAiB,CAAC,OAAO,CAAC;IACrE,CAAC;CAAA;AADG;IADC,IAAI;2CAC4D;AAGrE,MAAM,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC;IAClC,QAAQ,EAAE,SAAS;IACnB,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AACH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAC,CAAC;AAC1E,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css } from '@microsoft/fast-element';
|
|
2
2
|
import { display } from '@microsoft/fast-foundation';
|
|
3
|
-
import { Black15, Black91, White } from '@ni/nimble-tokens/dist/styledictionary/js/tokens';
|
|
3
|
+
import { Black15, Black91, DigitalGreenLight, PowerGreen, White } from '@ni/nimble-tokens/dist/styledictionary/js/tokens';
|
|
4
4
|
import { spinnerSmallHeight } from '../theme-provider/design-tokens';
|
|
5
5
|
import { Theme } from '../theme-provider/types';
|
|
6
6
|
import { themeBehavior } from '../utilities/style/theme';
|
|
@@ -28,6 +28,10 @@ export const styles = css `
|
|
|
28
28
|
opacity: 0.6;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
:host([appearance='accent']) div.container {
|
|
32
|
+
opacity: 1;
|
|
33
|
+
}
|
|
34
|
+
|
|
31
35
|
div.bit1,
|
|
32
36
|
div.bit2 {
|
|
33
37
|
background: var(--ni-private-spinner-bits-background-color);
|
|
@@ -139,14 +143,24 @@ export const styles = css `
|
|
|
139
143
|
}
|
|
140
144
|
`.withBehaviors(themeBehavior(Theme.light, css `
|
|
141
145
|
:host {
|
|
142
|
-
--ni-private-spinner-bits-background-color: ${Black91}
|
|
146
|
+
--ni-private-spinner-bits-background-color: ${Black91};
|
|
147
|
+
}
|
|
148
|
+
:host([appearance='accent']) {
|
|
149
|
+
--ni-private-spinner-bits-background-color: ${DigitalGreenLight};
|
|
150
|
+
}
|
|
143
151
|
`), themeBehavior(Theme.dark, css `
|
|
144
152
|
:host {
|
|
145
153
|
--ni-private-spinner-bits-background-color: ${Black15};
|
|
146
154
|
}
|
|
155
|
+
:host([appearance='accent']) {
|
|
156
|
+
--ni-private-spinner-bits-background-color: ${PowerGreen};
|
|
157
|
+
}
|
|
147
158
|
`), themeBehavior(Theme.color, css `
|
|
148
159
|
:host {
|
|
149
160
|
--ni-private-spinner-bits-background-color: ${White};
|
|
150
161
|
}
|
|
162
|
+
:host([appearance='accent']) {
|
|
163
|
+
--ni-private-spinner-bits-background-color: ${PowerGreen};
|
|
164
|
+
}
|
|
151
165
|
`));
|
|
152
166
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/spinner/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EACH,OAAO,EACP,OAAO,EACP,KAAK,EACR,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,aAAa,CAAC;;;kBAGV,kBAAkB;;;;;;;;UAQ1B;AACE;;;;;;GAMG;AACH,EACJ
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/spinner/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EACH,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,UAAU,EACV,KAAK,EACR,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,aAAa,CAAC;;;kBAGV,kBAAkB;;;;;;;;UAQ1B;AACE;;;;;;GAMG;AACH,EACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqHP,CAAC,aAAa,CACX,aAAa,CACT,KAAK,CAAC,KAAK,EACX,GAAG,CAAA;;8DAEmD,OAAO;;;8DAGP,iBAAiB;;SAEtE,CACJ,EACD,aAAa,CACT,KAAK,CAAC,IAAI,EACV,GAAG,CAAA;;8DAEmD,OAAO;;;8DAGP,UAAU;;SAE/D,CACJ,EACD,aAAa,CACT,KAAK,CAAC,KAAK,EACX,GAAG,CAAA;;8DAEmD,KAAK;;;8DAGL,UAAU;;SAE/D,CACJ,CACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types of spinner appearance.
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export declare const SpinnerAppearance: {
|
|
6
|
+
readonly default: undefined;
|
|
7
|
+
readonly accent: "accent";
|
|
8
|
+
};
|
|
9
|
+
export declare type SpinnerAppearance = (typeof SpinnerAppearance)[keyof typeof SpinnerAppearance];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/spinner/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC7B,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACV,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
|
+
import { SpinnerAppearance } from './types';
|
|
2
3
|
declare global {
|
|
3
4
|
interface HTMLElementTagNameMap {
|
|
4
5
|
'nimble-spinner': Spinner;
|
|
@@ -9,5 +10,11 @@ declare global {
|
|
|
9
10
|
* A spinner is an animating indicator that can be placed in a particular region of a page to represent loading progress, or an ongoing operation, of an indeterminate / unknown duration.
|
|
10
11
|
*/
|
|
11
12
|
export declare class Spinner extends FoundationElement {
|
|
13
|
+
/**
|
|
14
|
+
* @public
|
|
15
|
+
* @description
|
|
16
|
+
* The appearance the spinner area should have.
|
|
17
|
+
*/
|
|
18
|
+
appearance: SpinnerAppearance;
|
|
12
19
|
}
|
|
13
20
|
export declare const spinnerTag: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types of spinner appearance.
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export declare const SpinnerAppearance: {
|
|
6
|
+
readonly default: undefined;
|
|
7
|
+
readonly accent: "accent";
|
|
8
|
+
};
|
|
9
|
+
export declare type SpinnerAppearance = (typeof SpinnerAppearance)[keyof typeof SpinnerAppearance];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ni/nimble-components",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.7.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",
|