@ni/nimble-components 1.0.0-beta.128 → 1.0.0-beta.129
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/esm/button/types.d.ts +1 -1
- package/dist/esm/button/types.js.map +1 -1
- package/dist/esm/drawer/index.js +4 -4
- package/dist/esm/drawer/index.js.map +1 -1
- package/dist/esm/drawer/types.d.ts +2 -2
- package/dist/esm/drawer/types.js.map +1 -1
- package/dist/esm/icon-base/types.d.ts +1 -1
- package/dist/esm/icon-base/types.js +4 -0
- package/dist/esm/icon-base/types.js.map +1 -1
- package/dist/esm/nimble-components/src/button/types.d.ts +1 -1
- package/dist/esm/nimble-components/src/drawer/types.d.ts +2 -2
- package/dist/esm/nimble-components/src/icon-base/types.d.ts +1 -1
- package/dist/esm/nimble-components/src/text-field/types.d.ts +1 -1
- package/dist/esm/nimble-components/src/theme-provider/design-token-comments.d.ts +1 -1
- package/dist/esm/nimble-components/src/theme-provider/design-token-names.d.ts +1 -1
- package/dist/esm/nimble-components/src/theme-provider/design-tokens.d.ts +0 -1
- package/dist/esm/nimble-components/src/theme-provider/index.d.ts +7 -8
- package/dist/esm/nimble-components/src/theme-provider/template.d.ts +2 -2
- package/dist/esm/nimble-components/src/theme-provider/types.d.ts +2 -2
- package/dist/esm/nimble-components/src/tree-view/types.d.ts +1 -1
- package/dist/esm/nimble-components/src/utilities/style/prefers-reduced-motion.d.ts +1 -5
- package/dist/esm/nimble-components/src/utilities/style/theme.d.ts +44 -0
- package/dist/esm/text-field/styles.js +18 -6
- package/dist/esm/text-field/styles.js.map +1 -1
- package/dist/esm/text-field/types.d.ts +1 -1
- package/dist/esm/text-field/types.js.map +1 -1
- package/dist/esm/theme-provider/design-token-comments.d.ts +1 -1
- package/dist/esm/theme-provider/design-token-comments.js +1 -2
- package/dist/esm/theme-provider/design-token-comments.js.map +1 -1
- package/dist/esm/theme-provider/design-token-names.d.ts +1 -1
- package/dist/esm/theme-provider/design-token-names.js +1 -2
- package/dist/esm/theme-provider/design-token-names.js.map +1 -1
- package/dist/esm/theme-provider/design-tokens.d.ts +0 -1
- package/dist/esm/theme-provider/design-tokens.js +11 -22
- package/dist/esm/theme-provider/design-tokens.js.map +1 -1
- package/dist/esm/theme-provider/index.d.ts +7 -8
- package/dist/esm/theme-provider/index.js +8 -8
- package/dist/esm/theme-provider/index.js.map +1 -1
- 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 +2 -2
- package/dist/esm/theme-provider/types.js +7 -7
- package/dist/esm/theme-provider/types.js.map +1 -1
- package/dist/esm/tree-view/types.d.ts +1 -1
- package/dist/esm/tree-view/types.js.map +1 -1
- 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 +1 -5
- package/dist/esm/utilities/style/prefers-reduced-motion.js +1 -7
- package/dist/esm/utilities/style/prefers-reduced-motion.js.map +1 -1
- 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/tokens-internal.scss +0 -6
- package/dist/tokens.scss +0 -3
- package/package.json +1 -1
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* @public
|
|
4
4
|
*/
|
|
5
5
|
import type { Button } from '@microsoft/fast-foundation';
|
|
6
|
-
export declare type ButtonAppearanceAttribute = 'outline' | 'ghost' | 'block';
|
|
7
6
|
export declare enum ButtonAppearance {
|
|
8
7
|
Outline = "outline",
|
|
9
8
|
Ghost = "ghost",
|
|
10
9
|
Block = "block"
|
|
11
10
|
}
|
|
11
|
+
export declare type ButtonAppearanceAttribute = `${ButtonAppearance}`;
|
|
12
12
|
export declare type ButtonType = Button['type'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/button/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/button/types.ts"],"names":[],"mappings":"AAMA,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IACxB,uCAAmB,CAAA;IACnB,mCAAe,CAAA;IACf,mCAAe,CAAA;AACnB,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B"}
|
package/dist/esm/drawer/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { AnimateGroup, AnimateTo } from '@microsoft/fast-animation';
|
|
|
3
3
|
import { attr, Observable } from '@microsoft/fast-element';
|
|
4
4
|
import { DesignSystem, Dialog as FoundationDialog, dialogTemplate as template } from '@microsoft/fast-foundation';
|
|
5
5
|
import { drawerAnimationDurationMs } from '../theme-provider/design-tokens';
|
|
6
|
-
import {
|
|
6
|
+
import { prefersReducedMotionMediaQuery } from '../utilities/style/prefers-reduced-motion';
|
|
7
7
|
import { animationConfig } from './animations';
|
|
8
8
|
import { styles } from './styles';
|
|
9
9
|
import { DrawerLocation, DrawerState } from './types';
|
|
@@ -34,7 +34,7 @@ class Drawer extends FoundationDialog {
|
|
|
34
34
|
super.connectedCallback();
|
|
35
35
|
this.updateAnimationDuration();
|
|
36
36
|
this.animationsEnabledChangedHandler = () => this.updateAnimationDuration();
|
|
37
|
-
|
|
37
|
+
prefersReducedMotionMediaQuery.addEventListener('change', this.animationsEnabledChangedHandler);
|
|
38
38
|
this.onStateChanged();
|
|
39
39
|
const notifier = Observable.getNotifier(this);
|
|
40
40
|
const subscriber = {
|
|
@@ -53,7 +53,7 @@ class Drawer extends FoundationDialog {
|
|
|
53
53
|
this.propertyChangeSubscriber = undefined;
|
|
54
54
|
}
|
|
55
55
|
if (this.animationsEnabledChangedHandler) {
|
|
56
|
-
|
|
56
|
+
prefersReducedMotionMediaQuery.removeEventListener('change', this.animationsEnabledChangedHandler);
|
|
57
57
|
this.animationsEnabledChangedHandler = undefined;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
@@ -122,7 +122,7 @@ class Drawer extends FoundationDialog {
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
updateAnimationDuration() {
|
|
125
|
-
const disableAnimations =
|
|
125
|
+
const disableAnimations = prefersReducedMotionMediaQuery.matches;
|
|
126
126
|
this.animationDurationMilliseconds = disableAnimations
|
|
127
127
|
? animationDurationWhenDisabledMilliseconds
|
|
128
128
|
: drawerAnimationDurationMs.getValueFor(this);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/drawer/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EACH,IAAI,EAEJ,UAAU,EAEb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,YAAY,EACZ,MAAM,IAAI,gBAAgB,EAC1B,cAAc,IAAI,QAAQ,EAC7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/drawer/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EACH,IAAI,EAEJ,UAAU,EAEb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACH,YAAY,EACZ,MAAM,IAAI,gBAAgB,EAC1B,cAAc,IAAI,QAAQ,EAC7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,8BAA8B,EAAE,MAAM,2CAA2C,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE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a;gBACtB,CAAC,CAAC,WAAW,CAAC,MAAM;gBACpB,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC;QAC7B,CAAC,CAAC;QACF,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,cAAc,CAAC,IAAI,EAAE,CAAC;IAC1B,CAAC;IAEO,sBAAsB;QAC1B,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC;IAClC,CAAC;CACJ;AAhMG;IADC,IAAI;wCACiD;AAGtD;IADC,IAAI;qCAC0C;AAQ/C;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;8CAC1B;AAuLlC,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC;IAChC,QAAQ,EAAE,QAAQ;IAClB,0GAA0G;IAC1G,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export declare type DrawerLocationAttribute = 'left' | 'right';
|
|
2
1
|
export declare enum DrawerLocation {
|
|
3
2
|
Left = "left",
|
|
4
3
|
Right = "right"
|
|
5
4
|
}
|
|
6
|
-
export declare type
|
|
5
|
+
export declare type DrawerLocationAttribute = `${DrawerLocation}`;
|
|
7
6
|
export declare enum DrawerState {
|
|
8
7
|
Opening = "opening",
|
|
9
8
|
Opened = "opened",
|
|
10
9
|
Closing = "closing",
|
|
11
10
|
Closed = "closed"
|
|
12
11
|
}
|
|
12
|
+
export declare type DrawerStateAttribute = `${DrawerState}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/drawer/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/drawer/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,+BAAa,CAAA;IACb,iCAAe,CAAA;AACnB,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAGD,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACnB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;AACrB,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB"}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Predefined icon status states
|
|
3
3
|
* @public
|
|
4
4
|
*/
|
|
5
|
-
export declare type IconStatusAttribute = 'fail' | 'warning' | 'pass' | 'regular';
|
|
6
5
|
export declare enum IconStatus {
|
|
7
6
|
Fail = "fail",
|
|
8
7
|
Warning = "warning",
|
|
9
8
|
Pass = "pass",
|
|
10
9
|
Regular = "regular"
|
|
11
10
|
}
|
|
11
|
+
export declare type IconStatusAttribute = `${IconStatus}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/icon-base/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/icon-base/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAN,IAAY,UAKX;AALD,WAAY,UAAU;IAClB,2BAAa,CAAA;IACb,iCAAmB,CAAA;IACnB,2BAAa,CAAA;IACb,iCAAmB,CAAA;AACvB,CAAC,EALW,UAAU,KAAV,UAAU,QAKrB"}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* @public
|
|
4
4
|
*/
|
|
5
5
|
import type { Button } from '@microsoft/fast-foundation';
|
|
6
|
-
export declare type ButtonAppearanceAttribute = 'outline' | 'ghost' | 'block';
|
|
7
6
|
export declare enum ButtonAppearance {
|
|
8
7
|
Outline = "outline",
|
|
9
8
|
Ghost = "ghost",
|
|
10
9
|
Block = "block"
|
|
11
10
|
}
|
|
11
|
+
export declare type ButtonAppearanceAttribute = `${ButtonAppearance}`;
|
|
12
12
|
export declare type ButtonType = Button['type'];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export declare type DrawerLocationAttribute = 'left' | 'right';
|
|
2
1
|
export declare enum DrawerLocation {
|
|
3
2
|
Left = "left",
|
|
4
3
|
Right = "right"
|
|
5
4
|
}
|
|
6
|
-
export declare type
|
|
5
|
+
export declare type DrawerLocationAttribute = `${DrawerLocation}`;
|
|
7
6
|
export declare enum DrawerState {
|
|
8
7
|
Opening = "opening",
|
|
9
8
|
Opened = "opened",
|
|
10
9
|
Closing = "closing",
|
|
11
10
|
Closed = "closed"
|
|
12
11
|
}
|
|
12
|
+
export declare type DrawerStateAttribute = `${DrawerState}`;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Predefined icon status states
|
|
3
3
|
* @public
|
|
4
4
|
*/
|
|
5
|
-
export declare type IconStatusAttribute = 'fail' | 'warning' | 'pass' | 'regular';
|
|
6
5
|
export declare enum IconStatus {
|
|
7
6
|
Fail = "fail",
|
|
8
7
|
Warning = "warning",
|
|
9
8
|
Pass = "pass",
|
|
10
9
|
Regular = "regular"
|
|
11
10
|
}
|
|
11
|
+
export declare type IconStatusAttribute = `${IconStatus}`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as TokensNamespace from './design-tokens';
|
|
2
2
|
declare type TokenName = keyof typeof TokensNamespace;
|
|
3
3
|
export declare const tokenNames: {
|
|
4
|
-
[key in TokenName]: string;
|
|
4
|
+
readonly [key in TokenName]: string;
|
|
5
5
|
};
|
|
6
6
|
export declare const styleNameFromTokenName: (tokenName: string) => string;
|
|
7
7
|
export declare const cssPropertyFromTokenName: (tokenName: string) => string;
|
|
@@ -40,4 +40,3 @@ export declare const contentFontColorDisabled: import("@microsoft/fast-foundatio
|
|
|
40
40
|
export declare const smallDelay: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
41
41
|
export declare const mediumDelay: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
42
42
|
export declare const drawerAnimationDurationMs: import("@microsoft/fast-foundation").CSSDesignToken<number>;
|
|
43
|
-
export declare const passwordRevealFilter: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import { DesignToken, FoundationElement } from '@microsoft/fast-foundation';
|
|
2
2
|
import { Direction } from '@microsoft/fast-web-utilities';
|
|
3
|
-
import {
|
|
4
|
-
export type { NimbleThemeProvider };
|
|
3
|
+
import { Theme } from './types';
|
|
5
4
|
declare global {
|
|
6
5
|
interface HTMLElementTagNameMap {
|
|
7
|
-
'nimble-theme-provider':
|
|
6
|
+
'nimble-theme-provider': ThemeProvider;
|
|
8
7
|
}
|
|
9
8
|
}
|
|
10
9
|
export declare const direction: DesignToken<Direction>;
|
|
11
|
-
export declare const theme: DesignToken<
|
|
10
|
+
export declare const theme: DesignToken<Theme>;
|
|
12
11
|
/**
|
|
13
|
-
* The
|
|
12
|
+
* The ThemeProvider implementation. Add this component to the page and set its `theme` attribute to control
|
|
14
13
|
* the values of design tokens that provide colors and fonts as CSS custom properties to any descendant components.
|
|
15
14
|
* @internal
|
|
16
15
|
*/
|
|
17
|
-
declare class
|
|
16
|
+
export declare class ThemeProvider extends FoundationElement {
|
|
18
17
|
direction: Direction;
|
|
19
|
-
theme:
|
|
18
|
+
theme: Theme;
|
|
20
19
|
directionChanged(_prev: Direction | undefined, next: Direction | undefined): void;
|
|
21
|
-
themeChanged(_prev:
|
|
20
|
+
themeChanged(_prev: Theme | undefined, next: Theme | undefined): void;
|
|
22
21
|
connectedCallback(): void;
|
|
23
22
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const template: import("@microsoft/fast-element").ViewTemplate<
|
|
1
|
+
import type { ThemeProvider } from '.';
|
|
2
|
+
export declare const template: import("@microsoft/fast-element").ViewTemplate<ThemeProvider, any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
export declare enum NimbleTheme {
|
|
1
|
+
export declare enum Theme {
|
|
3
2
|
Light = "light",
|
|
4
3
|
Dark = "dark",
|
|
5
4
|
Color = "color",
|
|
6
5
|
LegacyBlue = "legacy-blue"
|
|
7
6
|
}
|
|
7
|
+
export declare type ThemeAttribute = `${Theme}`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const pinnedSelectedAttribute = "pinned-selected";
|
|
2
2
|
export declare const groupSelectedAttribute = "group-selected";
|
|
3
|
-
export declare type TreeViewSelectionModeAttribute = 'all' | 'leaves-only';
|
|
4
3
|
export declare enum TreeViewSelectionMode {
|
|
5
4
|
All = "all",
|
|
6
5
|
LeavesOnly = "leaves-only"
|
|
7
6
|
}
|
|
7
|
+
export declare type TreeViewSelectionModeAttribute = `${TreeViewSelectionMode}`;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Singleton utility to watch the prefers-reduced-motion media value
|
|
3
3
|
*/
|
|
4
|
-
export declare
|
|
5
|
-
static instance: PrefersReducedMotionWatcher;
|
|
6
|
-
readonly mediaQuery: MediaQueryList;
|
|
7
|
-
private constructor();
|
|
8
|
-
}
|
|
4
|
+
export declare const prefersReducedMotionMediaQuery: MediaQueryList;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Behavior, ElementStyles, FASTElement } from '@microsoft/fast-element';
|
|
2
|
+
import type { Theme } from '../../theme-provider/types';
|
|
3
|
+
export declare type LightStyle = ElementStyles | null;
|
|
4
|
+
export declare type DarkStyleOrAlias = ElementStyles | null | Theme.Light;
|
|
5
|
+
export declare type ColorStyleOrAlias = ElementStyles | null | Theme.Light | Theme.Dark;
|
|
6
|
+
export declare type LegacyBlueStyleOrAlias = ElementStyles | null | Theme.Light | Theme.Dark | Theme.Color;
|
|
7
|
+
/**
|
|
8
|
+
* Behavior to conditionally apply theme-based stylesheets.
|
|
9
|
+
*/
|
|
10
|
+
declare class ThemeStyleSheetBehavior implements Behavior {
|
|
11
|
+
private readonly themeStyles;
|
|
12
|
+
private readonly cache;
|
|
13
|
+
constructor(lightStyle: LightStyle, darkStyleOrAlias: DarkStyleOrAlias, colorStyleOrAlias: ColorStyleOrAlias, legacyBlueStyleOrAlias: LegacyBlueStyleOrAlias);
|
|
14
|
+
private static resolveTheme;
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
bind(source: FASTElement & HTMLElement): void;
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
unbind(source: FASTElement & HTMLElement): void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Behavior to conditionally apply theme-based stylesheets. To determine which to apply,
|
|
26
|
+
* the behavior will use the nearest ThemeProvider's 'theme' design system value.
|
|
27
|
+
* To re-use the same style for multiple themes you can specify the name of an already
|
|
28
|
+
* defined theme to alias them together.
|
|
29
|
+
*
|
|
30
|
+
* @public
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* css`
|
|
34
|
+
* // ...
|
|
35
|
+
* `.withBehaviors(new ThemeStyleSheetBehavior(
|
|
36
|
+
* css`:host { ... Theme.Light style... }`),
|
|
37
|
+
* css`:host { ... Theme.Dark style... }`),
|
|
38
|
+
* null, // No style needed for Theme.Color style
|
|
39
|
+
* Theme.Light, // For the Theme.LegacyBlue style, re-use the previously set Theme.Light style
|
|
40
|
+
* )
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare const themeBehavior: (lightStyle: LightStyle, darkStyleOrAlias: DarkStyleOrAlias, colorStyleOrAlias: ColorStyleOrAlias, legacyBlueStyleOrAlias: LegacyBlueStyleOrAlias) => ThemeStyleSheetBehavior;
|
|
44
|
+
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { css } from '@microsoft/fast-element';
|
|
2
2
|
import { display } from '@microsoft/fast-foundation';
|
|
3
|
-
import { borderColorRgbPartial, borderColorHover, borderWidth, contentFontColor, contentFontColorDisabled, contentFontSize, controlHeight, failColor, fillColorSelectedRgbPartial, fontFamily, iconSize, labelFontColor, labelFontFamily, labelFontSize, labelFontWeight, labelHeight, labelTextTransform,
|
|
3
|
+
import { borderColorRgbPartial, borderColorHover, borderWidth, contentFontColor, contentFontColorDisabled, contentFontSize, controlHeight, failColor, fillColorSelectedRgbPartial, fontFamily, iconSize, labelFontColor, labelFontFamily, labelFontSize, labelFontWeight, labelHeight, labelTextTransform, smallDelay } from '../theme-provider/design-tokens';
|
|
4
|
+
import { Theme } from '../theme-provider/types';
|
|
5
|
+
import { themeBehavior } from '../utilities/style/theme';
|
|
4
6
|
export const styles = css `
|
|
5
7
|
${display('inline-block')}
|
|
6
8
|
|
|
@@ -73,10 +75,6 @@ export const styles = css `
|
|
|
73
75
|
border: none;
|
|
74
76
|
}
|
|
75
77
|
|
|
76
|
-
.control::-ms-reveal {
|
|
77
|
-
filter: ${passwordRevealFilter};
|
|
78
|
-
}
|
|
79
|
-
|
|
80
78
|
.control:hover,
|
|
81
79
|
.control:focus,
|
|
82
80
|
.control:disabled,
|
|
@@ -138,5 +136,19 @@ export const styles = css `
|
|
|
138
136
|
:host([disabled]) [part='end'] path {
|
|
139
137
|
fill: ${contentFontColorDisabled};
|
|
140
138
|
}
|
|
141
|
-
|
|
139
|
+
`.withBehaviors(themeBehavior(css `
|
|
140
|
+
${'' /* Light theme */}
|
|
141
|
+
.control::-ms-reveal {
|
|
142
|
+
filter: invert(0%);
|
|
143
|
+
}
|
|
144
|
+
`, css `
|
|
145
|
+
${'' /* Dark theme */}
|
|
146
|
+
.control::-ms-reveal {
|
|
147
|
+
filter: invert(100%);
|
|
148
|
+
}
|
|
149
|
+
`,
|
|
150
|
+
// Color theme
|
|
151
|
+
Theme.Dark,
|
|
152
|
+
// LegacyBlue theme
|
|
153
|
+
Theme.Light));
|
|
142
154
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/text-field/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD,OAAO,EACH,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,wBAAwB,EACxB,eAAe,EACf,aAAa,EACb,SAAS,EACT,2BAA2B,EAC3B,UAAU,EACV,QAAQ,EACR,cAAc,EACd,eAAe,EACf,aAAa,EACb,eAAe,EACf,WAAW,EACX,kBAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/text-field/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD,OAAO,EACH,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,wBAAwB,EACxB,eAAe,EACf,aAAa,EACb,SAAS,EACT,2BAA2B,EAC3B,UAAU,EACV,QAAQ,EACR,cAAc,EACd,eAAe,EACf,aAAa,EACb,eAAe,EACf,WAAW,EACX,kBAAkB,EAClB,UAAU,EACb,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,cAAc,CAAC;;;uBAGN,UAAU;qBACZ,eAAe;;;iBAGnB,gBAAgB;uBACV,WAAW,MAAM,aAAa;;;;iBAIpC,wBAAwB;;;;;;;;;uBASlB,UAAU;yBACR,WAAW,eAAe,qBAAqB;;oCAEpC,UAAU,oBAAoB,UAAU;;;;;;;;;;;mCAWzC,gBAAgB;;;;;yBAK1B,WAAW,UAAU,SAAS;;;;mCAIpB,SAAS;;;;;;yBAMnB,WAAW,UAAU,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6BrD,cAAc;2BACJ,2BAA2B;;;;iBAIrC,cAAc;;;;;;;;;;;;iBAYd,wBAAwB;;;;;iBAKxB,cAAc;uBACR,eAAe;qBACjB,aAAa;uBACX,eAAe;uBACf,WAAW;0BACR,kBAAkB;;;;;;;;;;;;;;;kBAe1B,QAAQ;iBACT,QAAQ;;;;gBAIT,SAAS;;;;gBAIT,wBAAwB;;CAEvC,CAAC,aAAa,CACP,aAAa,CACT,GAAG,CAAA;cACD,EAAE,CAAC,iBAAiB;;;;SAIzB,EACG,GAAG,CAAA;cACD,EAAE,CAAC,gBAAgB;;;;SAIxB;AACG,cAAc;AACd,KAAK,CAAC,IAAI;AACV,mBAAmB;AACnB,KAAK,CAAC,KAAK,CACd,CACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/text-field/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/text-field/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"design-token-comments.js","sourceRoot":"","sources":["../../../src/theme-provider/design-token-comments.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"design-token-comments.js","sourceRoot":"","sources":["../../../src/theme-provider/design-token-comments.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,QAAQ,GAA4C;IAC7D,qBAAqB,EAAE,EAAE;IACzB,0BAA0B,EAAE,uCAAuC;IACnE,iBAAiB,EAAE,EAAE;IACrB,2BAA2B,EAAE,EAAE;IAC/B,sBAAsB,EAAE,EAAE;IAC1B,cAAc,EAAE,EAAE;IAClB,WAAW,EAAE,EAAE;IACf,qBAAqB,EAAE,EAAE;IACzB,SAAS,EAAE,EAAE;IACb,YAAY,EAAE,EAAE;IAChB,SAAS,EAAE,EAAE;IACb,gBAAgB,EAAE,EAAE;IACpB,SAAS,EAAE,EAAE;IACb,mBAAmB,EAAE,EAAE;IACvB,gBAAgB,EAAE,EAAE;IACpB,aAAa,EAAE,EAAE;IACjB,eAAe,EAAE,EAAE;IACnB,WAAW,EAAE,EAAE;IACf,WAAW,EAAE,EAAE;IACf,QAAQ,EAAE,EAAE;IACZ,WAAW,EAAE,EAAE;IACf,UAAU,EAAE,EAAE;IACd,eAAe,EAAE,EAAE;IACnB,oBAAoB,EAAE,EAAE;IACxB,sBAAsB,EAAE,EAAE;IAC1B,aAAa,EAAE,EAAE;IACjB,eAAe,EAAE,EAAE;IACnB,kBAAkB,EAAE,EAAE;IACtB,oBAAoB,EAAE,EAAE;IACxB,oBAAoB,EAAE,EAAE;IACxB,eAAe,EAAE,EAAE;IACnB,cAAc,EAAE,EAAE;IAClB,mBAAmB,EAAE,EAAE;IACvB,gBAAgB,EAAE,EAAE;IACpB,sBAAsB,EAAE,EAAE;IAC1B,sBAAsB,EAAE,EAAE;IAC1B,kBAAkB,EAAE,EAAE;IACtB,uBAAuB,EAAE,EAAE;IAC3B,wBAAwB,EAAE,EAAE;IAC5B,UAAU,EAAE,EAAE;IACd,WAAW,EAAE,EAAE;IACf,yBAAyB,EAAE,EAAE;CAChC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as TokensNamespace from './design-tokens';
|
|
2
2
|
declare type TokenName = keyof typeof TokensNamespace;
|
|
3
3
|
export declare const tokenNames: {
|
|
4
|
-
[key in TokenName]: string;
|
|
4
|
+
readonly [key in TokenName]: string;
|
|
5
5
|
};
|
|
6
6
|
export declare const styleNameFromTokenName: (tokenName: string) => string;
|
|
7
7
|
export declare const cssPropertyFromTokenName: (tokenName: string) => string;
|
|
@@ -40,8 +40,7 @@ export const tokenNames = {
|
|
|
40
40
|
contentFontColorDisabled: 'content-font-color-disabled',
|
|
41
41
|
smallDelay: 'small-delay',
|
|
42
42
|
mediumDelay: 'medium-delay',
|
|
43
|
-
drawerAnimationDurationMs: 'drawer-animation-duration-ms'
|
|
44
|
-
passwordRevealFilter: 'password-reveal-filter'
|
|
43
|
+
drawerAnimationDurationMs: 'drawer-animation-duration-ms'
|
|
45
44
|
};
|
|
46
45
|
const prefix = 'ni-nimble';
|
|
47
46
|
export const styleNameFromTokenName = (tokenName) => `${prefix}-${tokenName}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"design-token-names.js","sourceRoot":"","sources":["../../../src/theme-provider/design-token-names.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"design-token-names.js","sourceRoot":"","sources":["../../../src/theme-provider/design-token-names.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,UAAU,GAA4C;IAC/D,qBAAqB,EAAE,0BAA0B;IACjD,0BAA0B,EAAE,8BAA8B;IAC1D,iBAAiB,EAAE,qBAAqB;IACxC,2BAA2B,EAAE,iCAAiC;IAC9D,sBAAsB,EAAE,2BAA2B;IACnD,cAAc,EAAE,kBAAkB;IAClC,WAAW,EAAE,cAAc;IAC3B,qBAAqB,EAAE,0BAA0B;IACjD,SAAS,EAAE,YAAY;IACvB,YAAY,EAAE,eAAe;IAC7B,SAAS,EAAE,YAAY;IACvB,gBAAgB,EAAE,oBAAoB;IACtC,SAAS,EAAE,YAAY;IACvB,mBAAmB,EAAE,wBAAwB;IAC7C,gBAAgB,EAAE,oBAAoB;IACtC,aAAa,EAAE,gBAAgB;IAC/B,eAAe,EAAE,kBAAkB;IACnC,WAAW,EAAE,cAAc;IAC3B,WA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,SAAS,MAAM,QAAQ,KAAK,CAAC"}
|
|
@@ -40,4 +40,3 @@ export declare const contentFontColorDisabled: import("@microsoft/fast-foundatio
|
|
|
40
40
|
export declare const smallDelay: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
41
41
|
export declare const mediumDelay: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
42
42
|
export declare const drawerAnimationDurationMs: import("@microsoft/fast-foundation").CSSDesignToken<number>;
|
|
43
|
-
export declare const passwordRevealFilter: import("@microsoft/fast-foundation").CSSDesignToken<string>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DesignToken } from '@microsoft/fast-foundation';
|
|
2
2
|
import hexRgb from 'hex-rgb';
|
|
3
3
|
import { Black91, Black88, Black85, Black15, Black75, White, Enterprise, Selection100, SlLegacyBlue, Fail100LightUi, SmallDelay, MediumDelay, Fail100DarkUi, BodyFamily, BodySize, ControlLabel1Family, ControlLabel1Size, ControlLabel1Weight, Warning100LightUi, Warning100DarkUi, Pass100LightUi, Pass100DarkUi, Title2Size, Title2Family, GroupLabel1Family, GroupLabel1Size, GroupLabel1Weight, LegacyContentFamily } from '@ni/nimble-tokens/dist/styledictionary/js/tokens';
|
|
4
|
-
import {
|
|
4
|
+
import { Theme } from './types';
|
|
5
5
|
import { tokenNames, styleNameFromTokenName } from './design-token-names';
|
|
6
6
|
import { theme } from '.';
|
|
7
7
|
// Color Tokens
|
|
@@ -54,8 +54,6 @@ export const contentFontColorDisabled = DesignToken.create(styleNameFromTokenNam
|
|
|
54
54
|
export const smallDelay = DesignToken.create(styleNameFromTokenName(tokenNames.smallDelay)).withDefault(SmallDelay);
|
|
55
55
|
export const mediumDelay = DesignToken.create(styleNameFromTokenName(tokenNames.mediumDelay)).withDefault(MediumDelay);
|
|
56
56
|
export const drawerAnimationDurationMs = DesignToken.create(styleNameFromTokenName(tokenNames.drawerAnimationDurationMs)).withDefault(250);
|
|
57
|
-
// Filter Tokens
|
|
58
|
-
export const passwordRevealFilter = DesignToken.create(styleNameFromTokenName(tokenNames.passwordRevealFilter)).withDefault((element) => getPasswordRevealFilterForTheme(element));
|
|
59
57
|
// Private helpers functions
|
|
60
58
|
function hexToRgbPartial(hexValue) {
|
|
61
59
|
const { red, green, blue } = hexRgb(hexValue);
|
|
@@ -67,13 +65,13 @@ function hexToRgbaCssColor(hexValue, alpha) {
|
|
|
67
65
|
}
|
|
68
66
|
function getColorForTheme(element, lightThemeColor, darkThemeColor, colorThemeColor, legacyBlueThemeColor) {
|
|
69
67
|
switch (theme.getValueFor(element)) {
|
|
70
|
-
case
|
|
68
|
+
case Theme.Light:
|
|
71
69
|
return lightThemeColor;
|
|
72
|
-
case
|
|
70
|
+
case Theme.Dark:
|
|
73
71
|
return darkThemeColor;
|
|
74
|
-
case
|
|
72
|
+
case Theme.Color:
|
|
75
73
|
return colorThemeColor;
|
|
76
|
-
case
|
|
74
|
+
case Theme.LegacyBlue:
|
|
77
75
|
return legacyBlueThemeColor;
|
|
78
76
|
default:
|
|
79
77
|
return lightThemeColor;
|
|
@@ -102,7 +100,7 @@ function getFillColorHoverForTheme(element) {
|
|
|
102
100
|
}
|
|
103
101
|
function getFontForTheme(element) {
|
|
104
102
|
switch (theme.getValueFor(element)) {
|
|
105
|
-
case
|
|
103
|
+
case Theme.LegacyBlue:
|
|
106
104
|
return `${LegacyContentFamily}`;
|
|
107
105
|
default:
|
|
108
106
|
return `${BodyFamily}`;
|
|
@@ -110,7 +108,7 @@ function getFontForTheme(element) {
|
|
|
110
108
|
}
|
|
111
109
|
function getLabelFontForTheme(element) {
|
|
112
110
|
switch (theme.getValueFor(element)) {
|
|
113
|
-
case
|
|
111
|
+
case Theme.LegacyBlue:
|
|
114
112
|
return `${LegacyContentFamily}`;
|
|
115
113
|
default:
|
|
116
114
|
return `${ControlLabel1Family}, ${BodyFamily}`;
|
|
@@ -118,7 +116,7 @@ function getLabelFontForTheme(element) {
|
|
|
118
116
|
}
|
|
119
117
|
function getGroupLabelFontForTheme(element) {
|
|
120
118
|
switch (theme.getValueFor(element)) {
|
|
121
|
-
case
|
|
119
|
+
case Theme.LegacyBlue:
|
|
122
120
|
return `${LegacyContentFamily}`;
|
|
123
121
|
default:
|
|
124
122
|
return `${GroupLabel1Family}, ${BodyFamily}`;
|
|
@@ -126,7 +124,7 @@ function getGroupLabelFontForTheme(element) {
|
|
|
126
124
|
}
|
|
127
125
|
function getGroupLabelTextTransformForTheme(element) {
|
|
128
126
|
switch (theme.getValueFor(element)) {
|
|
129
|
-
case
|
|
127
|
+
case Theme.LegacyBlue:
|
|
130
128
|
return 'none';
|
|
131
129
|
default:
|
|
132
130
|
return 'uppercase';
|
|
@@ -134,7 +132,7 @@ function getGroupLabelTextTransformForTheme(element) {
|
|
|
134
132
|
}
|
|
135
133
|
function getLabelTextTransformForTheme(element) {
|
|
136
134
|
switch (theme.getValueFor(element)) {
|
|
137
|
-
case
|
|
135
|
+
case Theme.LegacyBlue:
|
|
138
136
|
return 'none';
|
|
139
137
|
default:
|
|
140
138
|
return 'none';
|
|
@@ -142,19 +140,10 @@ function getLabelTextTransformForTheme(element) {
|
|
|
142
140
|
}
|
|
143
141
|
function getLabelTextSizeForTheme(element) {
|
|
144
142
|
switch (theme.getValueFor(element)) {
|
|
145
|
-
case
|
|
143
|
+
case Theme.LegacyBlue:
|
|
146
144
|
return '13px';
|
|
147
145
|
default:
|
|
148
146
|
return ControlLabel1Size;
|
|
149
147
|
}
|
|
150
148
|
}
|
|
151
|
-
function getPasswordRevealFilterForTheme(element) {
|
|
152
|
-
switch (theme.getValueFor(element)) {
|
|
153
|
-
case NimbleTheme.Color:
|
|
154
|
-
case NimbleTheme.Dark:
|
|
155
|
-
return 'invert(100%)';
|
|
156
|
-
default:
|
|
157
|
-
return 'invert(0%)';
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
149
|
//# sourceMappingURL=design-tokens.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"design-tokens.js","sourceRoot":"","sources":["../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AAoB;IACzD,QAAQ,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE;QAChC,KAAK,WAAW,CAAC,KAAK,CAAC;QACvB,KAAK,WAAW,CAAC,IAAI;YACjB,OAAO,cAAc,CAAC;QAC1B;YACI,OAAO,YAAY,CAAC;KAC3B;AACL,CAAC"}
|
|
1
|
+
{"version":3,"file":"design-tokens.js","sourceRoot":"","sources":["../../../src/theme-provider/design-tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,MAAM,MAAM,SAAS,CAAC;AAC7B,OAAO,EACH,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,KAAK,EACL,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,UAAU,EACV,WAAW,EACX,aAAa,EACb,UAAU,EACV,QAAQ,EACR,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACtB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;AAE1B,eAAe;AACf,MAAM,CAAC,MAAM,qBAAqB,GAAG,WAAW,CAAC,MAAM,CACnD,sBAAsB,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAC3D,CAAC,WAAW,CAAC,CAAC,OAAoB,EAAE,EAAE,CAAC,eAAe,CACnD,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,CAAC,CACnE,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,W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;AACL,CAAC"}
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import { DesignToken, FoundationElement } from '@microsoft/fast-foundation';
|
|
2
2
|
import { Direction } from '@microsoft/fast-web-utilities';
|
|
3
|
-
import {
|
|
4
|
-
export type { NimbleThemeProvider };
|
|
3
|
+
import { Theme } from './types';
|
|
5
4
|
declare global {
|
|
6
5
|
interface HTMLElementTagNameMap {
|
|
7
|
-
'nimble-theme-provider':
|
|
6
|
+
'nimble-theme-provider': ThemeProvider;
|
|
8
7
|
}
|
|
9
8
|
}
|
|
10
9
|
export declare const direction: DesignToken<Direction>;
|
|
11
|
-
export declare const theme: DesignToken<
|
|
10
|
+
export declare const theme: DesignToken<Theme>;
|
|
12
11
|
/**
|
|
13
|
-
* The
|
|
12
|
+
* The ThemeProvider implementation. Add this component to the page and set its `theme` attribute to control
|
|
14
13
|
* the values of design tokens that provide colors and fonts as CSS custom properties to any descendant components.
|
|
15
14
|
* @internal
|
|
16
15
|
*/
|
|
17
|
-
declare class
|
|
16
|
+
export declare class ThemeProvider extends FoundationElement {
|
|
18
17
|
direction: Direction;
|
|
19
|
-
theme:
|
|
18
|
+
theme: Theme;
|
|
20
19
|
directionChanged(_prev: Direction | undefined, next: Direction | undefined): void;
|
|
21
|
-
themeChanged(_prev:
|
|
20
|
+
themeChanged(_prev: Theme | undefined, next: Theme | undefined): void;
|
|
22
21
|
connectedCallback(): void;
|
|
23
22
|
}
|
|
@@ -4,7 +4,7 @@ import { attr } from '@microsoft/fast-element';
|
|
|
4
4
|
import { Direction } from '@microsoft/fast-web-utilities';
|
|
5
5
|
import { template } from './template';
|
|
6
6
|
import { styles } from './styles';
|
|
7
|
-
import {
|
|
7
|
+
import { Theme } from './types';
|
|
8
8
|
// Not represented as a CSS Custom Property, instead available
|
|
9
9
|
// as an attribute of theme provider.
|
|
10
10
|
export const direction = DesignToken.create({
|
|
@@ -14,13 +14,13 @@ export const direction = DesignToken.create({
|
|
|
14
14
|
export const theme = DesignToken.create({
|
|
15
15
|
name: 'theme',
|
|
16
16
|
cssCustomPropertyName: null
|
|
17
|
-
}).withDefault(
|
|
17
|
+
}).withDefault(Theme.Light);
|
|
18
18
|
/**
|
|
19
|
-
* The
|
|
19
|
+
* The ThemeProvider implementation. Add this component to the page and set its `theme` attribute to control
|
|
20
20
|
* the values of design tokens that provide colors and fonts as CSS custom properties to any descendant components.
|
|
21
21
|
* @internal
|
|
22
22
|
*/
|
|
23
|
-
class
|
|
23
|
+
export class ThemeProvider extends FoundationElement {
|
|
24
24
|
directionChanged(_prev, next) {
|
|
25
25
|
if (next !== undefined && next !== null) {
|
|
26
26
|
direction.setValueFor(this, next);
|
|
@@ -43,7 +43,7 @@ class NimbleThemeProvider extends FoundationElement {
|
|
|
43
43
|
this.direction = Direction.ltr;
|
|
44
44
|
}
|
|
45
45
|
if (!this.theme) {
|
|
46
|
-
this.theme =
|
|
46
|
+
this.theme = Theme.Light;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -51,13 +51,13 @@ __decorate([
|
|
|
51
51
|
attr({
|
|
52
52
|
attribute: 'direction'
|
|
53
53
|
})
|
|
54
|
-
],
|
|
54
|
+
], ThemeProvider.prototype, "direction", void 0);
|
|
55
55
|
__decorate([
|
|
56
56
|
attr({
|
|
57
57
|
attribute: 'theme'
|
|
58
58
|
})
|
|
59
|
-
],
|
|
60
|
-
const nimbleDesignSystemProvider =
|
|
59
|
+
], ThemeProvider.prototype, "theme", void 0);
|
|
60
|
+
const nimbleDesignSystemProvider = ThemeProvider.compose({
|
|
61
61
|
baseName: 'theme-provider',
|
|
62
62
|
styles,
|
|
63
63
|
template
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/theme-provider/index.ts"],"names":[],"mappings":";AAAA,OAAO,EACH,YAAY,EACZ,WAAW,EACX,iBAAiB,EACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,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AAC,CAAC;SAClC;IACL,CAAC;IAEM,YAAY,CACf,KAAwB,EACxB,IAAuB;QAEvB,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,IAAI,EAAE;YACrC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;SACjC;aAAM;YACH,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;SAC9B;IACL,CAAC;IAEM,iBAAiB;QACpB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAE1B,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,GAAG,CAAC;SAClC;QAED,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YACb,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;SAC5B;IACL,CAAC;CACJ;AAxCG;IAHC,IAAI,CAAC;QACF,SAAS,EAAE,WAAW;KACzB,CAAC;gDAC2B;AAK7B;IAHC,IAAI,CAAC;QACF,SAAS,EAAE,OAAO;KACrB,CAAC;4CACmB;AAqCzB,MAAM,0BAA0B,GAAG,aAAa,CAAC,OAAO,CAAC;IACrD,QAAQ,EAAE,gBAAgB;IAC1B,MAAM;IACN,QAAQ;CACX,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE;KACrB,UAAU,CAAC,QAAQ,CAAC;KACpB,QAAQ,CAAC,0BAA0B,EAAE,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const template: import("@microsoft/fast-element").ViewTemplate<
|
|
1
|
+
import type { ThemeProvider } from '.';
|
|
2
|
+
export declare const template: import("@microsoft/fast-element").ViewTemplate<ThemeProvider, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../src/theme-provider/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAG/C,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../src/theme-provider/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAG/C,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAe,eAAe,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
export declare enum NimbleTheme {
|
|
1
|
+
export declare enum Theme {
|
|
3
2
|
Light = "light",
|
|
4
3
|
Dark = "dark",
|
|
5
4
|
Color = "color",
|
|
6
5
|
LegacyBlue = "legacy-blue"
|
|
7
6
|
}
|
|
7
|
+
export declare type ThemeAttribute = `${Theme}`;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export var
|
|
2
|
-
(function (
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
})(
|
|
1
|
+
export var Theme;
|
|
2
|
+
(function (Theme) {
|
|
3
|
+
Theme["Light"] = "light";
|
|
4
|
+
Theme["Dark"] = "dark";
|
|
5
|
+
Theme["Color"] = "color";
|
|
6
|
+
Theme["LegacyBlue"] = "legacy-blue"; // ⛔️ only for use within SystemLink apps that haven't been updated to brand-aligned controls
|
|
7
|
+
})(Theme || (Theme = {}));
|
|
8
8
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/theme-provider/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/theme-provider/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,KAKX;AALD,WAAY,KAAK;IACb,wBAAe,CAAA;IACf,sBAAa,CAAA;IACb,wBAAe,CAAA;IACf,mCAA0B,CAAA,CAAC,6FAA6F;AAC5H,CAAC,EALW,KAAK,KAAL,KAAK,QAKhB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const pinnedSelectedAttribute = "pinned-selected";
|
|
2
2
|
export declare const groupSelectedAttribute = "group-selected";
|
|
3
|
-
export declare type TreeViewSelectionModeAttribute = 'all' | 'leaves-only';
|
|
4
3
|
export declare enum TreeViewSelectionMode {
|
|
5
4
|
All = "all",
|
|
6
5
|
LeavesOnly = "leaves-only"
|
|
7
6
|
}
|
|
7
|
+
export declare type TreeViewSelectionModeAttribute = `${TreeViewSelectionMode}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/tree-view/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG,iBAAiB,CAAC;AACzD,MAAM,CAAC,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/tree-view/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG,iBAAiB,CAAC;AACzD,MAAM,CAAC,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AAEvD,MAAM,CAAN,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC7B,oCAAW,CAAA;IACX,mDAA0B,CAAA;AAC9B,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,QAGhC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file is a workaround for: https://github.com/prettier/prettier/issues/11400
|
|
3
3
|
*/
|
|
4
|
-
// eslint-disable-next-line
|
|
4
|
+
// eslint-disable-next-line no-restricted-imports
|
|
5
5
|
import { focusVisible as focusVisibleOriginal } from '@microsoft/fast-foundation';
|
|
6
6
|
/**
|
|
7
7
|
* The string representing the focus selector to be used. Value
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focus.js","sourceRoot":"","sources":["../../../../src/utilities/style/focus.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,
|
|
1
|
+
{"version":3,"file":"focus.js","sourceRoot":"","sources":["../../../../src/utilities/style/focus.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,iDAAiD;AACjD,OAAO,EAAE,YAAY,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,oBAAoB,EAAE,CAAC"}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Singleton utility to watch the prefers-reduced-motion media value
|
|
3
3
|
*/
|
|
4
|
-
export declare
|
|
5
|
-
static instance: PrefersReducedMotionWatcher;
|
|
6
|
-
readonly mediaQuery: MediaQueryList;
|
|
7
|
-
private constructor();
|
|
8
|
-
}
|
|
4
|
+
export declare const prefersReducedMotionMediaQuery: MediaQueryList;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Singleton utility to watch the prefers-reduced-motion media value
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
5
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
6
|
-
constructor() {
|
|
7
|
-
this.mediaQuery = window.matchMedia('(prefers-reduced-motion: reduce)');
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
PrefersReducedMotionWatcher.instance = new PrefersReducedMotionWatcher();
|
|
4
|
+
export const prefersReducedMotionMediaQuery = window.matchMedia('(prefers-reduced-motion: reduce)');
|
|
11
5
|
//# sourceMappingURL=prefers-reduced-motion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prefers-reduced-motion.js","sourceRoot":"","sources":["../../../../src/utilities/style/prefers-reduced-motion.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"prefers-reduced-motion.js","sourceRoot":"","sources":["../../../../src/utilities/style/prefers-reduced-motion.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAmB,MAAM,CAAC,UAAU,CAC3E,kCAAkC,CACrC,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Behavior, ElementStyles, FASTElement } from '@microsoft/fast-element';
|
|
2
|
+
import type { Theme } from '../../theme-provider/types';
|
|
3
|
+
export declare type LightStyle = ElementStyles | null;
|
|
4
|
+
export declare type DarkStyleOrAlias = ElementStyles | null | Theme.Light;
|
|
5
|
+
export declare type ColorStyleOrAlias = ElementStyles | null | Theme.Light | Theme.Dark;
|
|
6
|
+
export declare type LegacyBlueStyleOrAlias = ElementStyles | null | Theme.Light | Theme.Dark | Theme.Color;
|
|
7
|
+
/**
|
|
8
|
+
* Behavior to conditionally apply theme-based stylesheets.
|
|
9
|
+
*/
|
|
10
|
+
declare class ThemeStyleSheetBehavior implements Behavior {
|
|
11
|
+
private readonly themeStyles;
|
|
12
|
+
private readonly cache;
|
|
13
|
+
constructor(lightStyle: LightStyle, darkStyleOrAlias: DarkStyleOrAlias, colorStyleOrAlias: ColorStyleOrAlias, legacyBlueStyleOrAlias: LegacyBlueStyleOrAlias);
|
|
14
|
+
private static resolveTheme;
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
bind(source: FASTElement & HTMLElement): void;
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
unbind(source: FASTElement & HTMLElement): void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Behavior to conditionally apply theme-based stylesheets. To determine which to apply,
|
|
26
|
+
* the behavior will use the nearest ThemeProvider's 'theme' design system value.
|
|
27
|
+
* To re-use the same style for multiple themes you can specify the name of an already
|
|
28
|
+
* defined theme to alias them together.
|
|
29
|
+
*
|
|
30
|
+
* @public
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* css`
|
|
34
|
+
* // ...
|
|
35
|
+
* `.withBehaviors(new ThemeStyleSheetBehavior(
|
|
36
|
+
* css`:host { ... Theme.Light style... }`),
|
|
37
|
+
* css`:host { ... Theme.Dark style... }`),
|
|
38
|
+
* null, // No style needed for Theme.Color style
|
|
39
|
+
* Theme.Light, // For the Theme.LegacyBlue style, re-use the previously set Theme.Light style
|
|
40
|
+
* )
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare const themeBehavior: (lightStyle: LightStyle, darkStyleOrAlias: DarkStyleOrAlias, colorStyleOrAlias: ColorStyleOrAlias, legacyBlueStyleOrAlias: LegacyBlueStyleOrAlias) => ThemeStyleSheetBehavior;
|
|
44
|
+
export {};
|
|
@@ -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":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AAC,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACvC,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,MAAiC;QAC3C,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAE1C,IAAI,UAAU,EAAE;YACZ,UAAU,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;SACtC;QAED,iDAAiD;QACjD,6EAA6E;IACjF,CAAC;CACJ;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CACzB,UAAsB,EACtB,gBAAkC,EAClC,iBAAoC,EACpC,sBAA8C,EACvB,EAAE,CAAC,IAAI,uBAAuB,CACrD,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,CACzB,CAAC"}
|
|
@@ -253,9 +253,3 @@ $ni-nimble-internal-medium-delay: --ni-nimble-medium-delay;
|
|
|
253
253
|
/// Used to override a token value (generally making it no longer theme-aware).
|
|
254
254
|
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-drawer-animation-duration-ms}: <new value>;`.
|
|
255
255
|
$ni-nimble-internal-drawer-animation-duration-ms: --ni-nimble-drawer-animation-duration-ms;
|
|
256
|
-
|
|
257
|
-
/// Internal property for $ni-nimble-password-reveal-filter.
|
|
258
|
-
/// Not intended for general use. If used, inform Nimble squad of use-case.
|
|
259
|
-
/// Used to override a token value (generally making it no longer theme-aware).
|
|
260
|
-
/// Requires SCSS interpolation to set, ie `#{$ni-nimble-internal-password-reveal-filter}: <new value>;`.
|
|
261
|
-
$ni-nimble-internal-password-reveal-filter: --ni-nimble-password-reveal-filter;
|
package/dist/tokens.scss
CHANGED
|
@@ -130,6 +130,3 @@ $ni-nimble-medium-delay: var($ni-nimble-internal-medium-delay);
|
|
|
130
130
|
|
|
131
131
|
|
|
132
132
|
$ni-nimble-drawer-animation-duration-ms: var($ni-nimble-internal-drawer-animation-duration-ms);
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
$ni-nimble-password-reveal-filter: var($ni-nimble-internal-password-reveal-filter);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ni/nimble-components",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.129",
|
|
4
4
|
"description": "Styled web components for the NI Nimble Design System",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "npm run build-components && npm run generate-scss && npm run build-storybook",
|