@ni/nimble-components 9.0.3 → 10.0.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.
Files changed (62) hide show
  1. package/dist/all-components-bundle.js +81 -88
  2. package/dist/all-components-bundle.js.map +1 -1
  3. package/dist/all-components-bundle.min.js +798 -807
  4. package/dist/all-components-bundle.min.js.map +1 -1
  5. package/dist/esm/button/index.js +1 -1
  6. package/dist/esm/button/styles.js +2 -2
  7. package/dist/esm/button/types.d.ts +0 -1
  8. package/dist/esm/button/types.js.map +1 -1
  9. package/dist/esm/drawer/index.js +16 -16
  10. package/dist/esm/drawer/types.d.ts +12 -12
  11. package/dist/esm/drawer/types.js +10 -12
  12. package/dist/esm/drawer/types.js.map +1 -1
  13. package/dist/esm/icon-base/types.d.ts +7 -7
  14. package/dist/esm/icon-base/types.js +6 -7
  15. package/dist/esm/icon-base/types.js.map +1 -1
  16. package/dist/esm/menu-button/index.js +1 -1
  17. package/dist/esm/menu-button/types.d.ts +0 -1
  18. package/dist/esm/menu-button/types.js +4 -1
  19. package/dist/esm/menu-button/types.js.map +1 -1
  20. package/dist/esm/nimble-components/src/button/types.d.ts +0 -1
  21. package/dist/esm/nimble-components/src/drawer/types.d.ts +12 -12
  22. package/dist/esm/nimble-components/src/icon-base/types.d.ts +7 -7
  23. package/dist/esm/nimble-components/src/menu-button/types.d.ts +0 -1
  24. package/dist/esm/nimble-components/src/patterns/button/types.d.ts +6 -6
  25. package/dist/esm/nimble-components/src/text-area/types.d.ts +5 -6
  26. package/dist/esm/nimble-components/src/text-field/types.d.ts +7 -14
  27. package/dist/esm/nimble-components/src/theme-provider/types.d.ts +6 -6
  28. package/dist/esm/nimble-components/src/toggle-button/types.d.ts +0 -1
  29. package/dist/esm/nimble-components/src/tree-view/types.d.ts +6 -6
  30. package/dist/esm/nimble-components/src/utilities/style/theme.d.ts +5 -5
  31. package/dist/esm/patterns/button/styles.js +3 -3
  32. package/dist/esm/patterns/button/types.d.ts +6 -6
  33. package/dist/esm/patterns/button/types.js +5 -6
  34. package/dist/esm/patterns/button/types.js.map +1 -1
  35. package/dist/esm/text-area/index.js +1 -1
  36. package/dist/esm/text-area/styles.js +2 -2
  37. package/dist/esm/text-area/types.d.ts +5 -6
  38. package/dist/esm/text-area/types.js +4 -5
  39. package/dist/esm/text-area/types.js.map +1 -1
  40. package/dist/esm/text-field/index.js +1 -1
  41. package/dist/esm/text-field/styles.js +5 -5
  42. package/dist/esm/text-field/types.d.ts +7 -14
  43. package/dist/esm/text-field/types.js +6 -7
  44. package/dist/esm/text-field/types.js.map +1 -1
  45. package/dist/esm/theme-provider/design-tokens.js +5 -5
  46. package/dist/esm/theme-provider/index.js +2 -2
  47. package/dist/esm/theme-provider/types.d.ts +6 -6
  48. package/dist/esm/theme-provider/types.js +5 -6
  49. package/dist/esm/theme-provider/types.js.map +1 -1
  50. package/dist/esm/toggle-button/index.js +1 -1
  51. package/dist/esm/toggle-button/types.d.ts +0 -1
  52. package/dist/esm/toggle-button/types.js +4 -0
  53. package/dist/esm/toggle-button/types.js.map +1 -1
  54. package/dist/esm/tree-view/index.js +4 -4
  55. package/dist/esm/tree-view/types.d.ts +6 -6
  56. package/dist/esm/tree-view/types.js +5 -6
  57. package/dist/esm/tree-view/types.js.map +1 -1
  58. package/dist/esm/utilities/style/theme.d.ts +5 -5
  59. package/dist/esm/utilities/style/theme.js +3 -3
  60. package/dist/esm/utilities/style/theme.js.map +1 -1
  61. package/dist/tokens.scss +1 -1
  62. package/package.json +1 -1
@@ -14,7 +14,7 @@ export class Button extends FoundationButton {
14
14
  * @remarks
15
15
  * HTML Attribute: appearance
16
16
  */
17
- this.appearance = ButtonAppearance.Outline;
17
+ this.appearance = ButtonAppearance.outline;
18
18
  /**
19
19
  * @public
20
20
  * @remarks
@@ -6,7 +6,7 @@ import { appearanceBehavior } from '../utilities/style/appearance';
6
6
  import { ButtonAppearance } from './types';
7
7
  // prettier-ignore
8
8
  export const styles = buttonStyles
9
- .withBehaviors(appearanceBehavior(ButtonAppearance.Outline, css `
9
+ .withBehaviors(appearanceBehavior(ButtonAppearance.outline, css `
10
10
  :host(.primary) .control {
11
11
  box-shadow: 0px 0px 0px ${borderWidth} rgba(${actionRgbPartialColor}, 0.3) inset;
12
12
  }
@@ -26,7 +26,7 @@ export const styles = buttonStyles
26
26
  :host(.primary) .control[disabled] {
27
27
  box-shadow: none;
28
28
  }
29
- `), appearanceBehavior(ButtonAppearance.Block, css `
29
+ `), appearanceBehavior(ButtonAppearance.block, css `
30
30
  :host(.primary) .control {
31
31
  background-clip: padding-box;
32
32
  border-color: rgba(${actionRgbPartialColor}, 0.3);
@@ -3,6 +3,5 @@
3
3
  * @public
4
4
  */
5
5
  import type { Button } from '@microsoft/fast-foundation';
6
- export type { ButtonAppearanceAttribute } from '../patterns/button/types';
7
6
  export { ButtonAppearance } from '../patterns/button/types';
8
7
  export declare type ButtonType = Button['type'];
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/button/types.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/button/types.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -16,8 +16,8 @@ const animationDurationWhenDisabledMilliseconds = 0.001;
16
16
  export class Drawer extends FoundationDialog {
17
17
  constructor() {
18
18
  super(...arguments);
19
- this.location = DrawerLocation.Left;
20
- this.state = DrawerState.Closed;
19
+ this.location = DrawerLocation.left;
20
+ this.state = DrawerState.closed;
21
21
  /**
22
22
  * True to prevent dismissing the drawer when the overlay outside the drawer is clicked.
23
23
  * Only applicable when 'modal' is set to true (i.e. when the overlay is used).
@@ -61,11 +61,11 @@ export class Drawer extends FoundationDialog {
61
61
  }
62
62
  show() {
63
63
  // Not calling super.show() as that will immediately show the drawer, whereas 'Opening' state will animate
64
- this.state = DrawerState.Opening;
64
+ this.state = DrawerState.opening;
65
65
  }
66
66
  hide() {
67
67
  // Not calling super.hide() as that will immediately hide the drawer, whereas 'Closing' state will animate
68
- this.state = DrawerState.Closing;
68
+ this.state = DrawerState.closing;
69
69
  }
70
70
  /**
71
71
  * Handler for overlay clicks (user-initiated dismiss requests) only.
@@ -98,11 +98,11 @@ export class Drawer extends FoundationDialog {
98
98
  }
99
99
  }
100
100
  onHiddenChanged() {
101
- if (this.hidden && this.state !== DrawerState.Closed) {
102
- this.state = DrawerState.Closed;
101
+ if (this.hidden && this.state !== DrawerState.closed) {
102
+ this.state = DrawerState.closed;
103
103
  }
104
- else if (!this.hidden && this.state === DrawerState.Closed) {
105
- this.state = DrawerState.Opened;
104
+ else if (!this.hidden && this.state === DrawerState.closed) {
105
+ this.state = DrawerState.opened;
106
106
  }
107
107
  }
108
108
  onLocationChanged() {
@@ -112,18 +112,18 @@ export class Drawer extends FoundationDialog {
112
112
  if (this.isConnected) {
113
113
  this.cancelCurrentAnimation();
114
114
  switch (this.state) {
115
- case DrawerState.Opening:
115
+ case DrawerState.opening:
116
116
  this.animateOpening();
117
117
  this.hidden = false;
118
118
  break;
119
- case DrawerState.Opened:
119
+ case DrawerState.opened:
120
120
  this.hidden = false;
121
121
  break;
122
- case DrawerState.Closing:
122
+ case DrawerState.closing:
123
123
  this.hidden = false;
124
124
  this.animateClosing();
125
125
  break;
126
- case DrawerState.Closed:
126
+ case DrawerState.closed:
127
127
  this.hidden = true;
128
128
  break;
129
129
  default:
@@ -152,7 +152,7 @@ export class Drawer extends FoundationDialog {
152
152
  this.animateOpenClose(false);
153
153
  }
154
154
  else {
155
- this.state = DrawerState.Closed;
155
+ this.state = DrawerState.closed;
156
156
  }
157
157
  }
158
158
  animateOpenClose(drawerOpening) {
@@ -162,7 +162,7 @@ export class Drawer extends FoundationDialog {
162
162
  : animationConfig.slideOutOptions),
163
163
  duration: this.animationDurationMilliseconds
164
164
  };
165
- const drawerKeyframes = this.location === DrawerLocation.Right
165
+ const drawerKeyframes = this.location === DrawerLocation.right
166
166
  ? animationConfig.slideRightKeyframes
167
167
  : animationConfig.slideLeftKeyframes;
168
168
  const dialogAnimation = new AnimateTo(this.dialog, undefined, options);
@@ -177,8 +177,8 @@ export class Drawer extends FoundationDialog {
177
177
  const animationGroup = new AnimateGroup(animations);
178
178
  animationGroup.onFinish = () => {
179
179
  this.state = drawerOpening
180
- ? DrawerState.Opened
181
- : DrawerState.Closed;
180
+ ? DrawerState.opened
181
+ : DrawerState.closed;
182
182
  };
183
183
  this.animationGroup = animationGroup;
184
184
  animationGroup.play();
@@ -1,12 +1,12 @@
1
- export declare enum DrawerLocation {
2
- Left = "left",
3
- Right = "right"
4
- }
5
- export declare type DrawerLocationAttribute = `${DrawerLocation}`;
6
- export declare enum DrawerState {
7
- Opening = "opening",
8
- Opened = "opened",
9
- Closing = "closing",
10
- Closed = "closed"
11
- }
12
- export declare type DrawerStateAttribute = `${DrawerState}`;
1
+ export declare const DrawerLocation: {
2
+ readonly left: "left";
3
+ readonly right: "right";
4
+ };
5
+ export declare type DrawerLocation = typeof DrawerLocation[keyof typeof DrawerLocation];
6
+ export declare const DrawerState: {
7
+ readonly opening: "opening";
8
+ readonly opened: "opened";
9
+ readonly closing: "closing";
10
+ readonly closed: "closed";
11
+ };
12
+ export declare type DrawerState = typeof DrawerState[keyof typeof DrawerState];
@@ -1,13 +1,11 @@
1
- export var DrawerLocation;
2
- (function (DrawerLocation) {
3
- DrawerLocation["Left"] = "left";
4
- DrawerLocation["Right"] = "right";
5
- })(DrawerLocation || (DrawerLocation = {}));
6
- export var DrawerState;
7
- (function (DrawerState) {
8
- DrawerState["Opening"] = "opening";
9
- DrawerState["Opened"] = "opened";
10
- DrawerState["Closing"] = "closing";
11
- DrawerState["Closed"] = "closed";
12
- })(DrawerState || (DrawerState = {}));
1
+ export const DrawerLocation = {
2
+ left: 'left',
3
+ right: 'right'
4
+ };
5
+ export const DrawerState = {
6
+ opening: 'opening',
7
+ opened: 'opened',
8
+ closing: 'closing',
9
+ closed: 'closed'
10
+ };
13
11
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/drawer/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;CACR,CAAC;AAGX,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACV,CAAC"}
@@ -2,10 +2,10 @@
2
2
  * Predefined icon status states
3
3
  * @public
4
4
  */
5
- export declare enum IconStatus {
6
- Fail = "fail",
7
- Warning = "warning",
8
- Pass = "pass",
9
- Regular = "regular"
10
- }
11
- export declare type IconStatusAttribute = `${IconStatus}`;
5
+ export declare const IconStatus: {
6
+ readonly fail: "fail";
7
+ readonly warning: "warning";
8
+ readonly pass: "pass";
9
+ readonly regular: "regular";
10
+ };
11
+ export declare type IconStatus = typeof IconStatus[keyof typeof IconStatus];
@@ -2,11 +2,10 @@
2
2
  * Predefined icon status states
3
3
  * @public
4
4
  */
5
- export var IconStatus;
6
- (function (IconStatus) {
7
- IconStatus["Fail"] = "fail";
8
- IconStatus["Warning"] = "warning";
9
- IconStatus["Pass"] = "pass";
10
- IconStatus["Regular"] = "regular";
11
- })(IconStatus || (IconStatus = {}));
5
+ export const IconStatus = {
6
+ fail: 'fail',
7
+ warning: 'warning',
8
+ pass: 'pass',
9
+ regular: 'regular'
10
+ };
12
11
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/icon-base/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACtB,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;CACZ,CAAC"}
@@ -12,7 +12,7 @@ import { MenuButtonPosition } from './types';
12
12
  export class MenuButton extends FoundationElement {
13
13
  constructor() {
14
14
  super(...arguments);
15
- this.appearance = ButtonAppearance.Outline;
15
+ this.appearance = ButtonAppearance.outline;
16
16
  this.disabled = false;
17
17
  this.contentHidden = false;
18
18
  /**
@@ -2,7 +2,6 @@
2
2
  * Types of menu button appearance.
3
3
  * @public
4
4
  */
5
- export type { ButtonAppearanceAttribute } from '../patterns/button/types';
6
5
  export { ButtonAppearance } from '../patterns/button/types';
7
6
  /**
8
7
  * The options of where to position the menu relative to the menu button.
@@ -1,8 +1,11 @@
1
+ /**
2
+ * Types of menu button appearance.
3
+ * @public
4
+ */
1
5
  export { ButtonAppearance } from '../patterns/button/types';
2
6
  /**
3
7
  * The options of where to position the menu relative to the menu button.
4
8
  */
5
- // eslint-disable-next-line @typescript-eslint/naming-convention
6
9
  export const MenuButtonPosition = {
7
10
  above: 'above',
8
11
  below: 'below',
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/menu-button/types.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAC9B,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;CACN,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/menu-button/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAC9B,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;CACN,CAAC"}
@@ -3,6 +3,5 @@
3
3
  * @public
4
4
  */
5
5
  import type { Button } from '@microsoft/fast-foundation';
6
- export type { ButtonAppearanceAttribute } from '../patterns/button/types';
7
6
  export { ButtonAppearance } from '../patterns/button/types';
8
7
  export declare type ButtonType = Button['type'];
@@ -1,12 +1,12 @@
1
- export declare enum DrawerLocation {
2
- Left = "left",
3
- Right = "right"
4
- }
5
- export declare type DrawerLocationAttribute = `${DrawerLocation}`;
6
- export declare enum DrawerState {
7
- Opening = "opening",
8
- Opened = "opened",
9
- Closing = "closing",
10
- Closed = "closed"
11
- }
12
- export declare type DrawerStateAttribute = `${DrawerState}`;
1
+ export declare const DrawerLocation: {
2
+ readonly left: "left";
3
+ readonly right: "right";
4
+ };
5
+ export declare type DrawerLocation = typeof DrawerLocation[keyof typeof DrawerLocation];
6
+ export declare const DrawerState: {
7
+ readonly opening: "opening";
8
+ readonly opened: "opened";
9
+ readonly closing: "closing";
10
+ readonly closed: "closed";
11
+ };
12
+ export declare type DrawerState = typeof DrawerState[keyof typeof DrawerState];
@@ -2,10 +2,10 @@
2
2
  * Predefined icon status states
3
3
  * @public
4
4
  */
5
- export declare enum IconStatus {
6
- Fail = "fail",
7
- Warning = "warning",
8
- Pass = "pass",
9
- Regular = "regular"
10
- }
11
- export declare type IconStatusAttribute = `${IconStatus}`;
5
+ export declare const IconStatus: {
6
+ readonly fail: "fail";
7
+ readonly warning: "warning";
8
+ readonly pass: "pass";
9
+ readonly regular: "regular";
10
+ };
11
+ export declare type IconStatus = typeof IconStatus[keyof typeof IconStatus];
@@ -2,7 +2,6 @@
2
2
  * Types of menu button appearance.
3
3
  * @public
4
4
  */
5
- export type { ButtonAppearanceAttribute } from '../patterns/button/types';
6
5
  export { ButtonAppearance } from '../patterns/button/types';
7
6
  /**
8
7
  * The options of where to position the menu relative to the menu button.
@@ -22,9 +22,9 @@ export interface IButton {
22
22
  * Types of button appearance.
23
23
  * @public
24
24
  */
25
- export declare enum ButtonAppearance {
26
- Outline = "outline",
27
- Ghost = "ghost",
28
- Block = "block"
29
- }
30
- export declare type ButtonAppearanceAttribute = `${ButtonAppearance}`;
25
+ export declare const ButtonAppearance: {
26
+ readonly outline: "outline";
27
+ readonly ghost: "ghost";
28
+ readonly block: "block";
29
+ };
30
+ export declare type ButtonAppearance = typeof ButtonAppearance[keyof typeof ButtonAppearance];
@@ -1,8 +1,7 @@
1
1
  import { TextAreaResize } from '@microsoft/fast-foundation';
2
2
  export { TextAreaResize };
3
- export declare type TextAreaResizeAttribute = `${TextAreaResize}`;
4
- export declare enum TextAreaAppearance {
5
- Outline = "outline",
6
- Block = "block"
7
- }
8
- export declare type TextAreaAppearanceAttribute = `${TextAreaAppearance}`;
3
+ export declare const TextAreaAppearance: {
4
+ readonly outline: "outline";
5
+ readonly block: "block";
6
+ };
7
+ export declare type TextAreaAppearance = typeof TextAreaAppearance[keyof typeof TextAreaAppearance];
@@ -1,22 +1,15 @@
1
1
  import { TextFieldType } from '@microsoft/fast-foundation';
2
- /**
3
- * Values for the 'type' attribute of the text field.
4
- */
5
- export declare type TextFieldTypeAttribute = `${TextFieldType}`;
6
2
  /**
7
3
  * Values for the 'type' property of the text field.
8
4
  */
9
5
  export { TextFieldType };
10
- /**
11
- * Values for the 'appearance' attribute of the text field.
12
- */
13
- export declare type TextFieldAppearanceAttribute = `${TextFieldAppearance}`;
14
6
  /**
15
7
  * Values for the 'appearance' property of the text field
16
8
  */
17
- export declare enum TextFieldAppearance {
18
- Underline = "underline",
19
- Outline = "outline",
20
- Block = "block",
21
- Frameless = "frameless"
22
- }
9
+ export declare const TextFieldAppearance: {
10
+ readonly underline: "underline";
11
+ readonly outline: "outline";
12
+ readonly block: "block";
13
+ readonly frameless: "frameless";
14
+ };
15
+ export declare type TextFieldAppearance = typeof TextFieldAppearance[keyof typeof TextFieldAppearance];
@@ -1,6 +1,6 @@
1
- export declare enum Theme {
2
- Light = "light",
3
- Dark = "dark",
4
- Color = "color"
5
- }
6
- export declare type ThemeAttribute = `${Theme}`;
1
+ export declare const Theme: {
2
+ readonly light: "light";
3
+ readonly dark: "dark";
4
+ readonly color: "color";
5
+ };
6
+ export declare type Theme = typeof Theme[keyof typeof Theme];
@@ -2,5 +2,4 @@
2
2
  * Types of toggle button appearance.
3
3
  * @public
4
4
  */
5
- export type { ButtonAppearanceAttribute } from '../patterns/button/types';
6
5
  export { ButtonAppearance } from '../patterns/button/types';
@@ -1,8 +1,8 @@
1
1
  export declare const pinnedSelectedAttribute = "pinned-selected";
2
2
  export declare const groupSelectedAttribute = "group-selected";
3
- export declare enum TreeViewSelectionMode {
4
- All = "all",
5
- LeavesOnly = "leaves-only",
6
- None = "none"
7
- }
8
- export declare type TreeViewSelectionModeAttribute = `${TreeViewSelectionMode}`;
3
+ export declare const TreeViewSelectionMode: {
4
+ readonly all: "all";
5
+ readonly leavesOnly: "leaves-only";
6
+ readonly none: "none";
7
+ };
8
+ export declare type TreeViewSelectionMode = typeof TreeViewSelectionMode[keyof typeof TreeViewSelectionMode];
@@ -1,8 +1,8 @@
1
1
  import { Behavior, ElementStyles, FASTElement } from '@microsoft/fast-element';
2
2
  import type { Theme } from '../../theme-provider/types';
3
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;
4
+ export declare type DarkStyleOrAlias = ElementStyles | null | Extract<Theme, 'light'>;
5
+ export declare type ColorStyleOrAlias = ElementStyles | null | Extract<Theme, 'light' | 'dark'>;
6
6
  /**
7
7
  * Behavior to conditionally apply theme-based stylesheets.
8
8
  */
@@ -32,9 +32,9 @@ declare class ThemeStyleSheetBehavior implements Behavior {
32
32
  * css`
33
33
  * // ...
34
34
  * `.withBehaviors(new ThemeStyleSheetBehavior(
35
- * css`:host { ... Theme.Light style... }`),
36
- * null, // No style needed for Theme.Dark style
37
- * Theme.Light // For the Theme.Color style, re-use the previously set Theme.Light style
35
+ * css`:host { ... Theme.light style... }`),
36
+ * null, // No style needed for Theme.dark style
37
+ * Theme.light // For the Theme.color style, re-use the previously set Theme.light style
38
38
  * )
39
39
  * ```
40
40
  */
@@ -125,7 +125,7 @@ export const styles = css `
125
125
  }
126
126
  `
127
127
  // prettier-ignore
128
- .withBehaviors(appearanceBehavior(ButtonAppearance.Outline, css `
128
+ .withBehaviors(appearanceBehavior(ButtonAppearance.outline, css `
129
129
  .control {
130
130
  background-color: transparent;
131
131
  border-color: rgba(${actionRgbPartialColor}, 0.3);
@@ -150,7 +150,7 @@ export const styles = css `
150
150
  background-color: transparent;
151
151
  border-color: rgba(${borderRgbPartialColor}, 0.2);
152
152
  }
153
- `), appearanceBehavior(ButtonAppearance.Ghost, css `
153
+ `), appearanceBehavior(ButtonAppearance.ghost, css `
154
154
  .control {
155
155
  background-color: transparent;
156
156
  border-color: transparent;
@@ -175,7 +175,7 @@ export const styles = css `
175
175
  background-color: transparent;
176
176
  border-color: transparent;
177
177
  }
178
- `), appearanceBehavior(ButtonAppearance.Block, css `
178
+ `), appearanceBehavior(ButtonAppearance.block, css `
179
179
  .control {
180
180
  background-color: rgba(${borderRgbPartialColor}, 0.1);
181
181
  border-color: transparent;
@@ -22,9 +22,9 @@ export interface IButton {
22
22
  * Types of button appearance.
23
23
  * @public
24
24
  */
25
- export declare enum ButtonAppearance {
26
- Outline = "outline",
27
- Ghost = "ghost",
28
- Block = "block"
29
- }
30
- export declare type ButtonAppearanceAttribute = `${ButtonAppearance}`;
25
+ export declare const ButtonAppearance: {
26
+ readonly outline: "outline";
27
+ readonly ghost: "ghost";
28
+ readonly block: "block";
29
+ };
30
+ export declare type ButtonAppearance = typeof ButtonAppearance[keyof typeof ButtonAppearance];
@@ -2,10 +2,9 @@
2
2
  * Types of button appearance.
3
3
  * @public
4
4
  */
5
- export var ButtonAppearance;
6
- (function (ButtonAppearance) {
7
- ButtonAppearance["Outline"] = "outline";
8
- ButtonAppearance["Ghost"] = "ghost";
9
- ButtonAppearance["Block"] = "block";
10
- })(ButtonAppearance || (ButtonAppearance = {}));
5
+ export const ButtonAppearance = {
6
+ outline: 'outline',
7
+ ghost: 'ghost',
8
+ block: 'block'
9
+ };
11
10
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/patterns/button/types.ts"],"names":[],"mappings":"AAuBA;;;GAGG;AACH,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IACxB,uCAAmB,CAAA;IACnB,mCAAe,CAAA;IACf,mCAAe,CAAA;AACnB,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/patterns/button/types.ts"],"names":[],"mappings":"AAuBA;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;CACR,CAAC"}
@@ -16,7 +16,7 @@ export class TextArea extends FoundationTextArea {
16
16
  * @remarks
17
17
  * HTML Attribute: appearance
18
18
  */
19
- this.appearance = TextAreaAppearance.Outline;
19
+ this.appearance = TextAreaAppearance.outline;
20
20
  }
21
21
  }
22
22
  __decorate([
@@ -102,12 +102,12 @@ export const styles = css `
102
102
  }
103
103
  `
104
104
  // prettier-ignore
105
- .withBehaviors(appearanceBehavior(TextAreaAppearance.Outline, css `
105
+ .withBehaviors(appearanceBehavior(TextAreaAppearance.outline, css `
106
106
  .control {
107
107
  border-color: rgba(${borderRgbPartialColor}, 0.3);
108
108
  background-color: transparent;
109
109
  }
110
- `), appearanceBehavior(TextAreaAppearance.Block, css `
110
+ `), appearanceBehavior(TextAreaAppearance.block, css `
111
111
  .control {
112
112
  background-color: rgba(${borderRgbPartialColor}, 0.1);
113
113
  }
@@ -1,8 +1,7 @@
1
1
  import { TextAreaResize } from '@microsoft/fast-foundation';
2
2
  export { TextAreaResize };
3
- export declare type TextAreaResizeAttribute = `${TextAreaResize}`;
4
- export declare enum TextAreaAppearance {
5
- Outline = "outline",
6
- Block = "block"
7
- }
8
- export declare type TextAreaAppearanceAttribute = `${TextAreaAppearance}`;
3
+ export declare const TextAreaAppearance: {
4
+ readonly outline: "outline";
5
+ readonly block: "block";
6
+ };
7
+ export declare type TextAreaAppearance = typeof TextAreaAppearance[keyof typeof TextAreaAppearance];
@@ -1,8 +1,7 @@
1
1
  import { TextAreaResize } from '@microsoft/fast-foundation';
2
2
  export { TextAreaResize };
3
- export var TextAreaAppearance;
4
- (function (TextAreaAppearance) {
5
- TextAreaAppearance["Outline"] = "outline";
6
- TextAreaAppearance["Block"] = "block";
7
- })(TextAreaAppearance || (TextAreaAppearance = {}));
3
+ export const TextAreaAppearance = {
4
+ outline: 'outline',
5
+ block: 'block'
6
+ };
8
7
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/text-area/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,CAAC;AAG1B,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,yCAAmB,CAAA;IACnB,qCAAe,CAAA;AACnB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/text-area/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAC9B,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;CACR,CAAC"}
@@ -17,7 +17,7 @@ export class TextField extends FoundationTextField {
17
17
  * @remarks
18
18
  * HTML Attribute: appearance
19
19
  */
20
- this.appearance = TextFieldAppearance.Underline;
20
+ this.appearance = TextFieldAppearance.underline;
21
21
  }
22
22
  connectedCallback() {
23
23
  super.connectedCallback();