@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.
- package/dist/all-components-bundle.js +460 -416
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +929 -911
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/breadcrumb/index.d.ts +2 -0
- package/dist/esm/breadcrumb/index.js +5 -0
- package/dist/esm/breadcrumb/index.js.map +1 -1
- package/dist/esm/breadcrumb/styles.js +4 -4
- package/dist/esm/breadcrumb/types.d.ts +9 -0
- package/dist/esm/breadcrumb/types.js +9 -0
- package/dist/esm/breadcrumb/types.js.map +1 -0
- package/dist/esm/button/index.d.ts +9 -3
- package/dist/esm/button/index.js +3 -0
- package/dist/esm/button/index.js.map +1 -1
- package/dist/esm/button/styles.js +17 -14
- package/dist/esm/button/styles.js.map +1 -1
- package/dist/esm/button/types.d.ts +9 -0
- package/dist/esm/button/types.js +8 -0
- package/dist/esm/button/types.js.map +1 -1
- package/dist/esm/combobox/index.d.ts +6 -6
- package/dist/esm/combobox/index.js +15 -9
- package/dist/esm/combobox/index.js.map +1 -1
- package/dist/esm/combobox/styles.js +5 -5
- package/dist/esm/drawer/styles.js +0 -4
- package/dist/esm/drawer/styles.js.map +1 -1
- package/dist/esm/icon-base/index.d.ts +9 -2
- package/dist/esm/icon-base/index.js +6 -1
- package/dist/esm/icon-base/index.js.map +1 -1
- package/dist/esm/icon-base/styles.js +4 -4
- package/dist/esm/icon-base/types.d.ts +6 -6
- package/dist/esm/icon-base/types.js +5 -5
- package/dist/esm/icon-base/types.js.map +1 -1
- package/dist/esm/list-option/styles.js +2 -2
- package/dist/esm/menu-button/index.d.ts +5 -5
- package/dist/esm/menu-button/index.js.map +1 -1
- package/dist/esm/menu-button/template.d.ts +1 -3
- package/dist/esm/menu-button/template.js +6 -5
- package/dist/esm/menu-button/template.js.map +1 -1
- package/dist/esm/number-field/index.d.ts +4 -5
- package/dist/esm/number-field/index.js +23 -12
- package/dist/esm/number-field/index.js.map +1 -1
- package/dist/esm/number-field/styles.js +5 -4
- package/dist/esm/number-field/styles.js.map +1 -1
- package/dist/esm/patterns/button/types.d.ts +1 -1
- package/dist/esm/patterns/dropdown/styles.js +1 -1
- package/dist/esm/patterns/dropdown/types.d.ts +8 -0
- package/dist/esm/patterns/dropdown/types.js +2 -3
- package/dist/esm/patterns/dropdown/types.js.map +1 -1
- package/dist/esm/patterns/error/styles.js +4 -4
- package/dist/esm/patterns/error/template.d.ts +2 -2
- package/dist/esm/patterns/error/template.js.map +1 -1
- package/dist/esm/patterns/error/types.d.ts +5 -4
- package/dist/esm/text-field/index.d.ts +5 -5
- package/dist/esm/text-field/index.js +13 -8
- package/dist/esm/text-field/index.js.map +1 -1
- package/dist/esm/text-field/styles.js +6 -6
- package/dist/esm/toggle-button/index.d.ts +2 -2
- package/dist/esm/tooltip/index.d.ts +8 -0
- package/dist/esm/tooltip/index.js +12 -0
- package/dist/esm/tooltip/index.js.map +1 -1
- package/dist/esm/tooltip/styles.js +8 -8
- package/dist/esm/tooltip/template.d.ts +1 -3
- package/dist/esm/tooltip/template.js +13 -8
- package/dist/esm/tooltip/template.js.map +1 -1
- package/dist/esm/tooltip/types.d.ts +4 -4
- package/dist/esm/tooltip/types.js +3 -3
- package/dist/esm/tooltip/types.js.map +1 -1
- package/dist/esm/tree-item/styles.d.ts +1 -3
- package/dist/esm/tree-item/styles.js +181 -176
- package/dist/esm/tree-item/styles.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Breadcrumb as FoundationBreadcrumb } from '@microsoft/fast-foundation';
|
|
2
|
+
import type { BreadcrumbAppearance } from './types';
|
|
2
3
|
declare global {
|
|
3
4
|
interface HTMLElementTagNameMap {
|
|
4
5
|
'nimble-breadcrumb': Breadcrumb;
|
|
@@ -8,4 +9,5 @@ declare global {
|
|
|
8
9
|
* A nimble-styled breadcrumb
|
|
9
10
|
*/
|
|
10
11
|
export declare class Breadcrumb extends FoundationBreadcrumb {
|
|
12
|
+
appearance: BreadcrumbAppearance;
|
|
11
13
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { attr } from '@microsoft/fast-element';
|
|
1
3
|
import { DesignSystem, Breadcrumb as FoundationBreadcrumb, breadcrumbTemplate as template } from '@microsoft/fast-foundation';
|
|
2
4
|
import { styles } from './styles';
|
|
3
5
|
/**
|
|
@@ -5,6 +7,9 @@ import { styles } from './styles';
|
|
|
5
7
|
*/
|
|
6
8
|
export class Breadcrumb extends FoundationBreadcrumb {
|
|
7
9
|
}
|
|
10
|
+
__decorate([
|
|
11
|
+
attr
|
|
12
|
+
], Breadcrumb.prototype, "appearance", void 0);
|
|
8
13
|
const nimbleBreadcrumb = Breadcrumb.compose({
|
|
9
14
|
baseName: 'breadcrumb',
|
|
10
15
|
baseClass: FoundationBreadcrumb,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/breadcrumb/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EACZ,UAAU,IAAI,oBAAoB,EAClC,kBAAkB,IAAI,QAAQ,EACjC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/breadcrumb/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EACH,YAAY,EACZ,UAAU,IAAI,oBAAoB,EAClC,kBAAkB,IAAI,QAAQ,EACjC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AASlC;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,oBAAoB;CAGnD;AADG;IADC,IAAI;8CACmC;AAG5C,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,CAAC;IACxC,QAAQ,EAAE,YAAY;IACtB,SAAS,EAAE,oBAAoB;IAC/B,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC,CAAC"}
|
|
@@ -19,7 +19,7 @@ export const styles = css `
|
|
|
19
19
|
flex-wrap: wrap;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
:host(
|
|
22
|
+
:host([appearance='prominent']) {
|
|
23
23
|
--ni-private-breadcrumb-link-active-font-color: ${bodyFontColor};
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -35,7 +35,7 @@ export const styles = css `
|
|
|
35
35
|
--ni-private-breadcrumb-link-active-font-color: ${DigitalGreenDark};
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
:host(
|
|
38
|
+
:host([appearance='prominent']) {
|
|
39
39
|
--ni-private-breadcrumb-link-font-color: ${DigitalGreenDark};
|
|
40
40
|
}
|
|
41
41
|
`), themeBehavior(Theme.dark, css `
|
|
@@ -43,7 +43,7 @@ export const styles = css `
|
|
|
43
43
|
--ni-private-breadcrumb-link-active-font-color: ${PowerGreen};
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
:host(
|
|
46
|
+
:host([appearance='prominent']) {
|
|
47
47
|
--ni-private-breadcrumb-link-font-color: ${PowerGreen};
|
|
48
48
|
}
|
|
49
49
|
`), themeBehavior(Theme.color, css `
|
|
@@ -51,7 +51,7 @@ export const styles = css `
|
|
|
51
51
|
--ni-private-breadcrumb-link-active-font-color: ${hexToRgbaCssColor(White, 0.6)};
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
:host(
|
|
54
|
+
:host([appearance='prominent']) {
|
|
55
55
|
--ni-private-breadcrumb-link-font-color: ${PowerGreen};
|
|
56
56
|
}
|
|
57
57
|
`));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Predefined icon appearance states
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export declare const BreadcrumbAppearance: {
|
|
6
|
+
readonly default: undefined;
|
|
7
|
+
readonly prominent: "prominent";
|
|
8
|
+
};
|
|
9
|
+
export declare type BreadcrumbAppearance = typeof BreadcrumbAppearance[keyof typeof BreadcrumbAppearance];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/breadcrumb/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAChC,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;CAChB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Button as FoundationButton } from '@microsoft/fast-foundation';
|
|
2
|
-
import type {
|
|
3
|
-
import { ButtonAppearance } from './types';
|
|
2
|
+
import type { ButtonPattern } from '../patterns/button/types';
|
|
3
|
+
import { ButtonAppearance, ButtonAppearanceVariant } from './types';
|
|
4
4
|
declare global {
|
|
5
5
|
interface HTMLElementTagNameMap {
|
|
6
6
|
'nimble-button': Button;
|
|
@@ -9,13 +9,19 @@ declare global {
|
|
|
9
9
|
/**
|
|
10
10
|
* A nimble-styled HTML button
|
|
11
11
|
*/
|
|
12
|
-
export declare class Button extends FoundationButton implements
|
|
12
|
+
export declare class Button extends FoundationButton implements ButtonPattern {
|
|
13
13
|
/**
|
|
14
14
|
* @public
|
|
15
15
|
* @remarks
|
|
16
16
|
* HTML Attribute: appearance
|
|
17
17
|
*/
|
|
18
18
|
appearance: ButtonAppearance;
|
|
19
|
+
/**
|
|
20
|
+
* @public
|
|
21
|
+
* @remarks
|
|
22
|
+
* HTML Attribute: appearance-variant
|
|
23
|
+
*/
|
|
24
|
+
appearanceVariant: ButtonAppearanceVariant;
|
|
19
25
|
/**
|
|
20
26
|
* @public
|
|
21
27
|
* @remarks
|
package/dist/esm/button/index.js
CHANGED
|
@@ -26,6 +26,9 @@ export class Button extends FoundationButton {
|
|
|
26
26
|
__decorate([
|
|
27
27
|
attr
|
|
28
28
|
], Button.prototype, "appearance", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
attr({ attribute: 'appearance-variant' })
|
|
31
|
+
], Button.prototype, "appearanceVariant", void 0);
|
|
29
32
|
__decorate([
|
|
30
33
|
attr({ attribute: 'content-hidden', mode: 'boolean' })
|
|
31
34
|
], Button.prototype, "contentHidden", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/button/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EACH,MAAM,IAAI,gBAAgB,EAE1B,cAAc,IAAI,QAAQ,EAC1B,YAAY,EACf,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/button/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EACH,MAAM,IAAI,gBAAgB,EAE1B,cAAc,IAAI,QAAQ,EAC1B,YAAY,EACf,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAA2B,MAAM,SAAS,CAAC;AAQpE;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,gBAAgB;IAA5C;;QACI;;;;WAIG;QAEI,eAAU,GAAqB,gBAAgB,CAAC,OAAO,CAAC;QAU/D;;;;WAIG;QAEI,kBAAa,GAAG,KAAK,CAAC;IACjC,CAAC;CAAA;AAjBG;IADC,IAAI;0CAC0D;AAQ/D;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC;iDACQ;AAQlD;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;6CAC1B;AAGjC;;;;;;;;GAQG;AACH,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAgB;IAC/C,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,gBAAgB;IAC3B,QAAQ;IACR,MAAM;IACN,aAAa,EAAE;QACX,cAAc,EAAE,IAAI;KACvB;CACJ,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC"}
|
|
@@ -5,44 +5,44 @@ import { styles as buttonStyles } from '../patterns/button/styles';
|
|
|
5
5
|
import { appearanceBehavior } from '../utilities/style/appearance';
|
|
6
6
|
import { ButtonAppearance } from './types';
|
|
7
7
|
export const styles = buttonStyles.withBehaviors(appearanceBehavior(ButtonAppearance.outline, css `
|
|
8
|
-
:host(
|
|
8
|
+
:host([appearance-variant='primary']) .control {
|
|
9
9
|
box-shadow: 0px 0px 0px ${borderWidth}
|
|
10
10
|
rgba(${actionRgbPartialColor}, 0.3) inset;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
:host(
|
|
13
|
+
:host([appearance-variant='primary']) .control:hover {
|
|
14
14
|
box-shadow: 0px 0px 0px ${borderWidth} ${borderHoverColor} inset;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
:host(
|
|
17
|
+
:host([appearance-variant='primary']) .control${focusVisible} {
|
|
18
18
|
box-shadow: 0px 0px 0px ${borderWidth} ${borderHoverColor} inset;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
:host(
|
|
21
|
+
:host([appearance-variant='primary']) .control:active {
|
|
22
22
|
box-shadow: none;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
:host(
|
|
25
|
+
:host([appearance-variant='primary']) .control[disabled] {
|
|
26
26
|
box-shadow: none;
|
|
27
27
|
}
|
|
28
28
|
`), appearanceBehavior(ButtonAppearance.block, css `
|
|
29
|
-
:host(
|
|
29
|
+
:host([appearance-variant='primary']) .control {
|
|
30
30
|
background-clip: padding-box;
|
|
31
31
|
border-color: rgba(${actionRgbPartialColor}, 0.3);
|
|
32
32
|
border-width: calc(2 * ${borderWidth});
|
|
33
33
|
padding: 0 calc(${standardPadding} - ${borderWidth});
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
:host(
|
|
36
|
+
:host([appearance-variant='primary'][content-hidden]) .control {
|
|
37
37
|
padding: 0px;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
:host(
|
|
40
|
+
:host([appearance-variant='primary']) .control:hover {
|
|
41
41
|
border-color: ${borderHoverColor};
|
|
42
42
|
box-shadow: none;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
:host(
|
|
45
|
+
:host([appearance-variant='primary']) .control${focusVisible} {
|
|
46
46
|
background-clip: border-box;
|
|
47
47
|
border-color: ${borderHoverColor};
|
|
48
48
|
border-width: ${borderWidth};
|
|
@@ -50,11 +50,12 @@ export const styles = buttonStyles.withBehaviors(appearanceBehavior(ButtonAppear
|
|
|
50
50
|
padding: 0 ${standardPadding};
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
:host(
|
|
53
|
+
:host([appearance-variant='primary'][content-hidden])
|
|
54
|
+
.control${focusVisible} {
|
|
54
55
|
padding: 0px;
|
|
55
56
|
}
|
|
56
57
|
|
|
57
|
-
:host(
|
|
58
|
+
:host([appearance-variant='primary']) .control:active {
|
|
58
59
|
background-clip: border-box;
|
|
59
60
|
border-color: ${fillSelectedColor};
|
|
60
61
|
border-width: ${borderWidth};
|
|
@@ -62,11 +63,12 @@ export const styles = buttonStyles.withBehaviors(appearanceBehavior(ButtonAppear
|
|
|
62
63
|
padding: 0 ${standardPadding};
|
|
63
64
|
}
|
|
64
65
|
|
|
65
|
-
:host(
|
|
66
|
+
:host([appearance-variant='primary'][content-hidden])
|
|
67
|
+
.control:active {
|
|
66
68
|
padding: 0px;
|
|
67
69
|
}
|
|
68
70
|
|
|
69
|
-
:host(
|
|
71
|
+
:host([appearance-variant='primary']) .control[disabled] {
|
|
70
72
|
background-clip: border-box;
|
|
71
73
|
border-color: transparent;
|
|
72
74
|
border-width: ${borderWidth};
|
|
@@ -74,7 +76,8 @@ export const styles = buttonStyles.withBehaviors(appearanceBehavior(ButtonAppear
|
|
|
74
76
|
padding: 0 ${standardPadding};
|
|
75
77
|
}
|
|
76
78
|
|
|
77
|
-
:host(
|
|
79
|
+
:host([appearance-variant='primary'][content-hidden])
|
|
80
|
+
.control[disabled] {
|
|
78
81
|
padding: 0px;
|
|
79
82
|
}
|
|
80
83
|
`));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/button/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EACH,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,eAAe,EAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC,aAAa,CAC5C,kBAAkB,CACd,gBAAgB,CAAC,OAAO,EACxB,GAAG,CAAA;;0CAE+B,WAAW;2BAC1B,qBAAqB;;;;0CAIN,WAAW,IAAI,gBAAgB;;;
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/button/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EACH,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,eAAe,EAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC,aAAa,CAC5C,kBAAkB,CACd,gBAAgB,CAAC,OAAO,EACxB,GAAG,CAAA;;0CAE+B,WAAW;2BAC1B,qBAAqB;;;;0CAIN,WAAW,IAAI,gBAAgB;;;4DAGb,YAAY;0CAC9B,WAAW,IAAI,gBAAgB;;;;;;;;;;SAUhE,CACJ,EACD,kBAAkB,CACd,gBAAgB,CAAC,KAAK,EACtB,GAAG,CAAA;;;qCAG0B,qBAAqB;yCACjB,WAAW;kCAClB,eAAe,MAAM,WAAW;;;;;;;;gCAQlC,gBAAgB;;;;4DAIY,YAAY;;gCAExC,gBAAgB;gCAChB,WAAW;0CACD,WAAW,IAAI,gBAAgB;6BAC5C,eAAe;;;;0BAIlB,YAAY;;;;;;gCAMN,iBAAiB;gCACjB,WAAW;;6BAEd,eAAe;;;;;;;;;;;gCAWZ,WAAW;;6BAEd,eAAe;;;;;;;SAOnC,CACJ,CACJ,CAAC"}
|
|
@@ -5,3 +5,12 @@
|
|
|
5
5
|
import type { Button } from '@microsoft/fast-foundation';
|
|
6
6
|
export { ButtonAppearance } from '../patterns/button/types';
|
|
7
7
|
export declare type ButtonType = Button['type'];
|
|
8
|
+
/**
|
|
9
|
+
* Types of button appearance variants.
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export declare const ButtonAppearanceVariant: {
|
|
13
|
+
readonly default: undefined;
|
|
14
|
+
readonly primary: "primary";
|
|
15
|
+
};
|
|
16
|
+
export declare type ButtonAppearanceVariant = typeof ButtonAppearanceVariant[keyof typeof ButtonAppearanceVariant];
|
package/dist/esm/button/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/button/types.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/button/types.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACnC,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;CACZ,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Combobox as FoundationCombobox } from '@microsoft/fast-foundation';
|
|
2
|
-
import
|
|
3
|
-
import '../
|
|
4
|
-
import '../
|
|
5
|
-
import type { IHasErrorText } from '../patterns/error/types';
|
|
2
|
+
import { ToggleButton } from '../toggle-button';
|
|
3
|
+
import type { ErrorPattern } from '../patterns/error/types';
|
|
4
|
+
import type { DropdownPattern } from '../patterns/dropdown/types';
|
|
6
5
|
import { DropdownAppearance } from '../patterns/dropdown/types';
|
|
7
6
|
declare global {
|
|
8
7
|
interface HTMLElementTagNameMap {
|
|
@@ -12,7 +11,7 @@ declare global {
|
|
|
12
11
|
/**
|
|
13
12
|
* A nimble-styed HTML combobox
|
|
14
13
|
*/
|
|
15
|
-
export declare class Combobox extends FoundationCombobox implements
|
|
14
|
+
export declare class Combobox extends FoundationCombobox implements DropdownPattern, ErrorPattern {
|
|
16
15
|
appearance: DropdownAppearance;
|
|
17
16
|
/**
|
|
18
17
|
* The ref to the internal dropdown button element.
|
|
@@ -27,7 +26,8 @@ export declare class Combobox extends FoundationCombobox implements IHasErrorTex
|
|
|
27
26
|
* @remarks
|
|
28
27
|
* HTML Attribute: error-text
|
|
29
28
|
*/
|
|
30
|
-
errorText
|
|
29
|
+
errorText?: string;
|
|
30
|
+
errorVisible: boolean;
|
|
31
31
|
private valueUpdatedByInput;
|
|
32
32
|
private valueBeforeTextUpdate?;
|
|
33
33
|
setPositioning(): void;
|
|
@@ -2,9 +2,10 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { attr, html, observable, ref } from '@microsoft/fast-element';
|
|
3
3
|
import { DesignSystem, Combobox as FoundationCombobox, comboboxTemplate as template } from '@microsoft/fast-foundation';
|
|
4
4
|
import { keyArrowDown, keyArrowUp, keyEnter, keySpace } from '@microsoft/fast-web-utilities';
|
|
5
|
+
import { ToggleButton } from '../toggle-button';
|
|
5
6
|
import { errorTextTemplate } from '../patterns/error/template';
|
|
6
|
-
import '../icons/
|
|
7
|
-
import '../icons/
|
|
7
|
+
import { IconArrowExpanderDown } from '../icons/arrow-expander-down';
|
|
8
|
+
import { IconExclamationMark } from '../icons/exclamation-mark';
|
|
8
9
|
import { styles } from './styles';
|
|
9
10
|
import { DropdownAppearance } from '../patterns/dropdown/types';
|
|
10
11
|
/**
|
|
@@ -14,6 +15,7 @@ export class Combobox extends FoundationCombobox {
|
|
|
14
15
|
constructor() {
|
|
15
16
|
super(...arguments);
|
|
16
17
|
this.appearance = DropdownAppearance.underline;
|
|
18
|
+
this.errorVisible = false;
|
|
17
19
|
this.valueUpdatedByInput = false;
|
|
18
20
|
}
|
|
19
21
|
// Workaround for https://github.com/microsoft/fast/issues/5123
|
|
@@ -155,6 +157,9 @@ __decorate([
|
|
|
155
157
|
__decorate([
|
|
156
158
|
attr({ attribute: 'error-text' })
|
|
157
159
|
], Combobox.prototype, "errorText", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
attr({ attribute: 'error-visible', mode: 'boolean' })
|
|
162
|
+
], Combobox.prototype, "errorVisible", void 0);
|
|
158
163
|
const nimbleCombobox = Combobox.compose({
|
|
159
164
|
baseName: 'combobox',
|
|
160
165
|
baseClass: FoundationCombobox,
|
|
@@ -165,11 +170,12 @@ const nimbleCombobox = Combobox.compose({
|
|
|
165
170
|
},
|
|
166
171
|
end: html `
|
|
167
172
|
<div class="end-slot-container">
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
173
|
+
<${DesignSystem.tagFor(IconExclamationMark)}
|
|
174
|
+
severity="error"
|
|
175
|
+
class="error-icon"
|
|
176
|
+
></${DesignSystem.tagFor(IconExclamationMark)}>
|
|
171
177
|
<div class="separator"></div>
|
|
172
|
-
|
|
178
|
+
<${DesignSystem.tagFor(ToggleButton)}
|
|
173
179
|
${ref('dropdownButton')}
|
|
174
180
|
appearance="ghost"
|
|
175
181
|
?checked="${x => x.open}"
|
|
@@ -184,12 +190,12 @@ const nimbleCombobox = Combobox.compose({
|
|
|
184
190
|
aria-expanded="${x => x.open}"
|
|
185
191
|
tabindex="-1"
|
|
186
192
|
>
|
|
187
|
-
|
|
193
|
+
<${DesignSystem.tagFor(IconArrowExpanderDown)}
|
|
188
194
|
slot="start"
|
|
189
195
|
class="dropdown-icon"
|
|
190
196
|
>
|
|
191
|
-
|
|
192
|
-
|
|
197
|
+
</${DesignSystem.tagFor(IconArrowExpanderDown)}>
|
|
198
|
+
</${DesignSystem.tagFor(ToggleButton)}>
|
|
193
199
|
</div>
|
|
194
200
|
${errorTextTemplate}
|
|
195
201
|
`
|
|
@@ -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,EAC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C,EAAE,EAAE,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,KAAK,CAAC;2BAC5C,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,KAAK,CAAC;4BAC7C,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,KAAsB,CAAC;;;;iCAI3D,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;;;mBAGzB,YAAY,CAAC,MAAM,CAAC,qBAAqB,CAAC;;;;oBAIzC,YAAY,CAAC,MAAM,CAAC,qBAAqB,CAAC;gBAC9C,YAAY,CAAC,MAAM,CAAC,YAAY,CAAC;;UAEvC,iBAAiB;KACtB;CACJ,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC,CAAC"}
|
|
@@ -23,7 +23,7 @@ export const styles = css `
|
|
|
23
23
|
color: ${bodyDisabledFontColor};
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
:host(
|
|
26
|
+
:host([error-visible])::after {
|
|
27
27
|
border-bottom-color: ${failColor};
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -35,7 +35,7 @@ export const styles = css `
|
|
|
35
35
|
border-bottom-color: ${borderHoverColor};
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
:host(
|
|
38
|
+
:host([error-visible]) .control {
|
|
39
39
|
border-bottom: var(--ni-private-bottom-border-width) solid ${failColor};
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -43,8 +43,8 @@ export const styles = css `
|
|
|
43
43
|
border-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
:host(
|
|
47
|
-
:host(
|
|
46
|
+
:host([error-visible][disabled]) .control,
|
|
47
|
+
:host([error-visible][open]) .control {
|
|
48
48
|
border-bottom-color: ${failColor};
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -98,7 +98,7 @@ export const styles = css `
|
|
|
98
98
|
display: none;
|
|
99
99
|
}
|
|
100
100
|
`.withBehaviors(appearanceBehavior(DropdownAppearance.block, css `
|
|
101
|
-
:host(
|
|
101
|
+
:host([error-visible]) .control {
|
|
102
102
|
border-bottom-width: ${borderWidth};
|
|
103
103
|
padding-bottom: 0;
|
|
104
104
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/drawer/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,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,WAAW,EACX,kBAAkB,EACrB,MAAM,iCAAiC,CAAC;AAEzC,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,OAAO,CAAC;;;;;;;;;gBASN,QAAQ;iBACP,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAgCxB,CAAA,8DAA+D,EAAE;;;;sBAIjD,kBAAkB;;;;;;;;;;;;;iBAavB,WAAW;;4BAEA,0BAA0B
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/drawer/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,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,WAAW,EACX,kBAAkB,EACrB,MAAM,iCAAiC,CAAC;AAEzC,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,OAAO,CAAC;;;;;;;;;gBASN,QAAQ;iBACP,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAgCxB,CAAA,8DAA+D,EAAE;;;;sBAIjD,kBAAkB;;;;;;;;;;;;;iBAavB,WAAW;;4BAEA,0BAA0B;;;;;;;;;;wBAU9B,WAAW,UAAU,mBAAmB;;;;;uBAKzC,WAAW,UAAU,mBAAmB;;;MAGzD;AACE;;;EAGE,CAAC,EACP;;;mBAGe,eAAe;;gBAElB,cAAc;;;;mBAIX,eAAe;;;;;;mBAMf,eAAe;;;;sBAIZ,WAAW,UAAU,gBAAgB;;CAE1D,CAAC"}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
2
|
import type { NimbleIcon } from '@ni/nimble-tokens/dist/icons/js';
|
|
3
|
+
import type { IconSeverity } from './types';
|
|
3
4
|
/**
|
|
4
5
|
* The base class for icon components
|
|
5
6
|
*/
|
|
6
7
|
export declare class Icon extends FoundationElement {
|
|
7
|
-
icon: NimbleIcon;
|
|
8
|
-
|
|
8
|
+
readonly icon: NimbleIcon;
|
|
9
|
+
/**
|
|
10
|
+
* @public
|
|
11
|
+
* @remarks
|
|
12
|
+
* HTML Attribute: severity
|
|
13
|
+
*/
|
|
14
|
+
severity: IconSeverity;
|
|
15
|
+
constructor(/** @internal */ icon: NimbleIcon);
|
|
9
16
|
}
|
|
10
17
|
declare type IconClass = typeof Icon;
|
|
11
18
|
export declare const registerIcon: (baseName: string, iconClass: IconClass) => void;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { attr } from '@microsoft/fast-element';
|
|
1
3
|
import { DesignSystem, FoundationElement } from '@microsoft/fast-foundation';
|
|
2
4
|
import { template } from './template';
|
|
3
5
|
import { styles } from './styles';
|
|
@@ -5,11 +7,14 @@ import { styles } from './styles';
|
|
|
5
7
|
* The base class for icon components
|
|
6
8
|
*/
|
|
7
9
|
export class Icon extends FoundationElement {
|
|
8
|
-
constructor(icon) {
|
|
10
|
+
constructor(/** @internal */ icon) {
|
|
9
11
|
super();
|
|
10
12
|
this.icon = icon;
|
|
11
13
|
}
|
|
12
14
|
}
|
|
15
|
+
__decorate([
|
|
16
|
+
attr
|
|
17
|
+
], Icon.prototype, "severity", void 0);
|
|
13
18
|
export const registerIcon = (baseName, iconClass) => {
|
|
14
19
|
const composedIcon = iconClass.compose({
|
|
15
20
|
baseName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/icon-base/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE7E,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/icon-base/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE7E,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC;;GAEG;AACH,MAAM,OAAO,IAAK,SAAQ,iBAAiB;IASvC,YAAmB,gBAAgB,CAAiB,IAAgB;QAChE,KAAK,EAAE,CAAC;QADwC,SAAI,GAAJ,IAAI,CAAY;IAEpE,CAAC;CACJ;AALG;IADC,IAAI;sCACyB;AASlC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,QAAgB,EAAE,SAAoB,EAAQ,EAAE;IACzE,MAAM,YAAY,GAAG,SAAS,CAAC,OAAO,CAAC;QACnC,QAAQ;QACR,QAAQ;QACR,MAAM;QACN,SAAS,EAAE,SAAS;KACvB,CAAC,CAAC;IAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC;AAC7E,CAAC,CAAC"}
|
|
@@ -16,19 +16,19 @@ export const styles = css `
|
|
|
16
16
|
height: 100%;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
:host(
|
|
19
|
+
:host([severity='error']) {
|
|
20
20
|
${iconColor.cssCustomProperty}: ${failColor};
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
:host(
|
|
23
|
+
:host([severity='warning']) {
|
|
24
24
|
${iconColor.cssCustomProperty}: ${warningColor};
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
:host(
|
|
27
|
+
:host([severity='success']) {
|
|
28
28
|
${iconColor.cssCustomProperty}: ${passColor};
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
:host(
|
|
31
|
+
:host([severity='information']) {
|
|
32
32
|
${iconColor.cssCustomProperty}: ${informationColor};
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Predefined icon
|
|
2
|
+
* Predefined icon appearance states
|
|
3
3
|
* @public
|
|
4
4
|
*/
|
|
5
|
-
export declare const
|
|
6
|
-
readonly
|
|
5
|
+
export declare const IconSeverity: {
|
|
6
|
+
readonly default: undefined;
|
|
7
|
+
readonly error: "error";
|
|
7
8
|
readonly warning: "warning";
|
|
8
|
-
readonly
|
|
9
|
-
readonly regular: "regular";
|
|
9
|
+
readonly success: "success";
|
|
10
10
|
readonly information: "information";
|
|
11
11
|
};
|
|
12
|
-
export declare type
|
|
12
|
+
export declare type IconSeverity = typeof IconSeverity[keyof typeof IconSeverity];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Predefined icon
|
|
2
|
+
* Predefined icon appearance states
|
|
3
3
|
* @public
|
|
4
4
|
*/
|
|
5
|
-
export const
|
|
6
|
-
|
|
5
|
+
export const IconSeverity = {
|
|
6
|
+
default: undefined,
|
|
7
|
+
error: 'error',
|
|
7
8
|
warning: 'warning',
|
|
8
|
-
|
|
9
|
-
regular: 'regular',
|
|
9
|
+
success: 'success',
|
|
10
10
|
information: 'information'
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/icon-base/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/icon-base/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,aAAa;CACpB,CAAC"}
|
|
@@ -16,13 +16,13 @@ export const styles = css `
|
|
|
16
16
|
padding: 8px 4px;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
:host(
|
|
19
|
+
:host([aria-selected='true']) {
|
|
20
20
|
box-shadow: none;
|
|
21
21
|
outline: none;
|
|
22
22
|
background-color: ${fillSelectedColor};
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
:host(:hover
|
|
25
|
+
:host([aria-selected='true']:hover) {
|
|
26
26
|
background-color: ${fillHoverSelectedColor};
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -2,7 +2,7 @@ import { FoundationElement } from '@microsoft/fast-foundation';
|
|
|
2
2
|
import { ButtonAppearance } from '../button/types';
|
|
3
3
|
import type { ToggleButton } from '../toggle-button';
|
|
4
4
|
import { MenuButtonPosition } from './types';
|
|
5
|
-
import type {
|
|
5
|
+
import type { ButtonPattern } from '../patterns/button/types';
|
|
6
6
|
import type { AnchoredRegion } from '../anchored-region';
|
|
7
7
|
declare global {
|
|
8
8
|
interface HTMLElementTagNameMap {
|
|
@@ -12,7 +12,7 @@ declare global {
|
|
|
12
12
|
/**
|
|
13
13
|
* A nimble-styled menu button control.
|
|
14
14
|
*/
|
|
15
|
-
export declare class MenuButton extends FoundationElement implements
|
|
15
|
+
export declare class MenuButton extends FoundationElement implements ButtonPattern {
|
|
16
16
|
appearance: ButtonAppearance;
|
|
17
17
|
disabled: boolean;
|
|
18
18
|
contentHidden: boolean;
|
|
@@ -25,11 +25,11 @@ export declare class MenuButton extends FoundationElement implements IButton {
|
|
|
25
25
|
*/
|
|
26
26
|
position: MenuButtonPosition;
|
|
27
27
|
/** @internal */
|
|
28
|
-
readonly toggleButton
|
|
28
|
+
readonly toggleButton?: ToggleButton;
|
|
29
29
|
/** @internal */
|
|
30
|
-
readonly region
|
|
30
|
+
readonly region?: AnchoredRegion;
|
|
31
31
|
/** @internal */
|
|
32
|
-
readonly slottedMenus
|
|
32
|
+
readonly slottedMenus?: HTMLElement[];
|
|
33
33
|
/**
|
|
34
34
|
* Used to maintain the internal state of whether the last menu item should be focused instead
|
|
35
35
|
* of the first menu item the next time the menu is opened.
|