@ni/nimble-components 1.0.0-beta.100 → 1.0.0-beta.101
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/README.md +20 -20
- package/dist/esm/button/behaviors.d.ts +12 -12
- package/dist/esm/button/behaviors.js +13 -13
- package/dist/esm/button/index.d.ts +17 -17
- package/dist/esm/button/index.js +37 -37
- package/dist/esm/button/styles.d.ts +1 -1
- package/dist/esm/button/styles.js +178 -178
- package/dist/esm/button/types.d.ts +9 -9
- package/dist/esm/button/types.js +10 -10
- package/dist/esm/checkbox/index.d.ts +2 -2
- package/dist/esm/checkbox/index.js +11 -11
- package/dist/esm/checkbox/styles.d.ts +1 -1
- package/dist/esm/checkbox/styles.js +91 -91
- package/dist/esm/drawer/animations.d.ts +14 -14
- package/dist/esm/drawer/animations.js +51 -51
- package/dist/esm/drawer/index.d.ts +39 -39
- package/dist/esm/drawer/index.js +189 -189
- package/dist/esm/drawer/styles.d.ts +1 -1
- package/dist/esm/drawer/styles.js +114 -114
- package/dist/esm/drawer/types.d.ts +10 -10
- package/dist/esm/drawer/types.js +12 -12
- package/dist/esm/icon-base/index.d.ts +12 -12
- package/dist/esm/icon-base/index.js +21 -21
- package/dist/esm/icon-base/styles.d.ts +1 -1
- package/dist/esm/icon-base/styles.js +37 -37
- package/dist/esm/icon-base/template.d.ts +2 -2
- package/dist/esm/icon-base/template.js +6 -6
- package/dist/esm/icons/access-control.d.ts +7 -7
- package/dist/esm/icons/access-control.js +11 -11
- package/dist/esm/icons/admin.d.ts +7 -7
- package/dist/esm/icons/admin.js +11 -11
- package/dist/esm/icons/administration.d.ts +7 -7
- package/dist/esm/icons/administration.js +11 -11
- package/dist/esm/icons/all-icons.d.ts +13 -13
- package/dist/esm/icons/all-icons.js +13 -13
- package/dist/esm/icons/check.d.ts +7 -7
- package/dist/esm/icons/check.js +11 -11
- package/dist/esm/icons/custom-applications.d.ts +7 -7
- package/dist/esm/icons/custom-applications.js +11 -11
- package/dist/esm/icons/delete.d.ts +7 -7
- package/dist/esm/icons/delete.js +11 -11
- package/dist/esm/icons/login.d.ts +7 -7
- package/dist/esm/icons/login.js +11 -11
- package/dist/esm/icons/logout.d.ts +7 -7
- package/dist/esm/icons/logout.js +11 -11
- package/dist/esm/icons/managed-systems.d.ts +7 -7
- package/dist/esm/icons/managed-systems.js +11 -11
- package/dist/esm/icons/measurement-data-analysis.d.ts +7 -7
- package/dist/esm/icons/measurement-data-analysis.js +11 -11
- package/dist/esm/icons/settings.d.ts +7 -7
- package/dist/esm/icons/settings.js +11 -11
- package/dist/esm/icons/test-insights.d.ts +7 -7
- package/dist/esm/icons/test-insights.js +11 -11
- package/dist/esm/icons/utilities.d.ts +7 -7
- package/dist/esm/icons/utilities.js +11 -11
- package/dist/esm/listbox-option/index.d.ts +10 -10
- package/dist/esm/listbox-option/index.js +28 -28
- package/dist/esm/listbox-option/styles.d.ts +1 -1
- package/dist/esm/listbox-option/styles.js +59 -59
- package/dist/esm/menu/index.d.ts +5 -5
- package/dist/esm/menu/index.js +21 -21
- package/dist/esm/menu/styles.d.ts +1 -1
- package/dist/esm/menu/styles.js +39 -39
- package/dist/esm/menu-item/index.d.ts +15 -15
- package/dist/esm/menu-item/index.js +21 -21
- package/dist/esm/menu-item/styles.d.ts +1 -1
- package/dist/esm/menu-item/styles.js +63 -63
- package/dist/esm/number-field/index.d.ts +6 -6
- package/dist/esm/number-field/index.js +22 -22
- package/dist/esm/number-field/styles.d.ts +1 -1
- package/dist/esm/number-field/styles.js +117 -117
- package/dist/esm/select/index.d.ts +12 -12
- package/dist/esm/select/index.js +45 -45
- package/dist/esm/select/styles.d.ts +1 -1
- package/dist/esm/select/styles.js +140 -140
- package/dist/esm/tab/index.d.ts +2 -2
- package/dist/esm/tab/index.js +8 -8
- package/dist/esm/tab/styles.d.ts +1 -1
- package/dist/esm/tab/styles.js +52 -52
- package/dist/esm/tab-panel/index.d.ts +2 -2
- package/dist/esm/tab-panel/index.js +8 -8
- package/dist/esm/tab-panel/styles.d.ts +1 -1
- package/dist/esm/tab-panel/styles.js +14 -14
- package/dist/esm/tabs/index.d.ts +2 -2
- package/dist/esm/tabs/index.js +8 -8
- package/dist/esm/tabs/styles.d.ts +1 -1
- package/dist/esm/tabs/styles.js +42 -42
- package/dist/esm/tabs-toolbar/index.d.ts +6 -6
- package/dist/esm/tabs-toolbar/index.js +14 -14
- package/dist/esm/tabs-toolbar/styles.d.ts +1 -1
- package/dist/esm/tabs-toolbar/styles.js +22 -22
- package/dist/esm/tabs-toolbar/template.d.ts +1 -1
- package/dist/esm/tabs-toolbar/template.js +7 -7
- package/dist/esm/testing/dom-next-update.d.ts +4 -4
- package/dist/esm/testing/dom-next-update.js +5 -5
- package/dist/esm/text-field/index.d.ts +6 -6
- package/dist/esm/text-field/index.js +13 -13
- package/dist/esm/text-field/styles.d.ts +1 -1
- package/dist/esm/text-field/styles.js +141 -141
- package/dist/esm/theme-provider/design-tokens.d.ts +48 -48
- package/dist/esm/theme-provider/design-tokens.js +163 -163
- package/dist/esm/theme-provider/index.d.ts +10 -10
- package/dist/esm/theme-provider/index.js +42 -42
- package/dist/esm/theme-provider/template.d.ts +2 -2
- package/dist/esm/theme-provider/template.js +2 -2
- package/dist/esm/theme-provider/themes.d.ts +6 -6
- package/dist/esm/theme-provider/themes.js +7 -7
- package/dist/esm/tree-item/index.d.ts +28 -28
- package/dist/esm/tree-item/index.js +115 -115
- package/dist/esm/tree-item/styles.d.ts +3 -3
- package/dist/esm/tree-item/styles.js +194 -194
- package/dist/esm/tree-view/index.d.ts +16 -16
- package/dist/esm/tree-view/index.js +33 -33
- package/dist/esm/tree-view/styles.d.ts +1 -1
- package/dist/esm/tree-view/styles.js +16 -16
- package/dist/esm/tree-view/types.d.ts +6 -6
- package/dist/esm/tree-view/types.js +7 -7
- package/dist/esm/utilities/style/focus.d.ts +11 -11
- package/dist/esm/utilities/style/focus.js +13 -13
- package/package.json +94 -94
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { css } from '@microsoft/fast-element';
|
|
2
|
-
import { display } from '@microsoft/fast-foundation';
|
|
3
|
-
import { focusVisible } from '../utilities/style/focus';
|
|
4
|
-
import { controlHeight, fontFamily, contentFontSize, fillColorSelected, fillColorHover, contentFontColor, borderColorHover, contentFontColorDisabled, iconSize } from '../theme-provider/design-tokens';
|
|
5
|
-
export const styles = css `
|
|
6
|
-
${display('grid')}
|
|
7
|
-
|
|
8
|
-
:host {
|
|
9
|
-
contain: layout;
|
|
10
|
-
overflow: visible;
|
|
11
|
-
box-sizing: border-box;
|
|
12
|
-
height: ${controlHeight};
|
|
13
|
-
grid-template-columns: 0px 1fr;
|
|
14
|
-
grid-template-rows: 1fr;
|
|
15
|
-
justify-items: start;
|
|
16
|
-
align-items: center;
|
|
17
|
-
padding-left: 8px;
|
|
18
|
-
padding-right: 8px;
|
|
19
|
-
margin: 0 0;
|
|
20
|
-
white-space: nowrap;
|
|
21
|
-
color: ${contentFontColor};
|
|
22
|
-
fill: currentcolor;
|
|
23
|
-
cursor: pointer;
|
|
24
|
-
font-family: ${fontFamily};
|
|
25
|
-
font-size: ${contentFontSize};
|
|
26
|
-
}
|
|
27
|
-
:host(${focusVisible}) {
|
|
28
|
-
outline: 2px solid ${borderColorHover};
|
|
29
|
-
outline-offset: -2px;
|
|
30
|
-
}
|
|
31
|
-
:host(:hover) {
|
|
32
|
-
background: ${fillColorHover};
|
|
33
|
-
}
|
|
34
|
-
:host(:active) {
|
|
35
|
-
background: ${fillColorSelected};
|
|
36
|
-
}
|
|
37
|
-
:host([disabled]) {
|
|
38
|
-
color: ${contentFontColorDisabled};
|
|
39
|
-
fill: currentcolor;
|
|
40
|
-
cursor: default;
|
|
41
|
-
}
|
|
42
|
-
:host([disabled]:hover) {
|
|
43
|
-
background: transparent;
|
|
44
|
-
}
|
|
45
|
-
:host(.indent-1) {
|
|
46
|
-
grid-template-columns: ${iconSize} 1fr;
|
|
47
|
-
column-gap: 8px;
|
|
48
|
-
}
|
|
49
|
-
[part='start'] {
|
|
50
|
-
display: contents;
|
|
51
|
-
}
|
|
52
|
-
slot[name='start']::slotted(*) {
|
|
53
|
-
fill: currentcolor;
|
|
54
|
-
width: ${iconSize};
|
|
55
|
-
height: ${iconSize};
|
|
56
|
-
}
|
|
57
|
-
:host(.indent-1) .start {
|
|
58
|
-
grid-column: 1;
|
|
59
|
-
}
|
|
60
|
-
:host(.indent-1) .content {
|
|
61
|
-
grid-column: 2;
|
|
62
|
-
}
|
|
63
|
-
`;
|
|
1
|
+
import { css } from '@microsoft/fast-element';
|
|
2
|
+
import { display } from '@microsoft/fast-foundation';
|
|
3
|
+
import { focusVisible } from '../utilities/style/focus';
|
|
4
|
+
import { controlHeight, fontFamily, contentFontSize, fillColorSelected, fillColorHover, contentFontColor, borderColorHover, contentFontColorDisabled, iconSize } from '../theme-provider/design-tokens';
|
|
5
|
+
export const styles = css `
|
|
6
|
+
${display('grid')}
|
|
7
|
+
|
|
8
|
+
:host {
|
|
9
|
+
contain: layout;
|
|
10
|
+
overflow: visible;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
height: ${controlHeight};
|
|
13
|
+
grid-template-columns: 0px 1fr;
|
|
14
|
+
grid-template-rows: 1fr;
|
|
15
|
+
justify-items: start;
|
|
16
|
+
align-items: center;
|
|
17
|
+
padding-left: 8px;
|
|
18
|
+
padding-right: 8px;
|
|
19
|
+
margin: 0 0;
|
|
20
|
+
white-space: nowrap;
|
|
21
|
+
color: ${contentFontColor};
|
|
22
|
+
fill: currentcolor;
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
font-family: ${fontFamily};
|
|
25
|
+
font-size: ${contentFontSize};
|
|
26
|
+
}
|
|
27
|
+
:host(${focusVisible}) {
|
|
28
|
+
outline: 2px solid ${borderColorHover};
|
|
29
|
+
outline-offset: -2px;
|
|
30
|
+
}
|
|
31
|
+
:host(:hover) {
|
|
32
|
+
background: ${fillColorHover};
|
|
33
|
+
}
|
|
34
|
+
:host(:active) {
|
|
35
|
+
background: ${fillColorSelected};
|
|
36
|
+
}
|
|
37
|
+
:host([disabled]) {
|
|
38
|
+
color: ${contentFontColorDisabled};
|
|
39
|
+
fill: currentcolor;
|
|
40
|
+
cursor: default;
|
|
41
|
+
}
|
|
42
|
+
:host([disabled]:hover) {
|
|
43
|
+
background: transparent;
|
|
44
|
+
}
|
|
45
|
+
:host(.indent-1) {
|
|
46
|
+
grid-template-columns: ${iconSize} 1fr;
|
|
47
|
+
column-gap: 8px;
|
|
48
|
+
}
|
|
49
|
+
[part='start'] {
|
|
50
|
+
display: contents;
|
|
51
|
+
}
|
|
52
|
+
slot[name='start']::slotted(*) {
|
|
53
|
+
fill: currentcolor;
|
|
54
|
+
width: ${iconSize};
|
|
55
|
+
height: ${iconSize};
|
|
56
|
+
}
|
|
57
|
+
:host(.indent-1) .start {
|
|
58
|
+
grid-column: 1;
|
|
59
|
+
}
|
|
60
|
+
:host(.indent-1) .content {
|
|
61
|
+
grid-column: 2;
|
|
62
|
+
}
|
|
63
|
+
`;
|
|
64
64
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { NumberField as FoundationNumberField } from '@microsoft/fast-foundation';
|
|
2
|
-
/**
|
|
3
|
-
* A nimble-styled HTML number input
|
|
4
|
-
*/
|
|
5
|
-
declare type NumberField = FoundationNumberField;
|
|
6
|
-
export type { NumberField };
|
|
1
|
+
import { NumberField as FoundationNumberField } from '@microsoft/fast-foundation';
|
|
2
|
+
/**
|
|
3
|
+
* A nimble-styled HTML number input
|
|
4
|
+
*/
|
|
5
|
+
declare type NumberField = FoundationNumberField;
|
|
6
|
+
export type { NumberField };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { DesignSystem, NumberField as FoundationNumberField, numberFieldTemplate as template } from '@microsoft/fast-foundation';
|
|
2
|
-
import { controlsArrowExpanderDown16X16, controlsArrowExpanderUp16X16 } from '@ni/nimble-tokens/dist-icons-esm/nimble-icons-inline';
|
|
3
|
-
import { styles } from './styles';
|
|
4
|
-
/**
|
|
5
|
-
* A function that returns a number-field registration for configuring the component with a DesignSystem.
|
|
6
|
-
*
|
|
7
|
-
* @public
|
|
8
|
-
* @remarks
|
|
9
|
-
* Generates HTML Element: \<nimble-number-field\>
|
|
10
|
-
*
|
|
11
|
-
*/
|
|
12
|
-
const nimbleNumberField = FoundationNumberField.compose({
|
|
13
|
-
baseName: 'number-field',
|
|
14
|
-
template,
|
|
15
|
-
styles,
|
|
16
|
-
shadowOptions: {
|
|
17
|
-
delegatesFocus: true
|
|
18
|
-
},
|
|
19
|
-
stepDownGlyph: controlsArrowExpanderDown16X16.data,
|
|
20
|
-
stepUpGlyph: controlsArrowExpanderUp16X16.data
|
|
21
|
-
});
|
|
22
|
-
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleNumberField());
|
|
1
|
+
import { DesignSystem, NumberField as FoundationNumberField, numberFieldTemplate as template } from '@microsoft/fast-foundation';
|
|
2
|
+
import { controlsArrowExpanderDown16X16, controlsArrowExpanderUp16X16 } from '@ni/nimble-tokens/dist-icons-esm/nimble-icons-inline';
|
|
3
|
+
import { styles } from './styles';
|
|
4
|
+
/**
|
|
5
|
+
* A function that returns a number-field registration for configuring the component with a DesignSystem.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
* @remarks
|
|
9
|
+
* Generates HTML Element: \<nimble-number-field\>
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
const nimbleNumberField = FoundationNumberField.compose({
|
|
13
|
+
baseName: 'number-field',
|
|
14
|
+
template,
|
|
15
|
+
styles,
|
|
16
|
+
shadowOptions: {
|
|
17
|
+
delegatesFocus: true
|
|
18
|
+
},
|
|
19
|
+
stepDownGlyph: controlsArrowExpanderDown16X16.data,
|
|
20
|
+
stepUpGlyph: controlsArrowExpanderUp16X16.data
|
|
21
|
+
});
|
|
22
|
+
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleNumberField());
|
|
23
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const styles: import("@microsoft/fast-element").ElementStyles;
|
|
1
|
+
export declare const styles: import("@microsoft/fast-element").ElementStyles;
|
|
@@ -1,118 +1,118 @@
|
|
|
1
|
-
import { css } from '@microsoft/fast-element';
|
|
2
|
-
import { display } from '@microsoft/fast-foundation';
|
|
3
|
-
import { borderColor, borderColorRgb, borderColorHover, borderWidth, contentFontColor, contentFontColorDisabled, contentFontSize, controlHeight, fillColorSelectedRgb, fontFamily, iconSize, labelFontColor, labelFontFamily, labelFontSize, labelFontWeight, labelHeight, labelTextTransform, smallDelay } from '../theme-provider/design-tokens';
|
|
4
|
-
export const styles = css `
|
|
5
|
-
${display('inline-block')}
|
|
6
|
-
|
|
7
|
-
:host {
|
|
8
|
-
font-family: ${fontFamily};
|
|
9
|
-
font-size: ${contentFontSize};
|
|
10
|
-
outline: none;
|
|
11
|
-
user-select: none;
|
|
12
|
-
color: ${contentFontColor};
|
|
13
|
-
height: calc(${labelHeight} + ${controlHeight});
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
:host([disabled]) {
|
|
17
|
-
color: ${contentFontColorDisabled};
|
|
18
|
-
cursor: default;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.root {
|
|
22
|
-
box-sizing: border-box;
|
|
23
|
-
position: relative;
|
|
24
|
-
display: flex;
|
|
25
|
-
flex-direction: row;
|
|
26
|
-
border-radius: 0px;
|
|
27
|
-
font-family: ${fontFamily};
|
|
28
|
-
border-bottom: ${borderWidth} solid rgba(${borderColorRgb}, 0.3);
|
|
29
|
-
padding-bottom: 1px;
|
|
30
|
-
transition: border-bottom ${smallDelay}, padding-bottom ${smallDelay};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@media (prefers-reduced-motion) {
|
|
34
|
-
.root {
|
|
35
|
-
transition-duration: 0s;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.root:hover {
|
|
40
|
-
border-bottom: 2px solid ${borderColorHover};
|
|
41
|
-
padding-bottom: 0px;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
:host([disabled]) .root,
|
|
45
|
-
:host([disabled]) .root:hover {
|
|
46
|
-
border-bottom: ${borderWidth} solid ${contentFontColorDisabled};
|
|
47
|
-
padding-bottom: 1px;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.control {
|
|
51
|
-
-webkit-appearance: none;
|
|
52
|
-
font: inherit;
|
|
53
|
-
background: transparent;
|
|
54
|
-
color: inherit;
|
|
55
|
-
height: 28px;
|
|
56
|
-
width: 100%;
|
|
57
|
-
margin-top: auto;
|
|
58
|
-
margin-bottom: auto;
|
|
59
|
-
border: none;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.control:hover,
|
|
63
|
-
.control:focus,
|
|
64
|
-
.control:disabled,
|
|
65
|
-
.control:active {
|
|
66
|
-
outline: none;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.control::selection {
|
|
70
|
-
color: ${labelFontColor};
|
|
71
|
-
background: rgba(${fillColorSelectedRgb}, 0.3);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.control::placeholder {
|
|
75
|
-
color: ${labelFontColor};
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.control:focus-within::placeholder {
|
|
79
|
-
opacity: 1;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.control[disabled]::placeholder {
|
|
83
|
-
color: ${contentFontColorDisabled};
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.label {
|
|
87
|
-
display: flex;
|
|
88
|
-
color: ${labelFontColor};
|
|
89
|
-
font-family: ${labelFontFamily};
|
|
90
|
-
font-size: ${labelFontSize};
|
|
91
|
-
font-weight: ${labelFontWeight};
|
|
92
|
-
line-height: ${labelHeight};
|
|
93
|
-
text-transform: ${labelTextTransform};
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.controls {
|
|
97
|
-
display: flex;
|
|
98
|
-
flex-direction: column;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.step-up,
|
|
102
|
-
.step-down {
|
|
103
|
-
display: inline-flex;
|
|
104
|
-
height: 15px;
|
|
105
|
-
width: 15px;
|
|
106
|
-
cursor: pointer;
|
|
107
|
-
justify-content: center;
|
|
108
|
-
align-items: center;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.step-up svg,
|
|
112
|
-
.step-down svg {
|
|
113
|
-
height: ${iconSize};
|
|
114
|
-
width: ${iconSize};
|
|
115
|
-
fill: ${borderColor};
|
|
116
|
-
}
|
|
117
|
-
`;
|
|
1
|
+
import { css } from '@microsoft/fast-element';
|
|
2
|
+
import { display } from '@microsoft/fast-foundation';
|
|
3
|
+
import { borderColor, borderColorRgb, borderColorHover, borderWidth, contentFontColor, contentFontColorDisabled, contentFontSize, controlHeight, fillColorSelectedRgb, fontFamily, iconSize, labelFontColor, labelFontFamily, labelFontSize, labelFontWeight, labelHeight, labelTextTransform, smallDelay } from '../theme-provider/design-tokens';
|
|
4
|
+
export const styles = css `
|
|
5
|
+
${display('inline-block')}
|
|
6
|
+
|
|
7
|
+
:host {
|
|
8
|
+
font-family: ${fontFamily};
|
|
9
|
+
font-size: ${contentFontSize};
|
|
10
|
+
outline: none;
|
|
11
|
+
user-select: none;
|
|
12
|
+
color: ${contentFontColor};
|
|
13
|
+
height: calc(${labelHeight} + ${controlHeight});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:host([disabled]) {
|
|
17
|
+
color: ${contentFontColorDisabled};
|
|
18
|
+
cursor: default;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.root {
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
position: relative;
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: row;
|
|
26
|
+
border-radius: 0px;
|
|
27
|
+
font-family: ${fontFamily};
|
|
28
|
+
border-bottom: ${borderWidth} solid rgba(${borderColorRgb}, 0.3);
|
|
29
|
+
padding-bottom: 1px;
|
|
30
|
+
transition: border-bottom ${smallDelay}, padding-bottom ${smallDelay};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@media (prefers-reduced-motion) {
|
|
34
|
+
.root {
|
|
35
|
+
transition-duration: 0s;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.root:hover {
|
|
40
|
+
border-bottom: 2px solid ${borderColorHover};
|
|
41
|
+
padding-bottom: 0px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:host([disabled]) .root,
|
|
45
|
+
:host([disabled]) .root:hover {
|
|
46
|
+
border-bottom: ${borderWidth} solid ${contentFontColorDisabled};
|
|
47
|
+
padding-bottom: 1px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.control {
|
|
51
|
+
-webkit-appearance: none;
|
|
52
|
+
font: inherit;
|
|
53
|
+
background: transparent;
|
|
54
|
+
color: inherit;
|
|
55
|
+
height: 28px;
|
|
56
|
+
width: 100%;
|
|
57
|
+
margin-top: auto;
|
|
58
|
+
margin-bottom: auto;
|
|
59
|
+
border: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.control:hover,
|
|
63
|
+
.control:focus,
|
|
64
|
+
.control:disabled,
|
|
65
|
+
.control:active {
|
|
66
|
+
outline: none;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.control::selection {
|
|
70
|
+
color: ${labelFontColor};
|
|
71
|
+
background: rgba(${fillColorSelectedRgb}, 0.3);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.control::placeholder {
|
|
75
|
+
color: ${labelFontColor};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.control:focus-within::placeholder {
|
|
79
|
+
opacity: 1;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.control[disabled]::placeholder {
|
|
83
|
+
color: ${contentFontColorDisabled};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.label {
|
|
87
|
+
display: flex;
|
|
88
|
+
color: ${labelFontColor};
|
|
89
|
+
font-family: ${labelFontFamily};
|
|
90
|
+
font-size: ${labelFontSize};
|
|
91
|
+
font-weight: ${labelFontWeight};
|
|
92
|
+
line-height: ${labelHeight};
|
|
93
|
+
text-transform: ${labelTextTransform};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.controls {
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-direction: column;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.step-up,
|
|
102
|
+
.step-down {
|
|
103
|
+
display: inline-flex;
|
|
104
|
+
height: 15px;
|
|
105
|
+
width: 15px;
|
|
106
|
+
cursor: pointer;
|
|
107
|
+
justify-content: center;
|
|
108
|
+
align-items: center;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.step-up svg,
|
|
112
|
+
.step-down svg {
|
|
113
|
+
height: ${iconSize};
|
|
114
|
+
width: ${iconSize};
|
|
115
|
+
fill: ${borderColor};
|
|
116
|
+
}
|
|
117
|
+
`;
|
|
118
118
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Select as FoundationSelect, SelectOptions } from '@microsoft/fast-foundation';
|
|
2
|
-
export type { Select };
|
|
3
|
-
/**
|
|
4
|
-
* A nimble-styed HTML select
|
|
5
|
-
*/
|
|
6
|
-
declare class Select extends FoundationSelect {
|
|
7
|
-
get value(): string;
|
|
8
|
-
set value(value: string);
|
|
9
|
-
setPositioning(): void;
|
|
10
|
-
connectedCallback(): void;
|
|
11
|
-
}
|
|
12
|
-
export declare const nimbleSelect: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<SelectOptions> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<SelectOptions, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
|
|
1
|
+
import { Select as FoundationSelect, SelectOptions } from '@microsoft/fast-foundation';
|
|
2
|
+
export type { Select };
|
|
3
|
+
/**
|
|
4
|
+
* A nimble-styed HTML select
|
|
5
|
+
*/
|
|
6
|
+
declare class Select extends FoundationSelect {
|
|
7
|
+
get value(): string;
|
|
8
|
+
set value(value: string);
|
|
9
|
+
setPositioning(): void;
|
|
10
|
+
connectedCallback(): void;
|
|
11
|
+
}
|
|
12
|
+
export declare const nimbleSelect: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<SelectOptions> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<SelectOptions, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
|
package/dist/esm/select/index.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { DesignSystem, Select as FoundationSelect, selectTemplate as template } from '@microsoft/fast-foundation';
|
|
2
|
-
import { controlsArrowExpanderDown16X16 } from '@ni/nimble-tokens/dist-icons-esm/nimble-icons-inline';
|
|
3
|
-
import { styles } from './styles';
|
|
4
|
-
/**
|
|
5
|
-
* A nimble-styed HTML select
|
|
6
|
-
*/
|
|
7
|
-
class Select extends FoundationSelect {
|
|
8
|
-
get value() {
|
|
9
|
-
return super.value;
|
|
10
|
-
}
|
|
11
|
-
set value(value) {
|
|
12
|
-
super.value = value;
|
|
13
|
-
// Workaround for https://github.com/microsoft/fast/issues/5139
|
|
14
|
-
// When the value property is set very early in the element's lifecycle (e.g. Angular value binding),
|
|
15
|
-
// the options property will not be set yet. As a workaround, we mark the listbox-option element with
|
|
16
|
-
// the selected attribute, which will set the initial value correctly.
|
|
17
|
-
if (value !== null && this.options.length === 0) {
|
|
18
|
-
const matchingOption = this.querySelector(`nimble-listbox-option[value="${value}"]`);
|
|
19
|
-
if (matchingOption !== null) {
|
|
20
|
-
matchingOption.setAttribute('selected', '');
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
// Workaround for https://github.com/microsoft/fast/issues/5123
|
|
25
|
-
setPositioning() {
|
|
26
|
-
if (!this.$fastController.isConnected) {
|
|
27
|
-
// Don't call setPositioning() until we're connected,
|
|
28
|
-
// since this.forcedPosition isn't initialized yet.
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
super.setPositioning();
|
|
32
|
-
}
|
|
33
|
-
connectedCallback() {
|
|
34
|
-
super.connectedCallback();
|
|
35
|
-
// Call setPositioning() after this.forcedPosition is initialized.
|
|
36
|
-
this.setPositioning();
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
export const nimbleSelect = Select.compose({
|
|
40
|
-
baseName: 'select',
|
|
41
|
-
template,
|
|
42
|
-
styles,
|
|
43
|
-
indicator: controlsArrowExpanderDown16X16.data
|
|
44
|
-
});
|
|
45
|
-
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSelect());
|
|
1
|
+
import { DesignSystem, Select as FoundationSelect, selectTemplate as template } from '@microsoft/fast-foundation';
|
|
2
|
+
import { controlsArrowExpanderDown16X16 } from '@ni/nimble-tokens/dist-icons-esm/nimble-icons-inline';
|
|
3
|
+
import { styles } from './styles';
|
|
4
|
+
/**
|
|
5
|
+
* A nimble-styed HTML select
|
|
6
|
+
*/
|
|
7
|
+
class Select extends FoundationSelect {
|
|
8
|
+
get value() {
|
|
9
|
+
return super.value;
|
|
10
|
+
}
|
|
11
|
+
set value(value) {
|
|
12
|
+
super.value = value;
|
|
13
|
+
// Workaround for https://github.com/microsoft/fast/issues/5139
|
|
14
|
+
// When the value property is set very early in the element's lifecycle (e.g. Angular value binding),
|
|
15
|
+
// the options property will not be set yet. As a workaround, we mark the listbox-option element with
|
|
16
|
+
// the selected attribute, which will set the initial value correctly.
|
|
17
|
+
if (value !== null && this.options.length === 0) {
|
|
18
|
+
const matchingOption = this.querySelector(`nimble-listbox-option[value="${value}"]`);
|
|
19
|
+
if (matchingOption !== null) {
|
|
20
|
+
matchingOption.setAttribute('selected', '');
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
// Workaround for https://github.com/microsoft/fast/issues/5123
|
|
25
|
+
setPositioning() {
|
|
26
|
+
if (!this.$fastController.isConnected) {
|
|
27
|
+
// Don't call setPositioning() until we're connected,
|
|
28
|
+
// since this.forcedPosition isn't initialized yet.
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
super.setPositioning();
|
|
32
|
+
}
|
|
33
|
+
connectedCallback() {
|
|
34
|
+
super.connectedCallback();
|
|
35
|
+
// Call setPositioning() after this.forcedPosition is initialized.
|
|
36
|
+
this.setPositioning();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export const nimbleSelect = Select.compose({
|
|
40
|
+
baseName: 'select',
|
|
41
|
+
template,
|
|
42
|
+
styles,
|
|
43
|
+
indicator: controlsArrowExpanderDown16X16.data
|
|
44
|
+
});
|
|
45
|
+
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSelect());
|
|
46
46
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const styles: import("@microsoft/fast-element").ElementStyles;
|
|
1
|
+
export declare const styles: import("@microsoft/fast-element").ElementStyles;
|