@ni/nimble-components 11.13.1 → 11.15.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 +755 -44
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +1342 -1149
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/all-components.d.ts +2 -0
- package/dist/esm/all-components.js +2 -0
- package/dist/esm/all-components.js.map +1 -1
- package/dist/esm/checkbox/styles.js +1 -1
- package/dist/esm/radio-button/index.d.ts +11 -0
- package/dist/esm/radio-button/index.js +17 -0
- package/dist/esm/radio-button/index.js.map +1 -0
- package/dist/esm/radio-button/styles.d.ts +1 -0
- package/dist/esm/radio-button/styles.js +95 -0
- package/dist/esm/radio-button/styles.js.map +1 -0
- package/dist/esm/radio-group/index.d.ts +13 -0
- package/dist/esm/radio-group/index.js +20 -0
- package/dist/esm/radio-group/index.js.map +1 -0
- package/dist/esm/radio-group/styles.d.ts +1 -0
- package/dist/esm/radio-group/styles.js +29 -0
- package/dist/esm/radio-group/styles.js.map +1 -0
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"all-components.js","sourceRoot":"","sources":["../../src/all-components.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,cAAc,CAAC;AACtB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,UAAU,CAAC;AAClB,OAAO,eAAe,CAAC;AACvB,OAAO,YAAY,CAAC;AACpB,OAAO,YAAY,CAAC;AACpB,OAAO,UAAU,CAAC;AAClB,OAAO,UAAU,CAAC;AAClB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,eAAe,CAAC;AACvB,OAAO,QAAQ,CAAC;AAChB,OAAO,eAAe,CAAC;AACvB,OAAO,aAAa,CAAC;AACrB,OAAO,gBAAgB,CAAC;AACxB,OAAO,UAAU,CAAC;AAClB,OAAO,UAAU,CAAC;AAClB,OAAO,OAAO,CAAC;AACf,OAAO,aAAa,CAAC;AACrB,OAAO,QAAQ,CAAC;AAChB,OAAO,gBAAgB,CAAC;AACxB,OAAO,aAAa,CAAC;AACrB,OAAO,cAAc,CAAC;AACtB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,iBAAiB,CAAC;AACzB,OAAO,WAAW,CAAC;AACnB,OAAO,WAAW,CAAC;AACnB,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"all-components.js","sourceRoot":"","sources":["../../src/all-components.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,cAAc,CAAC;AACtB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,UAAU,CAAC;AAClB,OAAO,eAAe,CAAC;AACvB,OAAO,YAAY,CAAC;AACpB,OAAO,YAAY,CAAC;AACpB,OAAO,UAAU,CAAC;AAClB,OAAO,UAAU,CAAC;AAClB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,eAAe,CAAC;AACvB,OAAO,QAAQ,CAAC;AAChB,OAAO,eAAe,CAAC;AACvB,OAAO,aAAa,CAAC;AACrB,OAAO,gBAAgB,CAAC;AACxB,OAAO,gBAAgB,CAAC;AACxB,OAAO,eAAe,CAAC;AACvB,OAAO,UAAU,CAAC;AAClB,OAAO,UAAU,CAAC;AAClB,OAAO,OAAO,CAAC;AACf,OAAO,aAAa,CAAC;AACrB,OAAO,QAAQ,CAAC;AAChB,OAAO,gBAAgB,CAAC;AACxB,OAAO,aAAa,CAAC;AACrB,OAAO,cAAc,CAAC;AACtB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,iBAAiB,CAAC;AACzB,OAAO,WAAW,CAAC;AACnB,OAAO,WAAW,CAAC;AACnB,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Radio as FoundationRadio } from '@microsoft/fast-foundation';
|
|
2
|
+
declare global {
|
|
3
|
+
interface HTMLElementTagNameMap {
|
|
4
|
+
'nimble-radio-button': RadioButton;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A nimble-styled radio button
|
|
9
|
+
*/
|
|
10
|
+
export declare class RadioButton extends FoundationRadio {
|
|
11
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Radio as FoundationRadio, radioTemplate as template, DesignSystem } from '@microsoft/fast-foundation';
|
|
2
|
+
import { circleFilled16X16 } from '@ni/nimble-tokens/dist/icons/js';
|
|
3
|
+
import { styles } from './styles';
|
|
4
|
+
/**
|
|
5
|
+
* A nimble-styled radio button
|
|
6
|
+
*/
|
|
7
|
+
export class RadioButton extends FoundationRadio {
|
|
8
|
+
}
|
|
9
|
+
const nimbleRadioButton = RadioButton.compose({
|
|
10
|
+
baseName: 'radio-button',
|
|
11
|
+
baseClass: FoundationRadio,
|
|
12
|
+
template,
|
|
13
|
+
styles,
|
|
14
|
+
checkedIndicator: circleFilled16X16.data
|
|
15
|
+
});
|
|
16
|
+
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadioButton());
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/radio-button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,IAAI,eAAe,EACxB,aAAa,IAAI,QAAQ,EACzB,YAAY,EAEf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAQlC;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,eAAe;CAAG;AAEnD,MAAM,iBAAiB,GAAG,WAAW,CAAC,OAAO,CAAe;IACxD,QAAQ,EAAE,cAAc;IACxB,SAAS,EAAE,eAAe;IAC1B,QAAQ;IACR,MAAM;IACN,gBAAgB,EAAE,iBAAiB,CAAC,IAAI;CAC3C,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,iBAAiB,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("@microsoft/fast-element").ElementStyles;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { css } from '@microsoft/fast-element';
|
|
2
|
+
import { display } from '@microsoft/fast-foundation';
|
|
3
|
+
import { bodyDisabledFontColor, bodyFontColor, borderColor, borderHoverColor, borderRgbPartialColor, borderWidth, buttonLabelFont, controlHeight, iconSize, smallDelay } from '../theme-provider/design-tokens';
|
|
4
|
+
import { focusVisible } from '../utilities/style/focus';
|
|
5
|
+
export const styles = css `
|
|
6
|
+
${display('inline-flex')}
|
|
7
|
+
|
|
8
|
+
:host {
|
|
9
|
+
font: ${buttonLabelFont};
|
|
10
|
+
align-items: center;
|
|
11
|
+
outline: none;
|
|
12
|
+
width: fit-content;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:host([disabled]) {
|
|
17
|
+
cursor: default;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.control {
|
|
21
|
+
width: calc(${controlHeight} / 2);
|
|
22
|
+
height: calc(${controlHeight} / 2);
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
flex-shrink: 0;
|
|
25
|
+
border: ${borderWidth} solid ${borderColor};
|
|
26
|
+
border-radius: 100%;
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
transition: box-shadow ${smallDelay};
|
|
31
|
+
${
|
|
32
|
+
/*
|
|
33
|
+
* Firefox includes the line height in the outline height calculation (not sure if intended or accidental).
|
|
34
|
+
* Set it to 0 to ensure the outline is just as high as the control.
|
|
35
|
+
*/ ''}
|
|
36
|
+
line-height: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:host([disabled]) .control {
|
|
40
|
+
background-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
41
|
+
border-color: rgba(${borderRgbPartialColor}, 0.2);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:host(:not([disabled]):not(:active):hover) .control {
|
|
45
|
+
border-color: ${borderHoverColor};
|
|
46
|
+
box-shadow: 0px 0px 0px ${borderWidth} ${borderHoverColor} inset;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:host(${focusVisible}) .control {
|
|
50
|
+
border-color: ${borderHoverColor};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:host(${focusVisible}) .control::after {
|
|
54
|
+
content: '';
|
|
55
|
+
position: absolute;
|
|
56
|
+
width: calc(2px + ${controlHeight} / 2);
|
|
57
|
+
height: calc(2px + ${controlHeight} / 2);
|
|
58
|
+
border: 2px solid ${borderHoverColor};
|
|
59
|
+
border-radius: 100%;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.label {
|
|
63
|
+
font: inherit;
|
|
64
|
+
color: ${bodyFontColor};
|
|
65
|
+
padding-left: 1ch;
|
|
66
|
+
cursor: inherit;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:host([disabled]) .label {
|
|
70
|
+
color: ${bodyDisabledFontColor};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
slot[name='checked-indicator'] {
|
|
74
|
+
display: none;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
slot[name='checked-indicator'] svg {
|
|
78
|
+
height: ${iconSize};
|
|
79
|
+
width: ${iconSize};
|
|
80
|
+
overflow: visible;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:host(.checked) slot[name='checked-indicator'] {
|
|
84
|
+
display: contents;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
slot[name='checked-indicator'] circle {
|
|
88
|
+
fill: ${borderColor};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:host([disabled]) slot[name='checked-indicator'] circle {
|
|
92
|
+
fill: rgba(${borderRgbPartialColor}, 0.3);
|
|
93
|
+
}
|
|
94
|
+
`;
|
|
95
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/radio-button/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,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,qBAAqB,EACrB,WAAW,EACX,eAAe,EACf,aAAa,EACb,QAAQ,EACR,UAAU,EACb,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,aAAa,CAAC;;;gBAGZ,eAAe;;;;;;;;;;;;sBAYT,aAAa;uBACZ,aAAa;;;kBAGlB,WAAW,UAAU,WAAW;;;;;iCAKjB,UAAU;UACjC;AACE;;;GAGG,CAAC,EACR;;;;;iCAKyB,qBAAqB;6BACzB,qBAAqB;;;;wBAI1B,gBAAgB;kCACN,WAAW,IAAI,gBAAgB;;;YAGrD,YAAY;wBACA,gBAAgB;;;YAG5B,YAAY;;;4BAGI,aAAa;6BACZ,aAAa;4BACd,gBAAgB;;;;;;iBAM3B,aAAa;;;;;;iBAMb,qBAAqB;;;;;;;;kBAQpB,QAAQ;iBACT,QAAQ;;;;;;;;;gBAST,WAAW;;;;qBAIN,qBAAqB;;CAEzC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RadioGroup as FoundationRadioGroup } from '@microsoft/fast-foundation';
|
|
2
|
+
import { Orientation } from '@microsoft/fast-web-utilities';
|
|
3
|
+
declare global {
|
|
4
|
+
interface HTMLElementTagNameMap {
|
|
5
|
+
'nimble-radio-group': RadioGroup;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export { Orientation };
|
|
9
|
+
/**
|
|
10
|
+
* A nimble-styled grouping element for radio buttons
|
|
11
|
+
*/
|
|
12
|
+
export declare class RadioGroup extends FoundationRadioGroup {
|
|
13
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { RadioGroup as FoundationRadioGroup, radioGroupTemplate as template, DesignSystem } from '@microsoft/fast-foundation';
|
|
2
|
+
import { Orientation } from '@microsoft/fast-web-utilities';
|
|
3
|
+
import { styles } from './styles';
|
|
4
|
+
export { Orientation };
|
|
5
|
+
/**
|
|
6
|
+
* A nimble-styled grouping element for radio buttons
|
|
7
|
+
*/
|
|
8
|
+
export class RadioGroup extends FoundationRadioGroup {
|
|
9
|
+
}
|
|
10
|
+
const nimbleRadioGroup = RadioGroup.compose({
|
|
11
|
+
baseName: 'radio-group',
|
|
12
|
+
baseClass: FoundationRadioGroup,
|
|
13
|
+
template,
|
|
14
|
+
styles,
|
|
15
|
+
shadowOptions: {
|
|
16
|
+
delegatesFocus: true
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadioGroup());
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/radio-group/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,UAAU,IAAI,oBAAoB,EAClC,kBAAkB,IAAI,QAAQ,EAC9B,YAAY,EACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAQlC,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,oBAAoB;CAAG;AAEvD,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,CAAC;IACxC,QAAQ,EAAE,aAAa;IACvB,SAAS,EAAE,oBAAoB;IAC/B,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,gBAAgB,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("@microsoft/fast-element").ElementStyles;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { css } from '@microsoft/fast-element';
|
|
2
|
+
import { display } from '@microsoft/fast-foundation';
|
|
3
|
+
import { controlLabelDisabledFontColor, controlLabelFont, controlLabelFontColor, standardPadding } from '../theme-provider/design-tokens';
|
|
4
|
+
export const styles = css `
|
|
5
|
+
${display('inline-block')}
|
|
6
|
+
|
|
7
|
+
.positioning-region {
|
|
8
|
+
display: flex;
|
|
9
|
+
gap: ${standardPadding};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:host([orientation='vertical']) .positioning-region {
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:host([orientation='horizontal']) .positioning-region {
|
|
17
|
+
flex-direction: row;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
slot[name='label'] {
|
|
21
|
+
font: ${controlLabelFont};
|
|
22
|
+
color: ${controlLabelFontColor};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:host([disabled]) slot[name='label'] {
|
|
26
|
+
color: ${controlLabelDisabledFontColor};
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
29
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/radio-group/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EACH,6BAA6B,EAC7B,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EAClB,MAAM,iCAAiC,CAAC;AAEzC,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,cAAc,CAAC;;;;eAId,eAAe;;;;;;;;;;;;gBAYd,gBAAgB;iBACf,qBAAqB;;;;iBAIrB,6BAA6B;;CAE7C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ni/nimble-components",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.15.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",
|
|
@@ -62,17 +62,17 @@
|
|
|
62
62
|
"@ni/eslint-config-typescript": "^3.0.5",
|
|
63
63
|
"@rollup/plugin-commonjs": "^21.0.2",
|
|
64
64
|
"@rollup/plugin-node-resolve": "13.1.3",
|
|
65
|
-
"@storybook/addon-a11y": "^6.
|
|
66
|
-
"@storybook/addon-actions": "^6.
|
|
67
|
-
"@storybook/addon-docs": "^6.
|
|
68
|
-
"@storybook/addon-essentials": "^6.
|
|
69
|
-
"@storybook/addon-interactions": "^6.
|
|
70
|
-
"@storybook/addon-links": "^6.
|
|
71
|
-
"@storybook/addons": "^6.
|
|
72
|
-
"@storybook/builder-webpack5": "^6.
|
|
73
|
-
"@storybook/html": "^6.
|
|
74
|
-
"@storybook/manager-webpack5": "^6.
|
|
75
|
-
"@storybook/theming": "^6.
|
|
65
|
+
"@storybook/addon-a11y": "^6.5.10",
|
|
66
|
+
"@storybook/addon-actions": "^6.5.10",
|
|
67
|
+
"@storybook/addon-docs": "^6.5.10",
|
|
68
|
+
"@storybook/addon-essentials": "^6.5.10",
|
|
69
|
+
"@storybook/addon-interactions": "^6.5.10",
|
|
70
|
+
"@storybook/addon-links": "^6.5.10",
|
|
71
|
+
"@storybook/addons": "^6.5.10",
|
|
72
|
+
"@storybook/builder-webpack5": "^6.5.10",
|
|
73
|
+
"@storybook/html": "^6.5.10",
|
|
74
|
+
"@storybook/manager-webpack5": "^6.5.10",
|
|
75
|
+
"@storybook/theming": "^6.5.10",
|
|
76
76
|
"@types/jasmine": "^3.6.0",
|
|
77
77
|
"@types/webpack-env": "^1.15.2",
|
|
78
78
|
"babel-loader": "^8.2.2",
|