@ni/nimble-components 23.0.1 → 24.0.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 +89 -119
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +3581 -3612
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/menu-button/index.d.ts +2 -2
- package/dist/esm/menu-button/index.js +4 -2
- package/dist/esm/menu-button/index.js.map +1 -1
- package/dist/esm/menu-button/template.js +1 -0
- package/dist/esm/menu-button/template.js.map +1 -1
- package/dist/esm/menu-button/types.d.ts +1 -1
- package/dist/esm/menu-button/types.js +1 -1
- package/dist/esm/menu-button/types.js.map +1 -1
- package/dist/esm/patterns/button/styles.js +42 -42
- package/dist/esm/patterns/button/styles.js.map +1 -1
- package/dist/esm/theme-provider/design-token-comments.js +0 -2
- package/dist/esm/theme-provider/design-token-comments.js.map +1 -1
- package/dist/esm/theme-provider/design-token-names.js +0 -2
- package/dist/esm/theme-provider/design-token-names.js.map +1 -1
- package/dist/esm/theme-provider/design-tokens.d.ts +0 -2
- package/dist/esm/theme-provider/design-tokens.js +4 -6
- package/dist/esm/theme-provider/design-tokens.js.map +1 -1
- package/dist/esm/toggle-button/index.d.ts +7 -1
- package/dist/esm/toggle-button/index.js +3 -0
- package/dist/esm/toggle-button/index.js.map +1 -1
- package/dist/esm/toggle-button/styles.js +27 -58
- package/dist/esm/toggle-button/styles.js.map +1 -1
- package/dist/esm/toggle-button/types.d.ts +1 -1
- package/dist/esm/toggle-button/types.js +1 -1
- package/dist/esm/toggle-button/types.js.map +1 -1
- package/dist/tokens-internal.scss +0 -12
- package/dist/tokens.scss +0 -6
- package/package.json +2 -2
|
@@ -1,63 +1,26 @@
|
|
|
1
1
|
import { css } from '@microsoft/fast-element';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { buttonAccentOutlineFontColor, buttonLabelFontColor, fillSelectedColor, fillSelectedRgbPartialColor, iconColor } from '../theme-provider/design-tokens';
|
|
3
|
+
import { buttonAppearanceVariantStyles, styles as buttonStyles } from '../patterns/button/styles';
|
|
4
|
+
import { appearanceBehavior } from '../utilities/style/appearance';
|
|
5
|
+
import { ButtonAppearance } from './types';
|
|
5
6
|
export const styles = css `
|
|
6
7
|
${buttonStyles}
|
|
8
|
+
${buttonAppearanceVariantStyles}
|
|
7
9
|
|
|
8
|
-
@layer
|
|
10
|
+
@layer checked {
|
|
9
11
|
.control[aria-pressed='true'] {
|
|
10
12
|
background-color: transparent;
|
|
13
|
+
color: ${buttonLabelFontColor};
|
|
11
14
|
background-image: linear-gradient(
|
|
12
15
|
${fillSelectedColor},
|
|
13
16
|
${fillSelectedColor}
|
|
14
17
|
);
|
|
15
18
|
border-color: rgba(${fillSelectedRgbPartialColor}, 0.3);
|
|
16
19
|
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@layer hover {
|
|
20
|
-
.control[aria-pressed='true']:hover {
|
|
21
|
-
border-color: ${borderHoverColor};
|
|
22
|
-
box-shadow: 0px 0px 0px ${borderWidth} ${borderHoverColor} inset;
|
|
23
|
-
background-image: linear-gradient(
|
|
24
|
-
${fillSelectedColor},
|
|
25
|
-
${fillSelectedColor}
|
|
26
|
-
);
|
|
27
|
-
background-size: calc(100% - 4px) calc(100% - 4px);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@layer focusVisible {
|
|
32
|
-
.control[aria-pressed='true']${focusVisible} {
|
|
33
|
-
border-color: ${borderHoverColor};
|
|
34
|
-
box-shadow: 0px 0px 0px ${borderWidth} ${borderHoverColor} inset;
|
|
35
|
-
background-image: linear-gradient(
|
|
36
|
-
${fillSelectedColor},
|
|
37
|
-
${fillSelectedColor}
|
|
38
|
-
);
|
|
39
|
-
background-size: calc(100% - 4px) calc(100% - 4px);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.control[aria-pressed='true']${focusVisible}::before {
|
|
43
|
-
outline: ${borderWidth} solid ${borderHoverColor};
|
|
44
|
-
outline-offset: -3px;
|
|
45
|
-
color: transparent;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@layer active {
|
|
50
|
-
.control[aria-pressed='true']:active {
|
|
51
|
-
box-shadow: none;
|
|
52
|
-
background-image: linear-gradient(
|
|
53
|
-
${fillSelectedColor},
|
|
54
|
-
${fillSelectedColor}
|
|
55
|
-
);
|
|
56
|
-
background-size: calc(100% - 2px) calc(100% - 2px);
|
|
57
|
-
}
|
|
58
20
|
|
|
59
|
-
.control[aria-pressed='true']
|
|
60
|
-
|
|
21
|
+
.control[aria-pressed='true'] [part='start'],
|
|
22
|
+
.control[aria-pressed='true'] [part='end'] {
|
|
23
|
+
${iconColor.cssCustomProperty}: ${buttonLabelFontColor};
|
|
61
24
|
}
|
|
62
25
|
}
|
|
63
26
|
|
|
@@ -69,16 +32,22 @@ export const styles = css `
|
|
|
69
32
|
);
|
|
70
33
|
border-color: rgba(${fillSelectedRgbPartialColor}, 0.3);
|
|
71
34
|
}
|
|
72
|
-
|
|
73
|
-
:host([disabled]) .control[aria-pressed='true']:hover {
|
|
74
|
-
background-image: linear-gradient(
|
|
75
|
-
${fillSelectedColor},
|
|
76
|
-
${fillSelectedColor}
|
|
77
|
-
);
|
|
78
|
-
background-size: 100% 100%;
|
|
79
|
-
border-color: rgba(${fillSelectedRgbPartialColor}, 0.3);
|
|
80
|
-
box-shadow: none;
|
|
81
|
-
}
|
|
82
35
|
}
|
|
83
|
-
|
|
36
|
+
`.withBehaviors(appearanceBehavior(ButtonAppearance.outline, css `
|
|
37
|
+
@layer checked {
|
|
38
|
+
:host([appearance-variant='accent'])
|
|
39
|
+
.control[aria-pressed='true'] {
|
|
40
|
+
color: ${buttonAccentOutlineFontColor};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:host([appearance-variant='accent'])
|
|
44
|
+
.control[aria-pressed='true']
|
|
45
|
+
[part='start'],
|
|
46
|
+
:host([appearance-variant='accent'])
|
|
47
|
+
.control[aria-pressed='true']
|
|
48
|
+
[part='end'] {
|
|
49
|
+
${iconColor.cssCustomProperty}: ${buttonAccentOutlineFontColor};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
`));
|
|
84
53
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/toggle-button/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/toggle-button/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAE9C,OAAO,EACH,4BAA4B,EAC5B,oBAAoB,EACpB,iBAAiB,EACjB,2BAA2B,EAC3B,SAAS,EACZ,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACH,6BAA6B,EAC7B,MAAM,IAAI,YAAY,EACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,YAAY;MACZ,6BAA6B;;;;;qBAKd,oBAAoB;;kBAEvB,iBAAiB;kBACjB,iBAAiB;;iCAEF,2BAA2B;;;;;cAK9C,SAAS,CAAC,iBAAiB,KAAK,oBAAoB;;;;;;;kBAOhD,iBAAiB;kBACjB,iBAAiB;;iCAEF,2BAA2B;;;CAG3D,CAAC,aAAa,CACX,kBAAkB,CACd,gBAAgB,CAAC,OAAO,EACxB,GAAG,CAAA;;;;6BAIkB,4BAA4B;;;;;;;;;sBASnC,SAAS,CAAC,iBAAiB,KAAK,4BAA4B;;;SAGzE,CACJ,CACJ,CAAC","sourcesContent":["import { css } from '@microsoft/fast-element';\n\nimport {\n buttonAccentOutlineFontColor,\n buttonLabelFontColor,\n fillSelectedColor,\n fillSelectedRgbPartialColor,\n iconColor\n} from '../theme-provider/design-tokens';\nimport {\n buttonAppearanceVariantStyles,\n styles as buttonStyles\n} from '../patterns/button/styles';\nimport { appearanceBehavior } from '../utilities/style/appearance';\nimport { ButtonAppearance } from './types';\n\nexport const styles = css`\n ${buttonStyles}\n ${buttonAppearanceVariantStyles}\n\n @layer checked {\n .control[aria-pressed='true'] {\n background-color: transparent;\n color: ${buttonLabelFontColor};\n background-image: linear-gradient(\n ${fillSelectedColor},\n ${fillSelectedColor}\n );\n border-color: rgba(${fillSelectedRgbPartialColor}, 0.3);\n }\n\n .control[aria-pressed='true'] [part='start'],\n .control[aria-pressed='true'] [part='end'] {\n ${iconColor.cssCustomProperty}: ${buttonLabelFontColor};\n }\n }\n\n @layer disabled {\n :host([disabled]) .control[aria-pressed='true'] {\n background-image: linear-gradient(\n ${fillSelectedColor},\n ${fillSelectedColor}\n );\n border-color: rgba(${fillSelectedRgbPartialColor}, 0.3);\n }\n }\n`.withBehaviors(\n appearanceBehavior(\n ButtonAppearance.outline,\n css`\n @layer checked {\n :host([appearance-variant='accent'])\n .control[aria-pressed='true'] {\n color: ${buttonAccentOutlineFontColor};\n }\n\n :host([appearance-variant='accent'])\n .control[aria-pressed='true']\n [part='start'],\n :host([appearance-variant='accent'])\n .control[aria-pressed='true']\n [part='end'] {\n ${iconColor.cssCustomProperty}: ${buttonAccentOutlineFontColor};\n }\n }\n `\n )\n);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/toggle-button/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/toggle-button/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACH,gBAAgB,EAChB,uBAAuB,EAC1B,MAAM,0BAA0B,CAAC","sourcesContent":["/**\n * Types of toggle button appearance.\n * @public\n */\nexport {\n ButtonAppearance,\n ButtonAppearanceVariant\n} from '../patterns/button/types';\n"]}
|
|
@@ -44,12 +44,6 @@ $ni-nimble-internal-button-fill-primary-color: --ni-nimble-button-fill-primary-c
|
|
|
44
44
|
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-button-primary-font-color}: <new value>;`.
|
|
45
45
|
$ni-nimble-internal-button-primary-font-color: --ni-nimble-button-primary-font-color;
|
|
46
46
|
|
|
47
|
-
/// Internal property for $ni-nimble-button-fill-active-primary-color.
|
|
48
|
-
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
49
|
-
/// Used to override a token value (generally making it no longer theme-aware).
|
|
50
|
-
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-button-fill-active-primary-color}: <new value>;`.
|
|
51
|
-
$ni-nimble-internal-button-fill-active-primary-color: --ni-nimble-button-fill-active-primary-color;
|
|
52
|
-
|
|
53
47
|
/// Internal property for $ni-nimble-button-fill-accent-color.
|
|
54
48
|
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
55
49
|
/// Used to override a token value (generally making it no longer theme-aware).
|
|
@@ -74,12 +68,6 @@ $ni-nimble-internal-button-accent-outline-font-color: --ni-nimble-button-accent-
|
|
|
74
68
|
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-button-border-accent-outline-color}: <new value>;`.
|
|
75
69
|
$ni-nimble-internal-button-border-accent-outline-color: --ni-nimble-button-border-accent-outline-color;
|
|
76
70
|
|
|
77
|
-
/// Internal property for $ni-nimble-button-fill-accent-active-color.
|
|
78
|
-
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
79
|
-
/// Used to override a token value (generally making it no longer theme-aware).
|
|
80
|
-
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-button-fill-accent-active-color}: <new value>;`.
|
|
81
|
-
$ni-nimble-internal-button-fill-accent-active-color: --ni-nimble-button-fill-accent-active-color;
|
|
82
|
-
|
|
83
71
|
/// Internal property for $ni-nimble-fill-selected-color.
|
|
84
72
|
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
85
73
|
/// Used to override a token value (generally making it no longer theme-aware).
|
package/dist/tokens.scss
CHANGED
|
@@ -26,9 +26,6 @@ $ni-nimble-button-fill-primary-color: var($ni-nimble-internal-button-fill-primar
|
|
|
26
26
|
/// Font color for "primary" appearance-variant buttons
|
|
27
27
|
$ni-nimble-button-primary-font-color: var($ni-nimble-internal-button-primary-font-color);
|
|
28
28
|
|
|
29
|
-
/// Active fill color for "primary" appearance-variant buttons
|
|
30
|
-
$ni-nimble-button-fill-active-primary-color: var($ni-nimble-internal-button-fill-active-primary-color);
|
|
31
|
-
|
|
32
29
|
/// Control fill color for "accent" appearance-variant buttons
|
|
33
30
|
$ni-nimble-button-fill-accent-color: var($ni-nimble-internal-button-fill-accent-color);
|
|
34
31
|
|
|
@@ -41,9 +38,6 @@ $ni-nimble-button-accent-outline-font-color: var($ni-nimble-internal-button-acce
|
|
|
41
38
|
/// Border color for "accent" appearance-variant outline buttons
|
|
42
39
|
$ni-nimble-button-border-accent-outline-color: var($ni-nimble-internal-button-border-accent-outline-color);
|
|
43
40
|
|
|
44
|
-
/// Active fill color for "accent" appearance-variant buttons
|
|
45
|
-
$ni-nimble-button-fill-accent-active-color: var($ni-nimble-internal-button-fill-accent-active-color);
|
|
46
|
-
|
|
47
41
|
/// Control fill color when a control is selected
|
|
48
42
|
$ni-nimble-fill-selected-color: var($ni-nimble-internal-fill-selected-color);
|
|
49
43
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ni/nimble-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.0.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 generate-workers && npm run build-components && npm run bundle-components && npm run generate-scss && npm run build-storybook",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@microsoft/fast-element": "^1.12.0",
|
|
69
69
|
"@microsoft/fast-foundation": "2.49.4",
|
|
70
70
|
"@microsoft/fast-web-utilities": "^6.0.0",
|
|
71
|
-
"@ni/nimble-tokens": "^6.13.
|
|
71
|
+
"@ni/nimble-tokens": "^6.13.1",
|
|
72
72
|
"@tanstack/table-core": "^8.10.7",
|
|
73
73
|
"@tanstack/virtual-core": "^3.0.0-beta.68",
|
|
74
74
|
"@tiptap/core": "^2.2.2",
|