@ni/nimble-components 1.0.0-beta.98 → 1.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/README.md +63 -3
- package/dist/esm/button/index.d.ts +16 -0
- package/dist/esm/button/index.js +23 -1
- package/dist/esm/button/index.js.map +1 -1
- package/dist/esm/button/types.d.ts +4 -5
- package/dist/esm/button/types.js +1 -10
- package/dist/esm/button/types.js.map +1 -1
- package/dist/esm/checkbox/index.d.ts +11 -1
- package/dist/esm/checkbox/index.js +8 -2
- package/dist/esm/checkbox/index.js.map +1 -1
- package/dist/esm/checkbox/styles.js +4 -4
- package/dist/esm/checkbox/styles.js.map +1 -1
- package/dist/esm/drawer/index.d.ts +7 -3
- package/dist/esm/drawer/index.js +8 -9
- package/dist/esm/drawer/index.js.map +1 -1
- package/dist/esm/drawer/styles.js +8 -7
- package/dist/esm/drawer/styles.js.map +1 -1
- package/dist/esm/drawer/types.d.ts +2 -0
- package/dist/esm/drawer/types.js.map +1 -1
- package/dist/esm/icon-base/styles.js +6 -6
- package/dist/esm/icon-base/styles.js.map +1 -1
- package/dist/esm/icon-base/template.js +1 -1
- package/dist/esm/icon-base/types.d.ts +11 -0
- package/dist/esm/icon-base/types.js +12 -0
- package/dist/esm/icon-base/types.js.map +1 -0
- package/dist/esm/icons/access-control.d.ts +5 -0
- package/dist/esm/icons/access-control.js.map +1 -1
- package/dist/esm/icons/admin.d.ts +5 -0
- package/dist/esm/icons/admin.js.map +1 -1
- package/dist/esm/icons/administration.d.ts +5 -0
- package/dist/esm/icons/administration.js.map +1 -1
- package/dist/esm/icons/all-icons.d.ts +11 -0
- package/dist/esm/icons/all-icons.js +11 -0
- package/dist/esm/icons/all-icons.js.map +1 -1
- package/dist/esm/icons/check.d.ts +5 -0
- package/dist/esm/icons/check.js.map +1 -1
- package/dist/esm/icons/custom-applications.d.ts +5 -0
- package/dist/esm/icons/custom-applications.js.map +1 -1
- package/dist/esm/icons/custom-status.d.ts +12 -0
- package/dist/esm/icons/custom-status.js +12 -0
- package/dist/esm/icons/custom-status.js.map +1 -0
- package/dist/esm/icons/delete.d.ts +5 -0
- package/dist/esm/icons/delete.js.map +1 -1
- package/dist/esm/icons/done.d.ts +12 -0
- package/dist/esm/icons/done.js +12 -0
- package/dist/esm/icons/done.js.map +1 -0
- package/dist/esm/icons/fail.d.ts +12 -0
- package/dist/esm/icons/fail.js +12 -0
- package/dist/esm/icons/fail.js.map +1 -0
- package/dist/esm/icons/login.d.ts +5 -0
- package/dist/esm/icons/login.js.map +1 -1
- package/dist/esm/icons/logout.d.ts +5 -0
- package/dist/esm/icons/logout.js.map +1 -1
- package/dist/esm/icons/looping.d.ts +12 -0
- package/dist/esm/icons/looping.js +12 -0
- package/dist/esm/icons/looping.js.map +1 -0
- package/dist/esm/icons/managed-systems.d.ts +5 -0
- package/dist/esm/icons/managed-systems.js.map +1 -1
- package/dist/esm/icons/measurement-data-analysis.d.ts +5 -0
- package/dist/esm/icons/measurement-data-analysis.js.map +1 -1
- package/dist/esm/icons/running.d.ts +12 -0
- package/dist/esm/icons/running.js +12 -0
- package/dist/esm/icons/running.js.map +1 -0
- package/dist/esm/icons/settings.d.ts +5 -0
- package/dist/esm/icons/settings.js.map +1 -1
- package/dist/esm/icons/skipped.d.ts +12 -0
- package/dist/esm/icons/skipped.js +12 -0
- package/dist/esm/icons/skipped.js.map +1 -0
- package/dist/esm/icons/status.d.ts +12 -0
- package/dist/esm/icons/status.js +12 -0
- package/dist/esm/icons/status.js.map +1 -0
- package/dist/esm/icons/succeeded.d.ts +12 -0
- package/dist/esm/icons/succeeded.js +12 -0
- package/dist/esm/icons/succeeded.js.map +1 -0
- package/dist/esm/icons/terminated.d.ts +12 -0
- package/dist/esm/icons/terminated.js +12 -0
- package/dist/esm/icons/terminated.js.map +1 -0
- package/dist/esm/icons/test-insights.d.ts +5 -0
- package/dist/esm/icons/test-insights.js.map +1 -1
- package/dist/esm/icons/timed-out.d.ts +12 -0
- package/dist/esm/icons/timed-out.js +12 -0
- package/dist/esm/icons/timed-out.js.map +1 -0
- package/dist/esm/icons/utilities.d.ts +5 -0
- package/dist/esm/icons/utilities.js.map +1 -1
- package/dist/esm/icons/waiting.d.ts +12 -0
- package/dist/esm/icons/waiting.js +12 -0
- package/dist/esm/icons/waiting.js.map +1 -0
- package/dist/esm/listbox-option/index.d.ts +5 -0
- package/dist/esm/listbox-option/index.js +2 -0
- package/dist/esm/listbox-option/index.js.map +1 -1
- package/dist/esm/menu/index.d.ts +8 -1
- package/dist/esm/menu/index.js +5 -2
- package/dist/esm/menu/index.js.map +1 -1
- package/dist/esm/menu-item/index.d.ts +9 -12
- package/dist/esm/menu-item/index.js +5 -2
- package/dist/esm/menu-item/index.js.map +1 -1
- package/dist/esm/nimble-components/src/button/index.d.ts +33 -0
- package/dist/esm/nimble-components/src/button/types.d.ts +8 -0
- package/dist/esm/nimble-components/src/checkbox/index.d.ts +12 -0
- package/dist/esm/{button → nimble-components/src/checkbox}/styles.d.ts +0 -0
- package/dist/esm/nimble-components/src/drawer/animations.d.ts +14 -0
- package/dist/esm/nimble-components/src/drawer/index.d.ts +43 -0
- package/dist/esm/nimble-components/src/drawer/styles.d.ts +1 -0
- package/dist/esm/nimble-components/src/drawer/types.d.ts +12 -0
- package/dist/esm/nimble-components/src/icon-base/index.d.ts +12 -0
- package/dist/esm/nimble-components/src/icon-base/styles.d.ts +1 -0
- package/dist/esm/nimble-components/src/icon-base/template.d.ts +2 -0
- package/dist/esm/nimble-components/src/icon-base/types.d.ts +11 -0
- package/dist/esm/nimble-components/src/icons/access-control.d.ts +12 -0
- package/dist/esm/nimble-components/src/icons/admin.d.ts +12 -0
- package/dist/esm/nimble-components/src/icons/administration.d.ts +12 -0
- package/dist/esm/nimble-components/src/icons/all-icons.d.ts +24 -0
- package/dist/esm/nimble-components/src/icons/check.d.ts +12 -0
- package/dist/esm/nimble-components/src/icons/custom-applications.d.ts +12 -0
- package/dist/esm/nimble-components/src/icons/custom-status.d.ts +12 -0
- package/dist/esm/nimble-components/src/icons/delete.d.ts +12 -0
- package/dist/esm/nimble-components/src/icons/done.d.ts +12 -0
- package/dist/esm/nimble-components/src/icons/fail.d.ts +12 -0
- package/dist/esm/nimble-components/src/icons/login.d.ts +12 -0
- package/dist/esm/nimble-components/src/icons/logout.d.ts +12 -0
- package/dist/esm/nimble-components/src/icons/looping.d.ts +12 -0
- package/dist/esm/nimble-components/src/icons/managed-systems.d.ts +12 -0
- package/dist/esm/nimble-components/src/icons/measurement-data-analysis.d.ts +12 -0
- package/dist/esm/nimble-components/src/icons/running.d.ts +12 -0
- package/dist/esm/nimble-components/src/icons/settings.d.ts +12 -0
- package/dist/esm/nimble-components/src/icons/skipped.d.ts +12 -0
- package/dist/esm/nimble-components/src/icons/status.d.ts +12 -0
- package/dist/esm/nimble-components/src/icons/succeeded.d.ts +12 -0
- package/dist/esm/nimble-components/src/icons/terminated.d.ts +12 -0
- package/dist/esm/nimble-components/src/icons/test-insights.d.ts +12 -0
- package/dist/esm/nimble-components/src/icons/timed-out.d.ts +12 -0
- package/dist/esm/nimble-components/src/icons/utilities.d.ts +12 -0
- package/dist/esm/nimble-components/src/icons/waiting.d.ts +12 -0
- package/dist/esm/nimble-components/src/listbox-option/index.d.ts +15 -0
- package/dist/esm/nimble-components/src/listbox-option/styles.d.ts +1 -0
- package/dist/esm/nimble-components/src/menu/index.d.ts +12 -0
- package/dist/esm/nimble-components/src/menu/styles.d.ts +1 -0
- package/dist/esm/nimble-components/src/menu-item/index.d.ts +12 -0
- package/dist/esm/nimble-components/src/menu-item/styles.d.ts +1 -0
- package/dist/esm/nimble-components/src/number-field/index.d.ts +12 -0
- package/dist/esm/nimble-components/src/number-field/styles.d.ts +1 -0
- package/dist/esm/nimble-components/src/patterns/button/styles.d.ts +1 -0
- package/dist/esm/nimble-components/src/patterns/button/types.d.ts +10 -0
- package/dist/esm/nimble-components/src/select/index.d.ts +16 -0
- package/dist/esm/nimble-components/src/select/styles.d.ts +1 -0
- package/dist/esm/nimble-components/src/tab/index.d.ts +12 -0
- package/dist/esm/nimble-components/src/tab/styles.d.ts +1 -0
- package/dist/esm/nimble-components/src/tab-panel/index.d.ts +12 -0
- package/dist/esm/nimble-components/src/tab-panel/styles.d.ts +1 -0
- package/dist/esm/nimble-components/src/tabs/index.d.ts +12 -0
- package/dist/esm/nimble-components/src/tabs/styles.d.ts +1 -0
- package/dist/esm/nimble-components/src/tabs-toolbar/index.d.ts +12 -0
- package/dist/esm/nimble-components/src/tabs-toolbar/styles.d.ts +1 -0
- package/dist/esm/nimble-components/src/tabs-toolbar/template.d.ts +1 -0
- package/dist/esm/nimble-components/src/testing/async-helpers.d.ts +10 -0
- package/dist/esm/nimble-components/src/text-field/index.d.ts +12 -0
- package/dist/esm/nimble-components/src/text-field/styles.d.ts +1 -0
- package/dist/esm/nimble-components/src/text-field/types.d.ts +3 -0
- package/dist/esm/nimble-components/src/theme-provider/design-token-comments.d.ts +6 -0
- package/dist/esm/nimble-components/src/theme-provider/design-token-names.d.ts +11 -0
- package/dist/esm/nimble-components/src/theme-provider/design-tokens.d.ts +42 -0
- package/dist/esm/nimble-components/src/theme-provider/index.d.ts +22 -0
- package/dist/esm/nimble-components/src/theme-provider/styles.d.ts +1 -0
- package/dist/esm/nimble-components/src/theme-provider/template.d.ts +2 -0
- package/dist/esm/{theme-provider/themes.d.ts → nimble-components/src/theme-provider/types.d.ts} +2 -1
- package/dist/esm/nimble-components/src/toggle-button/index.d.ts +33 -0
- package/dist/esm/nimble-components/src/toggle-button/styles.d.ts +1 -0
- package/dist/esm/nimble-components/src/toggle-button/template.d.ts +2 -0
- package/dist/esm/nimble-components/src/toggle-button/types.d.ts +6 -0
- package/dist/esm/nimble-components/src/tree-item/index.d.ts +34 -0
- package/dist/esm/nimble-components/src/tree-item/styles.d.ts +3 -0
- package/dist/esm/nimble-components/src/tree-view/index.d.ts +22 -0
- package/dist/esm/nimble-components/src/tree-view/styles.d.ts +1 -0
- package/dist/esm/nimble-components/src/tree-view/types.d.ts +7 -0
- package/dist/esm/{button/behaviors.d.ts → nimble-components/src/utilities/style/appearance.d.ts} +1 -1
- package/dist/esm/nimble-components/src/utilities/style/direction.d.ts +34 -0
- package/dist/esm/nimble-components/src/utilities/style/focus.d.ts +11 -0
- package/dist/esm/nimble-components/src/utilities/style/prefers-reduced-motion.d.ts +4 -0
- package/dist/esm/nimble-components/src/utilities/style/theme.d.ts +44 -0
- package/dist/esm/number-field/index.d.ts +8 -2
- package/dist/esm/number-field/index.js +8 -1
- package/dist/esm/number-field/index.js.map +1 -1
- package/dist/esm/number-field/styles.js +3 -3
- package/dist/esm/number-field/styles.js.map +1 -1
- package/dist/esm/patterns/button/styles.d.ts +1 -0
- package/dist/esm/{button → patterns/button}/styles.js +24 -14
- package/dist/esm/patterns/button/styles.js.map +1 -0
- package/dist/esm/patterns/button/types.d.ts +10 -0
- package/dist/esm/patterns/button/types.js +11 -0
- package/dist/esm/patterns/button/types.js.map +1 -0
- package/dist/esm/select/index.d.ts +6 -2
- package/dist/esm/select/index.js +9 -5
- package/dist/esm/select/index.js.map +1 -1
- package/dist/esm/tab/index.d.ts +11 -1
- package/dist/esm/tab/index.js +8 -1
- package/dist/esm/tab/index.js.map +1 -1
- package/dist/esm/tab-panel/index.d.ts +11 -1
- package/dist/esm/tab-panel/index.js +8 -1
- package/dist/esm/tab-panel/index.js.map +1 -1
- package/dist/esm/tabs/index.d.ts +11 -1
- package/dist/esm/tabs/index.js +8 -1
- package/dist/esm/tabs/index.js.map +1 -1
- package/dist/esm/tabs-toolbar/index.d.ts +7 -1
- package/dist/esm/tabs-toolbar/index.js +1 -1
- package/dist/esm/tabs-toolbar/index.js.map +1 -1
- package/dist/esm/tabs-toolbar/styles.js +3 -2
- package/dist/esm/tabs-toolbar/styles.js.map +1 -1
- package/dist/esm/testing/async-helpers.d.ts +10 -0
- package/dist/esm/testing/async-helpers.js +12 -0
- package/dist/esm/testing/async-helpers.js.map +1 -0
- package/dist/esm/text-field/index.d.ts +8 -2
- package/dist/esm/text-field/index.js +8 -1
- package/dist/esm/text-field/index.js.map +1 -1
- package/dist/esm/text-field/styles.js +20 -8
- package/dist/esm/text-field/styles.js.map +1 -1
- package/dist/esm/text-field/types.d.ts +3 -0
- package/dist/esm/text-field/types.js +3 -0
- package/dist/esm/text-field/types.js.map +1 -0
- package/dist/esm/theme-provider/design-token-comments.d.ts +6 -0
- package/dist/esm/theme-provider/design-token-comments.js +45 -0
- package/dist/esm/theme-provider/design-token-comments.js.map +1 -0
- package/dist/esm/theme-provider/design-token-names.d.ts +11 -0
- package/dist/esm/theme-provider/design-token-names.js +51 -0
- package/dist/esm/theme-provider/design-token-names.js.map +1 -0
- package/dist/esm/theme-provider/design-tokens.d.ts +4 -10
- package/dist/esm/theme-provider/design-tokens.js +94 -109
- package/dist/esm/theme-provider/design-tokens.js.map +1 -1
- package/dist/esm/theme-provider/index.d.ts +18 -6
- package/dist/esm/theme-provider/index.js +51 -26
- package/dist/esm/theme-provider/index.js.map +1 -1
- package/dist/esm/theme-provider/styles.d.ts +1 -0
- package/dist/esm/theme-provider/styles.js +7 -0
- package/dist/esm/theme-provider/styles.js.map +1 -0
- package/dist/esm/theme-provider/template.d.ts +2 -2
- package/dist/esm/theme-provider/template.js.map +1 -1
- package/dist/esm/theme-provider/types.d.ts +7 -0
- package/dist/esm/theme-provider/types.js +8 -0
- package/dist/esm/theme-provider/types.js.map +1 -0
- package/dist/esm/toggle-button/index.d.ts +33 -0
- package/dist/esm/toggle-button/index.js +43 -0
- package/dist/esm/toggle-button/index.js.map +1 -0
- package/dist/esm/toggle-button/styles.d.ts +1 -0
- package/dist/esm/toggle-button/styles.js +31 -0
- package/dist/esm/toggle-button/styles.js.map +1 -0
- package/dist/esm/toggle-button/template.d.ts +2 -0
- package/dist/esm/toggle-button/template.js +25 -0
- package/dist/esm/toggle-button/template.js.map +1 -0
- package/dist/esm/toggle-button/types.d.ts +6 -0
- package/dist/esm/toggle-button/types.js +2 -0
- package/dist/esm/toggle-button/types.js.map +1 -0
- package/dist/esm/tree-item/index.d.ts +7 -1
- package/dist/esm/tree-item/index.js +13 -12
- package/dist/esm/tree-item/index.js.map +1 -1
- package/dist/esm/tree-item/styles.js +9 -7
- package/dist/esm/tree-item/styles.js.map +1 -1
- package/dist/esm/tree-view/index.d.ts +9 -3
- package/dist/esm/tree-view/index.js +4 -3
- package/dist/esm/tree-view/index.js.map +1 -1
- package/dist/esm/tree-view/types.d.ts +2 -1
- package/dist/esm/tree-view/types.js +5 -5
- package/dist/esm/tree-view/types.js.map +1 -1
- package/dist/esm/utilities/style/appearance.d.ts +12 -0
- package/dist/esm/{button/behaviors.js → utilities/style/appearance.js} +1 -1
- package/dist/esm/utilities/style/appearance.js.map +1 -0
- package/dist/esm/utilities/style/direction.d.ts +34 -0
- package/dist/esm/utilities/style/direction.js +78 -0
- package/dist/esm/utilities/style/direction.js.map +1 -0
- package/dist/esm/utilities/style/focus.js +1 -1
- package/dist/esm/utilities/style/focus.js.map +1 -1
- package/dist/esm/utilities/style/prefers-reduced-motion.d.ts +4 -0
- package/dist/esm/utilities/style/prefers-reduced-motion.js +5 -0
- package/dist/esm/utilities/style/prefers-reduced-motion.js.map +1 -0
- package/dist/esm/utilities/style/theme.d.ts +44 -0
- package/dist/esm/utilities/style/theme.js +116 -0
- package/dist/esm/utilities/style/theme.js.map +1 -0
- package/dist/fonts.scss +3 -0
- package/dist/tokens-internal.scss +255 -0
- package/dist/tokens.scss +132 -0
- package/package.json +29 -20
- package/dist/esm/button/behaviors.js.map +0 -1
- package/dist/esm/button/styles.js.map +0 -1
- package/dist/esm/testing/dom-next-update.d.ts +0 -4
- package/dist/esm/testing/dom-next-update.js +0 -6
- package/dist/esm/testing/dom-next-update.js.map +0 -1
- package/dist/esm/theme-provider/themes.js +0 -8
- package/dist/esm/theme-provider/themes.js.map +0 -1
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/* eslint-disable max-classes-per-file */
|
|
2
|
+
import { ElementStyles } from '@microsoft/fast-element';
|
|
3
|
+
import { theme as themeToken } from '../../theme-provider';
|
|
4
|
+
/**
|
|
5
|
+
* Subscription for {@link ThemeStyleSheetBehavior}
|
|
6
|
+
*/
|
|
7
|
+
class ThemeStyleSheetBehaviorSubscription {
|
|
8
|
+
constructor(themeStyles, source) {
|
|
9
|
+
this.themeStyles = themeStyles;
|
|
10
|
+
this.source = source;
|
|
11
|
+
this.attached = null;
|
|
12
|
+
}
|
|
13
|
+
handleChange({ target, token }) {
|
|
14
|
+
this.attach(token.getValueFor(target));
|
|
15
|
+
}
|
|
16
|
+
attach(theme) {
|
|
17
|
+
if (this.attached !== this.themeStyles[theme]) {
|
|
18
|
+
if (this.attached !== null) {
|
|
19
|
+
this.source.$fastController.removeStyles(this.attached);
|
|
20
|
+
}
|
|
21
|
+
this.attached = this.themeStyles[theme];
|
|
22
|
+
if (this.attached !== null) {
|
|
23
|
+
this.source.$fastController.addStyles(this.attached);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Behavior to conditionally apply theme-based stylesheets.
|
|
30
|
+
*/
|
|
31
|
+
class ThemeStyleSheetBehavior {
|
|
32
|
+
constructor(lightStyle, darkStyleOrAlias, colorStyleOrAlias, legacyBlueStyleOrAlias) {
|
|
33
|
+
this.cache = new WeakMap();
|
|
34
|
+
const light = lightStyle;
|
|
35
|
+
const dark = ThemeStyleSheetBehavior.resolveTheme(darkStyleOrAlias, {
|
|
36
|
+
light,
|
|
37
|
+
dark: null,
|
|
38
|
+
color: null,
|
|
39
|
+
'legacy-blue': null
|
|
40
|
+
});
|
|
41
|
+
const color = ThemeStyleSheetBehavior.resolveTheme(colorStyleOrAlias, {
|
|
42
|
+
light,
|
|
43
|
+
dark,
|
|
44
|
+
color: null,
|
|
45
|
+
'legacy-blue': null
|
|
46
|
+
});
|
|
47
|
+
const legacyBlue = ThemeStyleSheetBehavior.resolveTheme(legacyBlueStyleOrAlias, {
|
|
48
|
+
light,
|
|
49
|
+
dark,
|
|
50
|
+
color,
|
|
51
|
+
'legacy-blue': null
|
|
52
|
+
});
|
|
53
|
+
this.themeStyles = {
|
|
54
|
+
light,
|
|
55
|
+
dark,
|
|
56
|
+
color,
|
|
57
|
+
'legacy-blue': legacyBlue
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
static resolveTheme(value, currentThemeStyles) {
|
|
61
|
+
if (value instanceof ElementStyles || value === null) {
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
const currentStyle = currentThemeStyles[value];
|
|
65
|
+
if (currentStyle === null) {
|
|
66
|
+
throw new Error(`Tried to alias to theme '${value}' but the theme value is not set to a style.`);
|
|
67
|
+
}
|
|
68
|
+
return currentStyle;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* @internal
|
|
72
|
+
*/
|
|
73
|
+
bind(source) {
|
|
74
|
+
const subscriber = this.cache.get(source)
|
|
75
|
+
|| new ThemeStyleSheetBehaviorSubscription(this.themeStyles, source);
|
|
76
|
+
const value = themeToken.getValueFor(source);
|
|
77
|
+
// Currently subscriber from cache may have gone through unbind
|
|
78
|
+
// but still be in cache so always resubscribe
|
|
79
|
+
// See: https://github.com/microsoft/fast/issues/3246#issuecomment-1030424876
|
|
80
|
+
themeToken.subscribe(subscriber);
|
|
81
|
+
subscriber.attach(value);
|
|
82
|
+
this.cache.set(source, subscriber);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* @internal
|
|
86
|
+
*/
|
|
87
|
+
unbind(source) {
|
|
88
|
+
const subscriber = this.cache.get(source);
|
|
89
|
+
if (subscriber) {
|
|
90
|
+
themeToken.unsubscribe(subscriber);
|
|
91
|
+
}
|
|
92
|
+
// Currently does not evict subscriber from cache
|
|
93
|
+
// See: https://github.com/microsoft/fast/issues/3246#issuecomment-1030424876
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Behavior to conditionally apply theme-based stylesheets. To determine which to apply,
|
|
98
|
+
* the behavior will use the nearest ThemeProvider's 'theme' design system value.
|
|
99
|
+
* To re-use the same style for multiple themes you can specify the name of an already
|
|
100
|
+
* defined theme to alias them together.
|
|
101
|
+
*
|
|
102
|
+
* @public
|
|
103
|
+
* @example
|
|
104
|
+
* ```ts
|
|
105
|
+
* css`
|
|
106
|
+
* // ...
|
|
107
|
+
* `.withBehaviors(new ThemeStyleSheetBehavior(
|
|
108
|
+
* css`:host { ... Theme.Light style... }`),
|
|
109
|
+
* css`:host { ... Theme.Dark style... }`),
|
|
110
|
+
* null, // No style needed for Theme.Color style
|
|
111
|
+
* Theme.Light, // For the Theme.LegacyBlue style, re-use the previously set Theme.Light style
|
|
112
|
+
* )
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
export const themeBehavior = (lightStyle, darkStyleOrAlias, colorStyleOrAlias, legacyBlueStyleOrAlias) => new ThemeStyleSheetBehavior(lightStyle, darkStyleOrAlias, colorStyleOrAlias, legacyBlueStyleOrAlias);
|
|
116
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../../src/utilities/style/theme.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,OAAO,EAEH,aAAa,EAGhB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAI3D;;GAEG;AACH,MAAM,mCAAmC;IAGrC,YACqB,WAAwB,EACxB,MAAiC;QADjC,gBAAW,GAAX,WAAW,CAAa;QACxB,WAAM,GAAN,MAAM,CAA2B;QAJ9C,aAAQ,GAAyB,IAAI,CAAC;IAK3C,CAAC;IAEG,YAAY,CAAC,EAChB,MAAM,EACN,KAAK,EACoC;QACzC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3C,CAAC;IAE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iBAAiB,EACjB,sBAAsB,CACzB,CAAC"}
|
package/dist/fonts.scss
ADDED
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
// Nimble Components Internal Tokens SCSS
|
|
2
|
+
// Used by Nimble Components Tokens SCSS
|
|
3
|
+
// For more information see https://github.com/ni/nimble/tree/main/packages/nimble-components#theming
|
|
4
|
+
|
|
5
|
+
/// Internal property for $ni-nimble-action-color-rgb-partial.
|
|
6
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
7
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
8
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-action-color-rgb-partial}: <new value>;`.
|
|
9
|
+
$ni-nimble-internal-action-color-rgb-partial: --ni-nimble-action-color-rgb-partial;
|
|
10
|
+
|
|
11
|
+
/// Internal property for $ni-nimble-application-background-color.
|
|
12
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
13
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
14
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-application-background-color}: <new value>;`.
|
|
15
|
+
$ni-nimble-internal-application-background-color: --ni-nimble-application-background-color;
|
|
16
|
+
|
|
17
|
+
/// Internal property for $ni-nimble-fill-color-selected.
|
|
18
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
19
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
20
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-fill-color-selected}: <new value>;`.
|
|
21
|
+
$ni-nimble-internal-fill-color-selected: --ni-nimble-fill-color-selected;
|
|
22
|
+
|
|
23
|
+
/// Internal property for $ni-nimble-fill-color-selected-rgb-partial.
|
|
24
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
25
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
26
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-fill-color-selected-rgb-partial}: <new value>;`.
|
|
27
|
+
$ni-nimble-internal-fill-color-selected-rgb-partial: --ni-nimble-fill-color-selected-rgb-partial;
|
|
28
|
+
|
|
29
|
+
/// Internal property for $ni-nimble-fill-color-selected-hover.
|
|
30
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
31
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
32
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-fill-color-selected-hover}: <new value>;`.
|
|
33
|
+
$ni-nimble-internal-fill-color-selected-hover: --ni-nimble-fill-color-selected-hover;
|
|
34
|
+
|
|
35
|
+
/// Internal property for $ni-nimble-fill-color-hover.
|
|
36
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
37
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
38
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-fill-color-hover}: <new value>;`.
|
|
39
|
+
$ni-nimble-internal-fill-color-hover: --ni-nimble-fill-color-hover;
|
|
40
|
+
|
|
41
|
+
/// Internal property for $ni-nimble-border-color.
|
|
42
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
43
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
44
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-border-color}: <new value>;`.
|
|
45
|
+
$ni-nimble-internal-border-color: --ni-nimble-border-color;
|
|
46
|
+
|
|
47
|
+
/// Internal property for $ni-nimble-border-color-rgb-partial.
|
|
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-border-color-rgb-partial}: <new value>;`.
|
|
51
|
+
$ni-nimble-internal-border-color-rgb-partial: --ni-nimble-border-color-rgb-partial;
|
|
52
|
+
|
|
53
|
+
/// Internal property for $ni-nimble-fail-color.
|
|
54
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
55
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
56
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-fail-color}: <new value>;`.
|
|
57
|
+
$ni-nimble-internal-fail-color: --ni-nimble-fail-color;
|
|
58
|
+
|
|
59
|
+
/// Internal property for $ni-nimble-warning-color.
|
|
60
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
61
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
62
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-warning-color}: <new value>;`.
|
|
63
|
+
$ni-nimble-internal-warning-color: --ni-nimble-warning-color;
|
|
64
|
+
|
|
65
|
+
/// Internal property for $ni-nimble-pass-color.
|
|
66
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
67
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
68
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-pass-color}: <new value>;`.
|
|
69
|
+
$ni-nimble-internal-pass-color: --ni-nimble-pass-color;
|
|
70
|
+
|
|
71
|
+
/// Internal property for $ni-nimble-border-color-hover.
|
|
72
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
73
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
74
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-border-color-hover}: <new value>;`.
|
|
75
|
+
$ni-nimble-internal-border-color-hover: --ni-nimble-border-color-hover;
|
|
76
|
+
|
|
77
|
+
/// Internal property for $ni-nimble-icon-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-icon-color}: <new value>;`.
|
|
81
|
+
$ni-nimble-internal-icon-color: --ni-nimble-icon-color;
|
|
82
|
+
|
|
83
|
+
/// Internal property for $ni-nimble-popup-box-shadow-color.
|
|
84
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
85
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
86
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-popup-box-shadow-color}: <new value>;`.
|
|
87
|
+
$ni-nimble-internal-popup-box-shadow-color: --ni-nimble-popup-box-shadow-color;
|
|
88
|
+
|
|
89
|
+
/// Internal property for $ni-nimble-popup-border-color.
|
|
90
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
91
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
92
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-popup-border-color}: <new value>;`.
|
|
93
|
+
$ni-nimble-internal-popup-border-color: --ni-nimble-popup-border-color;
|
|
94
|
+
|
|
95
|
+
/// Internal property for $ni-nimble-control-height.
|
|
96
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
97
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
98
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-control-height}: <new value>;`.
|
|
99
|
+
$ni-nimble-internal-control-height: --ni-nimble-control-height;
|
|
100
|
+
|
|
101
|
+
/// Internal property for $ni-nimble-standard-padding.
|
|
102
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
103
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
104
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-standard-padding}: <new value>;`.
|
|
105
|
+
$ni-nimble-internal-standard-padding: --ni-nimble-standard-padding;
|
|
106
|
+
|
|
107
|
+
/// Internal property for $ni-nimble-label-height.
|
|
108
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
109
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
110
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-label-height}: <new value>;`.
|
|
111
|
+
$ni-nimble-internal-label-height: --ni-nimble-label-height;
|
|
112
|
+
|
|
113
|
+
/// Internal property for $ni-nimble-border-width.
|
|
114
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
115
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
116
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-border-width}: <new value>;`.
|
|
117
|
+
$ni-nimble-internal-border-width: --ni-nimble-border-width;
|
|
118
|
+
|
|
119
|
+
/// Internal property for $ni-nimble-icon-size.
|
|
120
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
121
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
122
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-icon-size}: <new value>;`.
|
|
123
|
+
$ni-nimble-internal-icon-size: --ni-nimble-icon-size;
|
|
124
|
+
|
|
125
|
+
/// Internal property for $ni-nimble-drawer-width.
|
|
126
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
127
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
128
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-drawer-width}: <new value>;`.
|
|
129
|
+
$ni-nimble-internal-drawer-width: --ni-nimble-drawer-width;
|
|
130
|
+
|
|
131
|
+
/// Internal property for $ni-nimble-font-family.
|
|
132
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
133
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
134
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-font-family}: <new value>;`.
|
|
135
|
+
$ni-nimble-internal-font-family: --ni-nimble-font-family;
|
|
136
|
+
|
|
137
|
+
/// Internal property for $ni-nimble-label-font-family.
|
|
138
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
139
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
140
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-label-font-family}: <new value>;`.
|
|
141
|
+
$ni-nimble-internal-label-font-family: --ni-nimble-label-font-family;
|
|
142
|
+
|
|
143
|
+
/// Internal property for $ni-nimble-group-label-font-family.
|
|
144
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
145
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
146
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-group-label-font-family}: <new value>;`.
|
|
147
|
+
$ni-nimble-internal-group-label-font-family: --ni-nimble-group-label-font-family;
|
|
148
|
+
|
|
149
|
+
/// Internal property for $ni-nimble-drawer-header-font-family.
|
|
150
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
151
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
152
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-drawer-header-font-family}: <new value>;`.
|
|
153
|
+
$ni-nimble-internal-drawer-header-font-family: --ni-nimble-drawer-header-font-family;
|
|
154
|
+
|
|
155
|
+
/// Internal property for $ni-nimble-label-font-size.
|
|
156
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
157
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
158
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-label-font-size}: <new value>;`.
|
|
159
|
+
$ni-nimble-internal-label-font-size: --ni-nimble-label-font-size;
|
|
160
|
+
|
|
161
|
+
/// Internal property for $ni-nimble-content-font-size.
|
|
162
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
163
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
164
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-content-font-size}: <new value>;`.
|
|
165
|
+
$ni-nimble-internal-content-font-size: --ni-nimble-content-font-size;
|
|
166
|
+
|
|
167
|
+
/// Internal property for $ni-nimble-group-label-font-size.
|
|
168
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
169
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
170
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-group-label-font-size}: <new value>;`.
|
|
171
|
+
$ni-nimble-internal-group-label-font-size: --ni-nimble-group-label-font-size;
|
|
172
|
+
|
|
173
|
+
/// Internal property for $ni-nimble-drawer-header-font-size.
|
|
174
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
175
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
176
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-drawer-header-font-size}: <new value>;`.
|
|
177
|
+
$ni-nimble-internal-drawer-header-font-size: --ni-nimble-drawer-header-font-size;
|
|
178
|
+
|
|
179
|
+
/// Internal property for $ni-nimble-group-label-font-weight.
|
|
180
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
181
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
182
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-group-label-font-weight}: <new value>;`.
|
|
183
|
+
$ni-nimble-internal-group-label-font-weight: --ni-nimble-group-label-font-weight;
|
|
184
|
+
|
|
185
|
+
/// Internal property for $ni-nimble-label-font-weight.
|
|
186
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
187
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
188
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-label-font-weight}: <new value>;`.
|
|
189
|
+
$ni-nimble-internal-label-font-weight: --ni-nimble-label-font-weight;
|
|
190
|
+
|
|
191
|
+
/// Internal property for $ni-nimble-label-font-color.
|
|
192
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
193
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
194
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-label-font-color}: <new value>;`.
|
|
195
|
+
$ni-nimble-internal-label-font-color: --ni-nimble-label-font-color;
|
|
196
|
+
|
|
197
|
+
/// Internal property for $ni-nimble-group-label-font-color.
|
|
198
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
199
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
200
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-group-label-font-color}: <new value>;`.
|
|
201
|
+
$ni-nimble-internal-group-label-font-color: --ni-nimble-group-label-font-color;
|
|
202
|
+
|
|
203
|
+
/// Internal property for $ni-nimble-content-font-color.
|
|
204
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
205
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
206
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-content-font-color}: <new value>;`.
|
|
207
|
+
$ni-nimble-internal-content-font-color: --ni-nimble-content-font-color;
|
|
208
|
+
|
|
209
|
+
/// Internal property for $ni-nimble-button-content-font-color.
|
|
210
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
211
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
212
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-button-content-font-color}: <new value>;`.
|
|
213
|
+
$ni-nimble-internal-button-content-font-color: --ni-nimble-button-content-font-color;
|
|
214
|
+
|
|
215
|
+
/// Internal property for $ni-nimble-label-font-color-disabled.
|
|
216
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
217
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
218
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-label-font-color-disabled}: <new value>;`.
|
|
219
|
+
$ni-nimble-internal-label-font-color-disabled: --ni-nimble-label-font-color-disabled;
|
|
220
|
+
|
|
221
|
+
/// Internal property for $ni-nimble-label-text-transform.
|
|
222
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
223
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
224
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-label-text-transform}: <new value>;`.
|
|
225
|
+
$ni-nimble-internal-label-text-transform: --ni-nimble-label-text-transform;
|
|
226
|
+
|
|
227
|
+
/// Internal property for $ni-nimble-group-label-text-transform.
|
|
228
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
229
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
230
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-group-label-text-transform}: <new value>;`.
|
|
231
|
+
$ni-nimble-internal-group-label-text-transform: --ni-nimble-group-label-text-transform;
|
|
232
|
+
|
|
233
|
+
/// Internal property for $ni-nimble-content-font-color-disabled.
|
|
234
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
235
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
236
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-content-font-color-disabled}: <new value>;`.
|
|
237
|
+
$ni-nimble-internal-content-font-color-disabled: --ni-nimble-content-font-color-disabled;
|
|
238
|
+
|
|
239
|
+
/// Internal property for $ni-nimble-small-delay.
|
|
240
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
241
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
242
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-small-delay}: <new value>;`.
|
|
243
|
+
$ni-nimble-internal-small-delay: --ni-nimble-small-delay;
|
|
244
|
+
|
|
245
|
+
/// Internal property for $ni-nimble-medium-delay.
|
|
246
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
247
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
248
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-medium-delay}: <new value>;`.
|
|
249
|
+
$ni-nimble-internal-medium-delay: --ni-nimble-medium-delay;
|
|
250
|
+
|
|
251
|
+
/// Internal property for $ni-nimble-drawer-animation-duration-ms.
|
|
252
|
+
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
253
|
+
/// Used to override a token value (generally making it no longer theme-aware).
|
|
254
|
+
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-drawer-animation-duration-ms}: <new value>;`.
|
|
255
|
+
$ni-nimble-internal-drawer-animation-duration-ms: --ni-nimble-drawer-animation-duration-ms;
|
package/dist/tokens.scss
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
// Nimble Components Tokens SCSS
|
|
2
|
+
// Used to integrate theme-aware design tokens in an application.
|
|
3
|
+
// Requires using a <nimble-theme-provider> in the page.
|
|
4
|
+
// For more information see https://github.com/ni/nimble/tree/main/packages/nimble-components#theming
|
|
5
|
+
|
|
6
|
+
@import './tokens-internal';
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
$ni-nimble-action-color-rgb-partial: var($ni-nimble-internal-action-color-rgb-partial);
|
|
10
|
+
|
|
11
|
+
/// Background color for the application.
|
|
12
|
+
$ni-nimble-application-background-color: var($ni-nimble-internal-application-background-color);
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
$ni-nimble-fill-color-selected: var($ni-nimble-internal-fill-color-selected);
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
$ni-nimble-fill-color-selected-rgb-partial: var($ni-nimble-internal-fill-color-selected-rgb-partial);
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
$ni-nimble-fill-color-selected-hover: var($ni-nimble-internal-fill-color-selected-hover);
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
$ni-nimble-fill-color-hover: var($ni-nimble-internal-fill-color-hover);
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
$ni-nimble-border-color: var($ni-nimble-internal-border-color);
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
$ni-nimble-border-color-rgb-partial: var($ni-nimble-internal-border-color-rgb-partial);
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
$ni-nimble-fail-color: var($ni-nimble-internal-fail-color);
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
$ni-nimble-warning-color: var($ni-nimble-internal-warning-color);
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
$ni-nimble-pass-color: var($ni-nimble-internal-pass-color);
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
$ni-nimble-border-color-hover: var($ni-nimble-internal-border-color-hover);
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
$ni-nimble-icon-color: var($ni-nimble-internal-icon-color);
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
$ni-nimble-popup-box-shadow-color: var($ni-nimble-internal-popup-box-shadow-color);
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
$ni-nimble-popup-border-color: var($ni-nimble-internal-popup-border-color);
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
$ni-nimble-control-height: var($ni-nimble-internal-control-height);
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
$ni-nimble-standard-padding: var($ni-nimble-internal-standard-padding);
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
$ni-nimble-label-height: var($ni-nimble-internal-label-height);
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
$ni-nimble-border-width: var($ni-nimble-internal-border-width);
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
$ni-nimble-icon-size: var($ni-nimble-internal-icon-size);
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
$ni-nimble-drawer-width: var($ni-nimble-internal-drawer-width);
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
$ni-nimble-font-family: var($ni-nimble-internal-font-family);
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
$ni-nimble-label-font-family: var($ni-nimble-internal-label-font-family);
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
$ni-nimble-group-label-font-family: var($ni-nimble-internal-group-label-font-family);
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
$ni-nimble-drawer-header-font-family: var($ni-nimble-internal-drawer-header-font-family);
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
$ni-nimble-label-font-size: var($ni-nimble-internal-label-font-size);
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
$ni-nimble-content-font-size: var($ni-nimble-internal-content-font-size);
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
$ni-nimble-group-label-font-size: var($ni-nimble-internal-group-label-font-size);
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
$ni-nimble-drawer-header-font-size: var($ni-nimble-internal-drawer-header-font-size);
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
$ni-nimble-group-label-font-weight: var($ni-nimble-internal-group-label-font-weight);
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
$ni-nimble-label-font-weight: var($ni-nimble-internal-label-font-weight);
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
$ni-nimble-label-font-color: var($ni-nimble-internal-label-font-color);
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
$ni-nimble-group-label-font-color: var($ni-nimble-internal-group-label-font-color);
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
$ni-nimble-content-font-color: var($ni-nimble-internal-content-font-color);
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
$ni-nimble-button-content-font-color: var($ni-nimble-internal-button-content-font-color);
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
$ni-nimble-label-font-color-disabled: var($ni-nimble-internal-label-font-color-disabled);
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
$ni-nimble-label-text-transform: var($ni-nimble-internal-label-text-transform);
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
$ni-nimble-group-label-text-transform: var($ni-nimble-internal-group-label-text-transform);
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
$ni-nimble-content-font-color-disabled: var($ni-nimble-internal-content-font-color-disabled);
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
$ni-nimble-small-delay: var($ni-nimble-internal-small-delay);
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
$ni-nimble-medium-delay: var($ni-nimble-internal-medium-delay);
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
$ni-nimble-drawer-animation-duration-ms: var($ni-nimble-internal-drawer-animation-duration-ms);
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ni/nimble-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Styled web components for the NI Nimble Design System",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"build": "npm run build-components && npm run build-storybook",
|
|
6
|
+
"build": "npm run build-components && npm run generate-scss && npm run build-storybook",
|
|
7
7
|
"lint": "npm run eslint && npm run prettier",
|
|
8
8
|
"format": "npm run eslint-fix && npm run prettier-fix",
|
|
9
9
|
"eslint": "eslint .",
|
|
@@ -11,10 +11,14 @@
|
|
|
11
11
|
"prettier": "prettier-eslint \"**/*.*\" --list-different --prettier-ignore",
|
|
12
12
|
"prettier-fix": "prettier-eslint \"**/*.*\" --write --prettier-ignore",
|
|
13
13
|
"pack": "npm pack",
|
|
14
|
+
"invoke-publish": "npm publish",
|
|
14
15
|
"storybook": "start-storybook -p 6006",
|
|
15
16
|
"build-storybook": "build-storybook -o dist/storybook",
|
|
16
17
|
"build-components": "tsc -p ./tsconfig.json",
|
|
17
18
|
"build-components:watch": "tsc -p ./tsconfig.json -w",
|
|
19
|
+
"generate-scss": "npm run generate-scss:bundle && npm run generate-scss:run",
|
|
20
|
+
"generate-scss:bundle": "rollup build/generate-scss/source/index.js --format cjs --file build/generate-scss/dist/index.js",
|
|
21
|
+
"generate-scss:run": "node build/generate-scss/dist/index.js",
|
|
18
22
|
"chromatic": "chromatic",
|
|
19
23
|
"tdd": "npm run build-components && npm run test-chrome",
|
|
20
24
|
"tdd:watch": "npm run build-components:watch & npm run test-chrome:watch",
|
|
@@ -38,29 +42,32 @@
|
|
|
38
42
|
},
|
|
39
43
|
"homepage": "https://github.com/ni/nimble#readme",
|
|
40
44
|
"dependencies": {
|
|
41
|
-
"@microsoft/fast-animation": "^4.1.
|
|
42
|
-
"@microsoft/fast-
|
|
43
|
-
"@microsoft/fast-
|
|
44
|
-
"@microsoft/fast-
|
|
45
|
-
"@ni/nimble-tokens": "^1.0.0
|
|
46
|
-
"hex-rgb": "^5.0.0"
|
|
47
|
-
"lodash-es": "^4.17.21"
|
|
45
|
+
"@microsoft/fast-animation": "^4.1.8",
|
|
46
|
+
"@microsoft/fast-element": "^1.7.0",
|
|
47
|
+
"@microsoft/fast-foundation": "^2.28.0 <2.29.0",
|
|
48
|
+
"@microsoft/fast-web-utilities": "^5.1.0",
|
|
49
|
+
"@ni/nimble-tokens": "^1.0.0",
|
|
50
|
+
"hex-rgb": "^5.0.0"
|
|
48
51
|
},
|
|
49
52
|
"devDependencies": {
|
|
50
53
|
"@babel/cli": "^7.13.16",
|
|
51
54
|
"@babel/core": "^7.14.6",
|
|
52
55
|
"@babel/preset-env": "^7.13.15",
|
|
53
|
-
"@ni/eslint-config-
|
|
54
|
-
"@
|
|
55
|
-
"@storybook/addon-
|
|
56
|
-
"@storybook/addon-
|
|
57
|
-
"@storybook/addon-
|
|
58
|
-
"@storybook/addon-
|
|
59
|
-
"@storybook/
|
|
60
|
-
"@storybook/
|
|
61
|
-
"@storybook/
|
|
62
|
-
"@storybook/
|
|
63
|
-
"@storybook/
|
|
56
|
+
"@ni/eslint-config-javascript": "^3.1.0",
|
|
57
|
+
"@ni/eslint-config-typescript": "^3.0.5",
|
|
58
|
+
"@storybook/addon-a11y": "^6.4.0",
|
|
59
|
+
"@storybook/addon-actions": "^6.4.0",
|
|
60
|
+
"@storybook/addon-docs": "^6.4.0",
|
|
61
|
+
"@storybook/addon-essentials": "^6.4.0",
|
|
62
|
+
"@storybook/addon-interactions": "^6.4.0",
|
|
63
|
+
"@storybook/addon-links": "^6.4.0",
|
|
64
|
+
"@storybook/addons": "^6.4.0",
|
|
65
|
+
"@storybook/builder-webpack5": "^6.4.0",
|
|
66
|
+
"@storybook/html": "^6.4.0",
|
|
67
|
+
"@storybook/jest": "^0.0.5",
|
|
68
|
+
"@storybook/manager-webpack5": "^6.4.0",
|
|
69
|
+
"@storybook/testing-library": "^0.0.7",
|
|
70
|
+
"@storybook/theming": "^6.4.0",
|
|
64
71
|
"@types/jasmine": "^3.6.0",
|
|
65
72
|
"@types/webpack-env": "^1.15.2",
|
|
66
73
|
"babel-loader": "^8.2.2",
|
|
@@ -69,6 +76,7 @@
|
|
|
69
76
|
"css-loader": "^6.2.0",
|
|
70
77
|
"dotenv-webpack": "^7.0.2",
|
|
71
78
|
"eslint-plugin-jsdoc": "^36.1.0",
|
|
79
|
+
"eslint-plugin-storybook": "^0.5.1",
|
|
72
80
|
"html-webpack-plugin": "^5.3.1",
|
|
73
81
|
"jasmine-core": "^3.7.0",
|
|
74
82
|
"karma": "^6.3.0",
|
|
@@ -84,6 +92,7 @@
|
|
|
84
92
|
"prettier-eslint": "^13.0.0",
|
|
85
93
|
"prettier-eslint-cli": "^5.0.1",
|
|
86
94
|
"puppeteer": "^10.1.0",
|
|
95
|
+
"rollup": "^2.61.1",
|
|
87
96
|
"storybook-addon-xd-designs": "file:storybook-addon-xd-designs-6.0.0.tgz",
|
|
88
97
|
"ts-loader": "^9.2.5",
|
|
89
98
|
"typescript": "^4.3.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"behaviors.js","sourceRoot":"","sources":["../../../src/button/behaviors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAIxE;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB,CAC9B,KAAuB,EACvB,MAAqB;IAErB,OAAO,IAAI,0BAA0B,CAAC,YAAY,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AACvE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/button/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,YAAY,EA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ACO,cAAc;oCACvB,gBAAgB;;;;wCAIZ,iBAAiB;;;;;6CAKZ,cAAc;yCAClB,cAAc;;aAE1C,CACJ,CACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dom-next-update.js","sourceRoot":"","sources":["../../../src/testing/dom-next-update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAE9C;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,IAAmB,EAAE,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export var NimbleTheme;
|
|
2
|
-
(function (NimbleTheme) {
|
|
3
|
-
NimbleTheme["Light"] = "light";
|
|
4
|
-
NimbleTheme["Dark"] = "dark";
|
|
5
|
-
NimbleTheme["Color"] = "color";
|
|
6
|
-
NimbleTheme["LegacyBlue"] = "legacy-blue"; // ⛔️ only for use within SystemLink apps that haven't been updated to brand-aligned controls
|
|
7
|
-
})(NimbleTheme || (NimbleTheme = {}));
|
|
8
|
-
//# sourceMappingURL=themes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"themes.js","sourceRoot":"","sources":["../../../src/theme-provider/themes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACnB,8BAAe,CAAA;IACf,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,yCAA0B,CAAA,CAAC,6FAA6F;AAC5H,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB"}
|