@ni/nimble-components 1.0.0-beta.122 → 1.0.0-beta.123

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.
Files changed (70) hide show
  1. package/README.md +27 -0
  2. package/dist/esm/nimble-components/src/button/behaviors.d.ts +12 -0
  3. package/dist/esm/nimble-components/src/button/index.d.ts +24 -0
  4. package/dist/esm/nimble-components/src/button/styles.d.ts +1 -0
  5. package/dist/esm/nimble-components/src/button/types.d.ts +12 -0
  6. package/dist/esm/nimble-components/src/checkbox/index.d.ts +12 -0
  7. package/dist/esm/nimble-components/src/checkbox/styles.d.ts +1 -0
  8. package/dist/esm/nimble-components/src/drawer/animations.d.ts +14 -0
  9. package/dist/esm/nimble-components/src/drawer/index.d.ts +43 -0
  10. package/dist/esm/nimble-components/src/drawer/styles.d.ts +1 -0
  11. package/dist/esm/nimble-components/src/drawer/types.d.ts +12 -0
  12. package/dist/esm/nimble-components/src/icon-base/index.d.ts +12 -0
  13. package/dist/esm/nimble-components/src/icon-base/styles.d.ts +1 -0
  14. package/dist/esm/nimble-components/src/icon-base/template.d.ts +2 -0
  15. package/dist/esm/nimble-components/src/icon-base/types.d.ts +11 -0
  16. package/dist/esm/nimble-components/src/icons/access-control.d.ts +12 -0
  17. package/dist/esm/nimble-components/src/icons/admin.d.ts +12 -0
  18. package/dist/esm/nimble-components/src/icons/administration.d.ts +12 -0
  19. package/dist/esm/nimble-components/src/icons/all-icons.d.ts +15 -0
  20. package/dist/esm/nimble-components/src/icons/check.d.ts +12 -0
  21. package/dist/esm/nimble-components/src/icons/custom-applications.d.ts +12 -0
  22. package/dist/esm/nimble-components/src/icons/delete.d.ts +12 -0
  23. package/dist/esm/nimble-components/src/icons/fail.d.ts +12 -0
  24. package/dist/esm/nimble-components/src/icons/login.d.ts +12 -0
  25. package/dist/esm/nimble-components/src/icons/logout.d.ts +12 -0
  26. package/dist/esm/nimble-components/src/icons/managed-systems.d.ts +12 -0
  27. package/dist/esm/nimble-components/src/icons/measurement-data-analysis.d.ts +12 -0
  28. package/dist/esm/nimble-components/src/icons/settings.d.ts +12 -0
  29. package/dist/esm/nimble-components/src/icons/succeeded.d.ts +12 -0
  30. package/dist/esm/nimble-components/src/icons/test-insights.d.ts +12 -0
  31. package/dist/esm/nimble-components/src/icons/utilities.d.ts +12 -0
  32. package/dist/esm/nimble-components/src/listbox-option/index.d.ts +15 -0
  33. package/dist/esm/nimble-components/src/listbox-option/styles.d.ts +1 -0
  34. package/dist/esm/nimble-components/src/menu/index.d.ts +12 -0
  35. package/dist/esm/nimble-components/src/menu/styles.d.ts +1 -0
  36. package/dist/esm/nimble-components/src/menu-item/index.d.ts +12 -0
  37. package/dist/esm/nimble-components/src/menu-item/styles.d.ts +1 -0
  38. package/dist/esm/nimble-components/src/number-field/index.d.ts +12 -0
  39. package/dist/esm/nimble-components/src/number-field/styles.d.ts +1 -0
  40. package/dist/esm/nimble-components/src/select/index.d.ts +16 -0
  41. package/dist/esm/nimble-components/src/select/styles.d.ts +1 -0
  42. package/dist/esm/nimble-components/src/tab/index.d.ts +12 -0
  43. package/dist/esm/nimble-components/src/tab/styles.d.ts +1 -0
  44. package/dist/esm/nimble-components/src/tab-panel/index.d.ts +12 -0
  45. package/dist/esm/nimble-components/src/tab-panel/styles.d.ts +1 -0
  46. package/dist/esm/nimble-components/src/tabs/index.d.ts +12 -0
  47. package/dist/esm/nimble-components/src/tabs/styles.d.ts +1 -0
  48. package/dist/esm/nimble-components/src/tabs-toolbar/index.d.ts +12 -0
  49. package/dist/esm/nimble-components/src/tabs-toolbar/styles.d.ts +1 -0
  50. package/dist/esm/nimble-components/src/tabs-toolbar/template.d.ts +1 -0
  51. package/dist/esm/nimble-components/src/testing/async-helpers.d.ts +10 -0
  52. package/dist/esm/nimble-components/src/text-field/index.d.ts +12 -0
  53. package/dist/esm/nimble-components/src/text-field/styles.d.ts +1 -0
  54. package/dist/esm/nimble-components/src/text-field/types.d.ts +3 -0
  55. package/dist/esm/nimble-components/src/theme-provider/design-tokens.d.ts +48 -0
  56. package/dist/esm/nimble-components/src/theme-provider/index.d.ts +17 -0
  57. package/dist/esm/nimble-components/src/theme-provider/styles.d.ts +1 -0
  58. package/dist/esm/nimble-components/src/theme-provider/template.d.ts +2 -0
  59. package/dist/esm/nimble-components/src/theme-provider/types.d.ts +7 -0
  60. package/dist/esm/nimble-components/src/tree-item/index.d.ts +34 -0
  61. package/dist/esm/nimble-components/src/tree-item/styles.d.ts +3 -0
  62. package/dist/esm/nimble-components/src/tree-view/index.d.ts +22 -0
  63. package/dist/esm/nimble-components/src/tree-view/styles.d.ts +1 -0
  64. package/dist/esm/nimble-components/src/tree-view/types.d.ts +7 -0
  65. package/dist/esm/nimble-components/src/utilities/style/focus.d.ts +11 -0
  66. package/dist/esm/nimble-components/src/utilities/style/prefers-reduced-motion.d.ts +8 -0
  67. package/dist/esm/theme-provider/index.d.ts +2 -1
  68. package/dist/esm/theme-provider/index.js +2 -1
  69. package/dist/esm/theme-provider/index.js.map +1 -1
  70. package/package.json +2 -2
package/README.md CHANGED
@@ -26,6 +26,33 @@ If you have an existing application that incorporates a module bundler like [Web
26
26
  3. Add the HTML for the component to your page. You can see sample code for each component in the [Nimble Storybook](https://ni.github.io/nimble/storybook/) by going to the **Docs** tab for the component and clicking **Show code**. For example: `<nimble-succeeded-icon></nimble-succeeded-icon>`.
27
27
  4. Nimble components are [standard web components (custom elements)](https://developer.mozilla.org/en-US/docs/Web/Web_Components) so you can configure them via normal DOM APIs like attributes, properties, events, and methods. The [Storybook documentation](https://ni.github.io/nimble/storybook/) for each component describes its custom API.
28
28
 
29
+ ## Theming
30
+
31
+ This package contains a theming system which enables changing the appearance of controls based on user preferences or application designs. All built in components are styled in several themes. An application can also read the tokens underlying the themes to style other parts of the application or modify the tokens underlying the themes to customize the appearance beyond what Nimble offers.
32
+
33
+ The theming system is composed of:
34
+
35
+ 1. theme-aware [design tokens](/packages/nimble-components/src/theme-provider/design-tokens.ts) which map base tokens from `nimble-tokens` to CSS variables and TypeScript constants that style parts of controls.
36
+ 2. a [theme provider component](/packages/nimble-components/src/theme-provider/index.ts) which organizes the higher level tokens into themes.
37
+
38
+ ### Using the Theming System
39
+
40
+ 1. Include the `<nimble-theme-provider>` element on your page and set its `theme` attribute. The theme provider has no appearance of its own but defines tokens that are used by descendant components. It will typically be at the root of the application:
41
+
42
+ ```html
43
+ <body>
44
+ <nimble-theme-provider theme="light">
45
+ <!-- everything else -->
46
+ </nimble-theme-provider>
47
+ </body>
48
+ ```
49
+
50
+ 2. _Optional_ Add other Nimble components as descendants of the theme provider and they will inherit the theme.
51
+ 3. _Optional_ Style non-Nimble components using the values which the theme provider defines for tokens.
52
+ - Tokens are exposed as CSS custom properties and as TypeScript constants using the [FAST Design Token](https://www.fast.design/docs/design-systems/design-tokens) implementation.
53
+ - These tokens are not yet documented but you can see their names in [`design-tokens.ts`](/packages/nimble-components/src/theme-provider/design-tokens.ts).
54
+ 4. _Optional_ Customize the theme for all or part of your application. Approaches for doing this are an area of active research; please reach out to the Nimble team to discuss your use case.
55
+
29
56
  ## Contributing
30
57
 
31
58
  Follow the instructions in [CONTRIBUTING.md](/packages/nimble-components/CONTRIBUTING.md) to modify this library.
@@ -0,0 +1,12 @@
1
+ import type { Behavior, ElementStyles } from '@microsoft/fast-element';
2
+ import type { ButtonAppearance } from './types';
3
+ /**
4
+ * Behavior that will conditionally apply a stylesheet based on the element's
5
+ * appearance property
6
+ *
7
+ * @param value - The value of the appearance property
8
+ * @param styles - The styles to be applied when condition matches
9
+ *
10
+ * @public
11
+ */
12
+ export declare function appearanceBehavior(value: ButtonAppearance, styles: ElementStyles): Behavior;
@@ -0,0 +1,24 @@
1
+ import { Button as FoundationButton } from '@microsoft/fast-foundation';
2
+ import { ButtonAppearance } from './types';
3
+ export type { Button };
4
+ declare global {
5
+ interface HTMLElementTagNameMap {
6
+ 'nimble-button': Button;
7
+ }
8
+ }
9
+ /**
10
+ * A nimble-styled HTML button
11
+ */
12
+ declare class Button extends FoundationButton {
13
+ /**
14
+ * The appearance the button should have.
15
+ *
16
+ * @public
17
+ * @remarks
18
+ * HTML Attribute: appearance
19
+ */
20
+ appearance: ButtonAppearance;
21
+ connectedCallback(): void;
22
+ defaultSlottedContentChanged(): void;
23
+ private checkForEmptyText;
24
+ }
@@ -0,0 +1 @@
1
+ export declare const styles: import("@microsoft/fast-element").ElementStyles;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Types of button appearance.
3
+ * @public
4
+ */
5
+ import type { Button } from '@microsoft/fast-foundation';
6
+ export declare type ButtonAppearanceAttribute = 'outline' | 'ghost' | 'block';
7
+ export declare enum ButtonAppearance {
8
+ Outline = "outline",
9
+ Ghost = "ghost",
10
+ Block = "block"
11
+ }
12
+ export declare type ButtonType = Button['type'];
@@ -0,0 +1,12 @@
1
+ import { Checkbox as FoundationCheckbox } from '@microsoft/fast-foundation';
2
+ export type { Checkbox };
3
+ declare global {
4
+ interface HTMLElementTagNameMap {
5
+ 'nimble-checkbox': Checkbox;
6
+ }
7
+ }
8
+ /**
9
+ * A nimble-styled checkbox control.
10
+ */
11
+ declare class Checkbox extends FoundationCheckbox {
12
+ }
@@ -0,0 +1 @@
1
+ export declare const styles: import("@microsoft/fast-element").ElementStyles;
@@ -0,0 +1,14 @@
1
+ export declare const animationConfig: {
2
+ slideLeftKeyframes: Keyframe[];
3
+ slideRightKeyframes: Keyframe[];
4
+ fadeOverlayKeyframes: Keyframe[];
5
+ slideInOptions: {
6
+ duration: number;
7
+ easing: string;
8
+ };
9
+ slideOutOptions: {
10
+ duration: number;
11
+ easing: string;
12
+ direction: string;
13
+ };
14
+ };
@@ -0,0 +1,43 @@
1
+ import { Dialog as FoundationDialog } from '@microsoft/fast-foundation';
2
+ import { DrawerLocation, DrawerState } from './types';
3
+ export type { Drawer };
4
+ declare global {
5
+ interface HTMLElementTagNameMap {
6
+ 'nimble-drawer': Drawer;
7
+ }
8
+ }
9
+ /**
10
+ * Drawer/Sidenav control. Shows content in a panel on the left / right side of the screen,
11
+ * which animates to be visible with a slide-in / slide-out animation.
12
+ * Configured via 'location', 'state', 'modal', 'preventDismiss' properties.
13
+ */
14
+ declare class Drawer extends FoundationDialog {
15
+ location: DrawerLocation;
16
+ state: DrawerState;
17
+ /**
18
+ * True to prevent dismissing the drawer when the overlay outside the drawer is clicked.
19
+ * Only applicable when 'modal' is set to true (i.e. when the overlay is used).
20
+ * HTML Attribute: prevent-dismiss
21
+ */
22
+ preventDismiss: boolean;
23
+ private readonly propertiesToWatch;
24
+ private propertyChangeNotifier?;
25
+ private animationDurationMilliseconds;
26
+ private animationGroup?;
27
+ private animationsEnabledChangedHandler?;
28
+ private propertyChangeSubscriber?;
29
+ connectedCallback(): void;
30
+ disconnectedCallback(): void;
31
+ show(): void;
32
+ hide(): void;
33
+ dismiss(): void;
34
+ private onPropertyChange;
35
+ private onHiddenChanged;
36
+ private onLocationChanged;
37
+ private onStateChanged;
38
+ private updateAnimationDuration;
39
+ private animateOpening;
40
+ private animateClosing;
41
+ private animateOpenClose;
42
+ private cancelCurrentAnimation;
43
+ }
@@ -0,0 +1 @@
1
+ export declare const styles: import("@microsoft/fast-element").ElementStyles;
@@ -0,0 +1,12 @@
1
+ export declare type DrawerLocationAttribute = 'left' | 'right';
2
+ export declare enum DrawerLocation {
3
+ Left = "left",
4
+ Right = "right"
5
+ }
6
+ export declare type DrawerStateAttribute = 'opening' | 'opened' | 'closing' | 'closed';
7
+ export declare enum DrawerState {
8
+ Opening = "opening",
9
+ Opened = "opened",
10
+ Closing = "closing",
11
+ Closed = "closed"
12
+ }
@@ -0,0 +1,12 @@
1
+ import { FoundationElement } from '@microsoft/fast-foundation';
2
+ import type { NimbleIcon } from '@ni/nimble-tokens/dist-icons-esm/nimble-icons-inline';
3
+ /**
4
+ * The base class for icon components
5
+ */
6
+ export declare class Icon extends FoundationElement {
7
+ icon: NimbleIcon;
8
+ constructor(icon: NimbleIcon);
9
+ }
10
+ declare type IconClass = typeof Icon;
11
+ export declare const registerIcon: (baseName: string, iconClass: IconClass) => void;
12
+ export {};
@@ -0,0 +1 @@
1
+ export declare const styles: import("@microsoft/fast-element").ElementStyles;
@@ -0,0 +1,2 @@
1
+ import type { Icon } from '.';
2
+ export declare const template: import("@microsoft/fast-element").ViewTemplate<Icon, any>;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Predefined icon status states
3
+ * @public
4
+ */
5
+ export declare type IconStatusAttribute = 'fail' | 'warning' | 'pass' | 'regular';
6
+ export declare enum IconStatus {
7
+ Fail = "fail",
8
+ Warning = "warning",
9
+ Pass = "pass",
10
+ Regular = "regular"
11
+ }
@@ -0,0 +1,12 @@
1
+ import { Icon } from '../icon-base';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'nimble-access-control-icon': AccessControlIcon;
5
+ }
6
+ }
7
+ /**
8
+ * The icon component for the 'access-control' icon
9
+ */
10
+ export declare class AccessControlIcon extends Icon {
11
+ constructor();
12
+ }
@@ -0,0 +1,12 @@
1
+ import { Icon } from '../icon-base';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'nimble-admin-icon': AdminIcon;
5
+ }
6
+ }
7
+ /**
8
+ * The icon component for the 'admin' icon
9
+ */
10
+ export declare class AdminIcon extends Icon {
11
+ constructor();
12
+ }
@@ -0,0 +1,12 @@
1
+ import { Icon } from '../icon-base';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'nimble-administration-icon': AdministrationIcon;
5
+ }
6
+ }
7
+ /**
8
+ * The icon component for the 'administration' icon
9
+ */
10
+ export declare class AdministrationIcon extends Icon {
11
+ constructor();
12
+ }
@@ -0,0 +1,15 @@
1
+ export { AccessControlIcon } from './access-control';
2
+ export { AdminIcon } from './admin';
3
+ export { AdministrationIcon } from './administration';
4
+ export { CheckIcon } from './check';
5
+ export { CustomApplicationsIcon } from './custom-applications';
6
+ export { DeleteIcon } from './delete';
7
+ export { FailIcon } from './fail';
8
+ export { LoginIcon } from './login';
9
+ export { LogoutIcon } from './logout';
10
+ export { ManagedSystemsIcon } from './managed-systems';
11
+ export { MeasurementDataAnalysisIcon } from './measurement-data-analysis';
12
+ export { SettingsIcon } from './settings';
13
+ export { SucceededIcon } from './succeeded';
14
+ export { TestInsightsIcon } from './test-insights';
15
+ export { UtilitiesIcon } from './utilities';
@@ -0,0 +1,12 @@
1
+ import { Icon } from '../icon-base';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'nimble-check-icon': CheckIcon;
5
+ }
6
+ }
7
+ /**
8
+ * The icon component for the 'check' icon
9
+ */
10
+ export declare class CheckIcon extends Icon {
11
+ constructor();
12
+ }
@@ -0,0 +1,12 @@
1
+ import { Icon } from '../icon-base';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'nimble-custom-applications-icon': CustomApplicationsIcon;
5
+ }
6
+ }
7
+ /**
8
+ * The icon component for the 'custom-applications' icon
9
+ */
10
+ export declare class CustomApplicationsIcon extends Icon {
11
+ constructor();
12
+ }
@@ -0,0 +1,12 @@
1
+ import { Icon } from '../icon-base';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'nimble-delete-icon': DeleteIcon;
5
+ }
6
+ }
7
+ /**
8
+ * The icon component for the 'delete' icon
9
+ */
10
+ export declare class DeleteIcon extends Icon {
11
+ constructor();
12
+ }
@@ -0,0 +1,12 @@
1
+ import { Icon } from '../icon-base';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'nimble-fail-icon': FailIcon;
5
+ }
6
+ }
7
+ /**
8
+ * The icon component for the 'fail' icon
9
+ */
10
+ export declare class FailIcon extends Icon {
11
+ constructor();
12
+ }
@@ -0,0 +1,12 @@
1
+ import { Icon } from '../icon-base';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'nimble-login-icon': LoginIcon;
5
+ }
6
+ }
7
+ /**
8
+ * The icon component for the 'login' icon
9
+ */
10
+ export declare class LoginIcon extends Icon {
11
+ constructor();
12
+ }
@@ -0,0 +1,12 @@
1
+ import { Icon } from '../icon-base';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'nimble-logout-icon': LogoutIcon;
5
+ }
6
+ }
7
+ /**
8
+ * The icon component for the 'logout' icon
9
+ */
10
+ export declare class LogoutIcon extends Icon {
11
+ constructor();
12
+ }
@@ -0,0 +1,12 @@
1
+ import { Icon } from '../icon-base';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'nimble-managed-systems-icon': ManagedSystemsIcon;
5
+ }
6
+ }
7
+ /**
8
+ * The icon component for the 'managed-systems' icon
9
+ */
10
+ export declare class ManagedSystemsIcon extends Icon {
11
+ constructor();
12
+ }
@@ -0,0 +1,12 @@
1
+ import { Icon } from '../icon-base';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'nimble-measurement-data-analysis-icon': MeasurementDataAnalysisIcon;
5
+ }
6
+ }
7
+ /**
8
+ * The icon component for the 'measurement-data-analysis' icon
9
+ */
10
+ export declare class MeasurementDataAnalysisIcon extends Icon {
11
+ constructor();
12
+ }
@@ -0,0 +1,12 @@
1
+ import { Icon } from '../icon-base';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'nimble-settings-icon': SettingsIcon;
5
+ }
6
+ }
7
+ /**
8
+ * The icon component for the 'settings' icon
9
+ */
10
+ export declare class SettingsIcon extends Icon {
11
+ constructor();
12
+ }
@@ -0,0 +1,12 @@
1
+ import { Icon } from '../icon-base';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'nimble-succeeded-icon': SucceededIcon;
5
+ }
6
+ }
7
+ /**
8
+ * The icon component for the 'succeeded' icon
9
+ */
10
+ export declare class SucceededIcon extends Icon {
11
+ constructor();
12
+ }
@@ -0,0 +1,12 @@
1
+ import { Icon } from '../icon-base';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'nimble-test-insights-icon': TestInsightsIcon;
5
+ }
6
+ }
7
+ /**
8
+ * The icon component for the 'test-insights' icon
9
+ */
10
+ export declare class TestInsightsIcon extends Icon {
11
+ constructor();
12
+ }
@@ -0,0 +1,12 @@
1
+ import { Icon } from '../icon-base';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'nimble-utilities-icon': UtilitiesIcon;
5
+ }
6
+ }
7
+ /**
8
+ * The icon component for the 'utilities' icon
9
+ */
10
+ export declare class UtilitiesIcon extends Icon {
11
+ constructor();
12
+ }
@@ -0,0 +1,15 @@
1
+ import { ListboxOption as FoundationListboxOption } from '@microsoft/fast-foundation';
2
+ export type { ListboxOption };
3
+ declare global {
4
+ interface HTMLElementTagNameMap {
5
+ 'nimble-listbox-option': ListboxOption;
6
+ }
7
+ }
8
+ /**
9
+ * A nimble-styled HTML listbox option
10
+ */
11
+ declare class ListboxOption extends FoundationListboxOption {
12
+ get value(): string;
13
+ set value(value: string);
14
+ connectedCallback(): void;
15
+ }
@@ -0,0 +1 @@
1
+ export declare const styles: import("@microsoft/fast-element").ElementStyles;
@@ -0,0 +1,12 @@
1
+ import { Menu as FoundationMenu } from '@microsoft/fast-foundation';
2
+ export type { Menu };
3
+ declare global {
4
+ interface HTMLElementTagNameMap {
5
+ 'nimble-menu': Menu;
6
+ }
7
+ }
8
+ /**
9
+ * A nimble-styled menu
10
+ */
11
+ declare class Menu extends FoundationMenu {
12
+ }
@@ -0,0 +1 @@
1
+ export declare const styles: import("@microsoft/fast-element").ElementStyles;
@@ -0,0 +1,12 @@
1
+ import { MenuItem as FoundationMenuItem } from '@microsoft/fast-foundation';
2
+ export type { MenuItem };
3
+ declare global {
4
+ interface HTMLElementTagNameMap {
5
+ 'nimble-menu-item': MenuItem;
6
+ }
7
+ }
8
+ /**
9
+ * A nimble-styled menu-item
10
+ */
11
+ declare class MenuItem extends FoundationMenuItem {
12
+ }
@@ -0,0 +1 @@
1
+ export declare const styles: import("@microsoft/fast-element").ElementStyles;
@@ -0,0 +1,12 @@
1
+ import { NumberField as FoundationNumberField } from '@microsoft/fast-foundation';
2
+ export type { NumberField };
3
+ declare global {
4
+ interface HTMLElementTagNameMap {
5
+ 'nimble-number-field': NumberField;
6
+ }
7
+ }
8
+ /**
9
+ * A nimble-styled HTML number input
10
+ */
11
+ declare class NumberField extends FoundationNumberField {
12
+ }
@@ -0,0 +1 @@
1
+ export declare const styles: import("@microsoft/fast-element").ElementStyles;
@@ -0,0 +1,16 @@
1
+ import { Select as FoundationSelect } from '@microsoft/fast-foundation';
2
+ export type { Select };
3
+ declare global {
4
+ interface HTMLElementTagNameMap {
5
+ 'nimble-select': Select;
6
+ }
7
+ }
8
+ /**
9
+ * A nimble-styed HTML select
10
+ */
11
+ declare class Select extends FoundationSelect {
12
+ get value(): string;
13
+ set value(value: string);
14
+ setPositioning(): void;
15
+ connectedCallback(): void;
16
+ }
@@ -0,0 +1 @@
1
+ export declare const styles: import("@microsoft/fast-element").ElementStyles;
@@ -0,0 +1,12 @@
1
+ import { Tab as FoundationTab } from '@microsoft/fast-foundation';
2
+ export type { Tab };
3
+ declare global {
4
+ interface HTMLElementTagNameMap {
5
+ 'nimble-tab': Tab;
6
+ }
7
+ }
8
+ /**
9
+ * A nimble-styled HTML tab
10
+ */
11
+ declare class Tab extends FoundationTab {
12
+ }
@@ -0,0 +1 @@
1
+ export declare const styles: import("@microsoft/fast-element").ElementStyles;
@@ -0,0 +1,12 @@
1
+ import { TabPanel as FoundationTabPanel } from '@microsoft/fast-foundation';
2
+ export type { TabPanel };
3
+ declare global {
4
+ interface HTMLElementTagNameMap {
5
+ 'nimble-tab-panel': TabPanel;
6
+ }
7
+ }
8
+ /**
9
+ * A nimble-styled tab panel
10
+ */
11
+ declare class TabPanel extends FoundationTabPanel {
12
+ }
@@ -0,0 +1 @@
1
+ export declare const styles: import("@microsoft/fast-element").ElementStyles;
@@ -0,0 +1,12 @@
1
+ import { Tabs as FoundationTabs } from '@microsoft/fast-foundation';
2
+ export type { Tabs };
3
+ declare global {
4
+ interface HTMLElementTagNameMap {
5
+ 'nimble-tabs': Tabs;
6
+ }
7
+ }
8
+ /**
9
+ * A nimble-styled tabs control
10
+ */
11
+ declare class Tabs extends FoundationTabs {
12
+ }
@@ -0,0 +1 @@
1
+ export declare const styles: import("@microsoft/fast-element").ElementStyles;
@@ -0,0 +1,12 @@
1
+ import { FoundationElement } from '@microsoft/fast-foundation';
2
+ export type { TabsToolbar };
3
+ declare global {
4
+ interface HTMLElementTagNameMap {
5
+ 'nimble-tabs-toolbar': TabsToolbar;
6
+ }
7
+ }
8
+ /**
9
+ * A nimble-styled container for toolbar content next to tabs.
10
+ */
11
+ declare class TabsToolbar extends FoundationElement {
12
+ }
@@ -0,0 +1 @@
1
+ export declare const styles: import("@microsoft/fast-element").ElementStyles;
@@ -0,0 +1 @@
1
+ export declare const template: import("@microsoft/fast-element").ViewTemplate<any, any>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Allows test code to wait for components to complete pending asynchronous updates that resulted
3
+ * from DOM interactions like property or attribute changes.
4
+ */
5
+ export declare const waitForUpdatesAsync: () => Promise<void>;
6
+ /**
7
+ * Allows test code to force components to synchronously complete normally asynchronous pending
8
+ * updates that resulted from DOM interactions like property or attribute changes.
9
+ */
10
+ export declare const processUpdates: () => void;
@@ -0,0 +1,12 @@
1
+ import { TextField as FoundationTextField } from '@microsoft/fast-foundation';
2
+ export type { TextField };
3
+ declare global {
4
+ interface HTMLElementTagNameMap {
5
+ 'nimble-text-field': TextField;
6
+ }
7
+ }
8
+ /**
9
+ * A nimble-styed HTML text input
10
+ */
11
+ declare class TextField extends FoundationTextField {
12
+ }
@@ -0,0 +1 @@
1
+ export declare const styles: import("@microsoft/fast-element").ElementStyles;
@@ -0,0 +1,3 @@
1
+ import { TextFieldType } from '@microsoft/fast-foundation';
2
+ export declare type TextFieldTypeAttribute = 'email' | 'password' | 'tel' | 'text' | 'url';
3
+ export { TextFieldType };
@@ -0,0 +1,48 @@
1
+ import { DesignToken } from '@microsoft/fast-foundation';
2
+ import { NimbleTheme } from './types';
3
+ export declare const theme: DesignToken<NimbleTheme>;
4
+ export declare const actionColorRgb: import("@microsoft/fast-foundation").CSSDesignToken<string>;
5
+ export declare const applicationBackgroundColor: import("@microsoft/fast-foundation").CSSDesignToken<string>;
6
+ export declare const fillColorSelected: import("@microsoft/fast-foundation").CSSDesignToken<string>;
7
+ export declare const fillColorSelectedRgb: import("@microsoft/fast-foundation").CSSDesignToken<string>;
8
+ export declare const fillColorSelectedHover: import("@microsoft/fast-foundation").CSSDesignToken<string>;
9
+ export declare const fillColorHover: import("@microsoft/fast-foundation").CSSDesignToken<string>;
10
+ export declare const borderColor: import("@microsoft/fast-foundation").CSSDesignToken<string>;
11
+ export declare const borderColorRgb: import("@microsoft/fast-foundation").CSSDesignToken<string>;
12
+ export declare const failColorTheme: (element: HTMLElement) => string;
13
+ export declare const failColor: import("@microsoft/fast-foundation").CSSDesignToken<string>;
14
+ export declare const warningColorTheme: (element: HTMLElement) => string;
15
+ export declare const warningColor: import("@microsoft/fast-foundation").CSSDesignToken<string>;
16
+ export declare const passColorTheme: (element: HTMLElement) => string;
17
+ export declare const passColor: import("@microsoft/fast-foundation").CSSDesignToken<string>;
18
+ export declare const borderColorHover: import("@microsoft/fast-foundation").CSSDesignToken<string>;
19
+ export declare const popupBoxShadowColor: import("@microsoft/fast-foundation").CSSDesignToken<string>;
20
+ export declare const popupBorderColor: import("@microsoft/fast-foundation").CSSDesignToken<string>;
21
+ export declare const controlHeight: import("@microsoft/fast-foundation").CSSDesignToken<string>;
22
+ export declare const standardPadding: import("@microsoft/fast-foundation").CSSDesignToken<string>;
23
+ export declare const labelHeight: import("@microsoft/fast-foundation").CSSDesignToken<string>;
24
+ export declare const borderWidth: import("@microsoft/fast-foundation").CSSDesignToken<string>;
25
+ export declare const iconSize: import("@microsoft/fast-foundation").CSSDesignToken<string>;
26
+ export declare const drawerWidth: import("@microsoft/fast-foundation").CSSDesignToken<string>;
27
+ export declare const fontFamily: import("@microsoft/fast-foundation").CSSDesignToken<string>;
28
+ export declare const labelFontFamily: import("@microsoft/fast-foundation").CSSDesignToken<string>;
29
+ export declare const groupLabelFontFamily: import("@microsoft/fast-foundation").CSSDesignToken<string>;
30
+ export declare const drawerHeaderFontFamily: import("@microsoft/fast-foundation").CSSDesignToken<string>;
31
+ export declare const labelFontSize: import("@microsoft/fast-foundation").CSSDesignToken<string>;
32
+ export declare const contentFontSize: import("@microsoft/fast-foundation").CSSDesignToken<string>;
33
+ export declare const groupLabelFontSize: import("@microsoft/fast-foundation").CSSDesignToken<string>;
34
+ export declare const drawerHeaderFontSize: import("@microsoft/fast-foundation").CSSDesignToken<string>;
35
+ export declare const groupLabelFontWeight: import("@microsoft/fast-foundation").CSSDesignToken<string>;
36
+ export declare const labelFontWeight: import("@microsoft/fast-foundation").CSSDesignToken<string>;
37
+ export declare const labelFontColor: import("@microsoft/fast-foundation").CSSDesignToken<string>;
38
+ export declare const groupLabelFontColor: import("@microsoft/fast-foundation").CSSDesignToken<string>;
39
+ export declare const contentFontColor: import("@microsoft/fast-foundation").CSSDesignToken<string>;
40
+ export declare const buttonContentFontColor: import("@microsoft/fast-foundation").CSSDesignToken<string>;
41
+ export declare const labelFontColorDisabled: import("@microsoft/fast-foundation").CSSDesignToken<string>;
42
+ export declare const labelTextTransform: import("@microsoft/fast-foundation").CSSDesignToken<string>;
43
+ export declare const groupLabelTextTransform: import("@microsoft/fast-foundation").CSSDesignToken<string>;
44
+ export declare const contentFontColorDisabled: import("@microsoft/fast-foundation").CSSDesignToken<string>;
45
+ export declare const smallDelay: import("@microsoft/fast-foundation").CSSDesignToken<string>;
46
+ export declare const mediumDelay: import("@microsoft/fast-foundation").CSSDesignToken<string>;
47
+ export declare const drawerAnimationDurationMs: import("@microsoft/fast-foundation").CSSDesignToken<number>;
48
+ export declare const passwordRevealFilter: import("@microsoft/fast-foundation").CSSDesignToken<string>;
@@ -0,0 +1,17 @@
1
+ import { FoundationElement } from '@microsoft/fast-foundation';
2
+ import type { NimbleTheme } from './types';
3
+ export type { NimbleThemeProvider };
4
+ declare global {
5
+ interface HTMLElementTagNameMap {
6
+ 'nimble-theme-provider': NimbleThemeProvider;
7
+ }
8
+ }
9
+ /**
10
+ * The NimbleThemeProvider implementation. Add this component to the page and set its `theme` attribute to control
11
+ * the values of design tokens that provide colors and fonts as CSS custom properties to any descendant components.
12
+ * @internal
13
+ */
14
+ declare class NimbleThemeProvider extends FoundationElement {
15
+ theme: NimbleTheme;
16
+ themeChanged(_prev: NimbleTheme | undefined, next: NimbleTheme | undefined): void;
17
+ }
@@ -0,0 +1 @@
1
+ export declare const styles: import("@microsoft/fast-element").ElementStyles;
@@ -0,0 +1,2 @@
1
+ import type { NimbleThemeProvider } from '.';
2
+ export declare const template: import("@microsoft/fast-element").ViewTemplate<NimbleThemeProvider, any>;
@@ -0,0 +1,7 @@
1
+ export declare type NimbleThemeAttribute = 'light' | 'dark' | 'color' | 'legacy-blue';
2
+ export declare enum NimbleTheme {
3
+ Light = "light",
4
+ Dark = "dark",
5
+ Color = "color",
6
+ LegacyBlue = "legacy-blue"
7
+ }
@@ -0,0 +1,34 @@
1
+ import { TreeItem as FoundationTreeItem } from '@microsoft/fast-foundation';
2
+ export type { TreeItem };
3
+ declare global {
4
+ interface HTMLElementTagNameMap {
5
+ 'nimble-tree-item': TreeItem;
6
+ }
7
+ }
8
+ /**
9
+ * A function that returns a nimble-tree-item registration for configuring the component with a DesignSystem.
10
+ * Implements {@link @microsoft/fast-foundation#treeItemTemplate}
11
+ *
12
+ *
13
+ * @public
14
+ * @remarks
15
+ * Generates HTML Element: \<nimble-tree-item\>
16
+ *
17
+ */
18
+ declare class TreeItem extends FoundationTreeItem {
19
+ private treeView;
20
+ constructor();
21
+ connectedCallback(): void;
22
+ disconnectedCallback(): void;
23
+ private hasChildTreeItems;
24
+ private readonly handleClickOverride;
25
+ private readonly handleSelectedChange;
26
+ private clearTreeGroupSelection;
27
+ private setGroupSelectionOnRootParentTreeItem;
28
+ private getImmediateTreeItem;
29
+ /**
30
+ * This was copied directly from the FAST TreeItem implementation
31
+ * @returns the root tree view
32
+ */
33
+ private getParentTreeView;
34
+ }
@@ -0,0 +1,3 @@
1
+ import { ElementStyles } from '@microsoft/fast-element';
2
+ import { ElementDefinitionContext, TreeItemOptions } from '@microsoft/fast-foundation';
3
+ export declare const styles: (context: ElementDefinitionContext, definition: TreeItemOptions) => ElementStyles;
@@ -0,0 +1,22 @@
1
+ import { TreeView as FoundationTreeView } from '@microsoft/fast-foundation';
2
+ import { TreeViewSelectionMode } from './types';
3
+ export type { TreeView };
4
+ declare global {
5
+ interface HTMLElementTagNameMap {
6
+ 'nimble-tree-view': TreeView;
7
+ }
8
+ }
9
+ /**
10
+ * A function that returns a nimble-tree-view registration for configuring the component with a DesignSystem.
11
+ * Implements {@link @microsoft/fast-foundation#treeViewTemplate}
12
+ *
13
+ *
14
+ * @public
15
+ * @remarks
16
+ * Generates HTML Element: \<nimble-tree-view\>
17
+ *
18
+ */
19
+ declare class TreeView extends FoundationTreeView {
20
+ selectionMode: TreeViewSelectionMode;
21
+ connectedCallback(): void;
22
+ }
@@ -0,0 +1 @@
1
+ export declare const styles: import("@microsoft/fast-element").ElementStyles;
@@ -0,0 +1,7 @@
1
+ export declare const pinnedSelectedAttribute = "pinned-selected";
2
+ export declare const groupSelectedAttribute = "group-selected";
3
+ export declare type TreeViewSelectionModeAttribute = 'all' | 'leaves-only';
4
+ export declare enum TreeViewSelectionMode {
5
+ All = "all",
6
+ LeavesOnly = "leaves-only"
7
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file is a workaround for: https://github.com/prettier/prettier/issues/11400
3
+ */
4
+ /**
5
+ * The string representing the focus selector to be used. Value
6
+ * will be ":focus-visible" when https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo
7
+ * is supported and ":focus" when it is not.
8
+ *
9
+ * @public
10
+ */
11
+ export declare const focusVisible: string;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Singleton utility to watch the prefers-reduced-motion media value
3
+ */
4
+ export declare class PrefersReducedMotionWatcher {
5
+ static instance: PrefersReducedMotionWatcher;
6
+ readonly mediaQuery: MediaQueryList;
7
+ private constructor();
8
+ }
@@ -7,7 +7,8 @@ declare global {
7
7
  }
8
8
  }
9
9
  /**
10
- * The NimbleThemeProvider implementation
10
+ * The NimbleThemeProvider implementation. Add this component to the page and set its `theme` attribute to control
11
+ * the values of design tokens that provide colors and fonts as CSS custom properties to any descendant components.
11
12
  * @internal
12
13
  */
13
14
  declare class NimbleThemeProvider extends FoundationElement {
@@ -5,7 +5,8 @@ import { template } from './template';
5
5
  import { styles } from './styles';
6
6
  import { theme } from './design-tokens';
7
7
  /**
8
- * The NimbleThemeProvider implementation
8
+ * The NimbleThemeProvider implementation. Add this component to the page and set its `theme` attribute to control
9
+ * the values of design tokens that provide colors and fonts as CSS custom properties to any descendant components.
9
10
  * @internal
10
11
  */
11
12
  class NimbleThemeProvider extends FoundationElement {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/theme-provider/index.ts"],"names":[],"mappings":";AAAA,OAAO,EACH,YAAY,EAEZ,iBAAiB,EACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAWxC;;;GAGG;AACH,MAAM,mBAAoB,SAAQ,iBAAiB;IAMxC,YAAY,CACf,KAA8B,EAC9B,IAA6B;QAE7B,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,IAAI,EAAE;YACrC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,IAAqC,CAAC,CAAC;SAClE;aAAM;YACH,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;SAC9B;IACL,CAAC;CACJ;AAZG;IAHC,IAAI,CAAC;QACF,SAAS,EAAE,OAAO;KACrB,CAAC;kDACyB;AAc/B,MAAM,0BAA0B,GAAG,mBAAmB,CAAC,OAAO,CAAC;IAC3D,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
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/theme-provider/index.ts"],"names":[],"mappings":";AAAA,OAAO,EACH,YAAY,EAEZ,iBAAiB,EACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAWxC;;;;GAIG;AACH,MAAM,mBAAoB,SAAQ,iBAAiB;IAMxC,YAAY,CACf,KAA8B,EAC9B,IAA6B;QAE7B,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,IAAI,EAAE;YACrC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,IAAqC,CAAC,CAAC;SAClE;aAAM;YACH,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;SAC9B;IACL,CAAC;CACJ;AAZG;IAHC,IAAI,CAAC;QACF,SAAS,EAAE,OAAO;KACrB,CAAC;kDACyB;AAc/B,MAAM,0BAA0B,GAAG,mBAAmB,CAAC,OAAO,CAAC;IAC3D,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ni/nimble-components",
3
- "version": "1.0.0-beta.122",
3
+ "version": "1.0.0-beta.123",
4
4
  "description": "Styled web components for the NI Nimble Design System",
5
5
  "scripts": {
6
6
  "build": "npm run build-components && npm run build-storybook",
@@ -43,7 +43,7 @@
43
43
  "@microsoft/fast-components": "^2.0.0",
44
44
  "@microsoft/fast-element": "^1.6.1",
45
45
  "@microsoft/fast-foundation": "^2.22.0",
46
- "@ni/nimble-tokens": "^1.0.0-beta.37",
46
+ "@ni/nimble-tokens": "^1.0.0-beta.38",
47
47
  "hex-rgb": "^5.0.0",
48
48
  "lodash-es": "^4.17.21"
49
49
  },