@ni/nimble-components 2.0.0 → 2.1.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/esm/nimble-components/src/text-area/index.d.ts +22 -0
- package/dist/esm/nimble-components/src/text-area/styles.d.ts +1 -0
- package/dist/esm/nimble-components/src/text-area/types.d.ts +8 -0
- package/dist/esm/text-area/index.d.ts +22 -0
- package/dist/esm/text-area/index.js +31 -0
- package/dist/esm/text-area/index.js.map +1 -0
- package/dist/esm/text-area/styles.d.ts +1 -0
- package/dist/esm/text-area/styles.js +117 -0
- package/dist/esm/text-area/styles.js.map +1 -0
- package/dist/esm/text-area/types.d.ts +8 -0
- package/dist/esm/text-area/types.js +8 -0
- package/dist/esm/text-area/types.js.map +1 -0
- package/dist/esm/text-field/styles.js +64 -45
- package/dist/esm/text-field/styles.js.map +1 -1
- package/dist/esm/toggle-button/index.js +4 -1
- package/dist/esm/toggle-button/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TextArea as FoundationTextArea } from '@microsoft/fast-foundation';
|
|
2
|
+
import { TextAreaAppearance } from './types';
|
|
3
|
+
export type { TextArea };
|
|
4
|
+
declare global {
|
|
5
|
+
interface HTMLElementTagNameMap {
|
|
6
|
+
'nimble-text-area': TextArea;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A nimble-styed HTML text area
|
|
11
|
+
*/
|
|
12
|
+
declare class TextArea extends FoundationTextArea {
|
|
13
|
+
/**
|
|
14
|
+
* The appearance the text area should have.
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
* @remarks
|
|
18
|
+
* HTML Attribute: appearance
|
|
19
|
+
*/
|
|
20
|
+
appearance: TextAreaAppearance;
|
|
21
|
+
connectedCallback(): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("@microsoft/fast-element").ElementStyles;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TextAreaResize } from '@microsoft/fast-foundation';
|
|
2
|
+
export { TextAreaResize };
|
|
3
|
+
export declare type TextAreaResizeAttribute = `${TextAreaResize}`;
|
|
4
|
+
export declare enum TextAreaAppearance {
|
|
5
|
+
Outline = "outline",
|
|
6
|
+
Block = "block"
|
|
7
|
+
}
|
|
8
|
+
export declare type TextAreaAppearanceAttribute = `${TextAreaAppearance}`;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TextArea as FoundationTextArea } from '@microsoft/fast-foundation';
|
|
2
|
+
import { TextAreaAppearance } from './types';
|
|
3
|
+
export type { TextArea };
|
|
4
|
+
declare global {
|
|
5
|
+
interface HTMLElementTagNameMap {
|
|
6
|
+
'nimble-text-area': TextArea;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A nimble-styed HTML text area
|
|
11
|
+
*/
|
|
12
|
+
declare class TextArea extends FoundationTextArea {
|
|
13
|
+
/**
|
|
14
|
+
* The appearance the text area should have.
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
* @remarks
|
|
18
|
+
* HTML Attribute: appearance
|
|
19
|
+
*/
|
|
20
|
+
appearance: TextAreaAppearance;
|
|
21
|
+
connectedCallback(): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { attr } from '@microsoft/fast-element';
|
|
3
|
+
import { DesignSystem, TextArea as FoundationTextArea, textAreaTemplate as template } from '@microsoft/fast-foundation';
|
|
4
|
+
import { styles } from './styles';
|
|
5
|
+
import { TextAreaAppearance } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* A nimble-styed HTML text area
|
|
8
|
+
*/
|
|
9
|
+
class TextArea extends FoundationTextArea {
|
|
10
|
+
connectedCallback() {
|
|
11
|
+
super.connectedCallback();
|
|
12
|
+
if (!this.appearance) {
|
|
13
|
+
this.appearance = TextAreaAppearance.Outline;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
__decorate([
|
|
18
|
+
attr
|
|
19
|
+
], TextArea.prototype, "appearance", void 0);
|
|
20
|
+
const nimbleTextArea = TextArea.compose({
|
|
21
|
+
baseName: 'text-area',
|
|
22
|
+
baseClass: FoundationTextArea,
|
|
23
|
+
// @ts-expect-error FAST templates have incorrect type, see: https://github.com/microsoft/fast/issues/5047
|
|
24
|
+
template,
|
|
25
|
+
styles,
|
|
26
|
+
shadowOptions: {
|
|
27
|
+
delegatesFocus: true
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTextArea());
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/text-area/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EACH,YAAY,EACZ,QAAQ,IAAI,kBAAkB,EAC9B,gBAAgB,IAAI,QAAQ,EAC/B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAU7C;;GAEG;AACH,MAAM,QAAS,SAAQ,kBAAkB;IAW9B,iBAAiB;QACpB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YAClB,IAAI,CAAC,UAAU,GAAG,kBAAkB,CAAC,OAAO,CAAC;SAChD;IACL,CAAC;CACJ;AARG;IADC,IAAI;4CACkC;AAU3C,MAAM,cAAc,GAAG,QAAQ,CAAC,OAAO,CAAC;IACpC,QAAQ,EAAE,WAAW;IACrB,SAAS,EAAE,kBAAkB;IAC7B,0GAA0G;IAC1G,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,cAAc,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("@microsoft/fast-element").ElementStyles;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { css } from '@microsoft/fast-element';
|
|
2
|
+
import { display } from '@microsoft/fast-foundation';
|
|
3
|
+
import { borderColorRgbPartial, borderColorHover, borderWidth, contentFontColor, contentFontColorDisabled, contentFontSize, fillColorSelectedRgbPartial, fontFamily, labelFontColor, labelFontColorDisabled, labelFontFamily, labelFontSize, labelFontWeight, labelHeight, labelTextTransform, smallDelay } from '../theme-provider/design-tokens';
|
|
4
|
+
import { appearanceBehavior } from '../utilities/style/appearance';
|
|
5
|
+
import { TextAreaAppearance } from './types';
|
|
6
|
+
export const styles = css `
|
|
7
|
+
${display('inline-block')}
|
|
8
|
+
|
|
9
|
+
:host {
|
|
10
|
+
font-family: ${fontFamily};
|
|
11
|
+
font-size: ${contentFontSize};
|
|
12
|
+
outline: none;
|
|
13
|
+
user-select: none;
|
|
14
|
+
color: ${contentFontColor};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:host([disabled]) {
|
|
18
|
+
color: ${contentFontColorDisabled};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.label {
|
|
22
|
+
display: flex;
|
|
23
|
+
color: ${labelFontColor};
|
|
24
|
+
font-family: ${labelFontFamily};
|
|
25
|
+
font-size: ${labelFontSize};
|
|
26
|
+
font-weight: ${labelFontWeight};
|
|
27
|
+
line-height: ${labelHeight};
|
|
28
|
+
text-transform: ${labelTextTransform};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:host([disabled]) .label {
|
|
32
|
+
color: ${labelFontColorDisabled};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.control {
|
|
36
|
+
-webkit-appearance: none;
|
|
37
|
+
font: inherit;
|
|
38
|
+
outline: none;
|
|
39
|
+
box-sizing: border-box;
|
|
40
|
+
position: relative;
|
|
41
|
+
color: inherit;
|
|
42
|
+
border-radius: 0px;
|
|
43
|
+
align-items: flex-end;
|
|
44
|
+
border: ${borderWidth} solid transparent;
|
|
45
|
+
padding: 8px;
|
|
46
|
+
transition: outline ${smallDelay}, border ${smallDelay};
|
|
47
|
+
resize: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@media (prefers-reduced-motion) {
|
|
51
|
+
.control {
|
|
52
|
+
transition-duration: 0s;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.control:hover {
|
|
57
|
+
border-color: ${borderColorHover};
|
|
58
|
+
outline: 1px solid ${borderColorHover};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.control:focus-within {
|
|
62
|
+
border-color: ${borderColorHover};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.control[readonly],
|
|
66
|
+
.control[readonly]:hover,
|
|
67
|
+
.control[readonly]:hover:focus-within,
|
|
68
|
+
.control[disabled],
|
|
69
|
+
.control[disabled]:hover {
|
|
70
|
+
border-color: rgba(${borderColorRgbPartial}, 0.1);
|
|
71
|
+
outline: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.control::selection {
|
|
75
|
+
color: ${labelFontColor};
|
|
76
|
+
background: rgba(${fillColorSelectedRgbPartial}, 0.3);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.control::placeholder {
|
|
80
|
+
color: ${labelFontColor};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.control[disabled]::placeholder {
|
|
84
|
+
color: ${contentFontColorDisabled};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:host([resize='both']) .control {
|
|
88
|
+
resize: both;
|
|
89
|
+
}
|
|
90
|
+
:host([resize='horizontal']) .control {
|
|
91
|
+
resize: horizontal;
|
|
92
|
+
}
|
|
93
|
+
:host([resize='vertical']) .control {
|
|
94
|
+
resize: vertical;
|
|
95
|
+
}
|
|
96
|
+
`
|
|
97
|
+
// prettier-ignore
|
|
98
|
+
.withBehaviors(appearanceBehavior(TextAreaAppearance.Outline, css `
|
|
99
|
+
.control {
|
|
100
|
+
border-color: rgba(${borderColorRgbPartial}, 0.3);
|
|
101
|
+
background-color: transparent;
|
|
102
|
+
}
|
|
103
|
+
`), appearanceBehavior(TextAreaAppearance.Block, css `
|
|
104
|
+
.control {
|
|
105
|
+
background-color: rgba(${borderColorRgbPartial}, 0.1);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
:host([readonly]) .control {
|
|
109
|
+
background-color: transparent;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
:host([disabled]) .control {
|
|
113
|
+
border-color: transparent;
|
|
114
|
+
background-color: rgba(${borderColorRgbPartial}, 0.1);
|
|
115
|
+
}
|
|
116
|
+
`));
|
|
117
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +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,gBAAgB,EAChB,wBAAwB,EACxB,eAAe,EACf,2BAA2B,EAC3B,UAAU,EACV,cAAc,EACd,sBAAsB,EACtB,eAAe,EACf,aAAa,EACb,eAAe,EACf,WAAW,EACX,kBAAkB,EAClB,UAAU,EACb,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,cAAc,CAAC;;;uBAGN,UAAU;qBACZ,eAAe;;;iBAGnB,gBAAgB;;;;iBAIhB,wBAAwB;;;;;iBAKxB,cAAc;uBACR,eAAe;qBACjB,aAAa;uBACX,eAAe;uBACf,WAAW;0BACR,kBAAkB;;;;iBAI3B,sBAAsB;;;;;;;;;;;;kBAYrB,WAAW;;8BAEC,UAAU,YAAY,UAAU;;;;;;;;;;;wBAWtC,gBAAgB;6BACX,gBAAgB;;;;wBAIrB,gBAAgB;;;;;;;;6BAQX,qBAAqB;;;;;iBAKjC,cAAc;2BACJ,2BAA2B;;;;iBAIrC,cAAc;;;;iBAId,wBAAwB;;;;;;;;;;;;CAYxC;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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TextAreaResize } from '@microsoft/fast-foundation';
|
|
2
|
+
export { TextAreaResize };
|
|
3
|
+
export declare type TextAreaResizeAttribute = `${TextAreaResize}`;
|
|
4
|
+
export declare enum TextAreaAppearance {
|
|
5
|
+
Outline = "outline",
|
|
6
|
+
Block = "block"
|
|
7
|
+
}
|
|
8
|
+
export declare type TextAreaAppearanceAttribute = `${TextAreaAppearance}`;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TextAreaResize } from '@microsoft/fast-foundation';
|
|
2
|
+
export { TextAreaResize };
|
|
3
|
+
export var TextAreaAppearance;
|
|
4
|
+
(function (TextAreaAppearance) {
|
|
5
|
+
TextAreaAppearance["Outline"] = "outline";
|
|
6
|
+
TextAreaAppearance["Block"] = "block";
|
|
7
|
+
})(TextAreaAppearance || (TextAreaAppearance = {}));
|
|
8
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/text-area/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,CAAC;AAG1B,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,yCAAmB,CAAA;IACnB,qCAAe,CAAA;AACnB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B"}
|
|
@@ -21,6 +21,20 @@ export const styles = css `
|
|
|
21
21
|
color: ${contentFontColorDisabled};
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
.label {
|
|
25
|
+
display: flex;
|
|
26
|
+
color: ${labelFontColor};
|
|
27
|
+
font-family: ${labelFontFamily};
|
|
28
|
+
font-size: ${labelFontSize};
|
|
29
|
+
font-weight: ${labelFontWeight};
|
|
30
|
+
line-height: ${labelHeight};
|
|
31
|
+
text-transform: ${labelTextTransform};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host([disabled]) .label {
|
|
35
|
+
color: ${labelFontColorDisabled};
|
|
36
|
+
}
|
|
37
|
+
|
|
24
38
|
.root {
|
|
25
39
|
box-sizing: border-box;
|
|
26
40
|
position: relative;
|
|
@@ -39,38 +53,40 @@ export const styles = css `
|
|
|
39
53
|
);
|
|
40
54
|
}
|
|
41
55
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
:host([disabled]) .root:hover {
|
|
49
|
-
--ni-private-bottom-border-width: 1px;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.root:focus-within,
|
|
53
|
-
.root:hover {
|
|
54
|
-
border-bottom-color: ${borderColorHover};
|
|
56
|
+
@media (prefers-reduced-motion) {
|
|
57
|
+
.root {
|
|
58
|
+
transition-duration: 0s;
|
|
59
|
+
}
|
|
55
60
|
}
|
|
56
61
|
|
|
57
62
|
:host(.invalid) .root {
|
|
58
63
|
border-bottom-color: ${failColor};
|
|
59
64
|
}
|
|
60
65
|
|
|
66
|
+
:host([readonly]:not([disabled])) .root {
|
|
67
|
+
border: ${borderWidth} solid rgba(${borderColorRgbPartial}, 0.1);
|
|
68
|
+
padding: 0px;
|
|
69
|
+
padding-bottom: 1px;
|
|
70
|
+
background-color: transparent;
|
|
71
|
+
}
|
|
72
|
+
|
|
61
73
|
:host([disabled]) .root {
|
|
62
74
|
border-color: rgba(${borderColorRgbPartial}, 0.1);
|
|
63
75
|
}
|
|
64
76
|
|
|
65
|
-
|
|
66
|
-
border:
|
|
67
|
-
|
|
77
|
+
.root:hover {
|
|
78
|
+
--ni-private-bottom-border-width: var(
|
|
79
|
+
--ni-private-hover-bottom-border-width
|
|
80
|
+
);
|
|
81
|
+
border-bottom-color: ${borderColorHover};
|
|
68
82
|
}
|
|
69
83
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
84
|
+
:host([disabled]) .root:hover {
|
|
85
|
+
--ni-private-bottom-border-width: 1px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.root:focus-within {
|
|
89
|
+
border-bottom-color: ${borderColorHover};
|
|
74
90
|
}
|
|
75
91
|
|
|
76
92
|
.control {
|
|
@@ -112,28 +128,10 @@ export const styles = css `
|
|
|
112
128
|
opacity: 1;
|
|
113
129
|
}
|
|
114
130
|
|
|
115
|
-
.control[readonly] {
|
|
116
|
-
cursor: default;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
131
|
.control[disabled]::placeholder {
|
|
120
132
|
color: ${contentFontColorDisabled};
|
|
121
133
|
}
|
|
122
134
|
|
|
123
|
-
.label {
|
|
124
|
-
display: flex;
|
|
125
|
-
color: ${labelFontColor};
|
|
126
|
-
font-family: ${labelFontFamily};
|
|
127
|
-
font-size: ${labelFontSize};
|
|
128
|
-
font-weight: ${labelFontWeight};
|
|
129
|
-
line-height: ${labelHeight};
|
|
130
|
-
text-transform: ${labelTextTransform};
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
:host([disabled]) .label {
|
|
134
|
-
color: ${labelFontColorDisabled};
|
|
135
|
-
}
|
|
136
|
-
|
|
137
135
|
:host [part='end'] {
|
|
138
136
|
display: none;
|
|
139
137
|
}
|
|
@@ -166,22 +164,43 @@ export const styles = css `
|
|
|
166
164
|
}
|
|
167
165
|
`), appearanceBehavior(TextFieldAppearance.Block, css `
|
|
168
166
|
.root {
|
|
169
|
-
background-color: rgba(${borderColorRgbPartial}, 0.
|
|
167
|
+
background-color: rgba(${borderColorRgbPartial}, 0.1);
|
|
170
168
|
--ni-private-bottom-border-width: 0px;
|
|
171
169
|
padding-top: ${borderWidth};
|
|
172
170
|
padding-left: ${borderWidth};
|
|
173
171
|
padding-right: ${borderWidth};
|
|
174
172
|
}
|
|
175
173
|
|
|
176
|
-
.root:focus-within
|
|
177
|
-
|
|
178
|
-
|
|
174
|
+
.root:focus-within {
|
|
175
|
+
--ni-private-bottom-border-width: 1px;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.root:focus-within:hover {
|
|
179
|
+
--ni-private-bottom-border-width: var(
|
|
180
|
+
--ni-private-hover-bottom-border-width
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
:host(.invalid) .root {
|
|
179
185
|
--ni-private-bottom-border-width: 1px;
|
|
180
186
|
}
|
|
181
187
|
|
|
182
|
-
:host(
|
|
183
|
-
|
|
184
|
-
|
|
188
|
+
:host(.invalid) .root:hover {
|
|
189
|
+
--ni-private-bottom-border-width: var(
|
|
190
|
+
--ni-private-hover-bottom-border-width
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
:host([disabled]) .root {
|
|
195
|
+
background-color: rgba(${borderColorRgbPartial}, 0.07);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
:host([disabled]) .root:hover {
|
|
199
|
+
--ni-private-bottom-border-width: 0px;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
:host(.invalid[disabled]) .root {
|
|
203
|
+
--ni-private-bottom-border-width: 1px;
|
|
185
204
|
}
|
|
186
205
|
`), appearanceBehavior(TextFieldAppearance.Outline, css `
|
|
187
206
|
.root {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/text-field/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD,OAAO,EACH,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,wBAAwB,EACxB,eAAe,EACf,aAAa,EACb,SAAS,EACT,2BAA2B,EAC3B,UAAU,EACV,QAAQ,EACR,cAAc,EACd,sBAAsB,EACtB,eAAe,EACf,aAAa,EACb,eAAe,EACf,WAAW,EACX,kBAAkB,EAClB,UAAU,EACV,eAAe,EAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9C,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,cAAc,CAAC;;;uBAGN,UAAU;qBACZ,eAAe;;;iBAGnB,gBAAgB;uBACV,WAAW,MAAM,aAAa;;;;iBAIpC,wBAAwB;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/text-field/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,C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,SAAS;;;;gBAIT,wBAAwB;;CAEvC,CAAC,aAAa,CACP,kBAAkB,CACd,mBAAmB,CAAC,SAAS,EAC7B,GAAG,CAAA;;;+BAGgB,WAAW;gCACV,WAAW;iCACV,WAAW;;SAEnC,CACA,EACD,kBAAkB,CACd,mBAAmB,CAAC,KAAK,EACzB,GAAG,CAAA;;yCAE0B,qBAAqB;;+BAE/B,WAAW;gCACV,WAAW;iCACV,WAAW;;;;;;;;;;;;;;;;;;;;;;;;yCAwBH,qBAAqB;;;;;;;;;;SAUrD,CACA,EACD,kBAAkB,CACd,mBAAmB,CAAC,OAAO,EAC3B,GAAG,CAAA;;;gCAGiB,WAAW;;;SAGlC,CACA,EACD,aAAa,CACT,GAAG,CAAA;cACD,EAAE,CAAC,iBAAiB;;;;SAIzB,EACG,GAAG,CAAA;cACD,EAAE,CAAC,gBAAgB;;;;SAIxB;AACG,cAAc;AACd,KAAK,CAAC,IAAI,CACb,CACJ,CAAC"}
|
|
@@ -37,7 +37,10 @@ __decorate([
|
|
|
37
37
|
const nimbleToggleButton = ToggleButton.compose({
|
|
38
38
|
baseName: 'toggle-button',
|
|
39
39
|
template,
|
|
40
|
-
styles
|
|
40
|
+
styles,
|
|
41
|
+
shadowOptions: {
|
|
42
|
+
delegatesFocus: true
|
|
43
|
+
}
|
|
41
44
|
});
|
|
42
45
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleToggleButton());
|
|
43
46
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/toggle-button/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EACH,YAAY,EACZ,MAAM,IAAI,gBAAgB,EAE7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,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;AAtBG;IADC,IAAI;gDACgC;AAYrC;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;mDAC1B;AAYjC,MAAM,kBAAkB,GAAG,YAAY,CAAC,OAAO,CAAgB;IAC3D,QAAQ,EAAE,eAAe;IACzB,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,kBAAkB,EAAE,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ni/nimble-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Styled web components for the NI Nimble Design System",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "npm run build-components && npm run generate-scss && npm run build-storybook",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@microsoft/fast-element": "^1.7.0",
|
|
47
47
|
"@microsoft/fast-foundation": "^2.28.0 <2.29.0",
|
|
48
48
|
"@microsoft/fast-web-utilities": "^5.1.0",
|
|
49
|
-
"@ni/nimble-tokens": "^1.
|
|
49
|
+
"@ni/nimble-tokens": "^1.1.0",
|
|
50
50
|
"hex-rgb": "^5.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|