@ni/nimble-components 8.3.0 → 8.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 +102 -48
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +835 -796
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/all-components.d.ts +1 -0
- package/dist/esm/all-components.js +1 -0
- package/dist/esm/all-components.js.map +1 -1
- package/dist/esm/anchored-region/index.d.ts +11 -0
- package/dist/esm/anchored-region/index.js +24 -0
- package/dist/esm/anchored-region/index.js.map +1 -0
- package/dist/esm/anchored-region/styles.d.ts +1 -0
- package/dist/esm/anchored-region/styles.js +9 -0
- package/dist/esm/anchored-region/styles.js.map +1 -0
- package/dist/esm/button/index.d.ts +2 -7
- package/dist/esm/button/index.js +0 -6
- package/dist/esm/button/index.js.map +1 -1
- package/dist/esm/menu-button/index.d.ts +50 -0
- package/dist/esm/menu-button/index.js +154 -0
- package/dist/esm/menu-button/index.js.map +1 -0
- package/dist/esm/menu-button/styles.d.ts +1 -0
- package/dist/esm/menu-button/styles.js +29 -0
- package/dist/esm/menu-button/styles.js.map +1 -0
- package/dist/esm/menu-button/template.d.ts +2 -0
- package/dist/esm/menu-button/template.js +48 -0
- package/dist/esm/menu-button/template.js.map +1 -0
- package/dist/esm/menu-button/types.d.ts +15 -0
- package/dist/esm/menu-button/types.js +11 -0
- package/dist/esm/menu-button/types.js.map +1 -0
- package/dist/esm/nimble-components/src/all-components.d.ts +1 -0
- package/dist/esm/nimble-components/src/anchored-region/index.d.ts +11 -0
- package/dist/esm/nimble-components/src/anchored-region/styles.d.ts +1 -0
- package/dist/esm/nimble-components/src/button/index.d.ts +2 -7
- package/dist/esm/nimble-components/src/menu-button/index.d.ts +50 -0
- package/dist/esm/nimble-components/src/menu-button/styles.d.ts +1 -0
- package/dist/esm/nimble-components/src/menu-button/template.d.ts +2 -0
- package/dist/esm/nimble-components/src/menu-button/types.d.ts +15 -0
- package/dist/esm/nimble-components/src/patterns/button/types.d.ts +20 -0
- package/dist/esm/nimble-components/src/toggle-button/index.d.ts +3 -8
- package/dist/esm/patterns/button/types.d.ts +20 -0
- package/dist/esm/patterns/button/types.js.map +1 -1
- package/dist/esm/text-field/styles.js +31 -7
- package/dist/esm/text-field/styles.js.map +1 -1
- package/dist/esm/toggle-button/index.d.ts +3 -8
- package/dist/esm/toggle-button/index.js +1 -7
- package/dist/esm/toggle-button/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DelegatesARIAButton, StartEnd, Switch as FoundationSwitch } from '@microsoft/fast-foundation';
|
|
2
|
-
import {
|
|
2
|
+
import type { IButton } from '../patterns/button/types';
|
|
3
|
+
import { ButtonAppearance } from './types';
|
|
3
4
|
declare global {
|
|
4
5
|
interface HTMLElementTagNameMap {
|
|
5
6
|
'nimble-toggle-button': ToggleButton;
|
|
@@ -8,20 +9,14 @@ declare global {
|
|
|
8
9
|
/**
|
|
9
10
|
* A nimble-styled toggle button control.
|
|
10
11
|
*/
|
|
11
|
-
export declare class ToggleButton extends FoundationSwitch {
|
|
12
|
+
export declare class ToggleButton extends FoundationSwitch implements IButton {
|
|
12
13
|
/**
|
|
13
|
-
* The appearance the button should have.
|
|
14
|
-
*
|
|
15
14
|
* @public
|
|
16
15
|
* @remarks
|
|
17
16
|
* HTML Attribute: appearance
|
|
18
17
|
*/
|
|
19
18
|
appearance: ButtonAppearance;
|
|
20
19
|
/**
|
|
21
|
-
* Specify as 'true' to hide the text content of the button. The button will
|
|
22
|
-
* become square, and the text content will be used as the label of the button
|
|
23
|
-
* for accessibility purposes.
|
|
24
|
-
*
|
|
25
20
|
* @public
|
|
26
21
|
* @remarks
|
|
27
22
|
* HTML Attribute: content-hidden
|
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The interface that buttons of various types implement. The properties in this interface
|
|
3
|
+
* are leveraged by the shared button pattern css.
|
|
4
|
+
*/
|
|
5
|
+
export interface IButton {
|
|
6
|
+
/**
|
|
7
|
+
* The appearance the button should have.
|
|
8
|
+
*/
|
|
9
|
+
appearance: ButtonAppearance;
|
|
10
|
+
/**
|
|
11
|
+
* Specify as 'true' to hide the text content of the button. The button will
|
|
12
|
+
* become square, and the text content will be used as the label of the button
|
|
13
|
+
* for accessibility purposes.
|
|
14
|
+
*/
|
|
15
|
+
contentHidden: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Whether or not the button is disabled.
|
|
18
|
+
*/
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
}
|
|
1
21
|
/**
|
|
2
22
|
* Types of button appearance.
|
|
3
23
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/patterns/button/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/patterns/button/types.ts"],"names":[],"mappings":"AAuBA;;;GAGG;AACH,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IACxB,uCAAmB,CAAA;IACnB,mCAAe,CAAA;IACf,mCAAe,CAAA;AACnB,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B"}
|
|
@@ -43,6 +43,7 @@ export const styles = css `
|
|
|
43
43
|
--ni-private-hover-bottom-border-width: 2px;
|
|
44
44
|
border: 0px solid rgba(${borderRgbPartialColor}, 0.3);
|
|
45
45
|
border-bottom-width: var(--ni-private-bottom-border-width);
|
|
46
|
+
gap: calc(${standardPadding} / 2);
|
|
46
47
|
padding-bottom: calc(
|
|
47
48
|
var(--ni-private-hover-bottom-border-width) -
|
|
48
49
|
var(--ni-private-bottom-border-width)
|
|
@@ -86,12 +87,40 @@ export const styles = css `
|
|
|
86
87
|
border-bottom-color: ${borderHoverColor};
|
|
87
88
|
}
|
|
88
89
|
|
|
90
|
+
:host([appearance='frameless'].clear-inline-padding) .root {
|
|
91
|
+
padding-left: 0px;
|
|
92
|
+
padding-right: 0px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.root::before {
|
|
96
|
+
${ /* Empty string causes alignment issue */''}
|
|
97
|
+
content: ' ';
|
|
98
|
+
color: transparent;
|
|
99
|
+
width: 0px;
|
|
100
|
+
user-select: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
:host([appearance='frameless'].clear-inline-padding) .root::before {
|
|
104
|
+
display: none;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.root::after {
|
|
108
|
+
${ /* Empty string causes alignment issue */''}
|
|
109
|
+
content: ' ';
|
|
110
|
+
color: transparent;
|
|
111
|
+
width: 0px;
|
|
112
|
+
user-select: none;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
:host([appearance='frameless'].clear-inline-padding) .root::after {
|
|
116
|
+
display: none;
|
|
117
|
+
}
|
|
118
|
+
|
|
89
119
|
[part='start'] {
|
|
90
120
|
display: contents;
|
|
91
121
|
}
|
|
92
122
|
|
|
93
123
|
slot[name='start']::slotted(*) {
|
|
94
|
-
margin-left: calc(${standardPadding} / 2);
|
|
95
124
|
flex: none;
|
|
96
125
|
}
|
|
97
126
|
|
|
@@ -100,8 +129,7 @@ export const styles = css `
|
|
|
100
129
|
font: inherit;
|
|
101
130
|
background: transparent;
|
|
102
131
|
color: inherit;
|
|
103
|
-
padding
|
|
104
|
-
padding-bottom: 0px;
|
|
132
|
+
padding: 0px;
|
|
105
133
|
height: calc(
|
|
106
134
|
${controlHeight} - ${borderWidth} -
|
|
107
135
|
var(--ni-private-hover-bottom-border-width)
|
|
@@ -109,8 +137,6 @@ export const styles = css `
|
|
|
109
137
|
width: 100%;
|
|
110
138
|
margin-top: auto;
|
|
111
139
|
margin-bottom: auto;
|
|
112
|
-
padding-left: calc(${standardPadding} / 2);
|
|
113
|
-
padding-right: calc(${standardPadding} / 2);
|
|
114
140
|
border: none;
|
|
115
141
|
text-overflow: ellipsis;
|
|
116
142
|
}
|
|
@@ -154,7 +180,6 @@ export const styles = css `
|
|
|
154
180
|
:host(.invalid) .error-content svg {
|
|
155
181
|
height: ${iconSize};
|
|
156
182
|
width: ${iconSize};
|
|
157
|
-
padding-right: 8px;
|
|
158
183
|
flex: none;
|
|
159
184
|
}
|
|
160
185
|
|
|
@@ -195,7 +220,6 @@ export const styles = css `
|
|
|
195
220
|
}
|
|
196
221
|
|
|
197
222
|
slot[name='actions']::slotted(*) {
|
|
198
|
-
margin-right: 8px;
|
|
199
223
|
${controlHeight.cssCustomProperty}: 24px;
|
|
200
224
|
}
|
|
201
225
|
`.withBehaviors(appearanceBehavior(TextFieldAppearance.Underline, css `
|
|
@@ -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,aAAa,EACb,qBAAqB,EACrB,aAAa,EACb,aAAa,EACb,SAAS,EACT,2BAA2B,EAC3B,QAAQ,EACR,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,qBAAqB,EACrB,6BAA6B,EAC7B,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;;;gBAGb,QAAQ;;;;iBAIP,aAAa;uBACP,WAAW,MAAM,aAAa;;;;iBAIp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-foundation';
|
|
2
|
-
import {
|
|
2
|
+
import type { IButton } from '../patterns/button/types';
|
|
3
|
+
import { ButtonAppearance } from './types';
|
|
3
4
|
declare global {
|
|
4
5
|
interface HTMLElementTagNameMap {
|
|
5
6
|
'nimble-toggle-button': ToggleButton;
|
|
@@ -8,20 +9,14 @@ declare global {
|
|
|
8
9
|
/**
|
|
9
10
|
* A nimble-styled toggle button control.
|
|
10
11
|
*/
|
|
11
|
-
export declare class ToggleButton extends FoundationSwitch {
|
|
12
|
+
export declare class ToggleButton extends FoundationSwitch implements IButton {
|
|
12
13
|
/**
|
|
13
|
-
* The appearance the button should have.
|
|
14
|
-
*
|
|
15
14
|
* @public
|
|
16
15
|
* @remarks
|
|
17
16
|
* HTML Attribute: appearance
|
|
18
17
|
*/
|
|
19
18
|
appearance: ButtonAppearance;
|
|
20
19
|
/**
|
|
21
|
-
* Specify as 'true' to hide the text content of the button. The button will
|
|
22
|
-
* become square, and the text content will be used as the label of the button
|
|
23
|
-
* for accessibility purposes.
|
|
24
|
-
*
|
|
25
20
|
* @public
|
|
26
21
|
* @remarks
|
|
27
22
|
* HTML Attribute: content-hidden
|
|
@@ -3,7 +3,7 @@ import { attr } from '@microsoft/fast-element';
|
|
|
3
3
|
import { applyMixins, DelegatesARIAButton, DesignSystem, StartEnd, Switch as FoundationSwitch } from '@microsoft/fast-foundation';
|
|
4
4
|
import { styles } from './styles';
|
|
5
5
|
import { template } from './template';
|
|
6
|
-
import { ButtonAppearance } from '
|
|
6
|
+
import { ButtonAppearance } from './types';
|
|
7
7
|
/**
|
|
8
8
|
* A nimble-styled toggle button control.
|
|
9
9
|
*/
|
|
@@ -11,18 +11,12 @@ export class ToggleButton extends FoundationSwitch {
|
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments);
|
|
13
13
|
/**
|
|
14
|
-
* The appearance the button should have.
|
|
15
|
-
*
|
|
16
14
|
* @public
|
|
17
15
|
* @remarks
|
|
18
16
|
* HTML Attribute: appearance
|
|
19
17
|
*/
|
|
20
18
|
this.appearance = ButtonAppearance.Outline;
|
|
21
19
|
/**
|
|
22
|
-
* Specify as 'true' to hide the text content of the button. The button will
|
|
23
|
-
* become square, and the text content will be used as the label of the button
|
|
24
|
-
* for accessibility purposes.
|
|
25
|
-
*
|
|
26
20
|
* @public
|
|
27
21
|
* @remarks
|
|
28
22
|
* HTML Attribute: content-hidden
|
|
@@ -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,WAAW,EAEX,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,MAAM,IAAI,gBAAgB,EAC7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
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,WAAW,EAEX,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,MAAM,IAAI,gBAAgB,EAC7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAQ3C;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,gBAAgB;IAAlD;;QACI;;;;WAIG;QAEI,eAAU,GAAqB,gBAAgB,CAAC,OAAO,CAAC;QAE/D;;;;WAIG;QAEI,kBAAa,GAAG,KAAK,CAAC;IAIjC,CAAC;CAAA;AAZG;IADC,IAAI;gDAC0D;AAQ/D;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;mDAC1B;AAKjC,WAAW,CAAC,YAAY,EAAE,QAAQ,EAAE,mBAAmB,CAAC,CAAC;AAGzD,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": "8.
|
|
3
|
+
"version": "8.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",
|